/* ============================================================
   AI 中转站导航 — design tokens
   ============================================================ */
:root {
  /* palette */
  --bg: #0a0c14;
  --surface: rgba(23, 27, 45, 0.72);
  --surface-solid: #161a2c;
  --surface-hi: rgba(35, 41, 66, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.17);
  --ink: #f2f4fb;
  --ink-2: #b7bed6;
  --ink-3: #7c85a3;
  --brand: #7c5cff;
  --brand-2: #4d8dff;
  --mint: #2ee6a8;
  --mint-ink: #0b1f18;
  --amber: #ffc24b;
  --rose: #ff6b8b;

  /* type scale — every rule picks one of these */
  --fs-h2: clamp(21px, 2.9vw, 29px);
  --fs-h3: 17px;
  --fs-lg: 16px;
  --fs-base: 15px;
  --fs-sm: 13.5px;
  --fs-xs: 12.5px;
  --fs-2xs: 11.5px;

  /* numerals that need to read as data */
  --fs-num: 20px;

  /* spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 22px;
  --sp-6: 30px;
  --sp-7: 44px;
  --sp-section: clamp(38px, 6vw, 68px);

  /* prose measure — caps line length for readability */
  --measure: 36em;

  /* layout */
  --topbar-h: 64px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.24);
  --shadow: 0 18px 46px -18px rgba(0, 0, 0, 0.66);
  --grad-brand: linear-gradient(135deg, #8a6bff 0%, #4d8dff 100%);
  --grad-mint: linear-gradient(135deg, #2ee6a8 0%, #35c6ff 100%);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

:root[data-theme="light"] {
  --bg: #f6f7fc;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-hi: #ffffff;
  --line: rgba(18, 22, 40, 0.09);
  --line-hi: rgba(18, 22, 40, 0.17);
  --ink: #131629;
  --ink-2: #4d5573;
  --ink-3: #7b83a0;
  --mint: #0fae7c;
  --mint-ink: #ffffff;
  --amber: #b8760a;
  --shadow-sm: 0 4px 14px rgba(20, 24, 50, 0.07);
  --shadow: 0 20px 44px -22px rgba(20, 24, 50, 0.28);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* anchor jumps must clear the sticky topbar */
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
  /* CJK glyphs need looser tracking than latin — keep negatives shallow */
  letter-spacing: -0.008em;
  text-wrap: balance;
}

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

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

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

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

.ic {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: var(--sp-4);
  z-index: 90;
  padding: 10px var(--sp-4);
  color: #fff;
  background: var(--brand);
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top 200ms var(--ease);
}

.skip-link:focus-visible {
  top: 14px;
}

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

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ============================================================
   Background decor
   ============================================================ */
.decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.orb-1 {
  top: -160px;
  left: -80px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.75), transparent 68%);
  animation: drift 22s var(--ease) infinite alternate;
}

.orb-2 {
  top: 120px;
  right: -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(77, 141, 255, 0.6), transparent 68%);
  animation: drift 26s var(--ease) infinite alternate-reverse;
}

.orb-3 {
  top: 55%;
  left: 45%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(46, 230, 168, 0.34), transparent 70%);
  animation: drift 30s var(--ease) infinite alternate;
}

:root[data-theme="light"] .orb {
  opacity: 0.34;
}

.grid-veil {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 20%, transparent 78%);
  opacity: 0.7;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(40px, 50px, 0) scale(1.14);
  }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: transform 180ms var(--ease), background 180ms var(--ease),
    border-color 180ms var(--ease), box-shadow 180ms var(--ease), color 180ms var(--ease);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: var(--fs-xs);
}

.btn-lg {
  min-height: 50px;
  padding: 13px 26px;
  font-size: var(--fs-lg);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 12px 30px -12px rgba(124, 92, 255, 0.8);
}

.btn-primary:hover {
  box-shadow: 0 16px 38px -12px rgba(124, 92, 255, 0.95);
  transform: translateY(-2px);
}

.btn-outline {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-hi);
  backdrop-filter: blur(12px);
}

.btn-outline:hover {
  background: var(--surface-hi);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--ink-2);
  border-color: var(--line);
}

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

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  transition: color 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-hi);
  border-color: var(--line-hi);
}

