/* ═══════════════════════════════════════════════════════════════════════
   LEXICON — physical glass · editorial lists · marker highlights
   -----------------------------------------------------------------------
   0.  Tokens
   1.  Reset & base
   2.  Ambience: shader canvas / bloom / grain / light field
   3.  Type primitives
   4.  Top bar
   5.  Stage & hero
   6.  Search — physical lens
   7.  Chips
   8.  Results panel — list, not cards
   9.  "猜你想搜"
   10. Sheet — solid, compact surface
   11. Entry blocks (list rhythm)
   12. Marker highlights
   13. Controls
   14. Motion
   15. Responsive
   16. Fallbacks
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
   FONTS — 本地可变字体（无外网 CDN 依赖）
   ═══════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces Variable";
  src: url("/fonts/fraunces-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════════════════════════════════
   0. TOKENS
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --bg-void: #04060b;
  --bg-deep: #070a12;

  /* — ink — */
  --ink-100: rgba(246, 249, 255, 0.96);
  --ink-90:  rgba(238, 243, 255, 0.90);
  --ink-75:  rgba(228, 236, 252, 0.75);
  --ink-60:  rgba(214, 224, 246, 0.60);
  --ink-45:  rgba(202, 214, 240, 0.45);
  --ink-32:  rgba(192, 206, 236, 0.32);
  --ink-20:  rgba(186, 200, 230, 0.20);
  --ink-10:  rgba(186, 200, 230, 0.10);
  --ink-06:  rgba(186, 200, 230, 0.06);

  /* — accents — */
  --ice: #a9c8ff;
  --violet: #c9b3ff;
  --gold: #e9c37d;
  --good: #8fe6bd;
  --rose: #f6b6c8;

  /* — marker colors — */
  --m-amber: 255, 205, 92;
  --m-mint:  104, 236, 178;
  --m-sky:   118, 196, 255;
  --m-rose:  255, 148, 178;

  /* — physical glass — */
  --glass-body: linear-gradient(
    176deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.042) 18%,
    rgba(255, 255, 255, 0.012) 52%,
    rgba(0, 0, 0, 0.10) 82%,
    rgba(255, 255, 255, 0.075) 100%
  );
  --glass-rim: rgba(255, 255, 255, 0.115);
  --glass-bevel-top: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  --glass-bevel-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.62);
  --glass-inner-glow: inset 0 0 44px -14px rgba(255, 255, 255, 0.10);
  --shadow-contact:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 8px 20px -12px rgba(0, 0, 0, 0.8),
    0 34px 64px -30px rgba(0, 0, 0, 0.92),
    0 72px 120px -60px rgba(0, 0, 0, 0.75);

  /* — solid content surface（释义区不用玻璃） — */
  --solid-1: #0b0e15;
  --solid-2: #0e121b;
  --hair: rgba(255, 255, 255, 0.062);
  --hair-strong: rgba(255, 255, 255, 0.11);

  /* — radii — */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-4: 22px;
  --r-5: 30px;
  --r-pill: 999px;

  /* — spacing — */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;

  /* — type — */
  --font-ui: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont,
             "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Fraunces Variable", "Fraunces", "Iowan Old Style",
                  "Palatino Linotype", Palatino, Georgia, "Songti SC", serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-spring: cubic-bezier(0.22, 1.18, 0.36, 1);
  --dur-1: 130ms;
  --dur-2: 220ms;
  --dur-3: 340ms;
  --dur-4: 560ms;

  --shell: 1080px;
  --sheet-w: 720px;
  --topbar-h: 66px;

  /* — live registers (JS) — */
  --lx: 50%;
  --ly: 0%;
  --px: 0px;
  --py: 0px;
  --rx: 0deg;
  --ry: 0deg;
}

/* ═══════════════════════════════════════════════════════════════════════
   1. RESET & BASE
   ═══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg-void);
  color: var(--ink-90);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* film grain across the whole surface */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

