/* ==========================================================================
   Bangumi ACG Archive - Editorial Glass Design System
   Palette: Cold Silver Paper (light) / Midnight Cinema (dark)
   Locked Accent: Cobalt (#2f5bea light / #5b82ff dark)
   Shape Scale: 22px panels, 14px nested cards/covers, 999px interactive pills
   Note: Frosted glass surfaces are honest CSS backdrop-filter approximations
         with prefers-reduced-transparency solid fallbacks.
   ========================================================================== */

:root {
  --bg: #eef1f5;
  --bg-elevated: #e5eaf1;
  --surface: rgba(250, 252, 255, 0.58);
  --surface-strong: rgba(250, 252, 255, 0.86);
  --surface-solid: #f9fbfe;
  --surface-tint: rgba(47, 91, 234, 0.075);
  --surface-muted: rgba(232, 237, 245, 0.62);

  --ink: #111622;
  --ink-secondary: #435066;
  --ink-muted: #68768d;

  --accent: #2f5bea;
  --accent-hover: #244ad0;
  --accent-soft: rgba(47, 91, 234, 0.12);
  --accent-border: rgba(47, 91, 234, 0.34);
  --accent-ink: #ffffff;

  --border: rgba(17, 22, 34, 0.09);
  --border-strong: rgba(17, 22, 34, 0.17);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.72);

  --shadow-panel: 0 10px 30px -12px rgba(20, 34, 68, 0.11), 0 1px 3px rgba(20, 34, 68, 0.05), var(--inner-light);
  --shadow-lift: 0 20px 44px -16px rgba(20, 34, 68, 0.19), 0 3px 8px rgba(20, 34, 68, 0.06), var(--inner-light);

  --radius-panel: 22px;
  --radius-card: 14px;
  --radius-pill: 999px;

  --z-ambient: 0;
  --z-content: 10;
  --z-dock: 30;
  --z-dialog: 70;
  --z-toast: 90;
  --z-splash: 100;

  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0c1018;
  --bg-elevated: #121826;
  --surface: rgba(20, 27, 41, 0.56);
  --surface-strong: rgba(22, 30, 46, 0.88);
  --surface-solid: #141c2b;
  --surface-tint: rgba(91, 130, 255, 0.13);
  --surface-muted: rgba(29, 39, 58, 0.58);

  --ink: #f1f4f9;
  --ink-secondary: #b0bdd2;
  --ink-muted: #7f8fa8;

  --accent: #5b82ff;
  --accent-hover: #7395ff;
  --accent-soft: rgba(91, 130, 255, 0.18);
  --accent-border: rgba(91, 130, 255, 0.44);
  --accent-ink: #081022;

  --border: rgba(235, 242, 255, 0.1);
  --border-strong: rgba(235, 242, 255, 0.19);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  --shadow-panel: 0 14px 36px -14px rgba(0, 0, 0, 0.52), var(--inner-light);
  --shadow-lift: 0 24px 52px -14px rgba(0, 0, 0, 0.68), var(--inner-light);
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --surface: #f8fafd;
    --surface-strong: #ffffff;
    --surface-muted: #e9eef5;
  }
  [data-theme="dark"] {
    --surface: #141c2b;
    --surface-strong: #192336;
    --surface-muted: #1d283d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

body.splash-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Ambient Flowing Light Layer (GPU transform only)
   ========================================================================== */
.ambient-stage {
  position: fixed;
  inset: 0;
  z-index: var(--z-ambient);
  overflow: hidden;
  pointer-events: none;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(92px);
  will-change: transform;
}

.blob-a {
  width: 54vw;
  height: 54vw;
  max-width: 720px;
  max-height: 720px;
  top: -18%;
  left: -10%;
  background: radial-gradient(circle, rgba(47, 91, 234, 0.22), transparent 68%);
  animation: driftA 24s ease-in-out infinite alternate;
}

.blob-b {
  width: 48vw;
  height: 48vw;
  max-width: 640px;
  max-height: 640px;
  top: 12%;
  right: -12%;
  background: radial-gradient(circle, rgba(98, 138, 255, 0.18), transparent 70%);
  animation: driftB 28s ease-in-out infinite alternate;
}

.blob-c {
  width: 46vw;
  height: 46vw;
  max-width: 600px;
  max-height: 600px;
  bottom: -20%;
  left: 28%;
  background: radial-gradient(circle, rgba(132, 169, 224, 0.2), transparent 72%);
  animation: driftC 32s ease-in-out infinite alternate;
}

[data-theme="dark"] .blob-a {
  background: radial-gradient(circle, rgba(91, 130, 255, 0.24), transparent 68%);
}

[data-theme="dark"] .blob-b {
  background: radial-gradient(circle, rgba(56, 98, 214, 0.22), transparent 70%);
}

[data-theme="dark"] .blob-c {
  background: radial-gradient(circle, rgba(78, 128, 200, 0.16), transparent 72%);
}

@keyframes driftA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(14vw, 8vh, 0) scale(1.1); }
  100% { transform: translate3d(5vw, 18vh, 0) scale(0.95); }
}