.icon-btn .ic {
  width: 17px;
  height: 17px;
}

:root[data-theme="dark"] .ic-light,
:root[data-theme="light"] .ic-dark {
  display: none;
}

/* ============================================================
   Topbar
   ============================================================ */
/* 也不吸顶，页面只有一屏多点，没必要一直占着顶部 */
.topbar {
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  /* must equal --topbar-h so the sticky toolbar butts up with no seam */
  height: var(--topbar-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 240ms var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
}

.brand-logo img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.brand-logo.sm {
  padding: 4px;
}

.brand-logo.sm img {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.brand-text small {
  color: var(--ink-3);
  font-size: var(--fs-2xs);
}

.topbar-nav {
  display: flex;
  gap: var(--sp-1);
}

.topbar-nav a {
  padding: 7px 13px;
  color: var(--ink-2);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}

.topbar-nav a:hover {
  color: var(--ink);
  background: var(--surface-hi);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

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

/* ============================================================
   Section scaffolding
   ============================================================ */
.section {
  padding: var(--sp-section) 0;
}

.section-head {
  margin-bottom: var(--sp-5);
}

.section-head h1 {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.014em;
}

.section-sub {
  max-width: var(--measure);
  margin-top: var(--sp-2);
  color: var(--ink-2);
  font-size: var(--fs-sm);
}

.section-sub strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#closed-hint {
  color: var(--amber);
}

/* ============================================================
   Toolbar
   ============================================================ */
/* 不吸顶：下滑时跟着走会遮住卡片 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 280px;
  padding: 0 15px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  backdrop-filter: blur(12px);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}

.search-box .ic {
  width: 16px;
  height: 16px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 40px;
  background: none;
  border: 0;
  outline: none;
  font-size: var(--fs-sm);
}

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

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-right: auto;
}

.chip {
  padding: 8px 15px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  backdrop-filter: blur(12px);
  transition: color 160ms var(--ease), background 160ms var(--ease),
    border-color 160ms var(--ease), transform 160ms var(--ease);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line-hi);
  transform: translateY(-1px);
}

.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 8px 20px -10px rgba(124, 92, 255, 0.9);
}

.chip b {
  margin-left: 5px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.sort-box select {
  height: 40px;
  padding: 0 34px 0 15px;
  color: var(--ink-2);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c85a3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 11px center / 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  backdrop-filter: blur(12px);
  transition: border-color 180ms var(--ease);
}

.sort-box select:hover {
  border-color: var(--line-hi);
}

.sort-box option {
  color: #16192b;
  background: #fff;
}

/* ============================================================
   「我的进度」条
   ============================================================ */
.mine-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
  padding: 10px var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.chip-toggle .ic {
  width: 14px;
  height: 14px;
}

.chip-toggle.is-on {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 8px 20px -10px rgba(124, 92, 255, 0.9);
}

.chip-toggle b {
  font-variant-numeric: tabular-nums;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 32px;
  padding: 4px 6px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 160ms var(--ease);
}

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

.mine-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  color: var(--ink-3);
  font-size: var(--fs-2xs);
  line-height: 1.6;
}

.mine-hint .ic {
  width: 13px;
  height: 13px;
  color: var(--mint);
}

/* ============================================================
   Station cards
   ============================================================ */
.station-grid {
  display: grid;
  /* 窄一点，宽屏能放三四张，卡片不至于一张占半屏 */
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: var(--sp-3);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: rise 520ms var(--ease) both;
  animation-delay: var(--d, 0ms);
  transition: transform 260ms var(--ease), border-color 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 50% -20%, var(--tint, rgba(124, 92, 255, 0.22)), transparent 62%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-hi);
  box-shadow: var(--shadow);
}

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

.card.is-top {
  border-color: rgba(124, 92, 255, 0.42);
}

/* 已薅过：淡化但不隐藏，访客还能点进去或取消标记 */
.card.is-done {
  border-style: dashed;
}

.card.is-done .avatar {
  filter: saturate(0.35);
}

.card.is-done .card-cta {
  color: var(--ink-2);
  background: none;
  border: 1px solid var(--line-hi);
  box-shadow: none;
}

.card.is-done .card-cta:hover {
  color: var(--ink);
  border-color: var(--brand);
}

