@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #06080d;
  --bg-2: #0a0e15;
  --surface: #0f141d;
  --surface-2: #141b27;
  --surface-3: #1a2331;
  --line: rgba(160, 190, 230, .13);
  --line-strong: rgba(170, 205, 255, .23);
  --text: #eef4ff;
  --muted: #93a2b8;
  --muted-2: #66758b;
  --accent: #4b8dff;
  --accent-2: #9cc6ff;
  --accent-ink: #061020;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --review: #a78bfa;
  --font-ui: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Space Grotesk', 'PingFang SC', sans-serif;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --sidebar-w: 272px;
  --inspector-w: 380px;
  --topbar-h: 58px;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

[data-theme="claude"] { --accent: #d97757; --accent-2: #f3b39f; --accent-ink: #1b0e09; --surface: #17130f; --surface-2: #211a15; --surface-3: #2b221b; --line: rgba(240, 210, 190, .13); --font-display: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Songti SC', serif; }
[data-theme="openai"] { --accent: #10a37f; --accent-2: #7de2c6; --accent-ink: #03130f; --surface: #0d1515; --surface-2: #12201e; --surface-3: #182b28; }
[data-theme="gemini"] { --accent: #8b7bff; --accent-2: #c4b5ff; --accent-ink: #0d0820; --surface: #121022; --surface-2: #191631; --surface-3: #221d41; }
[data-theme="deepseek"] { --accent: #38bdf8; --accent-2: #a5e8ff; --accent-ink: #04131c; --surface: #0b1420; --surface-2: #101e2e; --surface-3: #16283c; }
[data-theme="glm"] { --accent: #6366f1; --accent-2: #b4b7ff; --accent-ink: #080a2a; }
[data-theme="qwen"] { --accent: #a855f7; --accent-2: #e0b4ff; --accent-ink: #1a0729; }
[data-theme="kimi"] { --accent: #f59e0b; --accent-2: #ffd28a; --accent-ink: #211403; }
[data-theme="mimo"] { --accent: #ec4899; --accent-2: #ffb3d7; --accent-ink: #2a0618; }
[data-theme="grok"] { --accent: #e5e7eb; --accent-2: #ffffff; --accent-ink: #08090b; --surface: #101114; --surface-2: #17191d; --surface-3: #202329; }
[data-theme="hunyuan"] { --accent: #14b8a6; --accent-2: #8ef0e2; --accent-ink: #031715; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg); }
body {
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 12% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, rgba(70, 110, 190, .10), transparent 58%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 38%);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 18px; height: 18px; fill: none; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mini { color: var(--muted-2); font-size: 11px; letter-spacing: .02em; }
.eyebrow { color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 34px); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; }
h2 { font-family: var(--font-display); font-size: 22px; line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }
::selection { background: color-mix(in srgb, var(--accent) 42%, transparent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 22%, transparent); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Intro ------------------------------------------------------------------ */
.intro {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 46%, #0c1b38 0%, #06080d 62%);
  overflow: hidden; pointer-events: none;
}
.intro[hidden] { display: none; }
.intro-glow { position: absolute; width: 62vmin; height: 62vmin; border-radius: 50%; background: radial-gradient(circle, rgba(70, 140, 255, .55), rgba(20, 60, 140, .12) 46%, transparent 70%); filter: blur(12px); animation: intro-glow 1.25s var(--ease) both; }
.intro-ring { position: absolute; width: 44vmin; height: 44vmin; border-radius: 50%; border: 1px solid rgba(150, 200, 255, .42); box-shadow: 0 0 60px rgba(70, 140, 255, .25), inset 0 0 40px rgba(70, 140, 255, .14); animation: intro-ring 1.2s var(--ease) both; }
.intro-x { position: relative; width: min(34vmin, 210px); filter: drop-shadow(0 0 28px rgba(70, 140, 255, .55)); animation: intro-x 1.15s var(--ease) both; }
.intro-word { position: absolute; bottom: 18%; color: rgba(220, 235, 255, .82); font-size: 11px; font-weight: 600; letter-spacing: .55em; padding-left: .55em; animation: intro-word 1.1s var(--ease) both; }
@keyframes intro-x { 0% { opacity: 0; transform: scale(.72) rotate(-16deg); } 45% { opacity: 1; transform: scale(1.03) rotate(5deg); } 70% { transform: scale(.99) rotate(0); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes intro-glow { 0% { opacity: 0; transform: scale(.7); } 55% { opacity: 1; } 100% { opacity: .72; transform: scale(1.08); } }
@keyframes intro-ring { 0% { opacity: 0; transform: scale(.55); } 55% { opacity: 1; } 100% { opacity: .45; transform: scale(1.12); } }
@keyframes intro-word { 0% { opacity: 0; letter-spacing: .8em; } 100% { opacity: 1; letter-spacing: .55em; } }
.intro.out { animation: intro-out .5s var(--ease) both; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .intro-glow, .intro-ring, .intro-x, .intro-word { animation: none !important; }
  .intro.out { transition: opacity .15s linear; }
}

/* Login ------------------------------------------------------------------ */
.login { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); background: var(--bg); }
.login[hidden] { display: none; }
.login-card { width: min(560px, 100%); padding: clamp(28px, 6vw, 78px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.login-brand { display: flex; align-items: center; gap: 18px; }
.login-x { width: 74px; height: 74px; object-fit: contain; filter: drop-shadow(0 0 24px rgba(70, 140, 255, .45)); }
.login h1 { margin-top: 4px; }
.login-lede { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 42ch; }
.login-form { display: grid; gap: 9px; margin-top: 10px; }
.login-form label { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; min-width: 0; height: 48px; border-radius: 13px; border: 1px solid var(--line-strong); background: rgba(8, 12, 20, .72); padding: 0 15px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: .04em; }
.key-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.hint { color: var(--muted-2); font-size: 11.5px; line-height: 1.65; }
.login-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.login-msg { min-height: 20px; font-size: 12.5px; color: var(--muted); }
.login-msg.bad { color: var(--bad); }
.login-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted-2); font-size: 11px; margin-top: 10px; }
.login-art { position: relative; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(circle at 60% 40%, rgba(50, 110, 220, .18), transparent 55%), linear-gradient(160deg, #0a0f18, #070a10); display: grid; place-items: center; }
.login-art-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(120, 170, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 170, 255, .06) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 72%); }
.login-art-card { position: absolute; width: 220px; padding: 18px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(15, 21, 32, .78); backdrop-filter: blur(14px); box-shadow: var(--shadow); display: grid; gap: 8px; }
.login-art-card span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.login-art-card b { font-size: 15px; font-weight: 500; }
.login-art-card.c1 { transform: translate(-120px, -130px) rotate(-4deg); }
.login-art-card.c2 { transform: translate(96px, -12px) rotate(3deg); }
.login-art-card.c3 { transform: translate(-58px, 126px) rotate(-2deg); }
.login-art-card::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); position: absolute; top: 18px; right: 18px; }

/* Buttons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border-radius: 12px; border: 1px solid transparent; font-size: 13.5px; font-weight: 500; letter-spacing: .01em; transition: transform .16s var(--ease), background .16s, border-color .16s, color .16s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 96%, #fff 4%), var(--accent)); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 60%, #fff 40%); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 20%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: var(--line); background: rgba(255, 255, 255, .025); color: var(--text); }
.btn.ghost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .05); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 34%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.btn.small { min-height: 36px; padding: 0 13px; font-size: 12.5px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; display: inline-grid; place-items: center; color: var(--muted); border: 1px solid transparent; transition: .16s; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .045); border-color: var(--line); }
.text-btn { color: var(--muted); font-size: 12px; padding: 4px 0; }
.text-btn:hover { color: var(--text); }
.text-btn.danger { color: color-mix(in srgb, var(--bad) 80%, var(--muted)); }

/* Shell ------------------------------------------------------------------ */
.shell { position: fixed; inset: 0; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--inspector-w); grid-template-rows: var(--topbar-h) minmax(0, 1fr); }
.shell[hidden] { display: none; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 max(10px, env(safe-area-inset-left)) 0 max(10px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: blur(20px) saturate(1.25); z-index: 30; }
.bars { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--text); }
.bars:hover { background: rgba(255, 255, 255, .05); }
.bars svg { width: 22px; height: 22px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.brand-x { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 55%, transparent)); }
.brand-word { font-family: var(--font-display); font-size: 14px; letter-spacing: -.02em; white-space: nowrap; }
.model-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px 0 7px; margin-left: 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); transition: .16s; }
.model-chip:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .05); }
.model-brand { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 4px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-2); font-size: 10px; font-weight: 700; letter-spacing: -.02em; }
.model-ver { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.model-chip .chev { width: 13px; height: 13px; color: var(--muted-2); }
.top-spacer { flex: 1; }
.factory-link { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; margin-left: 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: .16s; }
.factory-link:hover { border-color: var(--accent); color: var(--accent-2); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.factory-link .chev { width: 12px; height: 12px; transform: rotate(-90deg); }
@media (max-width: 420px) { .factory-link span { display: none; } .factory-link { padding: 0 8px; } }

/* 漫游的小助理：固定定位 + transform 位移，不参与布局，不挡点击 */
.roam-pet { position: fixed; left: 0; top: 0; width: 96px; height: 96px; object-fit: contain; pointer-events: none; z-index: 20; opacity: 0; transition: transform 3.4s cubic-bezier(.4, 0, .2, 1), opacity .5s ease; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .35)); will-change: transform; }
.roam-pet.in { opacity: 1; }
@media (max-width: 640px) { .roam-pet { width: 72px; height: 72px; } }
@media (prefers-reduced-motion: reduce) { .roam-pet { transition: opacity .3s ease; } }
.net-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); transition: .2s; }
.net-dot.off { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.temp-bubble { width: 38px; height: 38px; border-radius: 50%; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); transition: .18s; }
.temp-bubble:hover { color: var(--text); border-color: var(--accent); }
.temp-bubble[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); border-style: solid; border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 38%, var(--surface-2)), var(--surface)); border: 1px solid var(--line-strong); color: var(--text); font-size: 12px; font-weight: 600; }
.avatar.small { width: 30px; height: 30px; font-size: 11px; }
.avatar:hover { border-color: var(--accent); }

