/* =====================================================================
   影视评价 · 谷山
   Design system: "Aurora" — editorial + soft-glass, responsive dual-shell
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7fb;
  --bg-2: #eceef7;
  --surface: #ffffff;
  --surface-2: #f3f4fb;
  --surface-3: #eaecf6;
  --border: #e7e8f2;
  --border-strong: #d7d9e8;
  --text: #14141b;
  --text-2: #3d3d4e;
  --muted: #75758b;
  --brand: #5b57f5;
  --brand-2: #a855f7;
  --accent: #ff5c8a;
  --brand-soft: rgba(91, 87, 245, .12);
  --brand-ring: rgba(91, 87, 245, .35);
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #f04438;
  --glass: rgba(255, 255, 255, .72);
  --scrim: rgba(14, 12, 40, .42);
  --sh-1: 0 1px 2px rgba(16, 16, 40, .05), 0 1px 3px rgba(16, 16, 40, .06);
  --sh-2: 0 6px 16px -4px rgba(16, 16, 40, .12), 0 2px 6px -2px rgba(16, 16, 40, .06);
  --sh-3: 0 20px 44px -16px rgba(16, 16, 40, .24);
  --sh-pop: 0 30px 70px -24px rgba(59, 40, 160, .45);
  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --stage-a: #12b76a; --stage-b: #2e90fa; --stage-c: #7c5cff; --stage-d: #f79009;
  --stage-e: #f04438; --stage-f: #ef6820; --stage-g: #667085; --stage-h: #b42318;
}
:root[data-theme="dark"] {
  --bg: #0b0b11; --bg-2: #101017; --surface: #15151f; --surface-2: #1c1c29; --surface-3: #242433;
  --border: #272738; --border-strong: #34344a; --text: #f4f4f8; --text-2: #c9c9d7; --muted: #8f8fa6;
  --brand: #7c7bff; --brand-2: #c084fc; --accent: #ff6e97;
  --brand-soft: rgba(124, 123, 255, .16); --brand-ring: rgba(124, 123, 255, .4);
  --glass: rgba(18, 18, 28, .72); --scrim: rgba(0, 0, 0, .55);
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 8px 20px -6px rgba(0,0,0,.55); --sh-3: 0 24px 50px -18px rgba(0,0,0,.7);
  --sh-pop: 0 30px 70px -24px rgba(0,0,0,.8);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b11; --bg-2: #101017; --surface: #15151f; --surface-2: #1c1c29; --surface-3: #242433;
    --border: #272738; --border-strong: #34344a; --text: #f4f4f8; --text-2: #c9c9d7; --muted: #8f8fa6;
    --brand: #7c7bff; --brand-2: #c084fc; --accent: #ff6e97;
    --brand-soft: rgba(124, 123, 255, .16); --brand-ring: rgba(124, 123, 255, .4);
    --glass: rgba(18, 18, 28, .72); --scrim: rgba(0, 0, 0, .55);
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 8px 20px -6px rgba(0,0,0,.55); --sh-3: 0 24px 50px -18px rgba(0,0,0,.7);
    --sh-pop: 0 30px 70px -24px rgba(0,0,0,.8);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 8% -8%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    radial-gradient(760px 480px at 108% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--brand-ring); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0; align-self: start; height: 100dvh;
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 16px calc(16px + var(--safe-b));
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 8px 10px 16px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.side-logo {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px -8px var(--brand-ring);
}
.side-brand-text { background: linear-gradient(100deg, var(--text), color-mix(in srgb, var(--brand) 70%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav .nav-label { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.side-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 600; font-size: 14.5px; transition: background .16s, color .16s, transform .16s;
}
.side-item .ico { width: 22px; text-align: center; font-size: 18px; }
.side-item:hover { background: var(--surface-2); color: var(--text); }
.side-item.active { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent); }
.side-item .count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: var(--r-pill); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 35;
  display: flex; align-items: center; gap: 14px;
  height: 66px; padding: 0 clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.topbar .side-logo { width: 32px; height: 32px; }
.search { position: relative; flex: 1; max-width: 520px; margin: 0 auto 0 0; }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 44px 0 40px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--sh-1); outline: none; color: var(--text);
  transition: border-color .16s, box-shadow .16s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: 0 0 0 4px var(--brand-soft); }
.search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 7px; padding: 2px 7px;
}
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--sh-1); font-size: 18px;
  transition: transform .15s, background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0) scale(.96); }

.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-pill);
  box-shadow: var(--sh-1); font-weight: 700; font-size: 13.5px; transition: transform .15s, background .15s;
}
.user-chip:hover { background: var(--surface-2); transform: translateY(-1px); }
.user-chip .nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.view { width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(18px, 2.6vw, 34px) clamp(14px, 3vw, 34px) 72px; flex: 1; }

/* ---------- Tabbar (mobile) ---------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: var(--glass); border-top: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 0; border-radius: 14px;
}
.tab .tab-ico { font-size: 21px; line-height: 1; }
.tab.active { color: var(--brand); }
.tab-center .tab-ico {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px -10px var(--brand-ring); margin-top: -20px;
}

/* ---------- Typography & utilities ---------- */
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 30px 2px 16px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.section-title .sub { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.hr { height: 1px; background: var(--border); margin: 18px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; white-space: nowrap;
  background: var(--surface-2); color: var(--text); border: 1px solid transparent;
  transition: transform .15s, background .16s, border-color .16s, box-shadow .16s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 22px -10px var(--brand-ring); }
.btn.primary:hover { box-shadow: 0 14px 28px -10px var(--brand-ring); }
.btn.ghost { background: var(--surface); border-color: var(--border); box-shadow: var(--sh-1); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { display: flex; width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 600; transition: background .15s, color .15s, transform .15s;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }

/* ---------- Inputs ---------- */
.input, .textarea, select.input {
  width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus, .textarea:focus { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: 0 0 0 4px var(--brand-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
label.fld { display: block; font-size: 12.5px; font-weight: 800; color: var(--text-2); margin: 16px 2px 7px; }
.searchbar { display: flex; gap: 10px; }
.searchbar .input { flex: 1; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 15px; display: inline-flex; align-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: var(--r-pill); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.chip:hover { background: var(--surface-2); transform: translateY(-1px); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.stage-a.on { background: var(--stage-a); border-color: var(--stage-a); color: #fff; }
.chip.stage-b.on { background: var(--stage-b); border-color: var(--stage-b); color: #fff; }
.chip.stage-c.on { background: var(--stage-c); border-color: var(--stage-c); color: #fff; }
.chip.stage-d.on { background: var(--stage-d); border-color: var(--stage-d); color: #fff; }
.chip.stage-e.on { background: var(--stage-e); border-color: var(--stage-e); color: #fff; }
.chip.stage-f.on { background: var(--stage-f); border-color: var(--stage-f); color: #fff; }
.chip.stage-g.on { background: var(--stage-g); border-color: var(--stage-g); color: #fff; }
.chip.stage-h.on { background: var(--stage-h); border-color: var(--stage-h); color: #fff; }

.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.seg button { height: 32px; padding: 0 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; color: var(--muted); transition: background .16s, color .16s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }

/* ---------- Home hero ---------- */
.hero-home {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(22px, 3vw, 36px);
  color: #fff; background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 55%, var(--accent) 120%);
  box-shadow: var(--sh-pop);
}
.hero-home::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 240px at 80% -20%, rgba(255,255,255,.35), transparent 70%); pointer-events: none; }
.hero-home h1 { font-size: clamp(22px, 3vw, 32px); font-weight: 850; letter-spacing: -.02em; line-height: 1.2; }
.hero-home p { opacity: .92; margin-top: 8px; font-size: 14.5px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-home .btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.hero-home .btn.primary { background: #fff; color: var(--brand); border-color: #fff; }
.hero-stats { display: flex; gap: 22px; margin-top: 20px; position: relative; z-index: 1; }
.hero-stats .n { font-size: 24px; font-weight: 850; }
.hero-stats .l { font-size: 12px; opacity: .85; font-weight: 600; }

/* ---------- Stage grid ---------- */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.stage-card {
  position: relative; overflow: hidden; padding: 15px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-1);
  transition: transform .18s cubic-bezier(.2,.9,.3,1.2), box-shadow .18s, border-color .18s;
}
.stage-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--border-strong); }
.stage-card .dot { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 850; font-size: 17px; margin-bottom: 10px; }
.stage-card .nm { font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.stage-card .ct { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.stage-card .bar { position: absolute; left: 15px; right: 15px; bottom: 12px; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.stage-card .bar > i { display: block; height: 100%; border-radius: 999px; }
.stage-card { padding-bottom: 26px; }

/* ---------- Work grid & cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
@media (min-width: 560px) { .grid-cards { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 820px) { .grid-cards { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1200px) { .grid-cards { grid-template-columns: repeat(5, minmax(0,1fr)); } }

.work-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-1);
  transition: transform .2s cubic-bezier(.2,.9,.3,1.2), box-shadow .2s, border-color .2s;
  text-align: left;
}
.work-card:hover { transform: translateY(-5px); box-shadow: var(--sh-3); border-color: var(--border-strong); }
.work-card:active { transform: translateY(-1px) scale(.995); }
.cover {
  position: relative; aspect-ratio: 2 / 3; padding: 13px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%); pointer-events: none; }
.cover > * { position: relative; z-index: 1; }
.cover .emoji { font-size: 34px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.3)); }
.cover .title { font-weight: 800; font-size: 15px; line-height: 1.25; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.cover .meta { font-size: 11.5px; opacity: .95; margin-top: 3px; }
.cover .badge { position: absolute; top: 11px; right: 11px; z-index: 2; background: rgba(255,255,255,.92); color: #1b1b24; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; }
.cover .off { position: absolute; top: 11px; left: 11px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: 3px 8px; font-size: 10.5px; font-weight: 700; }
.cover.g0 { background: linear-gradient(145deg, #6366f1, #ec4899); }
.cover.g1 { background: linear-gradient(145deg, #0ea5e9, #10b981); }
.cover.g2 { background: linear-gradient(145deg, #f59e0b, #ef4444); }
.cover.g3 { background: linear-gradient(145deg, #8b5cf6, #06b6d4); }
.cover.g4 { background: linear-gradient(145deg, #db2777, #f59e0b); }
.cover.g5 { background: linear-gradient(145deg, #334155, #7c3aed); }
.work-card .body { display: flex; flex-direction: column; gap: 7px; padding: 11px 12px 13px; }
.work-card .t { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-card .r { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pill { border-radius: 999px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; }
.pill.stage { color: #fff; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-1); }
.kv { display: flex; gap: 12px; font-size: 14px; margin: 8px 0; }
.kv .k { flex: none; width: 68px; color: var(--muted); font-weight: 800; }
.warnbox { margin-top: 12px; padding: 11px 13px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--border)); color: color-mix(in srgb, var(--warn) 72%, var(--text)); font-size: 13px; }

/* ---------- Review card ---------- */
.card-list { display: flex; flex-direction: column; gap: 14px; }
.rc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-1); animation: pop .3s cubic-bezier(.2,.9,.3,1.3) both; }
.rc-head { display: flex; align-items: center; gap: 11px; }
.rc-head .who { font-weight: 800; font-size: 13.5px; }
.rc-head .when { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rc-mood { margin-left: auto; font-size: 27px; line-height: 1; }
.rc-work { display: inline-flex; align-items: center; gap: 7px; margin: 9px 0 7px; padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.rc-work:hover { background: var(--brand-soft); color: var(--brand); }
.rc-body { font-size: 15px; line-height: 1.68; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.rc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tag { padding: 4px 11px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.tag.soft { background: var(--surface-2); color: var(--text-2); }
.rc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.react {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-pill);
  font-size: 14px; transition: transform .14s, background .15s, border-color .15s;
}
.react:hover { background: var(--surface-2); transform: translateY(-1px); }
.react:active { transform: scale(.92); }
.react.mine { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.react .c { font-size: 12px; font-weight: 800; color: var(--muted); }
.rc-voice { width: 100%; margin-top: 10px; }

/* ---------- Mood picker ---------- */
.mood-row { display: flex; gap: 6px; }
.mood { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: var(--r); transition: background .16s, transform .14s; }
.mood:hover { background: var(--surface-2); }
.mood .e { font-size: 30px; line-height: 1; transition: transform .18s cubic-bezier(.2,.9,.3,1.4); filter: grayscale(.25); }
.mood:hover .e { filter: none; }
.mood.on { background: var(--brand-soft); }
.mood.on .e { transform: scale(1.26) translateY(-2px); filter: none; }
.mood .l { font-size: 11px; font-weight: 700; color: var(--muted); }
.mood.on .l { color: var(--brand); }

/* ---------- Avatar ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }

/* ---------- Sheet / modal ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease both; }
.sheet {
  position: relative; width: 100%; max-width: 620px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 20px calc(22px + var(--safe-b));
  box-shadow: var(--sh-pop); animation: slideup .32s cubic-bezier(.2,.9,.3,1.1) both;
}
@media (min-width: 680px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: var(--r-xl); margin: 22px; max-height: 86dvh; animation: pop .24s cubic-bezier(.2,.9,.3,1.2) both; }
}
.sheet-grip { width: 44px; height: 5px; border-radius: 999px; background: var(--border-strong); margin: 6px auto 14px; }
@media (min-width: 680px) { .sheet-grip { display: none; } }
.sheet h2 { font-size: 20px; font-weight: 850; letter-spacing: -.01em; margin: 4px 0 6px; }
.steps { display: flex; gap: 6px; margin: 10px 0 4px; }
.step-pip { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); }
.step-pip.on { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.chip-pick { height: 38px; padding: 0 15px; border-radius: var(--r-pill); border: 1.5px solid var(--border); background: var(--surface); font-size: 13.5px; font-weight: 700; transition: all .15s; }
.chip-pick:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.chip-pick.on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); color: var(--brand); }
.tags-pick { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.starters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.starter { padding: 8px 13px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 800; transition: transform .14s; }
.starter:hover { transform: translateY(-1px); }

/* ---------- Toast / fx ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(104px + var(--safe-b)); transform: translateX(-50%);
  z-index: 130; padding: 12px 20px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg);
  font-size: 14px; font-weight: 700; box-shadow: var(--sh-3); animation: pop .24s ease both;
}
.toast.good { background: var(--ok); color: #fff; }
.toast.bad { background: var(--danger); color: #fff; }
.fx { position: fixed; inset: 0; z-index: 140; pointer-events: none; }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; color: var(--muted); padding: 56px 16px; font-size: 14px; }
.empty .big { display: block; font-size: 48px; margin-bottom: 12px; }
.spinner { width: 28px; height: 28px; margin: 40px auto; border: 3px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.skel { border-radius: var(--r); background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-card { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-1); text-align: center; }
.stat-card .n { font-size: 24px; font-weight: 850; letter-spacing: -.02em; }
.stat-card .l { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ---------- Detail hero ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .detail-grid { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; } }
.detail-cover { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); }
.detail-cover .cover { aspect-ratio: 2 / 3; }
.detail-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 850; letter-spacing: -.02em; line-height: 1.15; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta-pill { padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--text-2); }

/* ---------- Animations ---------- */
@keyframes pop { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideup { from { transform: translateY(36px); opacity: .3 } to { transform: translateY(0); opacity: 1 } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes shimmer { to { background-position: -200% 0 } }

/* ---------- Responsive shell ---------- */
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-brand { display: flex; }
  .tabbar { display: flex; }
  .topbar { height: 60px; }
  .search { max-width: none; margin: 0; }
  .search kbd { display: none; }
  .view { padding-bottom: calc(96px + var(--safe-b)); }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 520px) {
  .user-chip .nm { display: none; }
  .detail-title { font-size: 24px; }
}
@media (max-width: 859px) {
  .detail-cover .cover { aspect-ratio: 16 / 10; }
  .detail-cover .cover .emoji { font-size: 40px !important; }
  .detail-cover .cover .title { font-size: 20px !important; }
}
@media (max-width: 600px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .mobile-brand .side-brand-text { display: none; }
  .top-actions { gap: 6px; }
  .search input { height: 40px; padding-right: 12px; }
  .cover .stage-name { display: none; }
}
.side-help {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--sh-1); color: var(--text-2); font-weight: 700; font-size: 13.5px;
  transition: background .15s, transform .15s;
}
.side-help:hover { background: var(--surface-2); transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
