/* ============================================================
   浮光 FUGUANG — editorial video curation
   1. tokens / reset
   2. typography & utilities
   3. masthead
   4. hero
   5. ticker / note
   6. selection: toolbar, chips, cards
   7. douyin board
   8. resolver
   9. footer
   10. overlays: sheet, drawer, toast
   11. responsive & motion
   ============================================================ */

/* ---------- 1. tokens ---------- */

:root {
  --coral: #e0506a;
  --teal: #0c8b95;
  --gold: #b8873f;

  --bg: #f2eee5;
  --bg-soft: #eae4d8;
  --surface: #faf7f0;
  --surface-2: #f6f1e7;
  --ink: #16130f;
  --ink-2: #3d372f;
  --ink-3: #6f675b;
  --line: rgba(22, 19, 15, 0.14);
  --line-strong: rgba(22, 19, 15, 0.28);
  --shadow: 0 18px 50px -24px rgba(30, 22, 12, 0.35);
  --shadow-soft: 0 10px 30px -20px rgba(30, 22, 12, 0.4);
  --chip-bg: transparent;
  --scrim: rgba(20, 16, 10, 0.45);

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono",
    monospace;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 74px;
}

[data-theme="ink"] {
  --coral: #ff6b81;
  --teal: #38d8ce;
  --gold: #d8b16b;

  --bg: #0b0c0e;
  --bg-soft: #101215;
  --surface: #131519;
  --surface-2: #171a1f;
  --ink: #f1ede4;
  --ink-2: #cfc8bb;
  --ink-3: #8b8478;
  --line: rgba(241, 237, 228, 0.13);
  --line-strong: rgba(241, 237, 228, 0.3);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --shadow-soft: 0 12px 34px -22px rgba(0, 0, 0, 0.9);
  --scrim: rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(224, 80, 106, 0.09), transparent 70%),
    radial-gradient(760px 460px at 6% 12%, rgba(12, 139, 149, 0.08), transparent 70%);
}

[data-theme="ink"] body::before {
  background:
    radial-gradient(900px 560px at 78% -8%, rgba(255, 107, 129, 0.1), transparent 70%),
    radial-gradient(800px 500px at 4% 10%, rgba(56, 216, 206, 0.07), transparent 70%);
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

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

h1,
h2,
h3,
p,
figure,
ol,
ul,
dl,
dd {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 10px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 1.5px solid var(--coral);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

[data-theme="ink"] .grain {
  opacity: 0.1;
  mix-blend-mode: screen;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  transition: top 0.2s;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

[hidden] {
  display: none !important;
}

/* ---------- 2. type & utilities ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-feature-settings: "tnum" 1;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink);
  opacity: 0.5;
}

.kicker__cn {
  letter-spacing: 0.28em;
  color: var(--ink);
}

h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-top: 14px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.section-head__desc {
  max-width: 420px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.75;
  padding-bottom: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn--primary:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.btn--square {
  width: 46px;
  padding: 0;
  border-color: var(--line-strong);
}

.btn--square svg {
  width: 18px;
  height: 18px;
}

.btn--square.is-saved {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.btn--square.is-saved svg {
  fill: currentColor;
}

.btn--danger:hover {
  background: #a3272f;
  border-color: #a3272f;
  color: #fff;
}

.btn--random {
  height: 42px;
  padding: 0 16px;
}

.btn:active {
  transform: translateY(1px);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.icon-btn:hover {
  background: var(--surface);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn__count {
  position: absolute;
  top: 1px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 17px;
  text-align: center;
}

.icon-sun,
.icon-moon {
  display: none;
}

[data-theme="paper"] .icon-moon,
[data-theme="ink"] .icon-sun {
  display: block;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  display: inline-block;
}

.dot--coral {
  background: var(--coral);
}

.dot--teal {
  background: var(--teal);
}

/* ---------- 3. masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.masthead.is-compact {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-color: var(--line-strong);
}

.masthead__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand__mark {
  width: 42px;
  height: auto;
  opacity: 0.92;
}

.brand__text {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand__latin {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  margin-right: 10px;
}

.nav a {
  position: relative;
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 0;
  transition: color 0.2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ---------- 4. hero ---------- */

.hero {
  padding-top: clamp(30px, 4vw, 52px);
}

.hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.hero__issue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.hero__issue .dot {
  width: 3px;
  height: 3px;
  background: var(--ink-3);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

.live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(224, 80, 106, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 80, 106, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(224, 80, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 80, 106, 0);
  }
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  gap: clamp(28px, 4.6vw, 74px);
  padding-top: clamp(24px, 3vw, 40px);
  align-items: start;
}

.hero__media {
  margin: 0;
  position: relative;
}

.media__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: var(--radius);
  isolation: isolate;
}

.media__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}

.media__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 42%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.media__frame--hero {
  cursor: pointer;
  border: 1px solid var(--line);
}

.media__frame--hero:hover img {
  transform: scale(1.025);
}

.media__frame--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 1.1s var(--ease);
  pointer-events: none;
}