.banner { position: fixed; top: calc(var(--topbar-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 10px; max-width: min(92vw, 680px); padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface-2) 92%, transparent); backdrop-filter: blur(14px); color: var(--text); font-size: 12px; box-shadow: var(--shadow); }
.banner[hidden] { display: none; }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.banner.off { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.banner .btn { min-height: 30px; padding: 0 10px; font-size: 11.5px; }

/* Sidebar ---------------------------------------------------------------- */
.sidebar { grid-row: 2; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 54%, transparent); overflow: auto; z-index: 20; }
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 4px; }
.side-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }
.side-nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: left; }
.nav-item svg { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav-item.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; color: var(--muted); background: rgba(255, 255, 255, .04); }
.side-section { display: grid; gap: 7px; min-height: 0; }
.side-label { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: var(--muted-2); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.conv-list { display: grid; gap: 2px; max-height: 28vh; overflow: auto; }
.conv-item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 9px; border-radius: 9px; color: var(--muted); text-align: left; font-size: 12.5px; }
.conv-item .conv-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item:hover, .conv-item.active { background: rgba(255, 255, 255, .045); color: var(--text); }
.conv-item.active { box-shadow: inset 2px 0 0 var(--accent); }
.conv-item .more { opacity: 0; color: var(--muted); padding: 3px; }
.conv-item:hover .more, .conv-item.active .more { opacity: 1; }
.conv-empty { padding: 8px; color: var(--muted-2); font-size: 11.5px; }
.project-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.project-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.project-pill:hover { color: var(--text); border-color: var(--line-strong); }
.project-pill.active { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 42%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.account { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 10px; text-align: left; }
.account:hover { background: rgba(255, 255, 255, .04); }
.account-meta { display: grid; gap: 2px; min-width: 0; flex: 1; }
.account-meta b { font-size: 11.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta span { font-size: 10.5px; color: var(--muted-2); }
.account svg { width: 15px; height: 15px; color: var(--muted-2); }
.side-links { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(3, 6, 12, .62); backdrop-filter: blur(3px); }
.scrim[hidden] { display: none; }

/* Main ------------------------------------------------------------------- */
.main { grid-row: 2; min-width: 0; min-height: 0; overflow: auto; padding: clamp(20px, 3vw, 38px) clamp(16px, 3vw, 38px) 130px; scroll-behavior: smooth; }
.main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.main-head h1 { margin-top: 8px; }
.lede { color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 9px; max-width: 62ch; }
.main-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { display: grid; gap: 3px; min-width: 92px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .018); }
.stat b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.stat span { font-size: 10px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }
.stat.accent b { color: var(--accent-2); }
.toolbar { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.tab { min-height: 32px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-size: 12px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.search { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--muted-2); }
.search svg { width: 15px; height: 15px; }
.search input { width: 190px; max-width: 40vw; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.search.wide { width: 100%; margin: 4px 0 12px; }
.search.wide input { width: 100%; max-width: none; }
.view[hidden] { display: none; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 168px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); text-align: left; transition: transform .18s var(--ease), border-color .18s, background .18s; overflow: hidden; }
.card::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--muted-2); opacity: .5; }
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)); }
.card.selected { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 14px 34px rgba(0, 0, 0, .28); }
.card[data-status="draft"]::before { background: var(--muted); }
.card[data-status="review"]::before, .card[data-status="reviewed"]::before { background: var(--review); }
.card[data-status="needs_changes"]::before { background: var(--warn); }
.card[data-status="approved"]::before, .card[data-status="running"]::before { background: var(--accent); }
.card[data-status="done"]::before { background: var(--good); }
.card[data-status="failed"]::before { background: var(--bad); }
.card-top { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 8px currentColor; }
.card[data-status="draft"] .status-dot { color: var(--muted); background: var(--muted); }
.card[data-status="review"] .status-dot, .card[data-status="reviewed"] .status-dot { color: var(--review); background: var(--review); }
.card[data-status="needs_changes"] .status-dot { color: var(--warn); background: var(--warn); }
.card[data-status="approved"] .status-dot, .card[data-status="running"] .status-dot { color: var(--accent); background: var(--accent); }
.card[data-status="done"] .status-dot { color: var(--good); background: var(--good); }
.card[data-status="failed"] .status-dot { color: var(--bad); background: var(--bad); }
.status-text { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.src-badge { margin-left: auto; color: var(--muted-2); font-size: 9.5px; letter-spacing: .06em; border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.card h3 { font-size: 14.5px; line-height: 1.35; font-weight: 500; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { color: var(--muted); font-size: 11.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }
.card-foot .tag { display: inline-flex; align-items: center; gap: 4px; }
.card-foot .tag svg { width: 12px; height: 12px; }
.card-foot .right { margin-left: auto; }
.card-empty-line { border: 1px dashed var(--line); border-radius: 14px; display: grid; place-items: center; min-height: 168px; color: var(--muted-2); font-size: 12px; padding: 18px; text-align: center; }
.works-grid { display: grid; gap: 12px; }
.work { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: rgba(255, 255, 255, .02); display: grid; gap: 9px; }
.work h3 { font-size: 15px; font-weight: 500; }
.work pre { margin: 0; color: var(--muted); font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; max-height: 200px; overflow: auto; }
.work .work-meta { display: flex; gap: 10px; color: var(--muted-2); font-size: 10.5px; flex-wrap: wrap; }
.task-list { display: grid; gap: 8px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .018); }
.task .task-desc { font-size: 12.5px; line-height: 1.45; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .task-meta { color: var(--muted-2); font-size: 10.5px; margin-top: 3px; }
.task .task-status { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.task[data-status="done"] .task-status { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.task[data-status="failed"] .task-status { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.task[data-status="running"] .task-status { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.empty { display: grid; place-items: center; text-align: center; gap: 10px; padding: 54px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }
.empty[hidden] { display: none; }
.empty h2 { font-size: 20px; }
.empty p { max-width: 48ch; font-size: 12.5px; line-height: 1.7; }
.empty .btn { margin-top: 4px; }
.main-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 28px; color: var(--muted-2); font-size: 10.5px; }
.dot-sep { opacity: .5; }

/* Inspector -------------------------------------------------------------- */
.inspector { grid-row: 2; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 42%, transparent); z-index: 18; }
.insp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 10px; }
.insp-body { flex: 1; min-height: 0; overflow: auto; padding: 0 18px 26px; }
.insp-empty { display: grid; gap: 14px; padding-top: 28px; color: var(--muted); }
.insp-empty p { font-size: 12.5px; line-height: 1.7; }
.insp-card-head { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.insp-card-head h2 { font-size: 20px; line-height: 1.25; }
.insp-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted-2); font-size: 10.5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.chip.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 32%, transparent); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 32%, transparent); }
.chip.accent { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 38%, transparent); }
.insp-tabs { display: flex; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); z-index: 2; }
.insp-tabs .tab { flex: 1; padding: 0 6px; font-size: 11.5px; min-height: 30px; }
.insp-section { display: grid; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.insp-section:last-child { border-bottom: 0; }
.insp-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.insp-section textarea, .field textarea, .field input { width: 100%; border: 1px solid var(--line); background: rgba(5, 8, 14, .48); border-radius: 10px; padding: 10px 11px; color: var(--text); font-size: 12.5px; line-height: 1.6; resize: vertical; }
.insp-section textarea:focus, .field textarea:focus, .field input:focus { border-color: color-mix(in srgb, var(--accent) 48%, transparent); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.insp-section textarea { min-height: 130px; }
.insp-section p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.insp-section ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 12px; line-height: 1.7; display: grid; gap: 4px; }
.insp-actions { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 14px; }
.insp-actions .btn { flex: 1 1 auto; }
.original { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: rgba(255, 255, 255, .015); }
.original summary { cursor: pointer; color: var(--muted); font-size: 11.5px; }
.original pre { margin: 9px 0 0; white-space: pre-wrap; color: var(--muted); font: 11.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 220px; overflow: auto; }
.result-box { border: 1px solid color-mix(in srgb, var(--good) 26%, transparent); background: color-mix(in srgb, var(--good) 6%, transparent); border-radius: 10px; padding: 10px 11px; }
.result-box pre { margin: 0; white-space: pre-wrap; color: var(--text); font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 260px; overflow: auto; }
.minimap-insp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 4px; }
.minimap-cell { aspect-ratio: 1.4; border-radius: 4px; background: var(--surface-3); border: 1px solid transparent; }
.minimap-cell.s-draft { background: color-mix(in srgb, var(--muted) 35%, var(--surface)); }
.minimap-cell.s-review, .minimap-cell.s-reviewed { background: color-mix(in srgb, var(--review) 50%, var(--surface)); }
.minimap-cell.s-needs_changes { background: color-mix(in srgb, var(--warn) 50%, var(--surface)); }
.minimap-cell.s-approved, .minimap-cell.s-running { background: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.minimap-cell.s-done { background: color-mix(in srgb, var(--good) 55%, var(--surface)); }
.minimap-cell.s-failed { background: color-mix(in srgb, var(--bad) 55%, var(--surface)); }
.minimap-cell:hover { border-color: var(--text); }

/* Composer --------------------------------------------------------------- */
.composer { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 34; width: min(560px, calc(100vw - 28px)); }
.composer-pill { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 15px 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface-2) 88%, transparent); backdrop-filter: blur(16px); box-shadow: 0 12px 34px rgba(0, 0, 0, .34); color: var(--muted); font-size: 12.5px; transition: .18s var(--ease); }
.composer-pill:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.composer-pill svg { width: 17px; height: 17px; color: var(--accent-2); }
.composer-pill kbd { margin-left: 6px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; font: 10px ui-monospace, monospace; }
.composer-panel { border-radius: 16px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(20px); box-shadow: var(--shadow); padding: 10px; display: grid; gap: 8px; }
.composer-panel[hidden] { display: none; }
.composer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 2px; }
.composer-target { color: var(--muted-2); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-panel textarea { width: 100%; min-height: 78px; max-height: 34vh; border: 0; outline: 0; resize: none; background: transparent; padding: 6px 7px; font-size: 13.5px; line-height: 1.65; }
.composer-panel textarea::placeholder { color: var(--muted-2); }
.composer-tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
.composer-tools .icon-btn { width: 34px; height: 34px; flex: 0 0 auto; }
.composer-tools .icon-btn svg { width: 16px; height: 16px; }
.quickbar { display: flex; gap: 5px; overflow: auto; padding: 1px; min-width: 0; scrollbar-width: none; }
.quickbar::-webkit-scrollbar { display: none; }
.quick { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; white-space: nowrap; }
.quick:hover { color: var(--text); border-color: var(--line-strong); }
.quick svg { width: 13px; height: 13px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 0; }
.composer-hint { color: var(--muted-2); font-size: 10.5px; }
.composer-foot .btn { min-height: 36px; padding: 0 14px; }
.attachments { display: flex; flex-wrap: wrap; gap: 5px; }
.attach-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }

/* Voice ------------------------------------------------------------------ */
.voice-orb { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(86px, calc(env(safe-area-inset-bottom) + 86px)); z-index: 36; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--accent) 88%, #fff 12%), color-mix(in srgb, var(--accent) 55%, #07101f)); border: 1px solid color-mix(in srgb, var(--accent-2) 42%, transparent); color: #fff; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25); touch-action: none; cursor: grab; user-select: none; transition: box-shadow .2s, transform .16s; }
.voice-orb:active { cursor: grabbing; transform: scale(.96); }
.voice-orb svg { width: 23px; height: 23px; }
.voice-orb .orb-ring { position: absolute; inset: -7px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); opacity: 0; }
.voice-orb.active .orb-ring { opacity: 1; animation: orb 1.8s ease-out infinite; }
.voice-orb.paused { filter: saturate(.45); }
@keyframes orb { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.voice-panel { position: fixed; z-index: 37; width: min(318px, calc(100vw - 24px)); padding: 13px; border-radius: 16px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(20px); box-shadow: var(--shadow); display: grid; gap: 9px; }
.voice-panel[hidden] { display: none; }
.voice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.voice-head b { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; }
.voice-target { padding: 6px 8px; border-radius: 7px; background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-transcript { min-height: 54px; max-height: 120px; overflow: auto; color: var(--text); font-size: 12px; line-height: 1.6; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.voice-meter { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.voice-meter span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .12s linear; }
.voice-speaker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.voice-speaker select { flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 8px; font-size: 11.5px; }
.voice-actions { display: flex; gap: 6px; }
.voice-actions .btn { flex: 1; }
.voice-note { color: var(--muted-2); font-size: 10px; line-height: 1.55; }

/* Modals ----------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3, 6, 12, .7); backdrop-filter: blur(7px); }
.modal[hidden] { display: none; }
.modal-card { width: min(560px, 100%); max-height: min(86dvh, 900px); overflow: auto; border-radius: 18px; border: 1px solid var(--line-strong); background: linear-gradient(170deg, var(--surface-2), var(--surface)); box-shadow: 0 30px 100px rgba(0, 0, 0, .6); padding: 18px; display: grid; gap: 12px; }
.modal-card.model-card { width: min(640px, 100%); }
.modal-card.settings-card { width: min(680px, 100%); }
.modal-card.wide { width: min(760px, 100%); }
.modal-card.narrow { width: min(440px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin-top: 4px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.model-list { display: grid; gap: 3px; max-height: 52dvh; overflow: auto; }
.model-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 9px; text-align: left; border: 1px solid transparent; }
.model-row:hover { background: rgba(255, 255, 255, .04); }
.model-row.selected { border-color: color-mix(in srgb, var(--accent) 42%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.model-row .glyph { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-2); font-size: 10px; font-weight: 700; }
.model-row .model-name { display: grid; gap: 2px; min-width: 0; }
.model-row .model-name b { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-row .model-name span { color: var(--muted-2); font-size: 10px; }
.model-row .model-check { color: var(--accent-2); opacity: 0; }
.model-row.selected .model-check { opacity: 1; }
.settings-tabs { display: flex; gap: 2px; overflow: auto; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.settings-tabs .tab { flex: 0 0 auto; }
.settings-body { display: grid; gap: 14px; }
.settings-pane { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.field input, .field textarea { font-size: 12.5px; }
.field textarea { min-height: 120px; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .16); }
.seg button { flex: 1; min-height: 32px; border-radius: 7px; color: var(--muted); font-size: 11.5px; }
.seg button.active { background: var(--surface-3); color: var(--text); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 40px; height: 23px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); flex: 0 0 auto; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: .18s; }
.switch.on { background: color-mix(in srgb, var(--accent) 35%, var(--surface-3)); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.switch.on::after { left: 20px; background: var(--accent-2); }
.token-box { display: flex; gap: 6px; align-items: center; }
.token-box input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 10.5px; }
.steps { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.75; display: grid; gap: 4px; }
.steps code { color: var(--accent-2); font-size: 11px; background: rgba(255, 255, 255, .04); border-radius: 4px; padding: 1px 4px; }
.quick-config { display: grid; gap: 5px; }
.quick-config-row { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; }
.quick-config-row .q-name { flex: 1; font-size: 12px; }
.quick-config-row .icon-btn { width: 30px; height: 30px; }
.quick-config-row .icon-btn svg { width: 14px; height: 14px; }
.about-list { display: grid; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.about-list b { color: var(--text); font-weight: 500; }
.confirm-text { color: var(--muted); font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.minimap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 5px; }
.minimap-grid .minimap-cell { aspect-ratio: 1.25; }

/* Toast ------------------------------------------------------------------ */
.toast { position: fixed; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 64px); transform: translate(-50%, 10px); z-index: 120; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface-2) 96%, transparent); color: var(--text); font-size: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s var(--ease); max-width: min(90vw, 520px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: #ffd7dd; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --inspector-w: 340px; --sidebar-w: 248px; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 318px); transform: translateX(-102%); transition: transform .24s var(--ease); background: var(--surface); box-shadow: 30px 0 80px rgba(0, 0, 0, .4); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .inspector { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: min(82dvh, 720px); border-left: 0; border-top: 1px solid var(--line-strong); border-radius: 20px 20px 0 0; background: var(--surface); transform: translateY(102%); transition: transform .26s var(--ease); box-shadow: 0 -30px 80px rgba(0, 0, 0, .45); }
  body.inspector-open .inspector { transform: translateY(0); }
  .insp-head { padding-top: 12px; }
  .insp-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); transform: translateX(-50%); }
  .insp-head { position: relative; }
  .main { padding-bottom: 150px; }
  .brand-word { display: none; }
  .main-actions .btn span { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card { padding: 28px 22px; }
}
@media (max-width: 620px) {
  :root { --topbar-h: 54px; }
  .topbar { gap: 6px; padding-right: max(10px, env(safe-area-inset-right)); }
  .model-chip { margin-left: 0; }
  .main { padding: 18px 13px 160px; }
  .main-head { flex-direction: column; gap: 10px; }
  .main-actions { width: 100%; justify-content: flex-start; }
  .main-actions .btn.ghost { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats { gap: 6px; }
  .stat { min-width: 0; flex: 1; padding: 8px 10px; }
  .stat b { font-size: 15px; }
  .toolbar { align-items: stretch; }
  .search { flex: 1; }
  .search input { width: 100%; max-width: none; }
  .composer { left: 10px; right: 10px; width: auto; bottom: max(10px, env(safe-area-inset-bottom)); }
  .composer-pill kbd { display: none; }
  .voice-orb { bottom: max(80px, calc(env(safe-area-inset-bottom) + 80px)); right: 14px; }
  .voice-panel { width: calc(100vw - 20px); left: 10px !important; top: auto !important; bottom: max(150px, calc(env(safe-area-inset-bottom) + 150px)) !important; }
  .modal { padding: 8px; align-items: end; }
  .modal-card { max-height: 90dvh; border-radius: 18px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-foot .btn { width: 100%; }
  .login h1 { font-size: 28px; }
  .login-x { width: 58px; height: 58px; }
}
@media (min-width: 981px) {
  body[data-layout="compact"] .shell { grid-template-columns: minmax(0, 1fr); }
  body[data-layout="compact"] .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 318px); transform: translateX(-102%); transition: transform .24s var(--ease); background: var(--surface); box-shadow: 30px 0 80px rgba(0, 0, 0, .4); z-index: 50; }
  body[data-layout="compact"].sidebar-open .sidebar { transform: translateX(0); }
  body[data-layout="compact"] .inspector { position: fixed; right: 0; top: var(--topbar-h); bottom: 0; width: min(420px, 92vw); transform: translateX(102%); transition: transform .26s var(--ease); background: var(--surface); box-shadow: -30px 0 80px rgba(0, 0, 0, .45); }
  body[data-layout="compact"].inspector-open .inspector { transform: translateX(0); }
  body[data-layout="compact"] .main { padding-bottom: 130px; }
}
body[data-layout="full"] .sidebar { transform: none !important; position: static; }
body[data-layout="full"] .inspector { transform: none !important; position: static; }
body[data-layout="full"] .shell { min-width: 980px; }
body[data-layout="full"] { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .intro { display: none !important; }
}

