/* ==========================================================================
   uFans.cc — Redesign Design System
   "Nocturne" · premium dark, single accent, one cool-neutral gray family
   --------------------------------------------------------------------------
   取代原 theme.css：删除四色渐变 / 霓虹辉光 / 全站同圆角 / 纯黑背景
   保留：暗色沉浸感、280+680+320 的信息优先级、订阅付费墙的商业模式
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* — canvas：单一冷中性灰阶，不用纯黑（#000 在 OLED 上像洞） — */
  --bg: #0b0c0f;
  --bg-2: #0e1014;
  --surface: #14171e;
  --surface-2: #1a1e26;
  --surface-3: #222732;
  --surface-4: #2b313d;

  /* — hairline：靠 1px 线做层次，不靠发光 — */
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);

  /* — ink：四级文本层级，原来只有 两档（white / white-45）
       每一级都按 WCAG AA（正文 4.5:1）校准过，最深一级只用于装饰性元素 — */
  --ink: #edeff3; /* 16.1:1 on --bg */
  --ink-2: #a5acb9; /* 7.9:1 */
  --ink-3: #868e9c; /* 5.6:1 —— 元信息、说明文字 */
  --ink-4: #6f7784; /* 4.3:1 —— 仅用于序号、图标描边、kbd 提示 */

  /* — 唯一强调色：降饱和玫红，替代原来的 玫红+橙+紫+青+金 五色 —
       填充态（按钮底）用深一档保证白字达到 4.59:1；
       文字态（深底上的链接/强调）用亮一档达到 6.7:1。 */
  --accent: #cf4257;
  --accent-hi: #ef7183;
  --accent-lo: #a63549;
  --accent-wash: rgba(207, 66, 87, 0.1);
  --accent-wash-2: rgba(207, 66, 87, 0.18);
  --accent-line: rgba(207, 66, 87, 0.38);

  /* — 语义色：仅用于状态，不作为装饰 — */
  --ok: #46a97e;
  --ok-wash: rgba(70, 169, 126, 0.12);
  --warn: #c99a34;
  --warn-wash: rgba(201, 154, 52, 0.12);

  /* — 圆角：分级而非统一 32px — */
  --r-chip: 6px;
  --r-btn: 10px;
  --r-field: 10px;
  --r-media: 14px;
  --r-card: 18px;
  --r-sheet: 22px;
  --r-round: 999px;

  /* — 阴影：单一光源（自上而下），色调带冷底而非纯黑 — */
  --sh-1: 0 1px 2px rgba(4, 6, 10, 0.5);
  --sh-2: 0 6px 20px -6px rgba(4, 6, 10, 0.62), 0 2px 5px rgba(4, 6, 10, 0.4);
  --sh-3: 0 26px 64px -18px rgba(4, 6, 10, 0.78), 0 6px 16px rgba(4, 6, 10, 0.5);

  /* — 尺度 — */
  --rail-w: 244px;
  --content-max: 1180px;
  --rail-r-w: 312px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;
  --dur-slow: 480ms;

  --font-sans: "Geist", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "Cascadia Mono",
    Consolas, monospace;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 组件类里给了 display:flex/grid 的元素会盖掉 UA 的 [hidden]{display:none}，
   导致"默认隐藏、出错才显示"的提示文案一开始就露出来。统一收口。 */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

/* 颗粒噪点：打破纯矢量的"塑料感"，压在内容之下，不可交互 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  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='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

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

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

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

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

::selection {
  background: var(--accent-wash-2);
  color: #fff;
}

/* 滚动条：细、低调，与画布同族 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-4) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #39404e;
  background-clip: content-box;
}

/* --------------------------------------------------------------------------
   3. A11y
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-btn);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus-visible {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: 4px;
}

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

@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;
  }
}

/* --------------------------------------------------------------------------
   4. Typography scale
   -------------------------------------------------------------------------- */
.t-display {
  font-size: clamp(1.75rem, 1.15rem + 2.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.t-h1 {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.028em;
}
.t-h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.t-h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.014em;
}
.t-body {
  font-size: 0.9375rem;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 62ch;
}
.t-small {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.t-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.t-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.ink-2 {
  color: var(--ink-2);
}
.ink-3 {
  color: var(--ink-3);
}
.accent {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   5. App shell
   -------------------------------------------------------------------------- */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100dvh;
}

/* — 左侧导航：去卡片化，改用 hairline 分隔 — */
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 20px;
}
.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 120% at 20% 10%,
    rgba(225, 92, 110, 0.5),
    transparent 62%
  );
}
.brand__mark svg {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand__name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand__name span {
  color: var(--ink-4);
  font-weight: 500;
}
.brand__tag {
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-btn);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__item svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  transition: transform var(--dur) var(--ease);
}
.nav__item::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease);
}
.nav__item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
}
.nav__item:hover svg {
  transform: translateY(-1px);
}
.nav__item[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
  font-weight: 600;
}
.nav__item[aria-current="page"]::before {
  height: 20px;
}
.nav__item[aria-current="page"] svg {
  color: var(--accent);
}

