/* 毛豆视频 · 片单手账
   方向：App 外壳式 IA —— 桌面左侧常驻侧边栏 + 右侧 Bento 网格首屏 + 歌单式片单表 + 横向步骤条 + 卡片 FAQ；
   移动端侧边栏收起，换为顶部 appbar + 底部 Tab 栏（中间圆形播放键）。
   视觉：燕麦纸底、墨色文字、单一毛豆绿；大圆角、柔和投影、细描边。浅色主题。
   CSP: style-src 'self'，禁止 style 属性；字体只用系统栈。 */

:root {
  color-scheme: light;
  --bg: #f2eee4;
  --paper: #fbf9f4;
  --paper-2: #f6f3eb;
  --ink: #1c1f17;
  --ink-2: #3a3d33;
  --muted: #6e7064;
  --faint: #a2a397;
  --line: rgba(28, 31, 23, 0.09);
  --line-strong: rgba(28, 31, 23, 0.16);
  --green: #5b8c2a;
  --green-deep: #3f6a17;
  --green-soft: #e4eed2;
  --green-tint: #f0f5e6;
  --chili: #d9532f;

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-latin: "Avenir Next", "Segoe UI", "Helvetica Neue", var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --side-w: 256px;
  --r-lg: 26px;
  --r-md: 18px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(28, 31, 23, .04), 0 12px 32px -18px rgba(28, 31, 23, .18);
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 650; font-size: 15px; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn--green { background: var(--green); color: #fff; box-shadow: 0 8px 20px -10px rgba(63, 106, 23, .8); }
.btn--green svg { fill: currentColor; }
.btn--green:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn--line { border: 1.5px solid var(--line-strong); background: var(--paper); }
.btn--line:hover { border-color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn--ink:hover { background: var(--green-deep); }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- App 外壳 ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 26px 18px 22px;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
}
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand img { border-radius: 12px; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { font-size: 12px; color: var(--muted); }

.side-nav { display: grid; gap: 2px; }
.side-nav__label { padding: 0 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--faint); }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px; border-radius: 12px;
  color: var(--ink-2); font-size: 14.5px;
  transition: background .15s, color .15s;
}
.side-nav svg, .tabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:hover { background: rgba(28, 31, 23, .05); }
.side-nav a.is-active { background: var(--paper); color: var(--green-deep); font-weight: 650; box-shadow: var(--shadow); }

.side-card {
  margin-top: auto; padding: 16px; border-radius: var(--r-md);
  background: var(--paper); box-shadow: var(--shadow);
}
.side-card__status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.side-card__status i { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 0 3px rgba(76, 175, 80, .18); }
.side-card__text { margin: 6px 0 14px; font-size: 13px; color: var(--muted); }
.side-foot { padding: 0 8px; font-size: 12px; color: var(--faint); line-height: 1.8; }
.side-foot b { color: var(--chili); }
.side-foot a:hover { color: var(--ink); }

.appbar { display: none; }

.main { padding: 28px clamp(20px, 3.4vw, 48px) 40px; max-width: 1280px; width: 100%; margin-inline: auto; }

.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.topline #greeting { color: var(--ink); font-weight: 650; }
.topline__age b { color: var(--chili); margin-right: 4px; }

/* ---------- Bento ---------- */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "hero hero hero hero hero hero hero hero date date date date"
    "hero hero hero hero hero hero hero hero dev  dev  dev  dev"
    "cats cats cats cats cats tip  tip  tip  save save save save";
}
.tile {
  position: relative; overflow: hidden;
  padding: 24px; border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--shadow);
}
.tile__label { font-size: 12px; font-weight: 650; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }

.tile--hero { grid-area: hero; padding: clamp(28px, 3.4vw, 44px); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(160deg, #fbf9f4 40%, #eef4e2 100%); }
.eyebrow { position: absolute; top: clamp(28px, 3.4vw, 40px); left: clamp(28px, 3.4vw, 44px); font-family: var(--font-latin); font-size: 11px; font-weight: 600; letter-spacing: .24em; color: var(--green); }
.tile--hero h1 { position: relative; z-index: 1; font-size: clamp(44px, 5.6vw, 76px); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
.tile--hero h1 span { display: block; color: var(--green); }
.tile__lead { position: relative; z-index: 1; max-width: 460px; margin-top: 16px; color: var(--muted); font-size: 15.5px; }
.tile__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tile__pod { position: absolute; right: -40px; top: 24px; width: min(52%, 380px); height: auto; transform: rotate(-8deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(-5deg) translateY(-8px); } }

.tile--date { grid-area: date; background: var(--green); color: #fff; }
.tile--date .tile__label { color: rgba(255, 255, 255, .7); }
.date-big { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-latin); }
.date-big span { font-size: clamp(64px, 7vw, 96px); font-weight: 700; line-height: .9; letter-spacing: -.04em; }
.date-big small { font-family: var(--font-sans); font-size: 18px; font-weight: 600; }
.tile__note { margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, .78); }
.tile--date::after {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, .1);
}

.tile--device { grid-area: dev; }
.devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.devices li { display: grid; justify-items: center; gap: 8px; padding: 16px 6px; border-radius: 14px; background: var(--paper-2); font-size: 13px; color: var(--ink-2); }
.devices svg { width: 26px; height: 26px; fill: none; stroke: var(--green-deep); stroke-width: 1.6; stroke-linecap: round; }

.tile--cats { grid-area: cats; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--green-tint); color: var(--green-deep); font-size: 14px; font-weight: 600;
  transition: background .2s, color .2s;
}
.chips a:hover { background: var(--green); color: #fff; }

.tile--tip { grid-area: tip; background: #fff6df; }
.tile--save { grid-area: save; display: flex; flex-direction: column; }
.tile--save .btn { margin-top: auto; }
.tip { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }

/* ---------- 面板 ---------- */
.panel { margin-top: 22px; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow); }
.panel__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.panel h2, .faq h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 750; }
.panel__head p { margin-top: 4px; color: var(--muted); font-size: 14px; }