h1, h2, h3, h4, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { list-style: none; padding: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

::selection {
  background: rgba(var(--m-sky), 0.28);
  color: var(--ink-100);
}

:focus-visible {
  outline: 2px solid rgba(var(--m-sky), 0.65);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════
   2. AMBIENCE
   ═══════════════════════════════════════════════════════════════════════ */
.fluid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0.92;
  transition: opacity 1.2s var(--ease-out-quart);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient__bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.ambient__bloom--a {
  width: 46vw; height: 46vw;
  left: 4vw; top: -8vw;
  background: radial-gradient(circle at 40% 40%, rgba(72, 116, 214, 0.34), transparent 68%);
  animation: drift-a 44s var(--ease-in-out) infinite;
}

.ambient__bloom--b {
  width: 40vw; height: 40vw;
  right: -6vw; top: 6vw;
  background: radial-gradient(circle at 50% 50%, rgba(140, 104, 210, 0.26), transparent 70%);
  animation: drift-b 56s var(--ease-in-out) infinite;
}

.ambient__bloom--c {
  width: 52vw; height: 40vw;
  left: 22vw; bottom: -18vw;
  background: radial-gradient(circle at 50% 50%, rgba(196, 132, 84, 0.20), transparent 72%);
  animation: drift-c 62s var(--ease-in-out) infinite;
}

.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 30%, rgba(3, 4, 8, 0.45) 78%, rgba(3, 4, 8, 0.82) 100%),
    linear-gradient(180deg, rgba(3, 4, 8, 0.28) 0%, transparent 18%, transparent 70%, rgba(3, 4, 8, 0.55) 100%);
}

/* —— cursor light field: the physical light source in the room —— */
.lightfield {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
}

.lightfield__core {
  position: absolute;
  left: 0; top: 0;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  transform: translate3d(var(--px), var(--py), 0);
  background: radial-gradient(circle, rgba(150, 186, 255, 0.10) 0%, rgba(120, 150, 230, 0.045) 34%, transparent 66%);
  filter: blur(10px);
}

.lightfield__halo {
  position: absolute;
  left: 0; top: 0;
  width: 1100px; height: 1100px;
  margin: -550px 0 0 -550px;
  transform: translate3d(calc(var(--px) * 0.6), calc(var(--py) * 0.6), 0);
  background: radial-gradient(circle, rgba(122, 156, 240, 0.055) 0%, transparent 58%);
  filter: blur(28px);
}

/* ═══════════════════════════════════════════════════════════════════════
   3. TYPE
   ═══════════════════════════════════════════════════════════════════════ */
.brand__text,
.hero__title,
.entry__word,
.res__word {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}

kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 5px;
  border: 1px solid var(--hair-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-45);
}

/* ═══════════════════════════════════════════════════════════════════════
   4. TOP BAR
   ═══════════════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--topbar-h);
  z-index: 40;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(4, 6, 11, 0.72), rgba(4, 6, 11, 0.18) 70%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0b0f18;
  background: linear-gradient(150deg, #f4f8ff, #c6d8ff 55%, #a9c0ee);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 10px -4px rgba(150, 190, 255, 0.7);
}

.brand__mark svg { width: 15px; height: 15px; }

.brand__text {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.19em;
  color: var(--ink-90);
}

.topbar__center {
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-45);
}

.topbar__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 10px rgba(143, 230, 189, 0.85);
  animation: pulse-dot 3.4s var(--ease-in-out) infinite;
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  flex: 0 0 auto;
}

.topbar__kbd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-32);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--ink-60);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.028);
  transition: color var(--dur-2), border-color var(--dur-2), background var(--dur-2), transform var(--dur-2);
}

.ghost-btn svg { width: 14px; height: 14px; }

.ghost-btn:hover {
  color: var(--ink-90);
  border-color: var(--hair-strong);
  background: rgba(255, 255, 255, 0.06);
}

.ghost-btn:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════════════════════════════════
   5. STAGE & HERO
   ═══════════════════════════════════════════════════════════════════════ */