.rail__spacer {
  flex: 1;
}

/* — 侧栏底部账户块 — */
.wallet {
  padding: 14px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
}
.wallet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.wallet__amt {
  font-size: 1.375rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.wallet__amt small {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-right: 1px;
}
.wallet__bar {
  margin-top: 10px;
  height: 3px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.wallet__bar i {
  display: block;
  height: 100%;
  width: 26%;
  background: var(--accent);
  border-radius: 99px;
}
.wallet .btn {
  margin-top: 12px;
  width: 100%;
}

/* — 访客侧栏：明确登录入口（原站缺失） — */
.rail-signin {
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
}
.rail-signin h3 {
  font-size: 0.9375rem;
  font-weight: 650;
}
.rail-signin p {
  margin-top: 4px;
  font-size: 0.78125rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.rail-signin .btn {
  width: 100%;
  margin-top: 12px;
}
.rail-signin__foot {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.rail-signin__foot b {
  color: var(--accent);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Main column
   -------------------------------------------------------------------------- */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(11, 12, 15, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar__title {
  flex: none;
  white-space: nowrap;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.topbar__title small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-4);
  margin-top: 1px;
}
.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 28px 72px;
}
.wrap--narrow {
  max-width: 880px;
}
.wrap--wide {
  max-width: 1320px;
}

/* 两栏：主内容 + 右栏。右栏只在 ≥1440 出现 —— 1280 宽的笔记本上，
   244 + 312 的左右边栏会把内容列挤到 700px 以下，得不偿失。 */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (min-width: 1440px) {
  .cols--rail {
    grid-template-columns: minmax(0, 1fr) var(--rail-r-w);
  }
}
.cols > * {
  min-width: 0;
}
.rail-r {
  display: none;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 84px;
}
@media (min-width: 1440px) {
  .rail-r {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   7. Buttons
   原站：100% 药丸 + 四色渐变 + pulse 动画。现：实心强调 / 描边 / 纯文字三级
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-btn);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.006em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform 120ms var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.btn:active {
  transform: translateY(1px) scale(0.988);
}

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--sh-1);
}
.btn--accent:hover {
  background: var(--accent-hi);
  box-shadow: 0 6px 18px -6px rgba(225, 92, 110, 0.55);
}
.btn--line {
  border-color: var(--line-2);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn--line:hover {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.05);
}
.btn--quiet {
  color: var(--ink-2);
  padding-inline: 10px;
}
.btn--quiet:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.btn--lg {
  padding: 12px 22px;
  font-size: 0.9375rem;
  border-radius: 12px;
}
.btn--block {
  width: 100%;
}
.btn--sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  background: var(--surface-3);
  border-color: transparent;
  color: var(--ink-3);
  box-shadow: none;
}

/* 图标按钮 */
.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-btn);
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.iconbtn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iconbtn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.iconbtn--line {
  border-color: var(--line-2);
}

/* --------------------------------------------------------------------------
   8. Chips / badges / segmented
   原站：药丸 + 多色（rose/gold/cyan）。现：6px 方角 + 单一色系
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--r-chip);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-3);
  white-space: nowrap;
}
.chip svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}
.chip--line {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
}
.chip--accent {
  background: var(--accent-wash);
  color: var(--accent-hi);
}
.chip--ok {
  background: var(--ok-wash);
  color: var(--ok);
}
.chip--warn {
  background: var(--warn-wash);
  color: var(--warn);
}
.chip--flag {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-ad {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
}

/* 分段控件：把原来散落的药丸按钮收进一个轨道 */
.seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--ink-3);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg__btn:hover {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.04);
}
.seg__btn[aria-selected="true"],
.seg__btn.is-active {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: var(--sh-1);
}
.seg__btn b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-size: 0.75rem;
}
.seg__btn[aria-selected="true"] b {
  color: var(--ink-3);
}
.seg--flush {
  background: transparent;
  border-color: transparent;
  padding: 0;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   9. Fields
   -------------------------------------------------------------------------- */
.field {
  display: block;
}
.field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  height: 46px;
  border-radius: var(--r-field);
  background: var(--surface);
  border: 1px solid var(--line-2);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.field__box:focus-within {
  border-color: var(--accent-line);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field__box svg {
  width: 17px;
  height: 17px;
  stroke: var(--ink-4);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  transition: stroke var(--dur) var(--ease);
}
.field__box:focus-within > svg {
  stroke: var(--ink-3);
}
.field__box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 0.9375rem;
}
.field__box input::placeholder {
  color: var(--ink-3);
}
.field__box--error {
  border-color: rgba(225, 92, 110, 0.6);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.field__hint--error {
  color: var(--accent-hi);
}
.field__hint svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.check input {
  appearance: none;
  width: 17px;
  height: 17px;
  flex: none;
  border-radius: 5px;
  border: 1px solid var(--line-3);
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  cursor: pointer;
}
.check input::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0.5);
  opacity: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked::after {
  opacity: 1;
  transform: rotate(-45deg) translateY(-1.5px) scale(1);
}

/* 搜索框 */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 160px;
  min-width: 0;
  max-width: 340px;
  height: 42px;
  padding: 0 8px 0 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.search:focus-within {
  border-color: var(--accent-line);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.search svg {
  width: 17px;
  height: 17px;
  stroke: var(--ink-4);
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  flex: none;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 0.875rem;
}
.search input::placeholder {
  color: var(--ink-3);
}
.search kbd {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-4);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

/* --------------------------------------------------------------------------
   10. Media
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-media);
  background: var(--surface-2);
  isolation: isolate;
}
.media--16x9 {
  aspect-ratio: 16 / 9;
}
.media--4x3 {
  aspect-ratio: 4 / 3;
}
.media--3x4 {
  aspect-ratio: 3 / 4;
}
.media--1x1 {
  aspect-ratio: 1 / 1;
}
.media--21x9 {
  aspect-ratio: 21 / 9;
}
/* 无图时的兜底：确定性渐变 + 微噪点，不留白 */
.media__fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      90% 80% at 22% 12%,
      hsl(var(--h, 250) 22% 24%),
      transparent 66%
    ),
    linear-gradient(150deg, #1c212b, #12151b 62%, #0f1116);
}
.media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease), filter var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
/* 兜底渐变是绝对定位的，会盖住同一层里"未定位"的 <img>。
   凡是把 fallback 和普通 img 放在一起的容器，都要把 img 提到定位层之上。 */