/* 暂停注册：整卡压暗，但文字保持可读，方便访客回来看还开不开 */
.card.is-closed {
  border-style: dashed;
}

.card.is-closed .avatar,
.card.is-closed .stat-row,
.card.is-closed .model-row {
  opacity: 0.55;
}

.card.is-closed:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.card.is-closed:hover::after {
  opacity: 0;
}

.card-note.is-warn {
  color: var(--amber);
}

.card-ribbon {
  position: absolute;
  top: var(--sp-4);
  right: -1px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px 4px 10px;
  color: #fff;
  background: var(--grad-brand);
  border-radius: var(--r-full) 0 0 var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 8px 20px -10px rgba(124, 92, 255, 0.9);
}

.card-ribbon .ic {
  width: 13px;
  height: 13px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* only reserve room for the ribbon on cards that actually have one */
.card.is-top .card-head {
  padding-right: 66px;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  color: #fff;
  background: var(--av, var(--grad-brand));
  border-radius: 11px;
  font-size: var(--fs-lg);
  font-weight: 800;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.7);
}

.card-title {
  min-width: 0;
}

.card-title h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: var(--sp-1);
}

.tag {
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
}

.tag-public {
  color: var(--mint);
  background: rgba(46, 230, 168, 0.13);
  border-color: rgba(46, 230, 168, 0.32);
}

.tag-signup {
  color: var(--brand-2);
  background: rgba(77, 141, 255, 0.13);
  border-color: rgba(77, 141, 255, 0.32);
}

.tag-paid {
  color: var(--amber);
  background: rgba(255, 194, 75, 0.13);
  border-color: rgba(255, 194, 75, 0.34);
}

.tag-chat {
  color: var(--rose);
  background: rgba(255, 107, 139, 0.13);
  border-color: rgba(255, 107, 139, 0.32);
}

.tag-closed {
  color: var(--amber);
  background: rgba(255, 194, 75, 0.14);
  border-color: rgba(255, 194, 75, 0.36);
}

.tag-done {
  color: var(--ink-3);
  background: rgba(124, 133, 163, 0.14);
  border-color: rgba(124, 133, 163, 0.34);
}

.card-desc {
  max-width: var(--measure);
  margin-top: 10px;
  color: var(--ink-2);
  font-size: var(--fs-xs);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: var(--sp-3);
}

/* 图标和标签同一行，数字紧跟其后，比原来的上下两行省一半高度 */
.stat-cell {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.stat-cell span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.stat-cell span .ic {
  width: 12px;
  height: 12px;
}

.stat-cell b {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.stat-cell.accent {
  background: rgba(46, 230, 168, 0.1);
  border-color: rgba(46, 230, 168, 0.26);
}

.stat-cell.accent b {
  color: var(--mint);
}

.meta-rows {
  display: grid;
  gap: 4px;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
}

.meta-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.meta-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: var(--ink-3);
}

.meta-row .ic {
  width: 14px;
  height: 14px;
}

.meta-row strong {
  color: var(--ink-2);
  font-weight: 600;
}

.model-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.model {
  padding: 2px 9px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
  background: color-mix(in srgb, var(--surface-solid) 62%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  line-height: 1.7;
}

/* 「详情」按钮跟模型标签同一行，省一行高度 */
.detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  /* 视觉上是个小标签，但保证 32px 的可点高度 */
  min-height: 32px;
  margin-left: auto;
  padding: 2px 9px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: var(--fs-2xs);
  line-height: 1.7;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.detail-toggle:hover {
  color: var(--ink);
  border-color: var(--line-hi);
}

.detail-toggle .ic {
  width: 12px;
  height: 12px;
  transition: transform 220ms var(--ease);
}

.detail-toggle.is-open .ic {
  transform: rotate(180deg);
}

.card-detail {
  margin-top: 10px;
  padding: 11px var(--sp-3);
  background: rgba(255, 255, 255, 0.04);
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: 9px;
  animation: rise 260ms var(--ease) both;
}

.card-detail ul {
  margin: 0;
  padding-left: 16px;
  color: var(--ink-2);
  font-size: var(--fs-xs);
  line-height: 1.65;
}

.card-detail li + li {
  margin-top: 5px;
}

.card-note {
  max-width: var(--measure);
  margin-top: 8px;
  color: var(--ink-3);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.card-foot {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--sp-3);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-height: 40px;
  padding: 9px var(--sp-3);
  color: #fff;
  background: var(--grad-brand);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: 0 12px 26px -14px rgba(124, 92, 255, 0.9);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(124, 92, 255, 1);
}

.card-cta:active {
  transform: scale(0.98);
}

.card-cta.is-disabled {
  color: var(--ink-3);
  background: none;
  border: 1px dashed var(--line-hi);
  box-shadow: none;
  cursor: not-allowed;
}

.card-cta.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.card-cta .ic {
  width: 16px;
  height: 16px;
  transition: transform 220ms var(--ease);
}

.card-cta:hover .ic {
  transform: translate(2px, -2px);
}

.card-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  color: var(--ink-3);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-full);
  transition: color 180ms var(--ease), background 180ms var(--ease),
    border-color 180ms var(--ease);
}