@keyframes driftB {
  0% { transform: translate3d(0, 0, 0) scale(1.04); }
  50% { transform: translate3d(-12vw, 14vh, 0) scale(0.92); }
  100% { transform: translate3d(-4vw, 24vh, 0) scale(1.08); }
}

@keyframes driftC {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-10vw, -12vh, 0) scale(1.12); }
  100% { transform: translate3d(12vw, -5vh, 0) scale(0.96); }
}

/* ==========================================================================
   Shared Interactive Primitives
   ========================================================================== */
.btn-primary,
.btn-glass,
.btn-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease-fluid), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Self-hosted Official Icons (Simple Icons + Phosphor Icons via CSS mask) */
.ui-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-x { -webkit-mask-image: url("/icons/x.svg"); mask-image: url("/icons/x.svg"); width: 13px; height: 13px; }
.icon-bilibili { -webkit-mask-image: url("/icons/bilibili.svg"); mask-image: url("/icons/bilibili.svg"); width: 15px; height: 15px; }
.brand-icon-img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.icon-sync { -webkit-mask-image: url("/icons/arrows-clockwise.svg"); mask-image: url("/icons/arrows-clockwise.svg"); }
.icon-shuffle { -webkit-mask-image: url("/icons/shuffle.svg"); mask-image: url("/icons/shuffle.svg"); width: 14px; height: 14px; }
.icon-arrow-right { -webkit-mask-image: url("/icons/arrow-right.svg"); mask-image: url("/icons/arrow-right.svg"); width: 16px; height: 16px; }
.icon-chat { -webkit-mask-image: url("/icons/chat-text.svg"); mask-image: url("/icons/chat-text.svg"); }
.icon-monitor { -webkit-mask-image: url("/icons/monitor.svg"); mask-image: url("/icons/monitor.svg"); width: 13px; height: 13px; }
.icon-sun { -webkit-mask-image: url("/icons/sun.svg"); mask-image: url("/icons/sun.svg"); width: 13px; height: 13px; }
.icon-moon { -webkit-mask-image: url("/icons/moon.svg"); mask-image: url("/icons/moon.svg"); width: 13px; height: 13px; }

.cta-arrow {
  transition: transform 0.22s var(--ease-fluid);
}

.splash-cta:hover .cta-arrow {
  transform: translateX(3px);
}

.is-spinning {
  animation: iconSpin 0.9s linear infinite;
}

@keyframes iconSpin {
  to { transform: rotate(360deg); }
}

.btn-primary:active,
.btn-glass:active,
.btn-subtle:active {
  transform: scale(0.98);
}

.btn-primary {
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 11px 24px;
  font-size: 14.5px;
  box-shadow: 0 10px 24px -8px rgba(47, 91, 234, 0.5);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-glass {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 20px;
  font-size: 14px;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.btn-glass:hover {
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.btn-glass:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-subtle {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-secondary);
  padding: 5px 12px;
  font-size: 12px;
}

.btn-subtle:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.text-link {
  border: none;
  background: transparent;
  padding: 2px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.16s ease;
}

.text-link:hover {
  opacity: 0.78;
}

/* 3-State Theme Switcher: system / light / dark */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  flex-shrink: 0;
}

.theme-opt {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-opt:hover {
  color: var(--ink);
}

.theme-opt.active {
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(17, 22, 34, 0.12);
}

[data-theme="dark"] .theme-opt.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* ==========================================================================
   Asymmetric Split Splash Cover (Prominent Moving Poster Wall + Frosted Left)
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  height: 100dvh;
  z-index: var(--z-splash);
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.76s var(--ease-fluid), opacity 0.54s ease, visibility 0.76s;
}

.splash-screen.dismissed {
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Full-bleed crisp poster wall (single marquee on page, motivated by ACG cover archive) */
.splash-wall {
  position: fixed;
  inset: -48px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  transform: rotate(-6deg) scale(1.1);
  opacity: 0.78;
  filter: saturate(1.12);
  pointer-events: none;
}

[data-theme="dark"] .splash-wall {
  opacity: 0.72;
}

.splash-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  will-change: transform;
  animation: wallFlowUp 48s linear infinite;
}

.splash-col:nth-child(even) {
  animation-name: wallFlowDown;
  animation-duration: 54s;
}

.splash-col:nth-child(3n) {
  animation-duration: 60s;
}

@keyframes wallFlowUp {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, -50%, 0); }
}