/* Chat ------------------------------------------------------------------- */
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.chat-head h2 { margin-top: 5px; font-size: 22px; }
.chat-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.temp-notice { margin: 4px 0 12px; padding: 9px 11px; border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--muted); font-size: 11px; line-height: 1.65; }
.temp-notice[hidden] { display: none; }
.chat-messages { display: grid; gap: 10px; padding: 4px 0 18px; max-width: 860px; }
.msg { display: grid; gap: 5px; max-width: min(86%, 680px); padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, .022); }
.msg.user { justify-self: end; background: color-mix(in srgb, var(--accent) 13%, transparent); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }
.msg.assistant { justify-self: start; }
.msg.system, .msg.reviewer, .msg.executor { justify-self: center; max-width: 100%; background: rgba(255, 255, 255, .015); border-style: dashed; color: var(--muted); font-size: 11.5px; }
.msg-head { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.msg-head b { color: var(--muted); font-weight: 500; }
.msg-body { color: var(--text); font-size: 13px; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .msg-body { color: #f5f9ff; }
.msg-actions { display: flex; gap: 6px; opacity: .55; transition: .15s; }
.msg:hover .msg-actions { opacity: 1; }
.msg-actions button { color: var(--muted-2); font-size: 10px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; }
.msg-actions button:hover { color: var(--text); border-color: var(--line-strong); }
.msg.streaming .msg-body::after { content: '▍'; color: var(--accent-2); animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.msg-error { color: var(--bad); font-size: 11px; }
.chat-empty-line { color: var(--muted-2); font-size: 12px; text-align: center; padding: 20px; }
@media (max-width: 620px) {
  .chat-head { flex-direction: column; }
  .chat-actions { justify-content: flex-start; }
  .msg { max-width: 94%; }
}

/* Small shared bits ------------------------------------------------------ */
.conv-title { flex: 1; min-width: 0; text-align: left; color: inherit; background: none; border: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.popmenu { position: fixed; z-index: 140; width: 140px; padding: 5px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); box-shadow: var(--shadow); display: grid; gap: 2px; }
.popmenu button { text-align: left; padding: 8px 9px; border-radius: 6px; color: var(--text); font-size: 12px; }
.popmenu button:hover { background: rgba(255, 255, 255, .06); }
.popmenu button.danger { color: var(--bad); }
.field select { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 10px; font-size: 12.5px; }
.field select:focus { border-color: color-mix(in srgb, var(--accent) 48%, transparent); outline: 0; }
body.sidebar-collapsed .shell { grid-template-columns: 0 minmax(0, 1fr) var(--inspector-w); }
body.sidebar-collapsed .sidebar { display: none; }
body.sidebar-collapsed .topbar { grid-column: 1 / -1; }
@media (min-width: 981px) { #inspClose { display: none; } }

@media (max-width: 980px) {
  body.inspector-open .composer,
  body.inspector-open .voice-orb,
  body.inspector-open .voice-panel { opacity: 0; pointer-events: none; }
  .inspector { z-index: 55; }
}
@media (max-width: 620px) {
  .main-actions .btn.ghost { display: inline-flex; }
  .main-actions .btn.ghost svg { width: 15px; height: 15px; }
}

/* Desktop placement: keep floating controls off the sidebar and inspector. */
@media (min-width: 981px) {
  body[data-layout="full"] .composer { left: calc(var(--sidebar-w) + 16px); }
  body[data-layout="full"].sidebar-collapsed .composer { left: 16px; }
  body[data-layout="full"] .voice-orb { right: calc(var(--inspector-w) + 20px); }
  body.sidebar-collapsed .side-foot { padding-bottom: 0; }
}

.switch { display: inline-block; vertical-align: middle; }
#accentInput, .token-box input[type="color"] { flex: 0 0 54px; width: 54px; height: 36px; padding: 3px; border-radius: 8px; }

/* Drawer starts below the top bar and stays opaque; floating controls get out
   of its way while it is open. */
@media (max-width: 980px) {
  .sidebar { top: var(--topbar-h); z-index: 50; background: var(--surface); }
  body.sidebar-open .composer,
  body.sidebar-open .voice-orb,
  body.sidebar-open .voice-panel { opacity: 0; pointer-events: none; }
}
@media (min-width: 981px) {
  body[data-layout="compact"] .sidebar { top: var(--topbar-h); z-index: 50; background: var(--surface); }
  body[data-layout="compact"].sidebar-open .composer,
  body[data-layout="compact"].sidebar-open .voice-orb { opacity: 0; pointer-events: none; }
}

[hidden] { display: none !important; }
.voice-panel { background: var(--surface); }

.composer-panel { background: var(--surface); }
@media (max-width: 620px) {
  body.composer-open .voice-orb { opacity: 0; pointer-events: none; }
}

/* SubRouter tiers ------------------------------------------------------- */
.tier-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 2px 0 10px; }
.tier-tabs button { min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; letter-spacing: .02em; }
.tier-tabs button:hover { color: var(--text); border-color: var(--line-strong); }
.tier-tabs button.active { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 48%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.login-tiers { display: grid; gap: 7px; margin-top: 4px; }
.tier-access { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8,12,20,.72); padding: 0 12px; font-size: 12px; }
.tier-access:focus { border-color: color-mix(in srgb, var(--accent) 45%, transparent); outline: 0; }
.msg-lat { margin-left: auto; color: var(--muted-2); font-size: 9.5px; letter-spacing: .02em; }

/* ============ 小助手休息室 ============ */
body.lounge-open { overflow: hidden; }

.lounge {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 700px at 15% 0%, #101a2c 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #161222 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  overflow: hidden;
  isolation: isolate;
}

.lounge-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.lounge-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 3px 3px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
}

.lounge-bar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 44px);
}
.lounge-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lounge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(52,211,153,.55); animation: loungePulse 2.4s ease-out infinite; }
@keyframes loungePulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.5)} 70%{box-shadow:0 0 0 12px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }

.lounge-skip {
  appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--muted); font: inherit; font-size: 13px; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.lounge-skip:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.06); }

.lounge-body {
  position: relative; z-index: 3; flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: 0 clamp(18px, 4vw, 44px) clamp(24px, 5vh, 60px);
}

.lounge-copy { max-width: 460px; }
.lounge-kicker { margin: 0 0 14px; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 11px; letter-spacing: .22em; color: var(--accent-2); opacity: .75; }
.lounge-copy h1 { margin: 0 0 16px; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -.02em; font-weight: 600; }
.lounge-sub { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 34ch; }

.lounge-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; perspective: 1200px; }

.lounge-row {
  --h: 264;
  position: relative; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  padding: 14px 16px; border-radius: 18px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 24px -18px rgba(0,0,0,.9);
  transition: transform .28s cubic-bezier(.22,1,.36,1), border-color .28s ease, background .28s ease, box-shadow .28s ease;
  transform-style: preserve-3d;
}

.lounge-row:hover {
  border-color: hsl(var(--h) 80% 70% / .45);
  background: linear-gradient(180deg, hsl(var(--h) 90% 70% / .12), rgba(255,255,255,.03));
  box-shadow: 0 0 0 1px hsl(var(--h) 80% 70% / .18), 0 18px 46px -26px hsl(var(--h) 90% 60% / .8);
}
.lounge-row::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(220px 120px at var(--mx,50%) var(--my,50%), hsl(var(--h) 90% 75% / .14), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.lounge-row:hover::after { opacity: 1; }

.lounge-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lounge-row-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.lounge-row-name em {
  font-style: normal; font-size: 10px; letter-spacing: .1em; padding: 2px 7px; border-radius: 999px;
  color: hsl(var(--h) 90% 82%); background: hsl(var(--h) 80% 55% / .16); border: 1px solid hsl(var(--h) 80% 70% / .25);
}
.lounge-row-desc { font-size: 12.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lounge-row-meta { font-family: 'Space Grotesk', ui-monospace, monospace; font-size: 11px; color: var(--muted-2); opacity: .8; }
.lounge-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease, stroke .25s ease; }
.lounge-row:hover .lounge-chev { transform: translateX(3px); stroke: hsl(var(--h) 90% 80%); }

/* 光球 */
.lounge-orb { position: relative; display: grid; place-items: center; border-radius: 50%; flex: none; }
.lounge-orb i {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, hsl(var(--h) 95% 68%), hsl(var(--h) 85% 46%) 42%, hsl(calc(var(--h) + 30) 80% 26%) 78%);
  box-shadow: 0 0 22px hsl(var(--h) 90% 55% / .55), inset 0 -6px 14px rgba(0,0,0,.45);
  animation: orbBreathe 4.2s ease-in-out infinite;
}
.lounge-orb b {
  position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 60% 70%, rgba(255,255,255,.55), transparent 55%);
  mix-blend-mode: screen; opacity: .75;
  animation: orbShift 6s ease-in-out infinite;
}
@keyframes orbBreathe { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
@keyframes orbShift { 0%,100%{transform:translate3d(-6%,6%,0)} 50%{transform:translate3d(8%,-6%,0)} }

/* 第二层 */
.lounge-detail { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4,6,10,.55); backdrop-filter: blur(14px); overflow: auto; }
.lounge-sheet {
  position: relative; width: min(560px, 100%); max-height: min(88vh, 760px); overflow: auto; margin: auto; padding: 34px 32px 30px; border-radius: 28px;
  background: linear-gradient(180deg, hsl(var(--h) 40% 14% / .95), #0c111a 55%);
  border: 1px solid hsl(var(--h) 60% 60% / .25);
  box-shadow: 0 40px 90px -40px hsl(var(--h) 90% 40% / .7), 0 0 0 1px rgba(255,255,255,.04) inset;
  overflow: hidden;
}
.lounge-sheet::before {
  content: ''; position: absolute; width: 380px; height: 380px; right: -140px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--h) 90% 60% / .28), transparent 65%); pointer-events: none;
}
.lounge-back { position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; font-size: 15px; }
.lounge-sheet-orb { display: grid; place-items: center; margin: 8px 0 18px; }
.lounge-sheet h2 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.02em; }
.lounge-sheet-desc { margin: 0 0 22px; color: var(--muted); line-height: 1.7; font-size: 14.5px; }
.lounge-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0 0 24px; }
.lounge-specs div { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.lounge-specs dt { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.lounge-specs dd { margin: 0; font-size: 13px; color: var(--text); font-family: 'Space Grotesk', ui-monospace, monospace; }
.lounge-wake {
  width: 100%; padding: 15px 20px; border-radius: 16px; border: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .01em; color: #06101e;
  background: linear-gradient(135deg, hsl(var(--h) 95% 74%), hsl(calc(var(--h) + 26) 90% 62%));
  box-shadow: 0 14px 34px -18px hsl(var(--h) 95% 60% / .95);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .18s ease, filter .18s ease;
}
.lounge-wake:hover { transform: translateY(-1px); filter: brightness(1.06); }
.lounge-wake:active { transform: translateY(1px) scale(.995); }
.lounge-wake span { width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,.5); }

.lounge-flash { position: absolute; inset: 0; z-index: 55; pointer-events: none; opacity: 0; background: #fff; transition: opacity .28s ease; }
.lounge-flash.on { opacity: .92; }

.lounge-orb-fly { pointer-events: none; }

@media (max-width: 900px) {
  .lounge-body { display: block; padding: 0 16px 28px; overflow-y: auto; }
  .lounge-copy { margin: 0 0 20px; }
  .lounge-copy h1 { font-size: clamp(24px, 7.4vw, 30px); margin-bottom: 10px; }
  .lounge-kicker { margin-bottom: 10px; font-size: 10px; }
  .lounge-sub { font-size: 13px; line-height: 1.6; }
  .lounge-list { gap: 8px; }
  .lounge-row { padding: 10px 14px; gap: 12px; grid-template-columns: 58px 1fr auto; }
  .lounge-row-name { font-size: 15px; }
  .lounge-row-desc { font-size: 12px; }
  .lounge-row-meta { display: none; }
  .lounge-sheet { padding: 28px 20px 22px; }
  .lounge-sheet h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .lounge-row, .lounge-orb i, .lounge-orb b, .lounge-dot { animation: none !important; }
}

/* 五个助手各自的动画签名 */
.lounge-orb u { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }

/* 小豆 · 声波一圈圈散开 */
.lounge-orb[data-id="voice"] u { animation: orbRing 2.6s cubic-bezier(.2,.7,.3,1) infinite; }
@keyframes orbRing {
  0%   { box-shadow: 0 0 0 0 hsl(var(--h) 92% 66% / .55), inset 0 0 0 0 hsl(var(--h) 92% 66% / .35); }
  70%  { box-shadow: 0 0 0 12px hsl(var(--h) 92% 66% / 0), inset 0 0 0 6px hsl(var(--h) 92% 66% / 0); }
  100% { box-shadow: 0 0 0 0 hsl(var(--h) 92% 66% / 0), inset 0 0 0 0 hsl(var(--h) 92% 66% / 0); }
}

/* 小记 · 扫描线绕一圈 */
.lounge-orb[data-id="scribe"] u::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 62%, hsl(var(--h) 95% 78% / .9) 78%, transparent 88% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: orbSpin 3.4s linear infinite;
}
@keyframes orbSpin { to { transform: rotate(360deg); } }

/* 小谋 · 两颗卫星绕着转 */
.lounge-orb[data-id="brain"] u::before,
.lounge-orb[data-id="brain"] u::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px;
  border-radius: 50%; background: hsl(var(--h) 95% 82%); box-shadow: 0 0 8px hsl(var(--h) 95% 70% / .9);
  animation: orbOrbit 5.2s linear infinite;
}
.lounge-orb[data-id="brain"] u::after { animation-duration: 7.4s; animation-direction: reverse; opacity: .7; }
@keyframes orbOrbit {
  from { transform: rotate(0deg) translateX(52%) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(52%) rotate(-360deg); }
}

