/* Study Podcast · listening-room tokens and homepage components. */
:root {
  color-scheme: light;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Songti SC", "STSong", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page: #f6f3ec;
  --surface: #fcfaf5;
  --surface-hover: #eee9de;
  --ink: #292c25;
  --ink-secondary: #65665c;
  --ink-muted: #6f7164;
  --line: #dcd8cd;
  --line-soft: #e9e5dc;
  --accent: #974e36;
  --accent-hover: #773b29;
  --accent-ink: #fffaf0;
  --shelf-top: #c5b69b;
  --shelf-front: #a7987c;
  --room-light: #fffdf7;
  --shadow: #443b2c25;
  --focus: #8e513b;
  --record-black: #171a18;
  --record-groove: #2b302c;
  --record-highlight: #ffffff1c;
  --paper-edge: #cfc7b6;
  --paper-edge-light: #e9e2d4;
  --sleeve-shade: #00000020;
  --sleeve-shade-deep: #00000050;
  --sleeve-light: #ffffff35;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;
  --text-xs: 11px; --text-sm: 12px; --text-body: 14px; --text-md: 16px;
  --text-lg: 20px; --text-title: 26px; --text-hero: clamp(34px, 4.4vw, 54px);
  --radius-small: 3px; --radius-control: 6px; --radius-pill: 999px;
  --motion-fast: 160ms; --motion-sleeve: 720ms; --ease-sleeve: cubic-bezier(.22,.75,.22,1);
  --page-width: 1120px; --page-gutter: clamp(20px, 5vw, 64px);
  --rack-width: min(var(--page-width), calc(100vw - var(--page-gutter) * 2));
  --cover-size: clamp(122px, calc(var(--rack-width) * .32), 246px);
  --cover-step: min(112px, calc((var(--rack-width) - 24px - var(--cover-size) * .73) / 4));
  --cover-top: 40px; --cover-depth: 4px; --cover-angle: -47deg;
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --page: #1b1e19; --surface: #23271f; --surface-hover: #2c3127;
  --ink: #ecebe2; --ink-secondary: #b2b5a5; --ink-muted: #a1a591;
  --line: #3d4436; --line-soft: #31372c;
  --accent: #dca58b; --accent-hover: #efbaa0; --accent-ink: #251c16;
  --shelf-top: #726650; --shelf-front: #514a3c; --room-light: #353d2a;
  --shadow: #00000050; --focus: #dfb69a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    color-scheme: dark;
    --page: #1b1e19; --surface: #23271f; --surface-hover: #2c3127;
    --ink: #ecebe2; --ink-secondary: #b2b5a5; --ink-muted: #a1a591;
    --line: #3d4436; --line-soft: #31372c;
    --accent: #dca58b; --accent-hover: #efbaa0; --accent-ink: #251c16;
    --shelf-top: #726650; --shelf-front: #514a3c; --room-light: #353d2a;
    --shadow: #00000050; --focus: #dfb69a;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--space-6); }
body { margin: 0; background: var(--page); color: var(--ink); font: var(--text-body)/1.7 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--space-1); }
button svg, a svg { flex: none; width: var(--text-lg); height: var(--text-lg); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: var(--space-3); left: var(--space-3); padding: var(--space-2) var(--space-4); background: var(--surface); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-shell { max-width: calc(var(--page-width) + var(--page-gutter) * 2); margin: 0 auto; padding: 0 var(--page-gutter); }
.masthead { min-height: var(--space-20); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); }
.brand-record { position: relative; display: block; width: var(--space-8); height: var(--space-8); border-radius: 50%; background: repeating-radial-gradient(circle, var(--ink) 0 2px, var(--page) 2.5px 3px, var(--ink) 3.5px 5px); }
.brand-record::after { content: ""; position: absolute; inset: var(--space-3); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--page); }
.brand-cn { font-size: var(--text-md); font-weight: 600; letter-spacing: 1px; }
.brand-en { display: block; margin-top: 1px; color: var(--ink-secondary); font: 9px/1.5 var(--font-mono); letter-spacing: 2px; }
.header-nav { display: flex; align-items: center; gap: var(--space-6); font-size: var(--text-sm); }
.header-nav a { transition: color var(--motion-fast); }
.header-nav a:hover { color: var(--accent); }
.nav-subscribe { display: inline-flex; align-items: center; gap: var(--space-2); }
.nav-subscribe svg { width: var(--text-body); height: var(--text-body); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: var(--space-10); height: var(--space-10); padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 50%; transition: background var(--motion-fast); }
.icon-button:hover { background: var(--surface-hover); }
.icon-button svg { width: var(--text-md); height: var(--text-md); }
.hero { padding-top: var(--space-12); }
.hero-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-8); }
.eyebrow { margin: 0 0 var(--space-3); color: var(--accent); font: var(--text-xs)/1.5 var(--font-mono); letter-spacing: 2px; }
h1 { margin: 0; font: 500 var(--text-hero)/1.25 var(--font-display); letter-spacing: -1.5px; }
.hero-description { max-width: 280px; margin: 0 0 var(--space-1); color: var(--ink-secondary); font-size: var(--text-sm); line-height: 1.9; }
.hero-description span { display: block; }
.record-room { position: relative; margin-top: var(--space-6); }
.room-header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); color: var(--ink-secondary); font-size: var(--text-sm); }
.room-label { display: inline-flex; align-items: center; gap: var(--space-2); }
.room-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.room-caption { color: var(--ink-muted); font-size: var(--text-xs); }
.record-stage { position: relative; height: 330px; isolation: isolate; overflow: clip; }
.room-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%,var(--room-light),transparent 70%); pointer-events: none; }
.record-ledge { position: absolute; top: calc(var(--cover-top) + var(--cover-size) + 4px); left: var(--space-8); right: var(--space-8); height: var(--space-3); border-radius: 1px; background: linear-gradient(to bottom,var(--shelf-top) 0 5px,var(--shelf-front) 5px 100%); box-shadow: 0 10px 20px -7px var(--shadow),0 30px 40px -10px var(--shadow); }
.record-rack { position: absolute; inset: 0; perspective: 1400px; perspective-origin: 50% 32%; }
.record { position: absolute; left: 50%; top: var(--cover-top); width: var(--cover-size); height: var(--cover-size); padding: 0; border: 0; background: transparent; appearance: none; pointer-events: none; transform-style: preserve-3d; transform: translateX(calc(-50% + var(--record-x))) translateY(0) translateZ(0); transition: transform var(--motion-sleeve) var(--ease-sleeve); transition-delay: 70ms; }
.record-turn { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transform: rotateY(var(--cover-angle)); transition: transform var(--motion-sleeve) var(--ease-sleeve); }
.record:hover .record-turn { transform: translateZ(16px) rotateY(calc(var(--cover-angle) + 5deg)); }
.record-face { position: absolute; inset: 0; display: block; border-radius: var(--radius-small); backface-visibility: hidden; }
.record-front { transform: translateZ(var(--cover-depth)); background: var(--record-color); box-shadow: 1px 2px 2px var(--sleeve-shade),8px 12px 24px -12px var(--sleeve-shade-deep); overflow: hidden; }
.record-front img { display: block; width: 100%; height: 100%; object-fit: cover; }
.record-front, .record-spine, .record-edge, .record-disc { pointer-events: auto; }
.record-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg,var(--sleeve-light),transparent 8%,transparent 92%,var(--sleeve-shade)),linear-gradient(to bottom,var(--sleeve-light),transparent 2%,transparent 98%,var(--sleeve-shade)); box-shadow: inset 2px 0 2px var(--sleeve-light),inset -1px 0 1px var(--sleeve-shade-deep); pointer-events: none; }
.record-back { transform: translateZ(calc(0px - var(--cover-depth))) rotateY(180deg); background: var(--record-color); }
.record-spine { position: absolute; left: calc(0px - var(--cover-depth)); top: 0; width: calc(var(--cover-depth) * 2); height: 100%; transform: rotateY(-90deg); background: linear-gradient(to right,var(--sleeve-shade),var(--sleeve-light) 45%,var(--sleeve-shade)),var(--record-color); backface-visibility: hidden; }
.record-edge { position: absolute; right: calc(0px - var(--cover-depth)); top: 0; width: calc(var(--cover-depth) * 2); height: 100%; transform: rotateY(90deg); background: linear-gradient(90deg,var(--paper-edge),var(--paper-edge-light) 40%,var(--paper-edge)); backface-visibility: hidden; }
.record-top { position: absolute; left: 0; top: calc(0px - var(--cover-depth)); width: 100%; height: calc(var(--cover-depth) * 2); transform: rotateX(90deg); background: linear-gradient(var(--paper-edge),var(--paper-edge-light) 40%,var(--paper-edge)); backface-visibility: hidden; }
.record-disc { position: absolute; inset: 3%; display: block; border-radius: 50%; transform: translateZ(0) translateX(0); background: radial-gradient(circle,var(--paper-edge-light) 0 2%,var(--record-black) 2.5% 3.5%,var(--record-color) 4% 21%,var(--record-black) 21.5% 23%,transparent 23%),repeating-radial-gradient(circle,var(--record-groove) 0 1px,var(--record-black) 1.4px 2px,var(--record-groove) 2.2px 2.5px),var(--record-black); box-shadow: inset 0 0 0 1px var(--record-highlight); transition: transform var(--motion-sleeve) var(--ease-sleeve); }
.record-disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 25deg,transparent,var(--record-highlight) 14%,transparent 25%,transparent 55%,var(--record-highlight) 65%,transparent 76%); }
.record-shadow { position: absolute; left: -12%; right: -12%; bottom: -18px; height: 22px; background: radial-gradient(ellipse,var(--sleeve-shade-deep),transparent 68%); transform: translateZ(-5px) rotateX(35deg); pointer-events: none; }
.record:focus-visible { outline-offset: var(--space-3); }
.record-rack:not(.is-ready) .record { transition: none; }
.js-only { display: none; }
.has-js .js-only { display: flex; }
.featured-detail { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: var(--space-8); padding: var(--space-6) 0 var(--space-8); border-bottom: 1px solid var(--line); }
.featured-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); color: var(--ink-secondary); font-size: var(--text-sm); }
.featured-tag { color: var(--accent); }
.featured-meta time, .duration { font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: var(--text-xs); }
.meta-dot { color: var(--ink-muted); }
.featured-detail h2 { max-width: 730px; margin: var(--space-2) 0 var(--space-2); font: 500 var(--text-title)/1.5 var(--font-display); }
.featured-detail h2 a:hover { color: var(--accent); }
.featured-summary { max-width: 720px; margin: 0; color: var(--ink-secondary); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.primary-button { display: inline-flex; justify-content: center; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-6); background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: var(--radius-pill); font-size: var(--text-sm); white-space: nowrap; transition: background var(--motion-fast); }
.primary-button:hover { background: var(--accent-hover); }
.primary-button svg { width: var(--text-md); height: var(--text-md); }
.text-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--ink-secondary); }
.text-link:hover { color: var(--accent); }
.text-link svg { width: var(--text-body); height: var(--text-body); }
.shelf-controls { display: flex; justify-content: space-between; gap: var(--space-3); align-items: center; margin-top: calc(0px - var(--space-6)); min-height: var(--space-8); position: relative; z-index: 3; }
.shelf-controls p { margin: 0; color: var(--ink-muted); font-size: var(--text-xs); }
.audio-area { padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
.audio-label { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.audio-label span { min-width: 0; }
.audio-close { border: 0; background: transparent; width: var(--space-8); height: var(--space-8); padding: 0; font-size: var(--text-lg); }
.audio-area audio { display: block; width: 100%; height: var(--space-12); }
.audio-status { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--accent); }
.library { padding-top: var(--space-12); }
.section-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); margin-bottom: var(--space-6); }
.section-title { display: flex; align-items: baseline; gap: var(--space-3); }
.section-title h2 { margin: 0; font: 500 var(--text-title)/1.3 var(--font-display); }
.section-title span { color: var(--ink-muted); font: var(--text-xs)/1.5 var(--font-mono); }
.search-box { display: flex; align-items: center; gap: var(--space-2); border-bottom: 1px solid var(--line); width: 240px; padding: var(--space-2) 0; color: var(--ink-muted); }
.search-box svg { flex: none; width: var(--text-md); height: var(--text-md); }
.search-box input { width: 100%; min-width: 0; padding: var(--space-1); border: 0; background: transparent; color: var(--ink); font-size: var(--text-sm); }
.search-box input::placeholder { color: var(--ink-muted); }
.library-caption { display: flex; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-3); color: var(--ink-muted); font-size: var(--text-xs); border-bottom: 1px solid var(--line); }
.episode-list { padding: 0; margin: 0; list-style: none; }
.episode-row { position: relative; display: grid; grid-template-columns: var(--space-16) minmax(0,1fr) auto; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-2); margin: 0 calc(0px - var(--space-2)); border-bottom: 1px solid var(--line-soft); transition: background var(--motion-fast); }
.episode-row:hover { background: var(--surface-hover); }
.episode-cover { width: var(--space-16); height: var(--space-16); border-radius: var(--radius-small); box-shadow: 1px 2px 3px var(--shadow); }
.episode-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--ink-muted); font-size: var(--text-xs); }
.episode-meta time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.episode-body { min-width: 0; }
.episode-body h3 { margin: var(--space-1) 0; font-size: var(--text-body); line-height: 1.6; font-weight: 500; }
.episode-body h3 a:hover { color: var(--accent); }
.episode-description { margin: 0; color: var(--ink-secondary); font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.episode-side { display: flex; align-items: center; gap: var(--space-4); padding-left: var(--space-6); }
.source-link { color: var(--ink-muted); font-size: var(--text-xs); }
.source-link:hover { color: var(--accent); }
.row-play { display: inline-flex; justify-content: center; align-items: center; width: var(--space-10); height: var(--space-10); padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.row-play:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row-play svg { width: var(--text-body); height: var(--text-body); }
.no-results { padding: var(--space-12) var(--space-4); text-align: center; color: var(--ink-secondary); }
.no-results p { margin: 0 0 var(--space-4); }
.clear-search { border: 1px solid var(--line); border-radius: var(--radius-pill); background: transparent; padding: var(--space-2) var(--space-4); }
.subscribe-section { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding: var(--space-10) 0; margin-top: var(--space-10); border-top: 1px solid var(--line); }
.subscribe-section h2 { margin: 0 0 var(--space-2); font: 500 var(--text-lg)/1.5 var(--font-display); }
.subscribe-section p { margin: 0; color: var(--ink-secondary); font-size: var(--text-sm); }
.subscribe-links { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.secondary-button { display: inline-flex; gap: var(--space-2); align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: var(--space-3) var(--space-5); background: transparent; font-size: var(--text-sm); white-space: nowrap; }
.secondary-button:hover { background: var(--surface-hover); }
.secondary-button svg { width: var(--text-body); height: var(--text-body); }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-6) 0 var(--space-8); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: var(--text-xs); }
.footer-links { display: flex; gap: var(--space-5); }
.footer-links a:hover { color: var(--accent); }
@media (min-width: 1000px) { .hero { padding-top: var(--space-12); } }
@media (max-width: 760px) {
  .hero-intro { align-items: flex-start; }
  .hero-description { max-width: 225px; }
  .header-nav { gap: var(--space-4); }
  .header-nav .nav-voices { display: none; }
  .record-stage { height: 330px; }
  .featured-detail { gap: var(--space-5); }
  .featured-detail h2 { font-size: var(--text-lg); }
  .episode-side { gap: var(--space-3); padding-left: 0; }
  .source-link { display: none; }
}
@media (max-width: 560px) {
  :root { --cover-top: 40px; --cover-depth: 3px; }
  .masthead { min-height: 76px; gap: var(--space-3); }
  .brand-cn { font-size: var(--text-body); }
  .brand-en { font-size: 8px; letter-spacing: 1.5px; }
  .brand-record { width: 28px; height: 28px; }
  .brand-record::after { inset: 10px; }
  .header-nav { gap: var(--space-3); }
  .header-nav .nav-library { display: none; }
  .nav-subscribe { font-size: var(--text-xs); gap: var(--space-1); }
  .icon-button { width: 36px; height: 36px; }
  .hero { padding-top: var(--space-10); }
  .hero-intro { flex-direction: column; gap: var(--space-4); }
  .hero-description { max-width: none; font-size: var(--text-sm); }
  .hero-description span { display: inline; }
  h1 { letter-spacing: -1px; }
  h1 span { display: block; }
  .eyebrow { font-size: 10px; }
  .record-room { margin-top: var(--space-8); }
  .record-stage { height: 230px; }
  .record-ledge { left: 0; right: 0; }
  .room-caption { display: none; }
  .shelf-controls { margin-top: calc(0px - var(--space-4)); }
  .featured-detail { grid-template-columns: 1fr; gap: var(--space-5); padding-top: var(--space-4); }
  .featured-meta { font-size: var(--text-xs); gap: var(--space-2); }
  .featured-detail h2 { font-size: 21px; line-height: 1.5; }
  .featured-actions { flex-direction: row; justify-content: space-between; }
  .primary-button { padding: var(--space-3) var(--space-5); }
  .library { padding-top: var(--space-8); }
  .section-top { flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-5); }
  .section-title h2 { font-size: 22px; }
  .search-box { width: 100%; }
  .search-box input { font-size: var(--text-md); }
  .episode-row { grid-template-columns: var(--space-12) minmax(0,1fr) var(--space-10); gap: var(--space-3); padding-top: var(--space-4); padding-bottom: var(--space-4); }
  .episode-cover { width: var(--space-12); height: var(--space-12); }
  .episode-body h3 { font-size: 13px; }
  .episode-description { display: none; }
  .episode-side .duration { display: none; }
  .row-play { width: var(--space-10); height: var(--space-10); }
  .subscribe-section { flex-direction: column; align-items: flex-start; gap: var(--space-5); margin-top: var(--space-8); padding: var(--space-8) 0; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}
@media (pointer: coarse) { .icon-button, .row-play, .audio-close { min-height: 44px; min-width: 44px; } }
@media (max-width: 360px) { :root { --cover-angle: -55deg; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; transition-delay: 0ms !important; animation: none !important; }
}
.record-rack:not(.is-ready) .record-turn,
.record-rack:not(.is-ready) .record-disc { transition:none; }