@keyframes wallFlowDown {
  0% { transform: translate3d(0, -50%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.splash-poster {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  border-radius: var(--radius-card);
  object-fit: cover;
  background: var(--bg-elevated);
  box-shadow: 0 10px 26px rgba(10, 16, 30, 0.24);
}

/* Directional legibility scrim: strong on left editorial side, transparent on right so posters shine */
.splash-scrim {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(104deg,
      color-mix(in srgb, var(--bg) 90%, transparent) 0%,
      color-mix(in srgb, var(--bg) 74%, transparent) 44%,
      color-mix(in srgb, var(--bg) 28%, transparent) 78%,
      color-mix(in srgb, var(--bg) 16%, transparent) 100%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 34%, transparent) 0%,
      transparent 28%,
      transparent 76%,
      color-mix(in srgb, var(--bg) 42%, transparent) 100%);
}

.splash-inner {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top)) 32px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.splash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.splash-sync-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.splash-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 44px;
  padding: 16px 0 24px;
}

.splash-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  animation: splashEnter 0.72s var(--ease-fluid) both;
}

@keyframes splashEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.splash-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.splash-avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-card);
  object-fit: cover;
  border: 2px solid var(--surface-solid);
  box-shadow: var(--shadow-panel);
  background: var(--surface-muted);
  flex-shrink: 0;
}

.splash-id-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.splash-handle {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.splash-sign {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-secondary);
  max-width: 36ch;
}

.splash-title {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink);
}

.splash-numbers {
  display: inline-grid;
  grid-template-columns: repeat(5, auto);
  gap: 22px;
  padding: 14px 22px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
}

.splash-num-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.splash-num-item strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.splash-num-item span {
  font-size: 12px;
  color: var(--ink-muted);
}

.splash-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.splash-cta {
  padding: 13px 30px;
  font-size: 15px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-links-compact {
  margin-top: 8px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: transform 0.2s var(--ease-fluid), border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.social-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.social-pill:active {
  transform: scale(0.98);
}

/* Right side floating featured review card on splash */
.splash-note-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  animation: splashEnter 0.84s var(--ease-fluid) 0.1s both;
}

.splash-note {
  width: 100%;
  max-width: 440px;
  padding: 20px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.28s var(--ease-fluid), border-color 0.2s ease;
}

.splash-note:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}

.splash-note-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.splash-note-cover {
  width: 50px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-muted);
  flex-shrink: 0;
}

.splash-note-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.splash-note-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splash-note-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.score-inline {
  font-weight: 700;
  color: var(--accent);
}

.splash-note-quote {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-secondary);
  white-space: pre-line;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ==========================================================================
   Main Archive Shell & Single-Line Desktop Nav
   ========================================================================== */
.archive-shell {
  position: relative;
  z-index: var(--z-content);
  max-width: 1320px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 24px calc(56px + env(safe-area-inset-bottom));
}

.site-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 6px 10px 6px 4px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-width: 0;
}

.nav-brand:hover {
  background: var(--surface);
}

.brand-glyph {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-sync-state {
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.toast {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface-solid);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
}

/* Orchestrated Entrance when transitioning from Splash into Archive */
body.splash-open .archive-shell .site-nav,
body.splash-open .archive-shell .tile,
body.splash-open .archive-shell .filter-dock {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}

.archive-shell.revealed .site-nav {
  animation: stageIn 0.64s var(--ease-fluid) 0.04s both;
}

.archive-shell.revealed .curated-grid .tile:nth-child(1) {
  animation: stageIn 0.72s var(--ease-fluid) 0.1s both;
}

.archive-shell.revealed .curated-grid .tile:nth-child(2) {
  animation: stageIn 0.72s var(--ease-fluid) 0.17s both;
}

.archive-shell.revealed .curated-grid .tile:nth-child(3) {
  animation: stageIn 0.72s var(--ease-fluid) 0.24s both;
}

.archive-shell.revealed .curated-grid .tile:nth-child(4) {
  animation: stageIn 0.72s var(--ease-fluid) 0.31s both;
}

.archive-shell.revealed .filter-dock {
  animation: stageIn 0.72s var(--ease-fluid) 0.36s both;
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ==========================================================================
   Asymmetric 4-Cell Curated Overview Grid (Diverse Backgrounds)
   ========================================================================== */
.curated-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-panel);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  transition: transform 0.34s var(--ease-fluid), border-color 0.22s ease, box-shadow 0.34s var(--ease-fluid);
}

