:root {
  --ink: #34342f;
  --ink-soft: #5d5a52;
  --canvas: #f3f0e8;
  --paper: #fbf9f3;
  --paper-warm: #f7f1e7;
  --wood: #cdae86;
  --wood-dark: #947353;
  --wood-light: #e4d1b4;
  --sage: #758374;
  --sage-light: #e5eae2;
  --clay: #b9785d;
  --clay-light: #f1e2d9;
  --line: #e4ded2;
  --muted: #88837a;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.play-icon { width: 24px; height: 24px; fill: currentColor; stroke: none; transform: translateX(1px); }
.pause-mark { font-size: 24px; font-weight: 900; letter-spacing: -4px; padding-right: 4px; }
.screen { min-height: 100vh; padding-bottom: 88px; }
.view { display: none; max-width: 540px; margin: 0 auto; padding: 14px 20px 24px; }
.screen[data-view="today"] .view-today,
.screen[data-view="news"] .view-news,
.screen[data-view="archive"] .view-archive,
.screen[data-view="settings"] .view-settings { display: block; }
.topbar, .row, .card-header, .section-title, .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.eyebrow, .card-eyebrow, .label { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 27px; line-height: 1.15; }
h2 { margin-bottom: 8px; font-size: 18px; line-height: 1.25; }
p { color: var(--ink-soft); line-height: 1.55; }
.round-button { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-light); color: var(--sage); display: grid; place-items: center; }
.install-card, .market-card, .chapter-card, .takeaway-card, .promise-card, .settings-card, .mix-card, .worker-card, .archive-card, .news-card, .transcript-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.install-card { margin: 16px 0 14px; padding: 13px; display: flex; align-items: center; gap: 11px; background: var(--paper-warm); border-color: var(--wood-light); }
.install-icon, .setting-icon { flex: 0 0 auto; width: 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; background: #eee4d5; color: var(--wood-dark); font-size: 13px; font-weight: 900; }
.install-icon img { width: 30px; height: 30px; border-radius: 10px; display: block; }
.install-card h2 { margin: 0 0 3px; font-size: 14px; }
.install-card p { margin: 0; font-size: 11px; line-height: 1.4; }
.small-button { border-radius: 11px; padding: 9px 12px; background: var(--wood-dark); color: white; font-size: 11px; font-weight: 900; }
.is-hidden { display: none !important; }
.player-card { position: relative; overflow: hidden; padding: 20px; border-radius: 28px; background: linear-gradient(145deg, var(--wood-light), #d2b28a); box-shadow: 0 12px 26px rgba(122, 102, 79, .14); }
.player-card::before, .player-card::after { content: ""; position: absolute; border: 1px solid rgba(112, 78, 50, .12); border-radius: 999px; pointer-events: none; }
.player-card::before { width: 250px; height: 250px; right: -145px; top: -95px; }
.player-card::after { width: 180px; height: 180px; left: -105px; bottom: -105px; }
.player-card > * { position: relative; z-index: 1; }
.player-top { display: flex; justify-content: space-between; margin-bottom: 24px; }
.pill, .duration { border-radius: 20px; padding: 7px 11px; background: rgba(255,255,255,.48); font-size: 11px; font-weight: 800; color: var(--ink); }
.duration { background: rgba(95,72,47,.1); color: var(--ink-soft); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); margin-right: 7px; }
.kicker { margin: 0 0 9px; color: #70583f; font-weight: 900; font-size: 11px; letter-spacing: 1.1px; }
.player-card h2 { font-size: 25px; line-height: 34px; margin-bottom: 9px; }
.summary { margin-bottom: 24px; color: #655c51; font-size: 13px; }
.native-audio {
  width: 100%;
  height: 34px;
  margin: 0 0 12px;
  opacity: .9;
}
.audio-status {
  margin: -4px 0 12px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.38);
  color: #655c51;
  font-size: 11px;
  line-height: 1.45;
}
.progress { display: block; position: relative; width: 100%; height: 22px; padding: 0; background: transparent; }
.progress::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 5px; border-radius: 5px; background: rgba(91,71,49,.18); }
.progress-fill { position: absolute; left: 0; top: 8px; width: 0; height: 5px; border-radius: 5px; background: var(--sage); }
.progress-thumb { position: absolute; left: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--sage); transform: translateX(-4px); }
.time-row { display: flex; justify-content: space-between; color: #756858; font-size: 10px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 34px; margin-top: 8px; }
.side-control { position: relative; width: 44px; height: 44px; background: transparent; font-size: 30px; line-height: 1; }
.side-control span { position: absolute; left: 50%; top: 19px; transform: translateX(-50%); font-size: 8px; font-weight: 900; }
.play-button { width: 66px; height: 66px; border-radius: 50%; background: var(--sage); color: white; font-size: 28px; box-shadow: 0 8px 18px rgba(86, 99, 84, .24); }
.player-options { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.option-button { min-width: 42px; height: 34px; padding: 0 10px; border-radius: 12px; background: rgba(255,255,255,.42); font-size: 12px; font-weight: 900; }
.lock-hint { color: var(--ink-soft); font-size: 10px; }
.transcript-card, .market-card, .chapter-card, .takeaway-card, .promise-card, .settings-card, .mix-card, .worker-card { margin-top: 16px; padding: 16px; }
.temperature-track { display: flex; position: relative; height: 8px; border-radius: 8px; margin-top: 20px; }
.temperature-track span { flex: 1; }
.temperature-track span:nth-child(1) { background: #a6b2a3; border-radius: 8px 0 0 8px; }
.temperature-track span:nth-child(2) { background: #d8c59f; }
.temperature-track span:nth-child(3) { background: #c98d70; border-radius: 0 8px 8px 0; }
.temperature-track i { position: absolute; left: 45%; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--ink); border: 1px solid var(--paper); }
.temperature-labels, .signal-row { display: flex; justify-content: space-between; gap: 8px; }
.temperature-labels { margin-top: 7px; color: var(--muted); font-size: 10px; }
.badge { background: var(--paper-warm); color: var(--wood-dark); border-radius: 12px; padding: 7px 10px; font-size: 11px; font-weight: 800; }
.signal-row { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; font-size: 12px; }
.signal-row p { margin: 0; color: var(--ink); }
.signal-row b { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); margin-right: 6px; }
.signal-row p:nth-child(2) b { background: var(--clay); }
.signal-row p:nth-child(3) b { background: var(--wood-dark); }
.signal-row strong { color: var(--ink-soft); margin-left: 4px; }
.section-title { margin-top: 22px; }
.section-title h2 { margin: 0; }
.section-title button, .section-title span { background: transparent; color: var(--wood-dark); font-size: 13px; font-weight: 800; }
.section-intro { margin: 7px 0 10px; font-size: 13px; }
.news-card { width: 100%; margin: 10px 0; padding: 14px; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; text-align: left; background: var(--paper); }
.news-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: var(--sage); background: var(--sage-light); font-weight: 900; }
.news-icon.tech { color: #627a8c; background: #e2e9ed; }
.news-icon.energy { color: var(--clay); background: var(--clay-light); }
.news-icon.life { color: var(--wood-dark); background: var(--paper-warm); }
.news-icon .icon { width: 22px; height: 22px; }
.news-card h3 { margin: 3px 0 7px; font-size: 16px; line-height: 1.35; }
.meta { color: var(--muted); font-size: 11px; font-weight: 800; }
.plain { margin: 9px 0 0; border-radius: 12px; background: var(--paper-warm); padding: 9px; font-size: 12px; }
.plain strong { display: block; color: var(--wood-dark); font-size: 10px; letter-spacing: .8px; }
.impact-line, .source-line {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.impact-line { color: var(--clay); font-weight: 800; }
.chevron { color: #b5afa4; align-self: center; }
.chapter-card { padding: 0; overflow: hidden; }
.chapter-row { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; padding: 14px; background: transparent; text-align: left; align-items: center; border-bottom: 1px solid var(--line); }
.chapter-row:last-child { border-bottom: 0; }
.chapter-number { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: white; background: var(--sage); font-weight: 900; font-size: 12px; }
.chapter-row strong { display: block; margin-bottom: 3px; }
.chapter-row small, .chapter-row time { color: var(--muted); }
.takeaway-card { display: flex; gap: 12px; align-items: center; background: var(--sage-light); }
.takeaway-card div { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: white; color: var(--sage); font-weight: 900; }
.takeaway-card p { margin: 0; }
.takeaway-card span { display: block; color: var(--sage); font-size: 11px; font-weight: 900; }
.page-header { margin-bottom: 16px; }
.page-header h1 { margin-bottom: 7px; }
.page-header p:last-child { margin-bottom: 0; font-size: 14px; }
.unread { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; align-content: center; background: var(--sage-light); color: var(--sage); }
.unread strong { font-size: 24px; }
.unread span { font-size: 10px; font-weight: 900; }
.filters, .category-row, .hour-options, .segments { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button, .category-row button, .hour-options button, .segments button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}
.filters button.active, .category-row button.active, .hour-options button.active, .segments button.active {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}
.timeline { margin-top: 12px; }
.promise-card strong { color: var(--wood-dark); }
.archive-card { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 12px; padding: 14px; margin-bottom: 10px; }
.archive-date { border-radius: 14px; padding: 10px 6px; text-align: center; background: var(--paper-warm); color: var(--wood-dark); font-weight: 900; font-size: 12px; }
.archive-card h2 { margin: 0 0 4px; font-size: 16px; }
.archive-card p { margin: 0; font-size: 12px; color: var(--muted); }
.group-title { margin: 20px 0 9px; font-size: 14px; color: var(--wood-dark); }
.settings-card { padding: 0; overflow: hidden; }
.setting-row { padding: 15px; }
.setting-row span:nth-child(2) { flex: 1; }
.setting-row strong { display: block; margin-bottom: 3px; }
.setting-row small { color: var(--muted); }
input[type="checkbox"] { width: 48px; height: 28px; accent-color: var(--sage); }
.divider { height: 1px; background: var(--line); margin: 0 15px; }
.time-setting, .preference { padding: 15px; }
.time-setting strong, .preference strong { display: block; margin-bottom: 10px; }
.notice { margin: 15px 15px 0; padding: 12px; border-radius: 12px; background: var(--clay-light); font-size: 12px; }
.setting-icon.clay { background: var(--clay-light); color: var(--clay); }
.setting-icon.voice { background: var(--sage-light); color: var(--sage); }
.test-button, .worker-card button { margin-top: 12px; width: 100%; border-radius: 14px; padding: 13px; background: var(--wood-dark); color: white; font-weight: 900; }
.voice-heading { display: flex; align-items: center; gap: 12px; padding: 15px; }
.voice-heading strong { display: block; margin-bottom: 3px; }
.voice-heading small { color: var(--muted); }
.select-row { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 10px; padding: 15px; color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.select-row select { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--paper-warm); color: var(--ink); }
.notice.subtle { background: var(--sage-light); color: var(--ink-soft); }
.mix-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.mix-bar span:nth-child(1) { flex: 5; background: var(--sage); }
.mix-bar span:nth-child(2) { flex: 3; background: var(--wood); }
.mix-bar span:nth-child(3) { flex: 2; background: var(--clay); }
.mix-card p, .worker-card p, .footnote { margin: 10px 0 0; font-size: 12px; }
.worker-card input { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--paper-warm); color: var(--ink); }
.footnote { color: var(--muted); padding-bottom: 8px; }
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 540px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(251, 249, 243, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.tabbar button { border-radius: 16px; padding: 8px 4px; background: transparent; color: #9c978e; font-size: 11px; font-weight: 800; }
.tabbar button span { display: grid; place-items: center; margin: 0 auto 3px; width: 28px; height: 22px; border-radius: 8px; line-height: 20px; font-size: 11px; }
.tabbar .icon { width: 17px; height: 17px; }
.tabbar button.active { color: var(--sage); }
.tabbar button.active span { background: var(--sage-light); }
dialog { width: min(92vw, 520px); border: 0; border-radius: 24px; padding: 0; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(52, 52, 47, .34); }
.dialog-inner { padding: 22px; }
.dialog-close { float: right; width: 38px; height: 38px; border-radius: 50%; background: var(--paper-warm); font-size: 24px; }
.dialog-category { color: var(--sage); font-weight: 900; font-size: 12px; }
.dialog-inner section { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--paper-warm); }
.dialog-inner section p { margin-bottom: 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  max-width: min(90vw, 420px);
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(52, 52, 47, .92);
  color: white;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { background: linear-gradient(180deg, #f8f5ee, var(--canvas)); }
  .view { padding-top: 24px; }
  .tabbar { border-radius: 24px 24px 0 0; }
}