.avatar img,
.avatar__ring + img,
.acard__cover img,
.acard__avatar img,
.hero__avatar img,
.hero__cover img,
.promo__media img,
.gallery__item img,
.auth-visual__img {
  position: relative;
  z-index: 1;
}
.media__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 12, 15, 0.34) 0%,
    transparent 34%,
    transparent 62%,
    rgba(11, 12, 15, 0.62) 100%
  );
  pointer-events: none;
}
.media__top {
  position: absolute;
  inset: 10px 10px auto;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.media__bottom {
  position: absolute;
  inset: auto 10px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.media__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.media__chip svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* hover：整块可点，图片轻推 + 暗角加深 */
a.media:hover .media__img,
.media-hover:hover .media__img {
  transform: scale(1.035);
}
.media-hover:hover .media__scrim {
  opacity: 1.2;
}

/* 播放按钮：不用发光的白圆，改为克制的小圆 + 描边 */
.playbtn {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: var(--r-round);
  transform: translate(-50%, -50%);
  background: rgba(10, 11, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(6px);
  box-shadow: var(--sh-2);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.playbtn svg {
  width: 22px;
  height: 22px;
  margin-left: 3px; /* 光学居中：三角形重心偏左 */
  fill: #fff;
}
.playbtn--sm {
  width: 44px;
  height: 44px;
}
.playbtn--sm svg {
  width: 17px;
  height: 17px;
  margin-left: 2px;
}
.media-hover:hover .playbtn,
a.media:hover .playbtn {
  background: var(--accent);
  border-color: var(--accent-hi);
  transform: translate(-50%, -50%) scale(1.06);
}

/* 付费墙：从"渐变横幅"改为"媒体本身的锁定态"
   模糊 + 压暗，但要保留足够可辨识度 —— 用户需要看见"墙后面有什么"才会付费。
   原站的做法（下方插一条霓虹渐变横幅）既割裂又没解决这个问题。 */
.media--locked .media__img {
  filter: blur(12px) saturate(0.82) brightness(0.82);
  transform: scale(1.1);
}
.media--locked:hover .media__img,
a.media--locked:hover .media__img {
  transform: scale(1.1);
}
.media--locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    72% 72% at 50% 46%,
    rgba(11, 12, 15, 0.08),
    rgba(11, 12, 15, 0.52)
  );
}
.lockpanel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px;
  text-align: center;
}
.lockpanel__glyph {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(20, 23, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--sh-2);
}
.lockpanel__glyph svg {
  width: 19px;
  height: 19px;
  stroke: var(--accent-hi);
  stroke-width: 1.85;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lockpanel__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.lockpanel__sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.66);
}

