/* ============================================================
   像素幻境 · 深空幻境设计系统 v7
   目录：
   01 设计令牌与重置   02 背景氛围         03 排版
   04 布局             05 顶栏导航(含移动端) 06 Hero/Landing
   07 按钮             08 面板与卡片       09 表单
   10 表格             11 徽章/标签        12 Flash 消息
   13 配额/用量组件     14 页脚/备案        15 动画
   16 滚动条/选区/焦点 17 响应式
   ============================================================ */

/* ---------- 01 设计令牌 ---------- */
:root {
  --bg: #05070f;
  --bg-soft: #0a0f1e;
  --panel: rgba(13, 20, 38, .72);
  --panel-solid: #0d1426;
  --panel-2: rgba(23, 33, 58, .78);
  --border: rgba(140, 170, 230, .14);
  --border-strong: rgba(140, 170, 230, .32);
  --text: #eaf0ff;
  --text-dim: #a8b6d8;
  --muted: #7e8db0;
  --c1: #38e1ff;      /* 青 */
  --c2: #8b8bff;      /* 靛 */
  --c3: #e06cff;      /* 紫 */
  --c4: #3df0b4;      /* 绿 */
  --warn: #ffb454;
  --danger: #ff6b81;
  --grad: linear-gradient(120deg, var(--c1), var(--c2), var(--c3));
  --grad-soft: linear-gradient(120deg, rgba(56,225,255,.14), rgba(139,139,255,.14), rgba(224,108,255,.14));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .5);
  --shadow-glow: 0 8px 32px rgba(88, 120, 255, .35);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --surface-0: rgba(4, 8, 18, .55);
  --surface-1: rgba(10, 15, 30, .7);
  --row-hover: rgba(120, 150, 255, .05);
  --header-bg: rgba(6, 9, 18, .72);
  --scroll-thumb: rgba(120, 150, 220, .25);
  --grid-line: rgba(130, 160, 240, .035);
  --nav-hover: rgba(255, 255, 255, .06);
  --chip-bg: rgba(255, 255, 255, .03);
  --toast-bg: rgba(13, 22, 42, .94);
}