/* Interactive specular reflection following cursor */
.tile::after,
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.32),
    transparent 64%
  );
  transition: opacity 0.32s ease;
}

[data-theme="dark"] .tile::after,
[data-theme="dark"] .work-card::after {
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(130, 165, 255, 0.14),
    transparent 64%
  );
}

.tile:hover::after,
.work-card:hover::after {
  opacity: 1;
}

.tile:hover {
  border-color: var(--border-strong);
}

.tile-spotlight {
  grid-column: span 7;
  min-height: 310px;
  cursor: pointer;
}

.tile-profile {
  grid-column: span 5;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.tile-mediums {
  grid-column: span 7;
  padding: 22px;
  background: linear-gradient(145deg, var(--surface-tint), var(--surface));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tile-spectrum {
  grid-column: span 5;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.skeleton-tile {
  min-height: 240px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-muted) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Cell 1: Full-Bleed Spotlight Review */
.spotlight-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 22%;
  transform: scale(1.04);
  transition: transform 0.7s var(--ease-fluid);
}

.tile-spotlight:hover .spotlight-bg {
  transform: scale(1.08);
}

.spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(11, 16, 28, 0.42) 0%,
    rgba(11, 16, 28, 0.68) 46%,
    rgba(11, 16, 28, 0.92) 100%);
}

.spotlight-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  color: #f4f7fc;
}

.spotlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spotlight-kicker {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(244, 247, 252, 0.8);
}

.spotlight-more {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(17, 24, 39, 0.45);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background-color 0.18s ease;
}

.spotlight-more:hover {
  background: rgba(255, 255, 255, 0.2);
}

.spotlight-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spotlight-title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.24;
  color: #ffffff;
}

.spotlight-quote {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: rgba(241, 245, 252, 0.92);
  max-width: 56ch;
  white-space: pre-line;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.spotlight-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.spotlight-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(235, 241, 252, 0.8);
}

.spotlight-score {
  font-weight: 800;
  color: #ffffff;
  background: var(--accent);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.spotlight-mini-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spotlight-thumb-btn {
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  width: 36px;
  height: 48px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.2s var(--ease-fluid), border-color 0.2s ease;
}

.spotlight-thumb-btn:hover,
.spotlight-thumb-btn.active {
  transform: translateY(-2px);
  border-color: #ffffff;
}

.spotlight-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cell 2: Profile & Counters */
.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-card);
  object-fit: cover;
  border: 2px solid var(--surface-solid);
  background: var(--surface-muted);
  flex-shrink: 0;
}