/* --------------------------------------------------------------------------
   11. Cards / surfaces
   规则：卡片只在"确实需要抬升"时出现（弹层、抽屉、抽屉式面板）。
        列表项一律"去卡片化"——靠 1px 分隔线与留白建立层次。
   -------------------------------------------------------------------------- */
.surface {
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
}
.surface--pad {
  padding: 20px;
}
.surface--flat {
  background: var(--bg-2);
}

.stack {
  display: flex;
  flex-direction: column;
}
.gap-4 {
  gap: 4px;
}
.gap-8 {
  gap: 8px;
}
.gap-10 {
  gap: 10px;
}
.gap-14 {
  gap: 14px;
}
.gap-20 {
  gap: 20px;
}
.row {
  display: flex;
  align-items: center;
}
.row--between {
  justify-content: space-between;
}
.row--wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}

/* 分区标题：不再用 24px 黑体 + 药丸按钮 */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head p {
  margin-top: 3px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* 分隔线列表（替代卡片堆叠） */
.divlist > * + * {
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   12. Feed / post card
   -------------------------------------------------------------------------- */
.feed {
  display: flex;
  flex-direction: column;
}
.feed > article + article {
  border-top: 1px solid var(--line);
}

.post {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 0;
}
.feed > article:first-child.post {
  padding-top: 4px;
}

.post__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  position: relative;
  display: block; /* span 默认 inline，会吞掉宽高 —— 必须显式 blockify */
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar--sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.avatar--lg {
  width: 96px;
  height: 96px;
  border-radius: 22px;
}
.avatar--xl {
  width: 112px;
  height: 112px;
  border-radius: 24px;
}
.avatar__ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.avatar-stack {
  display: flex;
}
.avatar-stack .avatar + .avatar {
  margin-left: -9px;
  box-shadow: 0 0 0 2px var(--bg);
}

.who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.who__name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.who__name:hover {
  color: var(--accent-hi);
}
.who__name svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.who__handle {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.post__title {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.016em;
  line-height: 1.4;
  transition: color var(--dur) var(--ease);
}
.post__title:hover {
  color: var(--accent-hi);
}
.post__excerpt {
  font-size: 0.875rem;
  line-height: 1.62;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.meta svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex: none;
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--r-btn);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  border: 1px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform 140ms var(--ease);
}
.act svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}
.act:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.act:active svg {
  transform: scale(0.86);
}
.act[aria-pressed="true"] {
  color: var(--accent-hi);
  background: var(--accent-wash);
}
.act[aria-pressed="true"] svg {
  fill: var(--accent-wash-2);
  stroke: var(--accent-hi);
}

/* 订阅状态行：替代原站的霓虹渐变横幅 */
.subbar {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--accent);
}
.subbar__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: var(--accent-wash);
}
.subbar__icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent-hi);
  stroke-width: 1.9;
  fill: none;
}
.subbar__text {
  display: block;
  min-width: 0;
  flex: 1;
}
.subbar__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}
.subbar__note {
  display: block;
  font-size: 0.71875rem;
  color: var(--ink-3);
  margin-top: 1px;
}
.subbar .btn {
  flex: none;
}

/* --------------------------------------------------------------------------
   13. Author card (discover)
   -------------------------------------------------------------------------- */
.agrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.acard {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.acard:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.acard__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.acard__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.acard:hover .acard__cover img {
  transform: scale(1.045);
}
.acard__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 12, 15, 0.2), transparent 45%);
}
.acard__body {
  padding: 0 15px 15px;
  margin-top: -22px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.acard__avatar {
  position: relative; /* 承载 .media__fallback（绝对定位），自身必须建立包含块 */
  width: 46px;
  height: 46px;
  border-radius: 13px;
  overflow: hidden;
  border: 2px solid var(--surface);
  background: var(--surface-3);
}
.acard__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.acard__name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.014em;
}
.acard__handle {
  font-size: 0.75rem;
  color: var(--ink-3);
}
.acard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.acard__bio {
  margin-top: 10px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acard__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}