/* ---------- 浅色主题 ---------- */
[data-theme="light"] {
  --bg: #eef2fc;
  --bg-soft: #e3e9f8;
  --panel: rgba(255, 255, 255, .82);
  --panel-solid: #ffffff;
  --panel-2: rgba(240, 244, 255, .94);
  --border: rgba(28, 48, 100, .13);
  --border-strong: rgba(28, 48, 100, .3);
  --text: #17213a;
  --text-dim: #3d4c74;
  --muted: #64718f;
  --grad-soft: linear-gradient(120deg, rgba(56, 190, 255, .18), rgba(139, 139, 255, .18), rgba(224, 108, 255, .16));
  --shadow: 0 18px 46px rgba(70, 90, 160, .13);
  --shadow-glow: 0 10px 34px rgba(90, 120, 255, .26);
  --surface-0: rgba(255, 255, 255, .9);
  --surface-1: rgba(238, 244, 255, .95);
  --row-hover: rgba(90, 120, 255, .07);
  --header-bg: rgba(244, 248, 255, .8);
  --scroll-thumb: rgba(90, 120, 200, .3);
  --grid-line: rgba(40, 60, 120, .05);
  --nav-hover: rgba(20, 40, 90, .06);
  --chip-bg: rgba(255, 255, 255, .65);
  --toast-bg: rgba(22, 30, 55, .96);
}
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .aurora { opacity: .7; }
[data-theme="light"] .flash { color: #fff; }
[data-theme="light"] .site-footer p { color: #6b7ba0; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  font-size: 15.5px;
  letter-spacing: .2px;
}
a { color: var(--c1); text-decoration: none; transition: color .2s; }
a:hover { color: #7feaff; }
code {
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: .12rem .45rem;
  border-radius: 7px;
  color: #ffd77a;
  font-size: .92em;
}
::selection { background: rgba(56, 225, 255, .28); }

/* ---------- 02 背景氛围 ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 560px at 12% -6%, rgba(64, 150, 255, .13), transparent 62%),
    radial-gradient(820px 520px at 88% 4%, rgba(180, 90, 255, .12), transparent 62%),
    radial-gradient(1000px 640px at 50% 108%, rgba(56, 225, 255, .08), transparent 66%),
    radial-gradient(700px 480px at 96% 78%, rgba(255, 122, 200, .07), transparent 62%);
  animation: auroraShift 22s ease-in-out infinite alternate;
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- 03 排版 ---------- */
h1, h2, h3 { line-height: 1.3; font-weight: 700; }
.page-title {
  font-size: 1.7rem; margin: 1.7rem 0 1.2rem; letter-spacing: .5px;
  background: var(--grad); background-size: 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueSlide 8s linear infinite;
}
.sub-title { margin: .9rem 0 .5rem; color: var(--text-dim); font-size: .92rem; font-weight: 600; }
.muted { color: var(--muted); font-size: .88rem; margin-top: .8rem; }
.empty { color: var(--muted); padding: .6rem 0; }

/* ---------- 04 布局 ---------- */
.container { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- 05 顶栏导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem 1.25rem; max-width: 1000px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 1.18rem; font-weight: 800; letter-spacing: 1px; color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: 1rem;
  box-shadow: 0 0 18px rgba(120, 140, 255, .45);
}
.nav { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.nav a {
  color: var(--text-dim); font-size: .93rem; padding: .42rem .78rem;
  border-radius: 999px; transition: all .2s;
}
.nav a:hover { color: #fff; background: var(--nav-hover); text-decoration: none; }
.nav a.active { color: #fff; background: linear-gradient(120deg, rgba(56,225,255,.18), rgba(139,139,255,.18)); box-shadow: inset 0 0 0 1px rgba(120,170,255,.25); }
.user-badge {
  color: var(--text); font-weight: 700; font-size: .9rem;
  padding: .42rem .78rem; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid rgba(120,160,255,.2);
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; width: 40px; height: 40px;
  font-size: 1.1rem; cursor: pointer;
}

/* ---------- 06 Hero / Landing ---------- */
.landing { position: relative; min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero { position: relative; z-index: 1; text-align: center; padding: 3rem 0 2rem; animation: rise .8s cubic-bezier(.22,.8,.32,1) both; }
.hero-small { padding: 2.2rem 0 .8rem; }
.hero-eyebrow {
  display: inline-block; letter-spacing: 5px; font-size: .8rem; color: var(--c1);
  padding: .35rem 1.1rem; border-radius: 999px;
  border: 1px solid rgba(56,225,255,.3); background: rgba(56,225,255,.07);
  margin-bottom: 1.1rem; animation: pulseGlow 3.4s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(2.7rem, 8vw, 5rem); font-weight: 900; letter-spacing: 6px; line-height: 1.15;
  background: var(--grad); background-size: 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueSlide 9s linear infinite;
  filter: drop-shadow(0 6px 30px rgba(120, 130, 255, .35));
}
.tagline { color: var(--text-dim); margin: 1rem 0 1.6rem; letter-spacing: 3px; font-size: .95rem; }
.hero-chips { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: -0.4rem 0 1.8rem; }
.chip {
  font-size: .82rem; color: var(--text-dim); padding: .32rem .9rem;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--chip-bg);
}
.hello { color: var(--text-dim); margin: .7rem 0 0; }
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- 07 按钮 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem 1.15rem; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; font-size: .92rem;
  transition: transform .16s, box-shadow .2s, background .2s, border-color .2s;
  overflow: hidden; user-select: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.35); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary {
  border: none; color: #fff; font-weight: 700;
  background: linear-gradient(120deg, #0ea5e9, #6366f1, #b556e0); background-size: 180%;
  box-shadow: 0 6px 22px rgba(90, 110, 255, .35);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(90, 110, 255, .5); }
.btn-danger { border: none; color: #fff; background: linear-gradient(120deg, #e5484d, #d63563); }
.btn-danger:hover { box-shadow: 0 8px 26px rgba(229, 72, 77, .4); }
.btn-ghost { background: transparent; }
.btn-lg { padding: .78rem 1.7rem; font-size: 1rem; letter-spacing: 2px; border-radius: 14px; }
.btn-sm { padding: .32rem .78rem; font-size: .82rem; border-radius: 10px; }

/* ---------- 08 面板与卡片 ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.06), transparent 40%);
}
.panel > * { position: relative; }
.panel h2 { font-size: 1.04rem; color: var(--text); margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.panel h2::before {
  content: ""; width: 4px; height: 1.05em; border-radius: 4px;
  background: var(--grad); box-shadow: 0 0 10px rgba(120,140,255,.5);
}
.card-title { font-size: 1.1rem; color: var(--text); margin-bottom: 1rem; letter-spacing: 3px; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.15rem; padding-bottom: 3rem; }
.card {
  position: relative; display: block; padding: 1.55rem;
  border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255,255,255,.05), rgba(255,255,255,0) 45%) padding-box,
    var(--grad-soft) padding-box,
    linear-gradient(135deg, rgba(56,225,255,.5), rgba(139,139,255,.5), rgba(224,108,255,.5)) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s;
  animation: rise .6s cubic-bezier(.22,.8,.32,1) both;
}
.cards .card:nth-child(1) { animation-delay: .05s; }
.cards .card:nth-child(2) { animation-delay: .13s; }
.cards .card:nth-child(3) { animation-delay: .21s; }
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow-glow); text-decoration: none; }
.card h2 { font-size: 1.18rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.card h2::before { display: none; }
.card p { color: var(--text-dim); font-size: .91rem; }
.card-go {
  display: inline-flex; align-items: center; gap: .3rem; margin-top: .95rem;
  color: var(--c1); font-size: .88rem; font-weight: 600;
  transition: gap .2s;
}
.card:hover .card-go { gap: .6rem; }

/* ---------- 09 表单 ---------- */
.stack { display: flex; flex-direction: column; gap: .95rem; }
.stack label { display: flex; flex-direction: column; gap: .4rem; font-size: .88rem; color: var(--text-dim); }
input[type="text"], input[type="password"], textarea, select {
  padding: .62rem .9rem; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-0);
  color: var(--text); width: 100%; font: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  outline: none; border-color: rgba(56,225,255,.55);
  background: var(--surface-0);
  box-shadow: 0 0 0 4px rgba(56,225,255,.12);
}
textarea { resize: vertical; min-height: 74px; }
select { width: auto; min-width: 180px; }
.upload-form { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.upload-form input[type="file"] { display: none; }
.file-pick {
  position: relative; display: inline-flex; align-items: center;
  padding: .62rem 1.1rem; border: 1.5px dashed rgba(56,225,255,.45);
  border-radius: 12px; color: var(--c1); cursor: pointer; font-size: .9rem;
  background: rgba(56,225,255,.04); transition: background .2s, border-color .2s;
}
.file-pick:hover { background: rgba(56,225,255,.09); border-color: var(--c1); }
.file-pick::after { content: attr(data-name); color: var(--muted); margin-left: .6rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 10 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .68rem .8rem; text-align: left; vertical-align: middle; border-bottom: 1px solid rgba(140,170,230,.09); }
.table th { color: var(--muted); font-weight: 600; font-size: .82rem; letter-spacing: .5px; white-space: nowrap; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--row-hover); }
.fname { word-break: break-all; }
.dim { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.th-right, .td-right { text-align: right !important; }
.td-right { white-space: nowrap; }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
.actions .inline-form { margin-left: 0; }

/* ---------- 11 徽章/标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .14rem .65rem; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--text-dim);
  font-size: .76rem; font-weight: 600; letter-spacing: .3px;
  border: 1px solid var(--border);
}
.badge-admin { background: rgba(139,139,255,.16); color: #c4c4ff; border-color: rgba(139,139,255,.35); }
.badge-ok { background: rgba(61,240,180,.12); color: var(--c4); border-color: rgba(61,240,180,.3); }
.badge-used { background: rgba(255,107,129,.1); color: var(--danger); border-color: rgba(255,107,129,.28); }
.invite-code { font-size: 1rem; letter-spacing: 2.5px; color: var(--c4); }

/* ---------- 12 Flash 消息 ---------- */
.flash-wrap {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 99; display: flex; flex-direction: column; gap: .55rem;
  width: min(92vw, 520px); pointer-events: none;
}
.flash {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.2rem; border-radius: 14px;
  background: var(--toast-bg); border: 1px solid rgba(120, 170, 255, .3);
  color: var(--text); font-size: .92rem; text-align: center;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
  animation: toastIn .35s cubic-bezier(.22,.8,.32,1) both;
  transition: opacity .4s, transform .4s;
}
.flash.fade { opacity: 0; transform: translateY(-10px); }
.flash-stack { display: flex; flex-direction: column; gap: .5rem; align-items: center; margin-bottom: 1.1rem; }
[data-theme="dark"] .flash {
  position: relative; padding-left: 1.45rem;
  background: linear-gradient(90deg, rgba(13, 22, 42, .97), rgba(21, 32, 60, .95));
  border-color: rgba(56, 225, 255, .45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 0 18px rgba(56, 225, 255, .12);
}
[data-theme="dark"] .flash::before {
  content: ""; position: absolute; left: .55rem; top: 9px; bottom: 9px; width: 4px;
  border-radius: 4px; background: var(--grad); box-shadow: 0 0 8px rgba(120, 140, 255, .6);
}
/* 拖拽上传浮层 */
.drop-overlay {
  position: fixed; inset: 0; z-index: 120; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 12, 26, .5); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s;
}
body.dragging .drop-overlay { opacity: 1; visibility: visible; }
.drop-hint {
  padding: 1.5rem 2.6rem; border-radius: 20px; font-size: 1.15rem; font-weight: 700;
  border: 2.5px dashed var(--c1); background: var(--panel-solid);
  box-shadow: 0 0 0 6px rgba(255,255,255,.05), var(--shadow-glow);
  color: var(--text); text-align: center; line-height: 1.7;
}
.drop-hint small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
[data-theme="archive"] .drop-overlay { background: rgba(247, 248, 251, .55); }

/* API 未配置提示 */
.api-warn {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, rgba(255, 107, 129, .13), rgba(255, 180, 84, .09));
  border: 1px solid rgba(255, 107, 129, .45);
  border-radius: 14px; padding: .85rem 1.1rem; margin: .9rem 0;
  color: var(--text); font-size: .95rem; line-height: 1.6;
}
.api-warn.banner { margin: 0 0 .9rem; }
.api-warn a { text-decoration: underline; }
.api-warn .btn { text-decoration: none; }
.api-warn .api-warn-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.api-ok {
  background: linear-gradient(120deg, rgba(61, 240, 180, .12), rgba(56, 225, 255, .07));
  border: 1px solid rgba(61, 240, 180, .4);
  border-radius: 14px; padding: .8rem 1.1rem; margin: .9rem 0;
  color: var(--text); font-size: .95rem;
}
[data-theme="archive"] .api-warn {
  background: linear-gradient(120deg, rgba(196, 106, 66, .12), rgba(222, 172, 96, .08));
  border-color: rgba(196, 106, 66, .5);
}
[data-theme="archive"] .api-ok {
  background: linear-gradient(120deg, rgba(96, 152, 108, .12), rgba(120, 180, 150, .08));
  border-color: rgba(96, 152, 108, .45);
}

/* DSH publish 自动投递提示 */
.publish-note-panel h2 { font-size: 1.02rem; }
.publish-note { display: flex; flex-wrap: wrap; gap: .55rem; }
.pub-item {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--chip-bg); border: 1px solid var(--border);
  border-radius: 999px; padding: .32rem .8rem; font-size: .88rem;
}
.pub-item b { color: var(--c4); font-weight: 700; }
.pub-item small { color: var(--muted); }
[data-theme="archive"] .pub-item b { color: #6b8f3a; }

/* ---------- 13 配额/用量组件 ---------- */
.quota-row { display: flex; flex-direction: column; gap: .55rem; }
.quota-text { color: var(--text-dim); font-size: .92rem; }
.quota-text b { color: var(--text); }
.quota-bar { height: 10px; border-radius: 999px; background: var(--surface-0); border: 1px solid var(--border); overflow: hidden; }
.quota-fill { height: 100%; border-radius: 999px; background: var(--grad); box-shadow: 0 0 12px rgba(100,140,255,.5); transition: width .5s; }
.cost-today { color: var(--c4); font-size: 1.12rem; font-weight: 800; }
.hours-row { display: flex; gap: 3px; align-items: flex-end; height: 96px; }
.hour-cell { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.hour-fill { width: 100%; min-height: 2px; background: var(--grad); border-radius: 3px 3px 0 0; transition: height .4s; opacity: .85; }
.hour-cell:hover .hour-fill { opacity: 1; }
.hour-cell span { font-size: .6rem; color: var(--muted); }
.hour-cell.peak .hour-fill { background: linear-gradient(180deg, #ffb454, #ff6b81); box-shadow: 0 0 8px rgba(255, 120, 90, .4); }
.hour-cell.off .hour-fill { background: linear-gradient(180deg, var(--c4), var(--c1)); }
.hour-cell.mixed .hour-fill { background: linear-gradient(90deg, var(--c4), #ffb454); }
.hours-legend { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; font-size: .8rem; color: var(--text-dim); }
.hours-legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: .35rem; vertical-align: -2px; }
.hours-legend .lg.peak { background: linear-gradient(180deg, #ffb454, #ff6b81); }
.hours-legend .lg.off { background: linear-gradient(180deg, var(--c4), var(--c1)); }
.hours-legend .lg.mixed { background: linear-gradient(90deg, var(--c4), #ffb454); }
.model-chip { display: inline-block; margin: .12rem .2rem .12rem 0; padding: .1rem .5rem; border-radius: 999px; background: var(--grad-soft); border: 1px solid var(--border); font-size: .76rem; color: var(--text-dim); }

/* ---------- 14 页脚/备案 ---------- */
.site-footer { text-align: center; padding: 2rem 1rem 2.4rem; border-top: 1px solid rgba(140,170,230,.07); margin-top: 2rem; }
.footer-inner { display: flex; flex-direction: column; gap: .7rem; align-items: center; }
.site-footer p { color: #5a6a8e; font-size: .87rem; }
.icp {
  display: inline-flex; padding: .42rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(139,139,255,.35);
  background: rgba(139,139,255,.07);
}
.icp a { color: #b9b9ff; font-weight: 700; letter-spacing: 1px; font-size: .9rem; }
.icp a:hover { color: #dcdcff; }

/* ---------- 15 动画 ---------- */
@keyframes auroraShift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-1.5%, 2%) scale(1.07); }
  100% { transform: translate(1.5%, -1.5%) scale(1.04); }
}
@keyframes hueSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,225,255,.25); }
  50%      { box-shadow: 0 0 22px 3px rgba(56,225,255,.18); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.22,.8,.32,1), transform .6s cubic-bezier(.22,.8,.32,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.login-card { animation: floaty 6s ease-in-out infinite; }

/* ---------- 16 滚动条/选区/焦点 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(120,150,220,.4); }
:focus-visible { outline: 2px solid rgba(56,225,255,.6); outline-offset: 2px; }

/* ---------- 16.5 新组件：特性区 / 错误页 / 倾斜卡 ---------- */
body { animation: pageIn .45s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1rem; margin-top: 2.6rem; text-align: left; }
.feature {
  padding: 1.25rem 1.3rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(12px); box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(56,225,255,.35); }
.feature-icon { font-size: 1.7rem; margin-bottom: .6rem; filter: drop-shadow(0 0 10px rgba(120,150,255,.4)); }
.feature h3 { font-size: 1rem; margin-bottom: .3rem; }
.feature p { color: var(--muted); font-size: .84rem; line-height: 1.6; }
/* 使用指南：横向翻页轮播 */
.guide-carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  gap: 1rem; scrollbar-width: none; padding: .1rem 0 .3rem;
}
.guide-carousel::-webkit-scrollbar { display: none; }
.guide-slide {
  flex: 0 0 100%; scroll-snap-align: center;
  background: var(--surface-0); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  color: var(--text-dim); font-size: .95rem; line-height: 1.85;
}
.guide-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .95rem; }
.guide-dots { display: flex; gap: .4rem; align-items: center; }
.guide-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: all .25s; padding: 0; border: none; }
.guide-dot.active { width: 22px; background: var(--grad); }
.btn:disabled { opacity: .38; cursor: default; transform: none; box-shadow: none; }
.mobile-tip {
  max-width: 940px; margin: .9rem auto 0; padding: .7rem 1.1rem;
  border-radius: var(--radius-sm); font-size: .88rem; color: var(--text-dim);
  background: rgba(255, 180, 84, .1); border: 1px solid rgba(255, 180, 84, .35);
  cursor: pointer;
}
.err-art { font-size: 4.6rem; line-height: 1; margin-bottom: .4rem; background: var(--grad); background-size: 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hueSlide 6s linear infinite, floaty 5s ease-in-out infinite; }
.stats { display: flex; gap: 1rem; justify-content: center; margin: 1.2rem 0 2rem; flex-wrap: wrap; }
.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.05rem 1.9rem; text-align: center; min-width: 132px;
  backdrop-filter: blur(12px); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .2s, border-color .2s; will-change: transform;
}
.stat b {
  display: block; font-size: 1.75rem; font-weight: 800; line-height: 1.2;
  background: var(--grad); background-size: 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueSlide 8s linear infinite;
}
.stat span { color: var(--muted); font-size: .85rem; }
.stat:hover { border-color: rgba(56, 225, 255, .35); box-shadow: 0 14px 40px rgba(70, 100, 220, .25); }
.hero-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 80vw); height: 300px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse, rgba(100, 130, 255, .16), transparent 65%); filter: blur(30px); }

/* ---------- 16.6 低性能/低带宽模式（data-lite） ---------- */
[data-lite] body { animation: none; }
[data-lite] .aurora { animation: none; }
[data-lite] .hero-title, [data-lite] .page-title, [data-lite] .stat b,
[data-lite] .brand, [data-lite] .err-art, [data-lite] .hero-eyebrow, [data-lite] .login-card { animation: none; }
[data-lite] .panel, [data-lite] .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-lite] .btn-primary::after { display: none; }
[data-lite] .fx-canvas { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 16.6b 统一结构：沙漏轮廓（宽-窄-宽）+ 侧拱支撑 ---------- */
.collar {
  height: 86px; margin: 0 auto -34px;
  max-width: 1180px;
  background: linear-gradient(180deg, var(--grad-soft), rgba(255,255,255,0));
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 0 0 44px 44px;
  opacity: .85;
}
:root {
  --arc-a: rgba(56, 225, 255, .5);
  --arc-b: rgba(139, 139, 255, .46);
  --arc-c: rgba(224, 108, 255, .5);
  --arc-bump-l: rgba(56, 225, 255, .9);
  --arc-bump-r: rgba(224, 108, 255, .9);
}
[data-theme="archive"] {
  --arc-a: rgba(96, 122, 169, .4);
  --arc-b: rgba(185, 154, 103, .36);
  --arc-c: rgba(241, 199, 197, .45);
  --arc-bump-l: rgba(96, 122, 169, .95);
  --arc-bump-r: rgba(185, 154, 103, .95);
}
.side-arc {
  position: fixed; z-index: -1; pointer-events: none; opacity: .5;
  width: var(--arc-r);
  height: calc(var(--arc-r) * 2);
  transform-origin: 50% 50%;
  transform: translateY(var(--jellyY, 0px)) scaleY(var(--stretch, 1));
  filter: hue-rotate(calc(var(--hue, 0) * 1deg));
  transition: transform .55s cubic-bezier(.25, 1.6, .4, 1), filter .35s linear;
  will-change: transform;
}
/* 左大半圆：直边贴左侧，弧面向内拱（配合右弧形成束腰） */
.side-arc.left {
  left: 0; top: 26%;
  --arc-r: clamp(170px, 18vw, 320px);
  border-radius: 0 var(--arc-r) var(--arc-r) 0;
  background: linear-gradient(135deg, var(--arc-a), var(--arc-b) 55%, var(--arc-c));
  box-shadow: inset 0 0 46px rgba(255, 255, 255, .07), 12px 0 40px rgba(60, 90, 200, .12);
}
/* 右大半圆：直边贴右侧，与左弧错位遥望 */
.side-arc.right {
  right: 0; top: 56%;
  --arc-r: clamp(170px, 18vw, 320px);
  border-radius: var(--arc-r) 0 0 var(--arc-r);
  background: linear-gradient(225deg, var(--arc-a), var(--arc-b) 55%, var(--arc-c));
  box-shadow: inset 0 0 46px rgba(255, 255, 255, .07), -12px 0 40px rgba(200, 90, 160, .12);
}
[data-lite] .side-arc { display: none; }
@media (max-width: 1100px) { .side-arc { display: none; } }
.site-footer {
  max-width: 1120px; margin: 3.6rem auto 0;
  border-radius: 30px 30px 0 0;
  background: var(--grad-soft);
  border-top: 1px solid var(--border);
}
/* 统一节奏：8pt 刻度 */
.container { padding: 0 1.5rem; }
.panel { margin-bottom: 1.5rem; }
.page-title { margin: 1.9rem 0 1.5rem; }
.landing { min-height: calc(100vh - 210px); }

/* ---------- 16.7 档案室主题（鱼档案风格） ---------- */
@font-face { font-family: "Nunito"; src: url("/static/fonts/nunito-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/fonts/nunito-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/fonts/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

[data-theme="archive"] {
  --bg: #f7f8fb;
  --bg-soft: #eef1f8;
  --panel: rgba(255, 255, 255, .84);
  --panel-solid: #ffffff;
  --panel-2: rgba(223, 232, 245, .82);
  --border: rgba(22, 33, 61, .13);
  --border-strong: rgba(96, 122, 169, .45);
  --text: #16213d;
  --text-dim: #3d4c74;
  --muted: #73809a;
  --c1: #607aa9;
  --c2: #b99a67;
  --c3: #f1c7c5;
  --c4: #6f9e7a;
  --grad: linear-gradient(120deg, #607aa9, #8a93c8, #b99a67);
  --grad-soft: linear-gradient(120deg, rgba(96, 122, 169, .14), rgba(185, 154, 103, .12));
  --shadow: 0 14px 34px rgba(34, 52, 92, .12);
  --shadow-glow: 0 10px 26px rgba(96, 122, 169, .32);
  --surface-0: rgba(255, 255, 255, .88);
  --surface-1: rgba(240, 244, 252, .95);
  --row-hover: rgba(96, 122, 169, .1);
  --header-bg: rgba(247, 248, 251, .86);
  --scroll-thumb: rgba(96, 122, 169, .35);
  --grid-line: rgba(22, 33, 61, .05);
  --nav-hover: rgba(96, 122, 169, .12);
  --chip-bg: rgba(255, 255, 255, .7);
  --toast-bg: rgba(255, 255, 255, .96);
  --font: "Nunito", "Zen Maru Gothic", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}
[data-theme="archive"] .flash {
  color: var(--text);
  border-color: rgba(96, 122, 169, .4);
  box-shadow: 0 10px 30px rgba(34, 52, 92, .16);
}
[data-theme="archive"] body { background: var(--bg); }
[data-theme="archive"] .aurora { opacity: .55; }
[data-theme="archive"] .bg-grid { background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 26px 26px; }
[data-theme="archive"] .hero-title, [data-theme="archive"] .page-title,
[data-theme="archive"] .brand, [data-theme="archive"] .panel h2,
[data-theme="archive"] .card h2, [data-theme="archive"] .feature h3,
[data-theme="archive"] .err-art { font-family: "Zen Maru Gothic", "PingFang SC", sans-serif; }
[data-theme="archive"] .btn { border-radius: 14px; }
[data-theme="archive"] .panel, [data-theme="archive"] .card, [data-theme="archive"] .stat { border-radius: 20px; }

/* 贴纸装饰（仅档案室主题显示） */
.archive-stickers { display: none; }
[data-theme="archive"] .archive-stickers { display: block; position: relative; height: 0; pointer-events: none; z-index: 1; }
.archive-seal {
  position: absolute; top: -34px; right: 4px; width: 86px; height: 86px;
  border-radius: 50%; border: 3px solid rgba(185, 154, 103, .8);
  color: rgba(160, 125, 70, .95); background: rgba(247, 248, 251, .6);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: "Zen Maru Gothic", sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: 1px;
  transform: rotate(9deg); box-shadow: 0 0 0 5px rgba(247, 248, 251, .35);
  animation: stickerBob 5s ease-in-out infinite;
}
.archive-scan {
  position: absolute; left: -8%; right: -8%; height: 3px; top: 42%;
  background: linear-gradient(90deg, transparent, rgba(96, 122, 169, .5), transparent);
  animation: scanMove 5s ease-in-out infinite;
}
.archive-wave {
  position: absolute; bottom: -30px; left: 6%; right: 6%; height: 12px; opacity: .8;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 12"><path d="M0 6 Q15 0 30 6 T60 6 T90 6 T120 6" fill="none" stroke="%23607aa9" stroke-width="2.4" stroke-linecap="round"/></svg>') repeat-x;
}
@keyframes stickerBob { 0%, 100% { transform: rotate(9deg) translateY(0); } 50% { transform: rotate(9deg) translateY(-6px); } }
@keyframes scanMove { 0% { top: 28%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 72%; opacity: 0; } }

/* ---------- 17 响应式 ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .container { padding: 0 1.15rem; }
  /* 横向卡片 → 从上到下逐个列开 */
  .stats { flex-direction: column; align-items: stretch; gap: .7rem; }
  .stat { width: 100%; min-width: 0; padding: .8rem 1.3rem; display: flex; align-items: center; justify-content: space-between; }
  .stat b { font-size: 1.35rem; }
  .cards { grid-template-columns: 1fr; gap: .95rem; }
  .card { padding: 1.25rem 1.3rem; }
  .panel { padding: 1.15rem; margin-bottom: 1.4rem; }
  .stack { gap: 1.05rem; }
  .btn, .btn-primary { min-height: 42px; }
  .nav-toggle { min-height: 44px; min-width: 44px; }
  .btn, .nav a, .nav-toggle { touch-action: manipulation; }
  .table-wrap { content-visibility: auto; contain-intrinsic-size: auto 340px; }
  .table th, .table td { padding: .58rem .55rem; }
  .flash-wrap { width: min(94vw, 460px); }
  .hero-title { font-size: clamp(2rem, 9vw, 2.9rem); }
  .hero { padding: 2.2rem 0 1.4rem; }
  .hero-chips { gap: .5rem; }
  .quota-row, .guide-slide { font-size: .9rem; }
  .hours-row { height: 84px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .3rem;
    background: rgba(6, 9, 18, .96); border-bottom: 1px solid var(--border);
    padding: .8rem 1.25rem 1rem; backdrop-filter: blur(18px);
  }
  .nav.open { display: flex; }
  .nav a, .user-badge { padding: .7rem .9rem; }
  .inline-form { margin-left: 0; }
  .hero { padding: 2.4rem 0 1.6rem; }
  .hero-title { letter-spacing: 3px; }
}
@media (pointer: coarse) {
  .fx-canvas { display: none; }
}

/* ============================================================
   v7.1 修订（2026-09-02 视觉/可用性优化）
   01 档案室主题对比度   02 补齐缺失组件类   03 表格与长文本
   04 页脚吸底           05 图例与装饰        06 窄屏优化
   ============================================================ */

/* 01 档案室主题(archive)对比度提升：渐变标题/徽章/说明文字 */
[data-theme="archive"] {
  --grad: linear-gradient(120deg, #2a4380 0%, #574a99 55%, #8a6834 100%);
}
[data-theme="archive"] .hero-title,
[data-theme="archive"] .page-title,
[data-theme="archive"] .stat b,
[data-theme="archive"] .err-art { filter: none; }
[data-theme="archive"] .brand { color: #22304f; }
[data-theme="archive"] .brand:hover { color: #22304f; }
[data-theme="archive"] .badge { background: rgba(74, 96, 150, .12); color: #2b3a5e; border-color: rgba(74, 96, 150, .4); }
[data-theme="archive"] .badge-admin { background: rgba(124, 108, 200, .16); color: #4a3f95; border-color: rgba(124, 108, 200, .45); }
[data-theme="archive"] .badge-ok { background: rgba(76, 158, 108, .14); color: #2e6a44; border-color: rgba(76, 158, 108, .45); }
[data-theme="archive"] .badge-used { background: rgba(196, 90, 90, .12); color: #a03c3c; border-color: rgba(196, 90, 90, .45); }
[data-theme="archive"] .model-chip { color: #37466b; }
[data-theme="archive"] .card p { color: #46557a; }
[data-theme="archive"] .card-go { color: #33518f; }
[data-theme="archive"] .muted, [data-theme="archive"] .fmeta { color: #5d6b88; }
[data-theme="archive"] .tagline, [data-theme="archive"] .hello, [data-theme="archive"] .hero-eyebrow { color: #31405f; }
[data-theme="archive"] .hero-glow { opacity: .5; }

/* 02 补齐缺失组件类（模板早已引用而样式表缺失） */
.kv { display: flex; flex-direction: column; gap: .8rem; }
.kv > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .8rem; font-size: .95rem; }
.kv > div > span:first-child { flex: 0 0 92px; color: var(--muted); font-size: .84rem; }
.kv code.invite-code, .kv b { color: var(--text); font-weight: 700; }
.friend-row { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px dashed var(--border); font-size: .93rem; }
.friend-row:last-child { border-bottom: none; }
.friend-row > span { flex: 1 1 240px; color: var(--text-dim); }
.panel.err-panel { text-align: center; padding: 2.6rem 1.5rem; }
.err-panel .err-art { margin-bottom: .4rem; }
.err-panel h1, .err-panel .page-title { font-size: 2.4rem; margin: .3rem 0 .5rem; }
.err-panel p { max-width: 560px; margin: .45rem auto; }
.err-panel .btn { margin-top: 1.1rem; }
.panel.maint-panel { text-align: center; padding: 3rem 1.5rem; }
.cost-note { margin-top: .55rem !important; padding-top: .6rem; border-top: 1px dashed var(--border); font-size: .85rem; }

/* 03 表格与长文本 */
.fname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
code.invite-code { white-space: nowrap; }
.table-scroll-hint { display: block; text-align: center; font-size: .75rem; color: var(--muted); padding: .5rem 0 .1rem; letter-spacing: .5px; }

/* 04 页脚吸底：短页不留大空白 */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main.container { width: 100%; flex: 1 0 auto; display: flex; flex-direction: column; }
body > .site-footer { flex-shrink: 0; }
.panel.err-panel, .panel.maint-panel { margin: auto 0; }

/* 05 时段图例：空闲时段改冷蓝，与高峰(橙红)/混合(绿橙)拉开区分 */
.hour-cell.off .hour-fill { background: linear-gradient(180deg, #4aa3e8, #3a6fd8); }
.hours-legend .lg.off { background: linear-gradient(180deg, #4aa3e8, #3a6fd8); }

/* 06 窄屏优化 */
@media (max-width: 600px) {
  .hero-chips { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-width: 340px; margin: -.2rem auto 1.4rem; }
  .hero-chips .chip { text-align: center; }
  .kv > div > span:first-child { flex-basis: 72px; }
  .archive-seal { width: 60px; height: 60px; font-size: .58rem; top: -18px; right: 2px; }
  .archive-wave { display: none; }
}
@media (max-width: 560px) {
  .upload-form { flex-direction: column; align-items: stretch; }
  .upload-form > * { width: 100%; }
  .upload-form .file-pick, .upload-form .btn, .upload-form select { justify-content: center; }
  .upload-form select { min-width: 0; }
}

/* ============================================================
   v7.2 AI 助手组件（2026-09-03）：FAB 悬浮 / 侧边栏 / embed /
   附件与产物卡 / 拖拽高亮
   ============================================================ */
#ai-fab{position:fixed;right:1.4rem;bottom:1.4rem;z-index:80;width:56px;height:56px;border-radius:18px;border:none;
  background:linear-gradient(135deg,#0ea5e9,#6366f1,#b556e0);color:#fff;font-size:1.5rem;cursor:pointer;
  box-shadow:0 10px 30px rgba(90,110,255,.45);display:flex;align-items:center;justify-content:center;
  transition:transform .2s, box-shadow .2s}
#ai-fab:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 14px 36px rgba(90,110,255,.6)}
#ai-fab .fab-dot{position:absolute;top:-2px;right:-2px;width:13px;height:13px;border-radius:50%;
  background:#3df0b4;border:2px solid var(--bg)}
#ai-shell{position:fixed;right:1.2rem;bottom:5.4rem;z-index:90;width:400px;max-width:94vw;height:min(660px,76vh);
  display:flex;flex-direction:column;border-radius:20px;overflow:hidden;border:1px solid var(--border-strong);
  background:var(--panel-solid);box-shadow:0 24px 70px rgba(0,0,0,.5);backdrop-filter:blur(16px);
  transform-origin:bottom right;animation:rise .22s cubic-bezier(.22,.8,.32,1) both}
#ai-shell[hidden]{display:none}
.ai-shell-head{display:flex;align-items:center;gap:.5rem;padding:.55rem .9rem;border-bottom:1px solid var(--border);
  font-size:.95rem;font-weight:700;letter-spacing:.5px}
.ai-shell-head .x{margin-left:auto;background:none;border:none;color:var(--muted);font-size:1.1rem;cursor:pointer;padding:.1rem .4rem}
.ai-shell-head .x:hover{color:var(--text)}
#ai-frame{flex:1;border:none;width:100%;background:var(--bg)}
.ai-drag-veil{position:absolute;inset:0;z-index:95;display:flex;align-items:center;justify-content:center;
  background:rgba(6,12,26,.55);color:#fff;font-size:1.05rem;font-weight:700;pointer-events:none;opacity:0;transition:opacity .15s}
#ai-shell.dragging .ai-drag-veil{opacity:1}
/* embed 全屏聊天（/ai?embed=1 在 iframe 内）：弹性填满，无标题时依然居中 */
body.ai-embed .site-header,body.ai-embed .collar,body.ai-embed .site-footer,body.ai-embed .flash-wrap{display:none}
body.ai-embed .page-title{display:none}
body.ai-embed main.container{padding-top:.5rem;padding-bottom:.5rem;display:flex;flex-direction:column}
body.ai-embed main.container>.panel{flex:1;display:flex;flex-direction:column;margin-bottom:0}
body.ai-embed .ai-wrap{flex:1;height:auto;min-height:280px}
/* 附件与产物 */
.ai-attach{display:flex;align-items:center;gap:.45rem;align-self:flex-start;max-width:88%;
  background:var(--chip-bg);border:1px solid var(--border);border-radius:12px;padding:.45rem .8rem;
  font-size:.85rem;color:var(--text-dim)}
.ai-attach b{color:var(--c1);font-weight:600}
.ai-attach .rm{margin-left:.3rem;cursor:pointer;color:var(--muted);background:none;border:none;font-size:.9rem}
.ai-files{margin:.9rem .1rem 0;padding:.7rem .9rem;border:1px solid var(--border);border-radius:14px;
  background:var(--chip-bg)}
.ai-files h4{margin:0 0 .5rem;font-size:.85rem;color:var(--text-dim);font-weight:600;letter-spacing:.4px}
.ai-file{display:flex;align-items:center;gap:.6rem;padding:.4rem 0;border-bottom:1px dashed var(--border);font-size:.88rem}
.ai-file:last-child{border-bottom:none}
.ai-file .fn{flex:1;word-break:break-all;color:var(--text)}
.ai-file .sz{color:var(--muted);font-size:.78rem;white-space:nowrap}
.ai-file a,.ai-file button{font-size:.8rem;white-space:nowrap}
@media (max-width:640px){
  #ai-fab{right:.9rem;bottom:.9rem;width:52px;height:52px}
  #ai-shell{right:.4rem;left:.4rem;bottom:5rem;width:auto;height:min(72vh,640px)}
  .ai-file{flex-wrap:wrap}
}

/* ============================================================
   v7.3 顶栏品牌（2026-09-03）：像素幻境文字渐变流动 + LOGO 居中微调
   ============================================================ */
@keyframes gradFlow{0%{background-position:0% 50%}100%{background-position:300% 50%}}
.brand-name{background:linear-gradient(90deg,var(--c1),var(--c2),var(--c3),var(--c1));
  background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;
  animation:gradFlow 7s linear infinite}
[data-theme="archive"] .brand-name{filter:saturate(1.1)}
/* LOGO 方块内星标视觉居中：glyph 重心偏上，下压补偿 */
.brand-mark{line-height:1;padding-bottom:2px;font-size:1.02rem}