.media__frame--hero:hover::before {
  transform: translateX(120%);
}

.hero__quality {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--bg);
  color: var(--ink);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.5);
}

.hero__quality::after {
  content: "分";
  font-size: 8px;
  letter-spacing: 0.1em;
  margin-top: 3px;
  color: var(--ink-3);
  font-weight: 400;
}

.media__platform {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  padding: 5px 10px;
  background: rgba(10, 10, 10, 0.66);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(6px);
}

.media__duration {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  padding: 3px 7px;
  background: rgba(10, 10, 10, 0.7);
  color: #f5f2ea;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.hero__play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: rgba(250, 247, 240, 0.94);
  color: #16130f;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.hero__play svg {
  width: 15px;
  height: 15px;
}

.media__frame--hero:hover .hero__play,
.media__frame--hero:focus-visible .hero__play {
  opacity: 1;
  transform: scale(1);
}

.hero__media figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  font-size: 12px;
  color: var(--ink-3);
}

.fig-dot {
  opacity: 0.5;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.hero__meta b {
  color: var(--coral);
  font-weight: 500;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin-top: 16px;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__desc {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.hero__score {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.score-ring {
  position: relative;
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-fg {
  fill: none;
  stroke-width: 2.5;
}

.ring-bg {
  stroke: var(--line);
}

.ring-fg {
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 1.1s var(--ease);
}

.score-ring__num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.score-caption {
  color: var(--ink-3);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.hero__reason {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.score-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
}

.score-subs li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.score-subs i {
  width: 14px;
  height: 2px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.score-subs i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--v, 0));
}

/* ---------- 5. ticker / note ---------- */

.ticker {
  margin-top: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.ticker__inner {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 0.9fr 1.6fr auto;
  align-items: center;
  gap: 24px;
  padding-block: 16px;
}

.ticker__cell {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink-3);
  font-size: 12px;
}

.ticker__cell + .ticker__cell {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.ticker__cell .mono {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticker__cell strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.ticker__cell--wide {
  font-size: 12px;
  color: var(--ink-2);
}

.ticker__cell--time {
  font-size: 11px;
}

.ticker__cell--time strong {
  font-size: 12px;
}

.note {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  padding-block: clamp(54px, 7vw, 96px);
}

.note__body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.note__body > p {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: var(--ink-2);
}

.note__body em {
  font-style: normal;
  color: var(--ink);
  box-shadow: inset 0 -0.45em 0 rgba(224, 80, 106, 0.16);
}

.note__aside {
  font-family: var(--font-sans) !important;
  font-size: 12.5px !important;
  line-height: 1.9 !important;
  color: var(--ink-3) !important;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ---------- 6. selection ---------- */

.selection {
  padding-bottom: clamp(70px, 9vw, 130px);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 18px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-3);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

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

.seg.is-active {
  background: var(--ink);
  color: var(--bg);
}

.seg .dot {
  width: 5px;
  height: 5px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  max-width: 330px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color 0.2s, background 0.2s;
}

.search:focus-within {
  border-color: var(--ink);
  background: var(--surface);
}

.search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
}

.search input::placeholder {
  color: var(--ink-3);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.select select {
  appearance: none;
  height: 100%;
  padding: 0 34px 0 14px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  cursor: pointer;
}

.select svg {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 10px;
}

.chips--small {
  padding-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  transition: all 0.2s var(--ease);
}

.chip .mono {
  font-size: 9px;
  color: var(--ink-3);
}

.chip:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.chip.is-active .mono {
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}

.chips--small .chip {
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
  border-color: transparent;
  color: var(--ink-3);
}

.chips--small .chip:hover {
  background: var(--surface);
  border-color: var(--line);
}

.chips--small .chip.is-active {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  box-shadow: inset 0 -1px 0 var(--ink);
}

.result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.result-line__hint {
  text-transform: none;
  letter-spacing: 0.02em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 40px) clamp(18px, 2vw, 30px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: rise 0.65s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 42ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: var(--radius);
  isolation: isolate;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}

.card:hover .card__media img {
  transform: scale(1.045);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.card__media.is-missing {
  background:
    linear-gradient(135deg, var(--bg-soft) 0%, var(--surface) 100%),
    repeating-linear-gradient(45deg, transparent 0 8px, var(--line) 8px 9px);
}

.card__quality {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 3px 7px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.45);
}

.card__quality::after {
  content: "分";
  font-size: 7px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0;
}

.card__quality[data-grade="S"] {
  background: var(--coral);
  color: #fff;
}

.card__quality[data-grade="S"]::after {
  color: rgba(255, 255, 255, 0.72);
}

.card__platform {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 3px 7px;
  background: rgba(10, 10, 10, 0.62);
  color: #f4f1e9;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  backdrop-filter: blur(4px);
}

.card__duration {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 8px;
  color: #f4f1e9;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.card__rank {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.08em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.card__play {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.card__play span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(250, 247, 240, 0.95);
  color: #16130f;
  font-size: 11px;
  letter-spacing: 0.06em;
  transform: translateY(6px);
  transition: transform 0.35s var(--ease);
}

.card__play svg {
  width: 13px;
  height: 13px;
}

.card:hover .card__play {
  opacity: 1;
}

.card:hover .card__play span {
  transform: none;
}

.card__body {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.card__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.card__eyebrow .sep {
  opacity: 0.5;
}

.card__title {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.card:hover .card__title {
  color: var(--coral);
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 2px;
  font-size: 11px;
  color: var(--ink-3);
}

.card__author {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.card__avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-soft);
  object-fit: cover;
  flex: 0 0 auto;
}

.card__author span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  flex: 0 0 auto;
}

.card__views svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.card__save {
  position: absolute;
  z-index: 3;
  right: 9px;
  top: 44px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.45);
  color: #fff;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.25s var(--ease);
  backdrop-filter: blur(4px);
}

.card__save svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.card:hover .card__save,
.card__save.is-saved {
  opacity: 1;
  transform: none;
}

.card__save:hover {
  background: rgba(10, 10, 10, 0.8);
}

.card__save.is-saved {
  background: var(--coral);
}

.card__save.is-saved svg {
  fill: currentColor;
}

.empty {
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
}

.empty__title {
  font-family: var(--font-serif);
  font-size: 24px;
}

.empty__desc {
  color: var(--ink-3);
  font-size: 13px;
  margin: 8px 0 22px;
}

.load-more {
  display: flex;
  justify-content: center;
  padding-top: 42px;
}

.load-more .btn {
  min-width: 200px;
}

/* ---------- 7. douyin board ---------- */

.board {
  padding-bottom: clamp(70px, 9vw, 120px);
}

.board__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board__status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-teal 2.6s infinite;
}

@keyframes pulse-teal {
  0% {
    box-shadow: 0 0 0 0 rgba(12, 139, 149, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(12, 139, 149, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(12, 139, 149, 0);
  }
}

.board__lead {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 26px;
}

.hot-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: var(--radius);
  text-align: left;
}

.hot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.hot-card:hover img {
  transform: scale(1.05);
}

.hot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.78) 100%);
}

.hot-card__rank {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hot-card__body {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
}

.hot-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

.hot-card__title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-card__heat {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.66);
}

.hot-card__open {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s;
}

.hot-card:hover .hot-card__open {
  opacity: 1;
}

.hot-card__open svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.board__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 42px;
  margin-top: 10px;
  border-top: 1px solid var(--line-strong);
}

.hot-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
  transition: padding 0.25s var(--ease), background 0.25s;
}

.hot-row:hover {
  padding-left: 8px;
  background: var(--surface-2);
}

.hot-row__rank {
  flex: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.hot-row:nth-child(-n + 3) .hot-row__rank {
  color: var(--coral);
}

.hot-row__thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 34px;
  overflow: hidden;
  background: var(--bg-soft);
}

.hot-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-row__title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-row__heat {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
}

.hot-row__arrow {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.25s var(--ease);
}

.hot-row:hover .hot-row__arrow {
  opacity: 1;
  transform: none;
  stroke: var(--teal);
}

.board__note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 780px;
  margin-top: 26px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.8;
}