.acard__stat {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.acard__stat b {
  font-size: 0.875rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.acard__stat span {
  font-size: 0.6875rem;
  color: var(--ink-3);
}

/* 特色卡：在网格里跨 2 列，打破"三等分卡片行"的机械感 */
@media (min-width: 900px) {
  .acard--feature {
    grid-column: span 2;
    flex-direction: row;
  }
  .acard--feature .acard__cover {
    width: 46%;
    aspect-ratio: auto;
    min-height: 260px;
  }
  .acard--feature .acard__body {
    margin-top: 0;
    padding: 20px;
  }
  .acard--feature .acard__avatar {
    margin-top: 0;
  }
  .acard--feature .acard__name {
    font-size: 1.125rem;
  }
  .acard--feature .acard__bio {
    -webkit-line-clamp: 3;
  }
}

/* --------------------------------------------------------------------------
   14. Stats
   -------------------------------------------------------------------------- */
.statrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.statrow > div {
  padding: 15px 16px;
}
.statrow > div + div {
  border-left: 1px solid var(--line);
}
.stat__k {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-4);
}
.stat__v {
  margin-top: 5px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  font-variant-numeric: tabular-nums;
}
.stat__v--accent {
  color: var(--accent-hi);
}

/* --------------------------------------------------------------------------
   15. Empty / loading / error
   原站：订阅页只有一行灰字，没有任何引导 —— 这里补上完整空态
   -------------------------------------------------------------------------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px 64px;
}
.empty__mark {
  position: relative;
  display: block;
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
}
.empty__mark span {
  position: absolute;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.empty__mark span:nth-child(1) {
  inset: 18px 26px 26px 18px;
}
.empty__mark span:nth-child(2) {
  inset: 26px 18px 18px 26px;
  background: var(--surface-2);
}
.empty__mark span:nth-child(3) {
  inset: 40px 34px 34px 40px;
  background: var(--accent);
  border-color: transparent;
  border-radius: 7px;
}
.empty h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.empty p {
  margin-top: 8px;
  max-width: 42ch;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-3);
}
.empty__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 8px;
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.055) 42%,
    transparent 64%
  );
  transform: translateX(-100%);
  animation: skel 1.5s var(--ease-in-out) infinite;
}
@keyframes skel {
  to {
    transform: translateX(100%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.skel--media {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-media);
}
.skel--line {
  height: 11px;
}
.skel--avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.6;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
}
.notice svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
}
.notice--warn {
  border-color: rgba(201, 154, 52, 0.3);
  background: var(--warn-wash);
  color: #e2c07a;
}
.notice--accent {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--ink);
}
.notice b {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   16. Announcement strip（替代右栏的玻璃公告卡）
   -------------------------------------------------------------------------- */
.strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--accent);
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.strip__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: var(--accent-wash-2);
}
.strip__icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent-hi);
  stroke-width: 1.9;
  fill: none;
}
.strip p {
  flex: 1;
  min-width: 0;
}
.strip b {
  color: var(--ink);
  font-weight: 600;
}
.strip p a {
  color: var(--accent-hi);
  font-weight: 600;
}
.strip p a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.strip__close {
  flex: none;
}

/* --------------------------------------------------------------------------
   17. Promo card（推广位：明确标注 AD，视觉克制）
   -------------------------------------------------------------------------- */
.promo {
  display: block;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.promo:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.promo__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.promo__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.promo:hover .promo__media img {
  transform: scale(1.04);
}
.promo__ad {
  position: absolute;
  top: 9px;
  right: 9px;
}
.promo__body {
  padding: 12px 14px 14px;
}
.promo__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.promo__sub {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* 推荐作者列表（右栏）：分隔线列表，不是卡片 */
.authorline {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  transition: opacity var(--dur) var(--ease);
}
.authorline + .authorline {
  border-top: 1px solid var(--line);
}
.authorline:hover .who__name {
  color: var(--accent-hi);
}
.authorline__rank {
  width: 18px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-4);
}
.authorline .btn {
  margin-left: auto;
  flex: none;
}

/* --------------------------------------------------------------------------
   18. Post detail
   -------------------------------------------------------------------------- */
.pd {
  display: grid;
  gap: 26px;
}
@media (min-width: 1080px) {
  .pd {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}
.pd__aside {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (max-width: 1079px) {
  .pd__aside {
    position: static;
  }
}
.pd__title {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.pd__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pd__desc {
  font-size: 0.90625rem;
  line-height: 1.72;
  color: var(--ink-2);
  max-width: 68ch;
}
.pd__tag {
  color: var(--ink-3);
}

.player {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.player__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.player__track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
  cursor: pointer;
}
.player__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: 99px;
  background: var(--accent);
}
.player__fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%) scale(0);
  transition: transform var(--dur) var(--ease);
  box-shadow: var(--sh-1);
}
.player__track:hover .player__fill::after {
  transform: translateY(-50%) scale(1);
}
.player__time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* 图集 */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 720px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}
.gallery__item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.gallery__item:hover img {
  transform: scale(1.06);
}
.gallery__more {
  display: grid;
  place-items: center;
  font-size: 0.9375rem;
  font-weight: 650;
  background: rgba(11, 12, 15, 0.72);
  color: #fff;
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
}