.card-mark:hover {
  color: var(--mint);
  border-color: var(--mint);
}

.card-mark.is-on {
  color: var(--mint-ink);
  background: var(--grad-mint);
  border-color: transparent;
}

.card-mark .ic {
  width: 17px;
  height: 17px;
}

.card-copy {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  color: var(--ink-2);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-full);
  transition: color 180ms var(--ease), background 180ms var(--ease),
    border-color 180ms var(--ease);
}

.card-copy:hover {
  color: var(--ink);
  background: var(--surface-hi);
  border-color: var(--brand);
}

.card-copy .ic {
  width: 17px;
  height: 17px;
}

.empty-state {
  padding: var(--sp-7) 20px;
  color: var(--ink-3);
  text-align: center;
  font-size: var(--fs-sm);
}

.noscript-box {
  padding: 18px 20px;
  background: var(--surface-solid);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
}

.noscript-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.noscript-box a {
  color: var(--brand-2);
  text-decoration: underline;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: var(--sp-5);
  padding: var(--sp-6) 0 calc(var(--sp-6) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-brand p {
  color: var(--ink-3);
  font-size: var(--fs-xs);
}


/* ============================================================
   Floating UI
   ============================================================ */
/* 手机上的分享按钮：跟着页面走，不再固定在屏幕底部遮内容 */
.mobile-bar {
  display: none;
  gap: 9px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto var(--sp-6);
}

.mobile-bar .btn {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-sm);
}

/* ============================================================
   Toasts
   ============================================================ */
.toast-region {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 60;
  display: grid;
  gap: 9px;
  width: min(320px, calc(100% - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  color: var(--ink);
  background: var(--surface-solid);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.5;
  animation: toast-in 300ms var(--ease) both;
}

.toast.is-out {
  animation: toast-out 260ms var(--ease) both;
}

.toast-dot {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  color: var(--mint-ink);
  background: var(--grad-mint);
  border-radius: var(--r-full);
}

.toast-dot .ic {
  width: 13px;
  height: 13px;
}

.toast.info .toast-dot {
  color: #3d2a00;
  background: var(--amber);
  font-size: var(--fs-xs);
  font-weight: 800;
}

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

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .topbar-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-h: 58px;
    /* prose already fills the column — the em cap would only add slack */
    --measure: 100%;
  }

  .shell {
    width: calc(100% - 32px);
  }

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

  .mobile-bar {
    display: flex;
    width: calc(100% - 32px);
  }

  .toolbar {
    gap: var(--sp-2);
  }

  .search-box {
    flex-basis: 100%;
    max-width: none;
    order: -1;
  }

  .filter-chips {
    gap: 6px;
  }

  /* 页面里已经有这两个按钮，顶栏就不重复占地方 */
  .topbar-promo {
    display: none;
  }

  .section-head {
    margin-bottom: var(--sp-4);
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand-text small {
    display: none;
  }

  .topbar-actions .btn-ghost span {
    display: none;
  }

  .topbar-actions .btn-ghost {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .card {
    padding: var(--sp-3);
    border-radius: 16px;
  }

  .card.is-top .card-head {
    padding-right: 68px;
  }

  .card-ribbon {
    top: 18px;
  }

  .chip {
    padding: 7px 13px;
  }
}

@media (max-width: 360px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .decor,
  .topbar-actions,
  .toolbar,
  .mobile-bar,
  .toast-region {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}