.board__note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* ---------- 8. resolver ---------- */

.resolver {
  padding-bottom: clamp(70px, 9vw, 120px);
}

.resolver__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(30px, 5vw, 80px);
  padding: clamp(30px, 4.6vw, 66px);
  background: #15120e;
  color: #f2eee5;
  border-radius: 3px;
  overflow: hidden;
  isolation: isolate;
}

[data-theme="ink"] .resolver__panel {
  background: #f2eee5;
  color: #15120e;
}

.resolver__panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -10% auto auto;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(224, 80, 106, 0.35), transparent 62%);
  filter: blur(10px);
}

[data-theme="ink"] .resolver__panel::before {
  background: radial-gradient(circle, rgba(12, 139, 149, 0.22), transparent 62%);
}

.resolver__panel .kicker {
  color: rgba(242, 238, 229, 0.5);
}

.resolver__panel .kicker::before {
  background: currentColor;
}

[data-theme="ink"] .resolver__panel .kicker {
  color: rgba(21, 18, 14, 0.5);
}

.resolver__copy h2 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.resolver__copy p {
  margin-top: 20px;
  max-width: 360px;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(242, 238, 229, 0.64);
}

[data-theme="ink"] .resolver__copy p {
  color: rgba(21, 18, 14, 0.62);
}