/* --------------------------------------------------------------------------
   19. Author hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero__cover {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
@media (max-width: 640px) {
  .hero__cover {
    aspect-ratio: 16 / 9;
  }
}
.hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 12, 15, 0.25) 0%,
    rgba(11, 12, 15, 0.1) 32%,
    rgba(20, 23, 30, 0.86) 100%
  );
}
.hero__body {
  position: relative;
  z-index: 1;
  padding: 0 22px 20px;
  margin-top: -52px;
}
.hero__top {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.hero__avatar {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid var(--surface);
  background: var(--surface-3);
  flex: none;
  box-shadow: var(--sh-2);
}
@media (max-width: 640px) {
  .hero__avatar {
    width: 76px;
    height: 76px;
    border-radius: 19px;
  }
  .hero__body {
    margin-top: -38px;
    padding: 0 16px 18px;
  }
}
.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__id {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 4px;
  min-width: 0;
}
.hero__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  font-weight: 780;
  letter-spacing: -0.032em;
}
.hero__verified {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}
.hero__verified svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 2.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero__handle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.hero__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 4px;
}
.hero__bio {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 0.875rem;
  line-height: 1.68;
  color: var(--ink-2);
}
.hero__stats {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}
.hero__stat b {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero__stat span {
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* 吸顶订阅条（滚动后出现） */
.stickybar {
  position: fixed;
  left: calc(var(--rail-w) + 50%);
  transform: translateX(-50%) translateY(120%);
  bottom: 22px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border-radius: var(--r-sheet);
  background: rgba(20, 23, 30, 0.9);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line-3);
  box-shadow: var(--sh-3);
  transition: transform var(--dur-slow) var(--ease), opacity var(--dur) var(--ease);
  opacity: 0;
}
@media (max-width: 1023px) {
  .stickybar {
    left: 16px;
    right: 16px;
    transform: translateY(140%);
    bottom: 76px;
  }
}
.stickybar.is-on {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
@media (max-width: 1023px) {
  .stickybar.is-on {
    transform: translateY(0);
  }
}
.stickybar__name {
  font-size: 0.875rem;
  font-weight: 600;
}
.stickybar__price {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* 帖子网格（作者页）：双列，区别于首页单列流 */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.pgrid .post {
  padding: 0;
  border: 0;
}

/* --------------------------------------------------------------------------
   20. Profile
   -------------------------------------------------------------------------- */
.settings {
  display: grid;
  gap: 24px;
}
@media (min-width: 900px) {
  .settings {
    grid-template-columns: 236px minmax(0, 1fr);
    align-items: start;
  }
}
.tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-btn);
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.tab svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.tab[aria-selected="true"],
.tab[aria-current="page"],
.tab.is-active {
  color: var(--ink);
  background: var(--surface-2);
  font-weight: 600;
}
.tab[aria-selected="true"] svg,
.tab[aria-current="page"] svg,
.tab.is-active svg {
  color: var(--accent);
}
.tab__count {
  margin-left: 0;
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line-2);
  text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.tier:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.tier[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.tier__flag {
  position: absolute;
  top: -8px;
  left: 14px;
}
.tier__pay {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.tier__amount {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.032em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tier__amount small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-right: 1px;
}
.tier__get {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px dashed var(--line-2);
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.tier__get b {
  color: var(--accent-hi);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.payrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.payrow:hover {
  border-color: var(--line-3);
}
.payrow[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--surface-2);
}
.payrow__logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--surface-3);
  font-weight: 800;
  font-size: 1rem;
  color: #4a8fe7;
}
.payrow__radio {
  margin-left: auto;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  display: grid;
  place-items: center;
  transition: border-color var(--dur) var(--ease);
}
.payrow[aria-checked="true"] .payrow__radio {
  border-color: var(--accent);
}
.payrow[aria-checked="true"] .payrow__radio::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

/* 断点表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  transition: background var(--dur) var(--ease);
}
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
.table td:first-child,
.table th:first-child {
  padding-left: 0;
}
.table td:last-child,
.table th:last-child {
  padding-right: 0;
  text-align: right;
}

/* 优惠券 */
.coupon {
  display: flex;
  align-items: stretch;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.coupon__amt {
  display: grid;
  place-items: center;
  padding: 0 18px;
  background: var(--accent-wash);
  border-right: 1px dashed var(--accent-line);
  font-size: 1.375rem;
  font-weight: 750;
  color: var(--accent-hi);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.coupon__amt small {
  font-size: 0.75rem;
  font-weight: 500;
}
.coupon__body {
  flex: 1;
  padding: 13px 15px;
}
.coupon__title {
  font-size: 0.875rem;
  font-weight: 600;
}
.coupon__meta {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   21. Auth
   -------------------------------------------------------------------------- */
.authpage {
  display: grid;
  min-height: 100dvh;
}
@media (min-width: 1000px) {
  .authpage {
    grid-template-columns: 1.05fr 1fr;
  }
}
.auth-visual {
  position: relative;
  display: none;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #0a0b0e;
}
@media (min-width: 1000px) {
  .auth-visual {
    display: block;
  }
}
.auth-visual__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.7) contrast(1.06) brightness(0.7);
}
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      165deg,
      rgba(11, 12, 15, 0.5),
      rgba(11, 12, 15, 0.86) 62%
    ),
    radial-gradient(80% 60% at 12% 88%, rgba(225, 92, 110, 0.24), transparent 70%);
}
.auth-visual__body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 40px 56px;
}
.auth-visual__quote {
  max-width: 30ch;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.032em;
  line-height: 1.18;
}
.auth-visual__quote em {
  font-style: normal;
  color: var(--accent-hi);
}
.auth-visual__proof {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.auth-visual__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.auth-visual__foot span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.auth-visual__foot svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke: var(--ink-4);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.authpanel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 34px 24px 48px;
  background: var(--bg);
}
.authcard {
  width: 100%;
  max-width: 396px;
}
.authcard__head {
  margin-bottom: 26px;
}
.authcard__head h1 {
  font-size: 1.625rem;
  font-weight: 780;
  letter-spacing: -0.032em;
}
.authcard__head p {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.authform {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.authform__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.authswitch {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.authswitch a {
  color: var(--accent-hi);
  font-weight: 600;
}
.authswitch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.authnote {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
}
.authnote svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  stroke: var(--accent-hi);
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
}
.authnote b {
  color: var(--ink);
  font-weight: 600;
}

/* 密码强度 */
.strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.strength__bars {
  display: flex;
  gap: 3px;
  flex: 1;
}
.strength__bars i {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--surface-3);
  transition: background var(--dur) var(--ease);
}
.strength__label {
  font-size: 0.6875rem;
  color: var(--ink-4);
  min-width: 3.5em;
  text-align: right;
}
.strength[data-level="1"] .strength__bars i:nth-child(1) {
  background: var(--accent);
}
.strength[data-level="2"] .strength__bars i:nth-child(-n + 2) {
  background: var(--warn);
}
.strength[data-level="3"] .strength__bars i {
  background: var(--ok);
}

/* --------------------------------------------------------------------------
   22. Mobile bottom nav —— 改为贴合底边的实心栏 + 顶部发丝线
   原站：悬浮药丸 + 渐变 tab-dot + 外发光
   -------------------------------------------------------------------------- */
.tabbar {
  display: none;
}
@media (max-width: 1023px) {
  .rail {
    display: none;
  }
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(11, 12, 15, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    border-top: 1px solid var(--line);
  }
  .tabbar__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--ink-4);
    border-radius: 10px;
    transition: color var(--dur) var(--ease);
  }
  .tabbar__item svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--dur) var(--ease);
  }
  .tabbar__item[aria-current="page"] {
    color: var(--ink);
  }
  .tabbar__item[aria-current="page"] svg {
    color: var(--accent);
    transform: translateY(-1px);
  }
  .tabbar__item[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 0;
    width: 22px;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--accent);
  }
  .tabbar__dot {
    position: absolute;
    top: 6px;
    right: 22%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #e15c6e);
    box-shadow: 0 0 0 2px var(--bg);
  }
  .topbar {
    padding: 12px 16px;
    gap: 10px;
  }
  .topbar .search {
    max-width: none;
    flex: 1 1 100px;
    min-width: 0;
  }
  .topbar .search kbd {
    display: none;
  }
  .wrap {
    padding: 18px 16px 104px;
  }
  .stickybar {
    bottom: 78px;
  }
}
@media (max-width: 560px) {
  .topbar__title small {
    display: none;
  }
  .topbar__actions .btn {
    padding-inline: 12px;
  }
  /* 公告条与订阅条在窄屏改为纵向堆叠：横排会让文案挤成三行，按钮压住文字 */
  .strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
  }
  .strip__icon {
    grid-column: 1;
    grid-row: 1;
  }
  .strip p {
    grid-column: 2;
    grid-row: 1;
    flex: none;
  }
  .strip .iconbtn {
    grid-column: 3;
    grid-row: 1;
  }
  .strip .btn {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 2px;
  }
  .subbar .btn {
    flex: 1 1 100%;
  }
}