.filters { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); }
.filters button { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.filters button.is-on { background: var(--ink); color: var(--paper); }

.tracks { border-top: 1px solid var(--line); }
.tracks li { border-bottom: 1px solid var(--line); }
.tracks li[hidden] { display: none; }
.track {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: 32px 56px minmax(0, 1fr) 70px 70px 40px;
  padding: 12px 10px; margin: 0 -10px; border-radius: 14px;
  transition: background .15s;
}
.track:hover { background: var(--green-tint); }
.track__no { font-family: var(--font-mono); font-size: 13px; color: var(--faint); text-align: center; }
.thumb { width: 56px; height: 40px; border-radius: 9px; }
.thumb--1 { background: linear-gradient(135deg, #a8c97c, #5b8c2a); }
.thumb--2 { background: linear-gradient(135deg, #f1d4a8, #d9853f); }
.thumb--3 { background: linear-gradient(135deg, #b9c6d6, #4f6380); }
.thumb--4 { background: radial-gradient(circle at 70% 35%, #fff3c4 0 18%, transparent 19%), linear-gradient(135deg, #e7b98a, #9b5a32); }
.thumb--5 { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .25) 0 3px, transparent 3px 9px), linear-gradient(135deg, #c9b3d9, #6e4b8a); }
.thumb--6 { background: linear-gradient(180deg, #9fd0d5 50%, #3f7d86 50%); }
.track__info { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.track__info strong { font-size: 15.5px; font-weight: 650; }
.track__info small { width: 100%; margin-top: -2px; font-size: 12.5px; color: var(--muted); order: 3; }
.tag-hot { padding: 0 6px; border-radius: 5px; background: #fde4dc; color: var(--chili); font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; }
.track__q { justify-self: start; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.track__len { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-align: right; }
.track__play { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); transition: background .2s, transform .2s var(--ease); }
.track__play svg { width: 16px; height: 16px; fill: var(--ink); }
.track:hover .track__play { background: var(--green); transform: scale(1.06); }
.track:hover .track__play svg { fill: #fff; }
.panel__more { display: inline-flex; gap: 6px; margin-top: 18px; font-weight: 650; color: var(--green-deep); }
.panel__more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* 步骤条 */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.stepper::before { content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.stepper li { position: relative; padding-right: 20px; }
.stepper span {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--green); color: var(--green-deep);
  font-family: var(--font-latin); font-weight: 700; font-size: 17px;
}
.stepper li:first-child span { background: var(--green); color: #fff; }
.stepper h3 { margin-top: 14px; font-size: 16px; }
.stepper p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }

/* FAQ 卡片 */
.faq { margin-top: 40px; }
.faq__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.faq article { padding: 22px 24px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: transparent; transition: border-color .2s, background .2s; }
.faq article:hover { border-color: var(--green); background: var(--paper); }
.faq h3 { font-size: 16px; display: flex; gap: 10px; }
.faq h3::before { content: "Q"; flex-shrink: 0; font-family: var(--font-latin); color: var(--green); font-weight: 800; }
.faq article p { margin-top: 8px; padding-left: 22px; color: var(--muted); font-size: 14px; }

.panel--about h2 { margin-bottom: 14px; }
.about__cols { columns: 3 240px; column-gap: 32px; color: var(--ink-2); font-size: 14.5px; }
.about__cols p { margin-bottom: 1em; break-inside: avoid; }
.about__cols a { color: var(--green-deep); font-weight: 600; border-bottom: 1.5px solid var(--green-soft); }

.foot { display: grid; gap: 8px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot nav { display: flex; gap: 18px; }
.foot nav a:hover { color: var(--ink); }
.foot__disclosure { color: var(--faint); font-size: 12px; }

.tabbar { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 200;
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "hero hero hero hero hero hero"
      "date date date dev  dev  dev"
      "cats cats cats cats cats cats"
      "tip  tip  tip  save save save";
  }
}

@media (max-width: 900px) {
  .app { display: block; }
  .side { display: none; }
  .appbar {
    position: sticky; top: 0; z-index: 80;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; padding: 0 16px;
    background: rgba(242, 238, 228, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .appbar .brand { padding: 0; }
  .main { padding: 16px 16px calc(100px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: 72px; }
  .topline { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; }
  .tabbar {
    position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 120;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    height: 66px; padding: 0 6px; border-radius: 22px;
    background: rgba(251, 249, 244, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 18px 40px -16px rgba(28, 31, 23, .35);
    border: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .tabbar a.is-active { color: var(--green-deep); font-weight: 650; }
  .tabbar__play { width: 54px; height: 54px; margin: -22px auto 0; border-radius: 50%; place-items: center; background: var(--green); color: #fff !important; box-shadow: 0 10px 24px -8px rgba(63, 106, 23, .8); }
  .tabbar__play svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
  .stepper { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .stepper::before { display: none; }
}

@media (max-width: 640px) {
  .bento {
    grid-template-columns: 1fr 1fr; gap: 10px;
    grid-template-areas:
      "hero hero"
      "date dev"
      "cats cats"
      "tip  save";
  }
  .tile { padding: 18px; border-radius: 22px; }
  .tile--hero { min-height: 0; padding: 72px 22px 24px; }
  .eyebrow { top: 24px; left: 22px; }
  .tile__pod { width: 52%; right: -28px; top: 8px; opacity: .9; }
  .tile__actions .btn { flex: 1 1 100%; }
  .date-big span { font-size: 56px; }
  .date-big small { font-size: 14px; }
  .devices { grid-template-columns: 1fr; gap: 6px; }
  .devices li { grid-auto-flow: column; justify-content: start; padding: 6px 10px; }
  .devices svg { width: 18px; height: 18px; }
  .tip { font-size: 13px; }
  .tile--save .btn { height: 40px; font-size: 13px; padding: 0 10px; }
  .panel { padding: 20px 16px; border-radius: 22px; }
  .filters { width: 100%; }
  .filters button { flex: 1; padding: 0 6px; }
  .track { grid-template-columns: 24px 48px minmax(0, 1fr) 34px; gap: 10px; padding: 10px 6px; margin: 0 -6px; }
  .thumb { width: 48px; height: 36px; }
  .track__q, .track__len { display: none; }
  .track__play { width: 32px; height: 32px; }
  .stepper { grid-template-columns: 1fr; }
  .stepper li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
  .stepper span { grid-row: span 2; }
  .stepper h3 { margin-top: 2px; }
  .faq__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 合规页（由 _tools/build.mjs 生成） ---------- */
.legal-wrap { width: 100%; max-width: 780px; margin-inline: auto; padding-inline: 20px; }
.legal-top { position: sticky; top: 0; z-index: 10; background: rgba(242, 238, 228, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.legal-top__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; }
.legal-brand img { border-radius: 10px; }
.legal-brand span { display: grid; line-height: 1.15; }
.legal-brand small { font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.legal-back { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: 14px; }
.legal-back:hover { border-color: var(--ink); }
.legal-body { margin-block: 28px 20px; padding: clamp(24px, 5vw, 48px); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow); }
.legal-crumb { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.legal-crumb a:hover { color: var(--green-deep); }
.legal-kicker { font-family: var(--font-latin); font-size: 11px; font-weight: 600; letter-spacing: .24em; color: var(--green); }
.legal-body h1 { margin-top: 8px; font-size: clamp(32px, 5vw, 46px); font-weight: 800; }
.legal-updated { margin-top: 8px; font-size: 13px; color: var(--faint); }
.legal-body h2 { margin-top: 32px; font-size: 19px; }
.legal-body p { margin-top: 10px; color: var(--ink-2); }
.legal-body a { color: var(--green-deep); font-weight: 600; }
.legal-note { margin-top: 32px; padding: 18px 20px; border-radius: var(--r-md); background: var(--green-tint); }
.legal-note p { margin: 0; }
.legal-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.legal-cta a { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line-strong); }
.legal-cta a:last-child { background: var(--green); color: #fff; border-color: transparent; }
.legal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 12px 40px; font-size: 13px; color: var(--muted); }
.legal-foot nav { display: flex; gap: 16px; }
.legal-foot a:hover { color: var(--ink); }