.profile-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-name {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.profile-handle {
  font-size: 13px;
  color: var(--ink-muted);
}

.profile-sign {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.profile-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.counter-cell {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.counter-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.counter-label {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Cell 3: Medium Tiles (Locked single accent hierarchy) */
.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tile-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.tile-desc {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.avg-tag {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.medium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  flex: 1;
}

.medium-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.24s var(--ease-fluid), border-color 0.2s ease, background-color 0.2s ease;
}

.medium-btn:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.medium-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.medium-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.medium-btn.active .medium-name {
  color: var(--accent);
}

.medium-count {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.medium-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Cell 4: Spectrum Bars (no heavy background tracks) & Tags */
.spectrum-bars {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 126px;
  padding-top: 14px;
}

.bar-col {
  border: none;
  background: transparent;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  cursor: pointer;
}

.bar-count {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  min-height: 14px;
}

.bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar-fill {
  width: 100%;
  max-width: 22px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: var(--accent);
  opacity: 0.42;
  transform-origin: bottom;
  animation: barRise 0.64s var(--ease-fluid) var(--bar-delay, 0s) both;
  transition: transform 0.22s var(--ease-fluid), opacity 0.2s ease;
}

@keyframes barRise {
  from {
    transform: scaleY(0.08);
    opacity: 0.1;
  }
  to {
    transform: scaleY(1);
    opacity: 0.42;
  }
}

.bar-col:hover .bar-fill,
.bar-col.active .bar-fill {
  opacity: 1;
  transform: scaleY(1.06);
}

.bar-label {
  font-size: 11px;
  color: var(--ink-muted);
}

.bar-col.active .bar-label {
  color: var(--accent);
  font-weight: 800;
}

.tag-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tag-pill {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tag-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.tag-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.tag-pill small {
  opacity: 0.72;
  font-size: 10.5px;
}

/* ==========================================================================
   Sticky Filter Dock
   ========================================================================== */
.filter-dock {
  position: sticky;
  top: 12px;
  z-index: var(--z-dock);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 14px 16px;
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.dock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tab-rail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(17, 22, 34, 0.1);
}

[data-theme="dark"] .tab-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.tab-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.tab-btn.active .tab-count {
  color: var(--accent);
}

.dock-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.switch-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.switch-chip:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.switch-chip input {
  margin: 0;
  accent-color: var(--accent);
}

.mode-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.mode-btn.active {
  background: var(--surface-solid);
  color: var(--ink);
}

[data-theme="dark"] .mode-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.chip-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.type-chip {
  border: 1px solid var(--border);
  background: transparent;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.type-chip:hover {
  background: var(--surface-muted);
}

.type-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.query-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  min-width: 240px;
}

.search-field,
.sort-field {
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 13px;
  transition: border-color 0.18s ease;
}

.search-field::placeholder {
  color: var(--ink-muted);
}

.search-field {
  width: 100%;
  max-width: 280px;
}

.search-field:focus,
.sort-field:focus {
  border-color: var(--accent);
  outline: none;
}

.sort-field {
  cursor: pointer;
}

.active-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.active-chip button {
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}

.list-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 0 4px 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Collection Grid - Detail Cards & Clean Poster Wall
   ========================================================================== */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.work-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 16px;
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.32s var(--ease-fluid), box-shadow 0.32s var(--ease-fluid), border-color 0.22s ease;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}

.flow-in {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

.flow-in.is-visible {
  animation: cardFloatUp 0.56s var(--ease-fluid) var(--stagger, 0ms) forwards;
}

@keyframes cardFloatUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.work-top {
  display: flex;
  gap: 14px;
}

.work-cover {
  width: 82px;
  height: 114px;
  border-radius: var(--radius-card);
  object-fit: cover;
  background: var(--surface-muted);
  flex-shrink: 0;
  transition: transform 0.42s var(--ease-fluid);
}

.work-card:hover .work-cover {
  transform: scale(1.04);
}

.work-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.work-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.work-type {
  font-weight: 700;
  color: var(--accent);
}

.work-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-orig {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-score-line {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-muted);
}

.work-my-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.work-my-score.unrated {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-muted);
}

.work-date {
  margin-left: auto;
}

.work-comment {
  margin: 0;
  padding: 11px 13px;
  border-radius: var(--radius-card);
  background: var(--surface-muted);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-secondary);
  white-space: pre-line;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Poster Mode: clean image without overlaid pill clutter */
.archive-grid.poster-mode {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px;
}

.poster-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  transition: transform 0.32s var(--ease-fluid), box-shadow 0.32s var(--ease-fluid), border-color 0.2s ease;
}

.poster-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}

.poster-frame {
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: var(--surface-muted);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.48s var(--ease-fluid);
}

.poster-item:hover .poster-frame img {
  transform: scale(1.05);
}

.poster-caption {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.poster-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.poster-rate {
  font-weight: 700;
  color: var(--accent);
}

/* States & Footer */
.state-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 40px 24px;
  text-align: center;
  backdrop-filter: blur(20px);
}

.state-panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.state-panel p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.site-footer {
  margin-top: 44px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.site-footer a {
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Subject Detail Dialog (Desktop Centered / Mobile Bottom Sheet)
   ========================================================================== */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-dialog);
  background: rgba(8, 12, 22, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.22s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialog-sheet {
  width: 100%;
  max-width: 660px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-lift);
  position: relative;
  animation: sheetIn 0.36s var(--ease-fluid) both;
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(12, 16, 28, 0.62);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.dialog-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.dialog-hero-bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.15);
  opacity: 0.22;
}

.dialog-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.dialog-cover {
  width: 112px;
  height: 156px;
  border-radius: var(--radius-card);
  object-fit: cover;
  background: var(--surface-muted);
  box-shadow: 0 12px 26px rgba(10, 16, 30, 0.25);
  flex-shrink: 0;
}

.dialog-head-text {
  min-width: 0;
  flex: 1;
  padding-right: 54px;
}

.dialog-tags-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.dialog-type-tag {
  font-weight: 700;
  color: var(--accent);
}

.dialog-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.28;
}

.dialog-orig {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.dialog-scores {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.dialog-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dialog-comment {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 14px 16px;
}

.dialog-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.dialog-comment-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-line;
  color: var(--ink);
}

.dialog-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dialog-summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--ink-secondary);
  white-space: pre-line;
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.dialog-meta-line {
  font-size: 12px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Explicit Responsive Collapse (< 1024px, < 768px, < 640px)
   ========================================================================== */
@media (max-width: 1024px) {
  .tile-spotlight,
  .tile-profile,
  .tile-mediums,
  .tile-spectrum {
    grid-column: span 12;
  }

  .splash-split {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
  }

  .splash-note-wrap {
    justify-content: flex-start;
  }

  .splash-note {
    max-width: 560px;
  }
}

@media (max-width: 768px) {
  .splash-wall {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .splash-scrim {
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 72%, transparent) 0%,
      color-mix(in srgb, var(--bg) 82%, transparent) 52%,
      color-mix(in srgb, var(--bg) 42%, transparent) 100%);
  }

  .splash-inner {
    padding: calc(14px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
    gap: 16px;
  }

  .splash-avatar {
    width: 56px;
    height: 56px;
  }

  .splash-title {
    font-size: clamp(30px, 8vw, 40px);
  }

  .splash-numbers {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 10px;
    text-align: center;
  }

  .splash-num-item strong {
    font-size: 19px;
  }

  .splash-num-item span {
    font-size: 11px;
  }

  .splash-actions {
    width: 100%;
  }

  .splash-actions .btn-primary,
  .splash-actions .btn-glass {
    flex: 1 1 130px;
  }

  .splash-note {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .archive-shell {
    padding: calc(10px + env(safe-area-inset-top)) 14px calc(44px + env(safe-area-inset-bottom));
  }

  .site-nav {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
  }

  .nav-tools {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .nav-sync-state {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .theme-opt {
    padding: 4px 8px;
    font-size: 11.5px;
  }

  .curated-grid {
    gap: 12px;
    margin-bottom: 16px;
  }

  .tile-spotlight {
    min-height: 270px;
  }

  .spotlight-content {
    padding: 16px;
  }

  .tile-profile,
  .tile-mediums,
  .tile-spectrum {
    padding: 16px;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
  }

  .profile-name {
    font-size: 20px;
  }

  .counter-cell {
    padding: 11px;
  }

  .counter-num {
    font-size: 21px;
  }

  .medium-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .medium-btn {
    padding: 13px 12px;
  }

  .medium-count {
    font-size: 24px;
  }

  .spectrum-bars {
    height: 112px;
    gap: 4px;
  }

  .filter-dock {
    position: static;
    padding: 12px;
    gap: 10px;
  }

  .tab-rail,
  .chip-rail {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tab-rail::-webkit-scrollbar,
  .chip-rail::-webkit-scrollbar {
    display: none;
  }

  .dock-right {
    width: 100%;
    justify-content: space-between;
  }

  .query-group {
    width: 100%;
    min-width: 0;
  }

  .search-field {
    max-width: none;
    font-size: 16px;
  }

  .sort-field {
    font-size: 16px;
    max-width: 148px;
  }

  .archive-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .work-card {
    padding: 14px;
  }

  .work-cover {
    width: 72px;
    height: 100px;
  }

  .archive-grid.poster-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dialog-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .dialog-sheet {
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .dialog-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .dialog-head-text {
    padding-right: 0;
  }

  .dialog-tags-inline,
  .dialog-scores {
    justify-content: center;
  }

  .dialog-foot {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* ==========================================================================
   Reduced Motion Guardrail (mandatory for MOTION_INTENSITY > 3)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .splash-col,
  .ambient-blob,
  .bar-fill,
  .splash-lead,
  .splash-note-wrap,
  .archive-shell.revealed .site-nav,
  .archive-shell.revealed .curated-grid .tile,
  .archive-shell.revealed .filter-dock,
  .flow-in.is-visible {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .splash-screen,
  .tile,
  .work-card,
  .poster-item {
    transition: none !important;
  }
}