/* 移动端抽屉式筛选 */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filters__scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-inline: -16px;
  padding-inline: 16px;
}
.filters__scroll::-webkit-scrollbar {
  display: none;
}
@media (min-width: 640px) {
  .filters__scroll {
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* --------------------------------------------------------------------------
   23. Sheet（移动端底部抽屉，替代全屏 modal）
   -------------------------------------------------------------------------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 7, 10, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
@media (min-width: 640px) {
  .sheet-mask {
    align-items: center;
  }
}
.sheet-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-3);
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(14px);
  transition: transform var(--dur-slow) var(--ease);
}
@media (min-width: 640px) {
  .sheet {
    border-radius: var(--r-sheet);
    transform: translateY(10px) scale(0.985);
  }
}
.sheet-mask.is-open .sheet {
  transform: none;
}
.sheet__grip {
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--surface-4);
  margin: -8px auto 16px;
}
@media (min-width: 640px) {
  .sheet__grip {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   24. Toast（原站为渐变药丸，现为中性单行）
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 11px;
  background: rgba(26, 30, 38, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-3);
  box-shadow: var(--sh-3);
  font-size: 0.8125rem;
  font-weight: 500;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}
.toast svg {
  width: 15px;
  height: 15px;
  stroke: var(--ok);
  stroke-width: 2.1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --------------------------------------------------------------------------
   25. Motion：入场错峰揭示
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease), transform 620ms var(--ease);
  transition-delay: var(--d, 0ms);
}