.stage {
  position: relative;
  z-index: 10;
  flex: 1;
  justify-content: center;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 11vh) var(--s-6) var(--s-9);
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.is-searching .stage {
  padding-top: calc(var(--topbar-h) + 26px);
  justify-content: flex-start;
}

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 520ms var(--ease-out-expo), opacity 380ms ease;
}

body.is-searching .hero {
  transform: translateY(0) scale(0.99);
}

body.is-searching .hero__kicker,
body.is-searching .hero__title,
body.is-searching .hero__sub {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: opacity 260ms ease, max-height 420ms var(--ease-out-expo), transform 420ms var(--ease-out-expo), margin 420ms;
}

.hero__kicker {
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-32);
  margin-bottom: var(--s-4);
  max-height: 40px;
}

.hero__title {
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: var(--ink-100);
  max-height: 120px;
}

.hero__period { color: var(--ice); }

.hero__sub {
  margin-top: var(--s-3);
  font-size: 13px;
  color: var(--ink-45);
  letter-spacing: 0.01em;
  max-height: 40px;
}

.hero__sep { margin: 0 9px; color: var(--ink-20); }

/* ═══════════════════════════════════════════════════════════════════════
   6. SEARCH — a piece of physical glass
   ═══════════════════════════════════════════════════════════════════════ */
.search {
  width: 100%;
  max-width: 620px;
  margin: var(--s-7) auto 0;
  perspective: 900px;
}

.search__glass {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transition: transform 420ms var(--ease-out-quart), box-shadow 380ms ease, background 380ms ease;
  background:
    radial-gradient(140% 220% at var(--lx) var(--ly), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 52%),
    var(--glass-body);
  border: 1px solid var(--glass-rim);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(0, 0, 0, 0.58),
    inset 0 15px 24px -18px rgba(255, 255, 255, 0.34),
    inset 0 -18px 28px -20px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    var(--shadow-contact);
  backdrop-filter: blur(30px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(30px) saturate(190%) brightness(1.04);
  overflow: hidden;
}

/* refracted rim: chromatic fringe at the edge of the glass */
.search__glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 210deg at var(--lx) var(--ly),
    rgba(255, 255, 255, 0.62),
    rgba(150, 196, 255, 0.30) 22%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(206, 168, 255, 0.26) 63%,
    rgba(255, 214, 180, 0.34) 82%,
    rgba(255, 255, 255, 0.58)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.85;
  pointer-events: none;
  z-index: 3;
  transition: opacity 400ms ease;
}

/* 高光：跟随光源的柔光斑 + 顶缘的镜面线 */
.search__glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 10%),
    radial-gradient(140px circle at var(--lx) var(--ly), rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.05) 42%, transparent 68%);
  mix-blend-mode: screen;
  opacity: 0.9;
  transition: opacity 420ms ease;
}

.search:focus-within .search__glass::after { opacity: 1; }

.search:focus-within .search__glass {
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(0, 0, 0, 0.58),
    inset 0 15px 24px -18px rgba(255, 255, 255, 0.36),
    inset 0 0 60px -18px rgba(160, 196, 255, 0.34),
    var(--shadow-contact),
    0 0 0 4px rgba(140, 180, 255, 0.055);
}

.search__icon {
  position: relative;
  z-index: 2;
  width: 19px; height: 19px;
  flex: 0 0 auto;
  color: var(--ink-45);
  transition: color var(--dur-2), transform var(--dur-3) var(--ease-spring);
}

.search:focus-within .search__icon {
  color: var(--ice);
  transform: scale(1.06);
}

.search__icon svg { width: 100%; height: 100%; display: block; }

.search__input {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-100);
  font-size: 16.5px;
  font-weight: 350;
  letter-spacing: -0.005em;
  font-family: var(--font-ui);
}