.resolver__copy code {
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  color: #f2eee5;
}

[data-theme="ink"] .resolver__copy code {
  background: rgba(0, 0, 0, 0.07);
  color: #15120e;
}

.resolver__examples {
  margin-top: 26px;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(242, 238, 229, 0.38);
  letter-spacing: 0.02em;
}

[data-theme="ink"] .resolver__examples {
  color: rgba(21, 18, 14, 0.38);
}

.resolver__form {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.resolver__form > label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(242, 238, 229, 0.5);
}

[data-theme="ink"] .resolver__form > label {
  color: rgba(21, 18, 14, 0.5);
}

.resolver__field {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 6px;
  border: 1px solid rgba(242, 238, 229, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="ink"] .resolver__field {
  border-color: rgba(21, 18, 14, 0.18);
  background: rgba(0, 0, 0, 0.03);
}

.resolver__field input {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: inherit;
}

.resolver__field input::placeholder {
  color: rgba(242, 238, 229, 0.32);
}

[data-theme="ink"] .resolver__field input::placeholder {
  color: rgba(21, 18, 14, 0.32);
}

.resolver__field .btn--primary {
  background: #f2eee5;
  border-color: #f2eee5;
  color: #15120e;
}

.resolver__field .btn--primary:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.resolver__status {
  min-height: 20px;
  margin-top: 12px;
  font-size: 11.5px;
  color: rgba(242, 238, 229, 0.55);
}

[data-theme="ink"] .resolver__status {
  color: rgba(21, 18, 14, 0.55);
}

.resolver__status.is-error {
  color: #ff9a9a;
}

.resolver__out {
  margin-top: 12px;
  border-top: 1px solid rgba(242, 238, 229, 0.16);
  padding-top: 16px;
}

[data-theme="ink"] .resolver__out {
  border-color: rgba(21, 18, 14, 0.14);
}

.resolve-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.resolve-card__cover {
  flex: 0 0 96px;
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.resolve-card__body {
  min-width: 0;
  flex: 1;
}

.resolve-card__title {
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resolve-card__meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.45);
}

[data-theme="ink"] .resolve-card__meta {
  color: rgba(21, 18, 14, 0.45);
}

.resolve-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.resolve-card__actions .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 11.5px;
  border-color: rgba(242, 238, 229, 0.25);
  color: #f2eee5;
}

.resolve-card__actions .btn:hover {
  background: #f2eee5;
  color: #15120e;
}

[data-theme="ink"] .resolve-card__actions .btn {
  border-color: rgba(21, 18, 14, 0.22);
  color: #15120e;
}

[data-theme="ink"] .resolve-card__actions .btn:hover {
  background: #15120e;
  color: #f2eee5;
}

/* ---------- 9. footer ---------- */

.footer {
  border-top: 1px solid var(--line-strong);
  padding-top: clamp(44px, 6vw, 76px);
  padding-bottom: 26px;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 50px;
}

.footer__brand .brand__name {
  font-size: 34px;
}