/* --------------------------------------------------------------------------
   26. Prototype chrome（仅原型用，不属于设计）
   固定在左下角的开发控件：切页面 + 切登录态。刻意做成"工具"而非设计的一部分。
   -------------------------------------------------------------------------- */
.proto {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px 7px 11px;
  border-radius: 14px;
  background: rgba(8, 9, 12, 0.92);
  backdrop-filter: blur(18px);
  border: 1px dashed rgba(225, 92, 110, 0.5);
  box-shadow: var(--sh-3);
}
@media (max-width: 1023px) {
  .proto {
    bottom: 78px;
    left: 12px;
    right: auto;
    max-width: calc(100vw - 24px);
  }
}
.proto__tag {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 6px;
  border: 1px solid var(--accent-line);
  border-radius: 5px;
}
.proto__sel {
  flex: none;
  appearance: none;
  padding: 5px 24px 5px 9px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23767d8b' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  border: 1px solid var(--line-2);
  outline: none;
  cursor: pointer;
}
.proto__sel:hover {
  border-color: var(--line-3);
  color: var(--ink);
}
.proto__toggle {
  display: flex;
  flex: none;
  align-items: center;
  padding: 2px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line-2);
}
.proto__toggle button {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.proto__toggle button:hover {
  color: var(--ink);
}
.proto__toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}
/* 向下滚动时收起，向上滚动或回到顶部时滑出 —— 免得一直压着内容 */
.proto.is-down {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}
.proto {
  transition: transform 320ms var(--ease), opacity 240ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .proto.is-down {
    transform: none;
    opacity: 0.25;
    pointer-events: auto;
  }
}

/* 原型状态：未登录 / 已登录 的显隐开关
   只做"隐藏"，不做"强制显示" —— 元素保持自己的 display 规则 */
html[data-state="guest"] .only-member,
html[data-state="member"] .only-guest {
  display: none !important;
}