.search__input::placeholder { color: var(--ink-32); }

.search__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  z-index: 5;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(var(--m-sky), 0.1), rgba(var(--m-sky), 0.9), rgba(var(--m-violet, 201, 179, 255), 0.6));
  opacity: 0;
  transition: opacity 200ms;
}

.search.is-loading .search__progress {
  opacity: 1;
  width: 100%;
  animation: progress-sweep 1s var(--ease-in-out) infinite;
}

.search__clear {
  position: relative;
  z-index: 2;
  width: 26px; height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-45);
  background: rgba(255, 255, 255, 0.05);
  transition: color var(--dur-2), background var(--dur-2), transform var(--dur-2);
}

.search__clear[hidden] { display: none; }
.search__clear svg { width: 11px; height: 11px; }

.search__clear:hover {
  color: var(--ink-90);
  background: rgba(255, 255, 255, 0.12);
}

.search__kbd {
  position: relative;
  z-index: 2;
  transition: opacity 220ms;
}

.search:focus-within .search__kbd { opacity: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   7. CHIPS
   ═══════════════════════════════════════════════════════════════════════ */
.hero__chips,
.hero__recent {
  margin-top: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 640px;
}

.chips__label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-20);
  margin-right: 4px;
}

.chip {
  position: relative;
  font-size: 12.5px;
  color: var(--ink-45);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: color var(--dur-2), border-color var(--dur-2), background var(--dur-2);
}

.chip::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: 3px;
  height: 1px;
  background: currentColor;
  opacity: 0.28;
  transform: scaleX(0.4);
  transition: transform var(--dur-3) var(--ease-out-expo), opacity var(--dur-2);
}

.chip:hover {
  color: var(--ink-90);
  border-color: var(--hair);
  background: rgba(255, 255, 255, 0.035);
}

.chip:hover::after { transform: scaleX(1); opacity: 0.5; }

.hero__recent[hidden] { display: none; }

.recent__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.recent__item {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-32);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--hair);
  transition: color var(--dur-2), border-color var(--dur-2);
}

.recent__item:hover { color: var(--ink-75); border-color: var(--hair-strong); }

/* ═══════════════════════════════════════════════════════════════════════
   8. RESULTS PANEL — editorial list
   ═══════════════════════════════════════════════════════════════════════ */
.panel {
  width: 100%;
  max-width: 820px;
  margin: var(--s-6) auto 0;
  animation: fade-rise 420ms var(--ease-out-expo) both;
}

.panel[hidden] { display: none; }

.panel__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--hair-strong);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.panel__count { color: var(--ink-60); }

.panel__meta {
  color: var(--ink-32);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.panel__keys {
  margin-left: auto;
  color: var(--ink-20);
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.panel__keys kbd { font-size: 9.5px; padding: 2px 4px; }

.list { position: relative; }

/* each row is a record line, not a card */
.res {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(148px, 25%) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  padding: 11px 10px 11px 6px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: background var(--dur-2) ease, padding-left var(--dur-2) var(--ease-out-expo);
  animation: row-in 420ms var(--ease-out-expo) both;
}

.res::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(var(--m-sky), 0.9), rgba(var(--m-mint), 0.7));
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity var(--dur-2), transform var(--dur-3) var(--ease-out-expo);
}

.res:hover,
.res.is-active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 62%, transparent);
  padding-left: 12px;
}

.res:hover::before,
.res.is-active::before { opacity: 1; transform: scaleY(1); }

.res.is-exact .res__word { color: #fff; }

.res__index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-20);
  letter-spacing: 0.04em;
  transition: color var(--dur-2);
}

.res:hover .res__index,
.res.is-active .res__index { color: var(--ink-45); }

.res__main {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
}

.res__word {
  font-size: 18px;
  font-weight: 480;
  letter-spacing: -0.012em;
  color: var(--ink-90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-2), letter-spacing var(--dur-3);
}