/* 小深 · 内芯缓慢旋转的云雾 */
.lounge-orb[data-id="deep"] u::before {
  content: ''; position: absolute; inset: 14%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, hsl(var(--h) 95% 72% / .75), transparent 55%, hsl(calc(var(--h) + 40) 95% 66% / .6), transparent);
  filter: blur(3px); mix-blend-mode: screen; animation: orbSpin 8s linear infinite;
}

/* 小办 · 规整的点阵脉冲 */
.lounge-orb[data-id="admin"] u::after {
  content: ''; position: absolute; inset: 6%; border-radius: 50%;
  background-image: radial-gradient(hsl(var(--h) 95% 80% / .95) 1px, transparent 1.4px);
  background-size: 6px 6px;
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%);
          mask: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%);
  animation: orbGrid 3.2s ease-in-out infinite;
}
@keyframes orbGrid { 0%,100% { opacity: .35; transform: scale(.94); } 50% { opacity: .9; transform: scale(1.04); } }

@media (prefers-reduced-motion: reduce) {
  .lounge-orb u, .lounge-orb u::before, .lounge-orb u::after { animation: none !important; }
}

.lounge-intro {
  margin: -6px 0 22px; padding: 14px 16px; border-radius: 14px;
  background: hsl(var(--h) 60% 12% / .55); border: 1px solid hsl(var(--h) 70% 60% / .18);
  font-size: 14px; line-height: 1.6; color: hsl(var(--h) 40% 88%);
  min-height: 62px;
}
.lounge-intro b { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: hsl(var(--h) 80% 72%); opacity: .75; margin-bottom: 6px; font-weight: 600; }
.lounge-intro-text::after { content: '▍'; opacity: .5; animation: caret 1s steps(1) infinite; margin-left: 1px; }
@keyframes caret { 50% { opacity: 0; } }

/* 角色立绘 */
.lounge-face {
  width: 58px; height: 66px; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.55));
  animation: faceFloat 4.4s ease-in-out infinite;
}
.lounge-row:hover .lounge-face { animation-duration: 2.2s; }
@keyframes faceFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-2.5px) } }

.lounge-face-lg {
  height: 262px; width: auto; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 18px 30px hsl(var(--h) 70% 30% / .55)) drop-shadow(0 2px 0 rgba(255,255,255,.06));
  animation: faceFloat 5.2s ease-in-out infinite;
}
.lounge-sheet-orb { min-height: 270px; position: relative; }
.lounge-sheet-orb::before {
  content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--h) 90% 60% / .30), transparent 66%);
  filter: blur(6px); pointer-events: none;
}