.footer__brand p {
  margin-top: 10px;
  font-family: var(--font-serif);
  color: var(--ink-3);
  font-size: 14px;
}

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

.footer__cols p {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.9;
}

.footer__cols .mono {
  color: var(--ink);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 62px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.footer__filing {
  color: var(--ink-2);
  font-size: 10px;
  text-decoration: none;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.footer__filing:hover {
  color: var(--coral);
}

.footer__filing:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---------- 10. overlays ---------- */

.sheet {
  width: min(1040px, calc(100vw - 40px));
  max-height: calc(100dvh - 60px);
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.sheet::backdrop {
  background: rgba(10, 8, 5, 0.55);
  backdrop-filter: blur(4px);
}

.sheet[open] {
  animation: sheet-in 0.4s var(--ease);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 14px 26px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.sheet__body {
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.detail__media {
  position: relative;
  background: var(--bg-soft);
  min-height: 100%;
}

.detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 560px;
}

.detail__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.detail__badges {
  position: absolute;
  z-index: 2;
  left: 20px;
  top: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.detail__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.detail__score small {
  font-size: 7px;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 3px;
  letter-spacing: 0.08em;
}

.detail__platform {
  padding: 6px 10px;
  background: rgba(10, 10, 10, 0.6);
  color: #f4f1e9;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(6px);
}

.detail__play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(250, 247, 240, 0.94);
  color: #16130f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease), background 0.3s;
}

.detail__play:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: #fff;
}

.detail__play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.detail__content {
  padding: clamp(22px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.detail__title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.detail__author {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.detail__author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-soft);
}

.detail__author span {
  color: var(--ink-3);
  font-size: 11px;
}

.detail__desc {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.detail__reason {
  padding: 12px 14px;
  border-left: 2px solid var(--coral);
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}

.detail__reason b {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: block;
  margin-bottom: 3px;
  font-weight: 400;
}

.detail__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.detail__stat {
  background: var(--bg);
  padding: 10px 12px;
}

.detail__stat dt {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.detail__stat dd {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.02em;
}

.detail__bars {
  display: grid;
  gap: 9px;
  padding-top: 4px;
}

.bar {
  display: grid;
  grid-template-columns: 44px 1fr 30px;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.bar__track {
  height: 3px;
  background: var(--line);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--v, 0));
  transition: transform 0.9s var(--ease);
}

.bar:nth-child(1) .bar__fill {
  background: var(--coral);
}

.bar em {
  font-style: normal;
  text-align: right;
  color: var(--ink-2);
}

.detail__actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

.detail__actions .btn {
  height: 44px;
}

.detail__hint {
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* handoff */

.sheet--handoff {
  width: min(440px, calc(100vw - 32px));
}

.handoff__body {
  padding: 24px 26px 30px;
}

.handoff__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.handoff__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.handoff__body h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.3;
}

.handoff__body p {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-3);
}

.handoff__link {
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  word-break: break-all;
  color: var(--ink-2);
  max-height: 72px;
  overflow: auto;
}

.handoff__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.handoff__actions .btn {
  height: 40px;
  font-size: 12px;
  padding: 0 14px;
}

/* drawer */

.drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100vw);
  background: var(--bg);
  border-left: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -30px 0 80px -40px rgba(0, 0, 0, 0.45);
}

.drawer[data-state="open"] {
  transform: none;
}

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer__head h2 {
  font-size: 30px;
  margin-top: 8px;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 22px;
}

.drawer__foot {
  display: flex;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.drawer__foot .btn {
  flex: 1;
  height: 40px;
  font-size: 12px;
}

.collection-item {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.collection__section {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.collection__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.collection__section-head .mono {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.collection__clear {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.collection__clear:hover {
  color: var(--coral);
}

.collection-item--history {
  opacity: 0.82;
}

.collection-item--history:hover {
  opacity: 1;
}

.collection-item__cover {
  flex: 0 0 76px;
  width: 76px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-soft);
}

.collection-item__body {
  flex: 1;
  min-width: 0;
}

.collection-item__title {
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-item__meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.collection-item__remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}

.collection-item__remove:hover {
  color: var(--coral);
}

.collection-item__remove svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.collection-empty {
  padding: 50px 10px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.9;
}

.collection-empty strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 6px;
  font-weight: 700;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  backdrop-filter: blur(2px);
}

.scrim[data-state="open"] {
  opacity: 1;
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  border-radius: 2px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.3s var(--ease);
  max-width: calc(100vw - 40px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* skeleton */

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface) 40%, var(--surface-2) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
}

.skeleton-card__line {
  height: 12px;
  background: var(--surface-2);
}

.skeleton-card__line--short {
  width: 60%;
}

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

/* ---------- 11. responsive ---------- */

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__content {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 36px;
  }

  .ticker__inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .ticker__cell--wide {
    display: none;
  }

  .ticker__cell--time {
    border-left: 0;
    padding-left: 0;
  }

  .note {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .board__list {
    gap: 0 26px;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .hero__content {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    padding-top: 8px;
  }

  .hero__title {
    font-size: clamp(30px, 6.4vw, 44px);
  }

  .hero__score {
    margin-top: 24px;
  }

  .resolver__panel {
    grid-template-columns: 1fr;
  }

  .resolver__copy p {
    max-width: none;
  }

  .resolver__examples {
    display: none;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail {
    grid-template-columns: 1fr;
  }

  .detail__media img {
    max-height: 300px;
  }

  .detail__play {
    width: 52px;
    height: 52px;
  }

  .board__lead {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
  }

  .brand__mark {
    width: 34px;
  }

  .brand__name {
    font-size: 22px;
  }

  .brand__latin {
    display: none;
  }

  .masthead__actions {
    gap: 0;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero__head {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
    padding-bottom: 14px;
  }

  .hero__content {
    padding-top: 18px;
    gap: 22px;
  }

  .hero__title {
    font-size: clamp(27px, 8vw, 36px);
    line-height: 1.22;
    -webkit-line-clamp: 4;
  }

  .hero__desc {
    font-size: 12.5px;
    -webkit-line-clamp: 4;
  }

  .hero__actions {
    margin-top: 20px;
    flex-wrap: wrap;
  }

  .hero__actions .btn {
    height: 42px;
    padding: 0 15px;
    font-size: 12.5px;
  }

  .hero__score {
    gap: 14px;
  }

  .score-ring {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }

  .score-ring__num {
    font-size: 17px;
  }

  .ticker__inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-block: 12px;
  }

  .ticker__cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .ticker__cell + .ticker__cell {
    padding-left: 10px;
  }

  .ticker__cell strong {
    font-size: 15px;
  }

  .ticker__cell--time {
    display: none;
  }

  .note {
    padding-block: 44px;
  }

  .note__body {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .note__body > p {
    font-size: 19px;
    line-height: 1.6;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-head__desc {
    font-size: 12px;
    padding-bottom: 0;
  }

  .toolbar {
    gap: 8px;
    padding-block: 14px;
  }

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

  .seg {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .search {
    max-width: none;
    flex: 1 1 100%;
    height: 40px;
    order: 3;
  }

  .select {
    height: 38px;
    flex: 1;
  }

  .select select {
    width: 100%;
    font-size: 12px;
  }

  .btn--random {
    height: 38px;
    flex: 0 0 auto;
  }

  .chips {
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
    height: 30px;
  }

  .chips--small {
    padding-bottom: 14px;
  }

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

  .card__title {
    font-size: 15.5px;
  }

  .card__play {
    display: none;
  }

  .card__save {
    opacity: 1;
    transform: none;
  }

  .board__lead {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hot-card {
    aspect-ratio: 16 / 9;
  }

  .hot-card:nth-child(n + 2) {
    display: none;
  }

  .board__list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hot-row {
    padding: 12px 0;
  }

  .hot-row__thumb {
    flex-basis: 44px;
    width: 44px;
    height: 30px;
  }

  .resolver__panel {
    padding: 26px 20px;
    gap: 26px;
  }

  .resolver__copy h2 {
    font-size: 34px;
  }

  .resolver__field {
    flex-direction: column;
    padding: 8px;
  }

  .resolver__field input {
    height: 38px;
  }

  .resolver__field .btn {
    width: 100%;
  }

  .footer__cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 40px;
  }

  .sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 10px 10px 0 0;
  }

  .sheet[open] {
    animation: sheet-up 0.38s var(--ease);
  }

  @keyframes sheet-up {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }

  .sheet__body {
    max-height: calc(92dvh - 60px);
  }

  .sheet__head {
    padding: 12px 12px 12px 20px;
  }

  .detail__media img {
    max-height: 220px;
  }

  .detail__content {
    padding: 20px;
    gap: 14px;
  }

  .detail__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail__actions {
    position: sticky;
    bottom: 0;
    background: var(--bg);
    margin: 0 -20px -20px;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--line);
  }

  .drawer {
    width: 100vw;
  }

  .toast {
    bottom: 18px;
  }
}

/* ---------- 12. runtime bits ---------- */

body.is-locked {
  overflow: hidden;
}

.hero__score-body {
  flex: 1;
  min-width: 0;
}

mark {
  background: rgba(224, 80, 106, 0.18);
  color: inherit;
  padding: 0 0.08em;
}

[data-theme="ink"] mark {
  background: rgba(255, 107, 129, 0.24);
}

.card__quality[data-grade="HOT"] {
  background: var(--teal);
  color: #fff;
  letter-spacing: 0;
}

.card__quality[data-grade="HOT"]::after {
  content: "";
  margin: 0;
}

.card__quality[data-grade="C"] {
  background: var(--surface);
  color: var(--ink-2);
}

.card__avatar--topic {
  background: linear-gradient(135deg, var(--coral), var(--teal));
}

.card__views .card__arrow {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail__stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail__author > span {
  color: var(--ink-2);
  font-size: 12.5px;
}

.detail__author > span span {
  color: var(--ink-3);
  font-size: 11px;
}

.detail__hint code {
  padding: 1px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 9.5px;
}

.collection-item__title {
  width: 100%;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
}

.collection-item__title:hover {
  color: var(--coral);
}

[data-theme="ink"] .resolver__field .btn--primary {
  background: #15120e;
  border-color: #15120e;
  color: #f2eee5;
}

[data-theme="ink"] .resolver__field .btn--primary:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

@media (max-width: 720px) {
  .detail__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* detail: full-bleed cover fills the plate */
.detail__media {
  overflow: hidden;
}

.detail__media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

@media (max-width: 720px) {
  .detail__media img {
    max-height: 320px;
  }
}

/* topic detail: shorter plate, content shouldn't float in a tall frame */
.detail--topic .detail__media img {
  max-height: 560px;
}

/* mobile section jump */
.quicknav {
  display: none;
}

/* mobile selection toolbar order */
@media (max-width: 720px) {
  .toolbar .segmented {
    order: 0;
  }

  .toolbar .search {
    order: 1;
  }

  .toolbar .select,
  .toolbar .btn--random {
    order: 2;
  }

  .toolbar .search kbd {
    display: none;
  }

  .quicknav {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 40px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  .quicknav a {
    color: inherit;
  }

  .quicknav a:first-child {
    color: var(--ink);
  }

  .quicknav__hint {
    margin-left: auto;
    font-size: 9px;
    opacity: 0.6;
  }

  /* 抖音热榜前三：横向滑动，不再隐藏第二三名 */
  .board__lead {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 8px;
  }

  .board__lead::-webkit-scrollbar {
    display: none;
  }

  .board__lead .hot-card {
    scroll-snap-align: start;
  }

  .board__lead .hot-card:nth-child(n + 2) {
    display: block;
  }
}

/* ------------------------------------------------------------------ */
/* 图床失败：首字海报（不让整屏破图）                                    */
/* ------------------------------------------------------------------ */

[data-cover] {
  position: relative;
  isolation: isolate;
  background: linear-gradient(
    145deg,
    hsl(var(--hue, 24) 12% 27%),
    hsl(calc(var(--hue, 24) + 24) 16% 17%)
  );
}

[data-cover]::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.04em;
  pointer-events: none;
}

[data-cover].is-cover-missing {
  background: linear-gradient(
    145deg,
    hsl(var(--hue, 24) 12% 27%),
    hsl(calc(var(--hue, 24) + 24) 16% 17%)
  );
}

.card__media[data-cover],
.hot-card[data-cover],
.hot-row__thumb[data-cover],
.detail__media[data-cover] {
  background: linear-gradient(
    145deg,
    hsl(var(--hue, 24) 12% 27%),
    hsl(calc(var(--hue, 24) + 24) 16% 17%)
  );
}

[data-cover].hot-row__thumb::after {
  font-size: 20px;
}

[data-cover].hot-card::after {
  font-size: clamp(48px, 9vw, 120px);
}

[data-cover].detail__media::after {
  font-size: clamp(64px, 12vw, 160px);
}

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