.res:hover .res__word { color: #fff; letter-spacing: -0.006em; }

.res__phon {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-32);
  white-space: nowrap;
  flex: 0 0 auto;
}

.res__def {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.res:hover .res__def { color: var(--ink-75); }

.res__tags {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  min-width: 0;
}

.res__tag {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-32);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.res.is-exact .res__tag:first-child { color: var(--gold); border-color: rgba(233, 195, 125, 0.28); }

.res__arrow {
  width: 14px; height: 14px;
  color: var(--ink-20);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur-2), transform var(--dur-3) var(--ease-out-expo);
}

.res:last-child { border-bottom: 0; }
.res:hover .res__arrow,
.res.is-active .res__arrow { opacity: 1; transform: translateX(0); }

/* compact lite rows (letter list) */
.res--lite { grid-template-columns: 34px 1fr auto; }
.res--lite .res__def { grid-column: 2; display: none; }

/* inline highlight inside list definition */
.res__def .mk { color: var(--ink-90); }

/* ── empty state ── */
.panel__empty {
  padding: var(--s-8) 2px var(--s-7);
  animation: fade-rise 480ms var(--ease-out-expo) both;
}

.panel__empty[hidden] { display: none; }

.empty__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-20);
  margin-bottom: 10px;
}

.empty__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-90);
  line-height: 1.3;
}

.empty__title b { font-weight: 500; color: #fff; }

.empty__text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-45);
}

/* ═══════════════════════════════════════════════════════════════════════
   9. 猜你想搜
   ═══════════════════════════════════════════════════════════════════════ */
.suggest { margin-top: var(--s-7); }
.suggest[hidden] { display: none; }

.suggest__label {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-45);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hair-strong);
}

.suggest__label span {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 10.5px;
  color: var(--ink-20);
}

.suggest__list { margin-top: 2px; }

.sg {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 108px 132px;
  align-items: center;
  gap: 12px;
  padding: 11px 10px 11px 6px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  animation: row-in 460ms var(--ease-out-expo) both;
  transition: background var(--dur-2), padding-left var(--dur-2) var(--ease-out-expo);
}

.sg:hover { background: rgba(255, 255, 255, 0.045); padding-left: 12px; }

.sg__index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-20);
}

.sg__word {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 460;
  color: var(--ink-90);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg__word i {
  font-style: normal;
  color: var(--ice);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(169, 200, 255, 0.5);
}

.sg__why {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-32);
  letter-spacing: 0.03em;
  text-align: right;
  white-space: nowrap;
}

.sg__bar {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.sg__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(var(--m-sky), 0.5), rgba(var(--m-mint), 0.85));
  transform-origin: left;
  animation: bar-grow 620ms var(--ease-out-expo) both;
}

.sg--top .sg__word { color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════
   10. SHEET — solid, compact documentation surface
   ═══════════════════════════════════════════════════════════════════════ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 3, 7, 0.62);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  opacity: 0;
  transition: opacity var(--dur-4) var(--ease-out-quart);
}

.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop.is-open { opacity: 1; }

.sheet {
  position: fixed;
  z-index: 70;
  top: calc(var(--topbar-h) + 14px);
  right: 14px;
  bottom: 14px;
  width: min(var(--sheet-w), calc(100vw - 28px));
  border-radius: var(--r-5);
  background:
    radial-gradient(120% 60% at var(--lx) var(--ly), rgba(255, 255, 255, 0.045), transparent 60%),
    linear-gradient(180deg, var(--solid-2), var(--solid-1) 42%, var(--solid-1));
  border: 1px solid var(--hair-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 24px 48px -22px rgba(0, 0, 0, 0.9),
    0 60px 110px -50px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(26px) scale(0.988);
  transition:
    opacity 340ms var(--ease-out-quart),
    transform 460ms var(--ease-out-expo);
}

/* machined edge: a hairline of refracted light along the top-left */
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.16), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.7;
}

.sheet.is-open { opacity: 1; transform: translateX(0) scale(1); }

.sheet__grabber {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  display: none;
}

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-45);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair);
  transition: color var(--dur-2), background var(--dur-2), transform var(--dur-2);
}

.sheet__close:hover {
  color: var(--ink-100);
  background: rgba(255, 255, 255, 0.10);
  transform: rotate(90deg);
}

.sheet__close svg { width: 12px; height: 12px; }

.sheet__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 34px 30px 46px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.sheet__scroll::-webkit-scrollbar { width: 8px; }
.sheet__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ═══════════════════════════════════════════════════════════════════════
   11. ENTRY
   ═══════════════════════════════════════════════════════════════════════ */
.entry { color: var(--ink-75); }

.entry__head { padding-bottom: var(--s-5); }

.entry__wordrow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.entry__word {
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 420;
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: #fff;
  overflow-wrap: anywhere;
}

.speak {
  flex: 0 0 auto;
  margin-top: 8px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-45);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.03);
  transition: color var(--dur-2), border-color var(--dur-2), transform var(--dur-2);
}

.speak svg { width: 15px; height: 15px; }
.speak:hover { color: var(--ice); border-color: rgba(169, 200, 255, 0.35); }
.speak.is-speaking { color: var(--ice); border-color: rgba(169, 200, 255, 0.5); animation: ping 900ms var(--ease-in-out) infinite; }

.entry__phonrow {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-45);
}

.phon i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-20);
  margin-right: 5px;
  text-transform: uppercase;
}

.entry__badges {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--hair);
  color: var(--ink-45);
}

.badge--ice { color: var(--ice); border-color: rgba(169, 200, 255, 0.26); background: rgba(169, 200, 255, 0.06); }
.badge--gold { color: var(--gold); border-color: rgba(233, 195, 125, 0.26); background: rgba(233, 195, 125, 0.06); }
.badge--violet { color: var(--violet); border-color: rgba(201, 179, 255, 0.24); background: rgba(201, 179, 255, 0.055); }

/* facts: a definition list, one compact line */
.facts {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

.fact {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 16px 9px 0;
  font-size: 11px;
}

.fact + .fact { padding-left: 16px; border-left: 1px solid var(--hair); }

.fact__k {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-20);
}

.fact__v {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-75);
  letter-spacing: 0.01em;
}

.fact__v--muted { color: var(--ink-20); }

.stars { letter-spacing: 0.06em; font-size: 10.5px; }
.stars span:first-child { color: var(--gold); }
.stars .off { color: rgba(255, 255, 255, 0.12); }

/* ── blocks ── */
.block {
  padding: 15px 0 17px;
  border-top: 1px solid var(--hair);
  animation: block-in 460ms var(--ease-out-expo) both;
}

.block:first-of-type { border-top: 1px solid var(--hair-strong); }

.block__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.block__cn {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.12em;
  color: var(--ink-90);
}

.block__en {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-20);
}

.block__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--hair), transparent);
  transform: translateY(-2px);
}

/* definitions */
.defs { display: flex; flex-direction: column; gap: 8px; }

.def {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.def__pos {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--violet);
  text-align: right;
  opacity: 0.8;
}

.def__cn {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-75);
  letter-spacing: 0.002em;
}

/* english definitions */
.en-defs { display: flex; flex-direction: column; gap: 6px; }

.en-defs p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-45);
  padding-left: 13px;
  position: relative;
}

.en-defs p::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-20);
}

/* inflections + phrases: list rows */
.forms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 0;
}

.form {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  padding-right: 18px;
}

.form__k { font-size: 10px; color: var(--ink-32); letter-spacing: 0.04em; }
.form__v { font-family: var(--font-mono); color: var(--ink-75); }

.phrases { display: flex; flex-direction: column; }

.phrase {
  display: grid;
  grid-template-columns: minmax(110px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

.phrase:last-child { border-bottom: 0; padding-bottom: 0; }

.phrase__en { color: var(--ink-90); font-weight: 420; }
.phrase__cn { color: var(--ink-45); font-size: 12.5px; }

/* examples */
.quotes { display: flex; flex-direction: column; gap: 14px; }

.quote {
  padding-left: 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.quote__en {
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-90);
  font-weight: 380;
}

.quote__en b {
  font-weight: 520;
  color: #fff;
  background: linear-gradient(transparent 62%, rgba(var(--m-mint), 0.16) 62%);
}

.quote__cn {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-45);
  line-height: 1.6;
}

.quote__src {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-32);
}

/* ── 辨析表 ── */
.disc { margin-bottom: 16px; }
.disc:last-child { margin-bottom: 0; }

.disc__cap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-45);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--hair);
}

.disc__pos {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--violet);
  opacity: 0.85;
}

.disc__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.065);
  transition: background var(--dur-2);
}

.disc__row:last-child { border-bottom: 0; }
.disc__row.is-self { background: rgba(var(--m-amber), 0.05); }

.disc__w {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-90);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-2);
}

button.disc__w:hover { color: var(--ice); }

.disc__row.is-self .disc__w {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(var(--m-amber), 0.5);
  text-underline-offset: 3px;
}

.disc__cn {
  font-size: 12.5px;
  color: var(--ink-60);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disc__f {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-32);
  text-align: right;
  white-space: nowrap;
}

/* synonyms + word family: inline chips (list density, no boxes) */
.syno-group { margin-bottom: 12px; }
.syno-group:last-child { margin-bottom: 0; }

.syno-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-32);
  margin-bottom: 6px;
}

.syno-pos {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--violet);
  opacity: 0.8;
}

.wordchips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.wordchip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 13px;
  color: var(--ink-75);
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-2), border-color var(--dur-2);
}

.wordchip span {
  font-size: 11px;
  color: var(--ink-32);
}

.wordchip:hover {
  color: #fff;
  border-bottom-color: rgba(169, 200, 255, 0.4);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-45);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 2px 7px;
}

/* ═══════════════════════════════════════════════════════════════════════
   12. MARKER HIGHLIGHTS
   ═══════════════════════════════════════════════════════════════════════ */
.mk {
  --hl: var(--m-amber);
  position: relative;
  color: #fff;
  padding: 0 0.06em;
  border-radius: 2px;
  background-image: linear-gradient(
    92deg,
    rgba(var(--hl), 0.05) 0%,
    rgba(var(--hl), 0.36) 9%,
    rgba(var(--hl), 0.31) 52%,
    rgba(var(--hl), 0.38) 88%,
    rgba(var(--hl), 0.08) 100%
  );
  background-repeat: no-repeat;
  background-position: 0 90%;
  background-size: 0% 50%;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: marker-bg 560ms var(--ease-out-expo) forwards;
  animation-delay: var(--d, 0ms);
}

.mk--amber { --hl: var(--m-amber); }
.mk--mint  { --hl: var(--m-mint); }
.mk--sky   { --hl: var(--m-sky); }
.mk--rose  { --hl: var(--m-rose); }

/* 笔尖的湿墨：贴近基线的一条淡痕，不压字身 */
.mk::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0.02em;
  right: -0.10em;
  bottom: 0.06em;
  height: 0.30em;
  border-radius: 46% 54% 40% 60% / 62% 48% 52% 38%;
  background: rgba(var(--hl), 0.20);
  filter: blur(2.6px);
  transform: scaleX(0) rotate(0.4deg);
  transform-origin: 0% 50%;
  animation: marker-ink 640ms var(--ease-out-expo) forwards;
  animation-delay: calc(var(--d, 0ms) + 60ms);
}

/* legend swatch */
.mk-swatch {
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: rgba(var(--hl, 255, 205, 92), 0.7);
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════════
   13. FOOTER
   ═══════════════════════════════════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 10;
  padding: 0 var(--s-6) var(--s-6);
}

.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--ink-20);
}

.footer__sep { color: var(--ink-10); }

/* ═══════════════════════════════════════════════════════════════════════
   14. MOTION
   ═══════════════════════════════════════════════════════════════════════ */
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, 3vw, 0) scale(1.08); }
}

@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.04); }
  50% { transform: translate3d(-3vw, 4vw, 0) scale(0.94); }
}

@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-5vw, -3vw, 0) scale(1.1); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes ping {
  0%, 100% { box-shadow: 0 0 0 0 rgba(169, 200, 255, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(169, 200, 255, 0); }
}

@keyframes progress-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

@keyframes marker-bg {
  to { background-size: 100% 50%; }
}

@keyframes marker-ink {
  to { transform: scaleX(1) rotate(0.4deg); }
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes block-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ═══════════════════════════════════════════════════════════════════════
   15. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .res { grid-template-columns: 30px minmax(130px, 30%) minmax(0, 1fr) auto; gap: 10px; }
  .res__tags { display: none; }
  .sheet { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(88dvh, 900px); }
  .sheet__grabber { display: block; }
  .sheet__scroll { padding: 30px 20px 40px; }
  .sg { grid-template-columns: 30px minmax(0, 1fr) 48px; }
  .sg__why { display: none; }
}

@media (max-width: 720px) {
  :root { --topbar-h: 58px; }

  .topbar__center,
  .topbar__kbd { display: none; }

  .topbar__inner { padding: 0 16px; }

  .stage { padding: calc(var(--topbar-h) + 8vh) 16px var(--s-7); }

  .hero__title { font-size: 38px; }
  .hero__sub { font-size: 12px; }

  .search { margin-top: var(--s-6); }
  .search__glass { height: 52px; padding: 0 15px; }
  .search__input { font-size: 16px; }

  .panel { margin-top: var(--s-5); }

  .res {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    row-gap: 3px;
    padding: 12px 4px;
    align-items: center;
  }

  .res__main { grid-column: 2; }
  .res__def {
    grid-column: 2;
    font-size: 12.5px;
    color: var(--ink-40, var(--ink-45));
  }
  .res__word { font-size: 16.5px; }
  .res__arrow { display: none; }

  .panel__keys { display: none; }

  .entry__word { font-size: 30px; }
  .def { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .def__cn { font-size: 14px; }
  .disc__row { grid-template-columns: 92px minmax(0, 1fr); }
  .disc__f { display: none; }
  .phrase { grid-template-columns: 1fr; gap: 2px; }
  .fact { padding: 7px 12px 7px 0; font-size: 10.5px; }
  .fact + .fact { padding-left: 12px; }
  .facts { gap: 0; }

}

@media (max-width: 420px) {
  .hero__title { font-size: 33px; }
  .facts { flex-direction: column; }
  .fact + .fact { border-left: 0; padding-left: 0; }
  .fact { border-bottom: 1px solid var(--hair); width: 100%; }
  .fact:last-child { border-bottom: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   16. FALLBACKS
   ═══════════════════════════════════════════════════════════════════════ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .search__glass {
    background: linear-gradient(180deg, rgba(30, 38, 56, 0.92), rgba(14, 18, 28, 0.94));
  }
  .topbar { background: rgba(4, 6, 11, 0.94); }
  .sheet-backdrop { background: rgba(2, 3, 7, 0.86); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .mk { background-size: 100% 50%; }
  .mk::after { transform: scaleX(1); }
  .ambient__bloom { animation: none !important; }
}

@media print {
  .fluid-canvas, .ambient, .lightfield, .topbar, .hero, .panel__head, .footer, .sheet__close { display: none !important; }
  body { background: #fff; color: #111; }
  .sheet { position: static; width: 100%; border: 0; box-shadow: none; }
}
