/* 吾真 · iPhone 18 Pro Max demo · 440×956 · 思源黑体占位 · 宋风绿黄 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --color-primary: #3D5C4A;
  --color-primary-pressed: #2F4A3B;
  --color-primary-soft: #E7EFE9;
  --color-accent: #C4A35A;
  --color-canvas: #F7F4EC;
  --color-surface: #FFFEFA;
  --color-ink: #2C2A26;
  --color-muted: #7A756C;
  --color-line: #E4DFD4;

  --primary: var(--color-primary);
  --accent: var(--color-accent);
  --canvas: var(--color-canvas);
  --surface: var(--color-surface);
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --line: var(--color-line);

  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-logo: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", sans-serif;

  --phone-w: 440px;
  --phone-h: 956px;
  --safe-top: 59px;
  --safe-bottom: 34px;
  --tab-h: 52px;
  --mini-h: 90px; /* main row + mini-scrub touch */
  --radius: 14px;
  --shadow-1: 0 8px 28px rgba(44, 42, 38, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: #E8E2D4;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; display: block;
}
svg.i.fill { fill: currentColor; stroke: none; }

/* —— Stage / Phone chrome —— */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--canvas);
  border-radius: 54px;
  box-shadow:
    0 0 0 10px #1c1b19,
    0 0 0 12px #3a3834,
    0 28px 64px rgba(44, 42, 38, 0.28);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone.is-player { background: linear-gradient(180deg, #E9E4D6 0%, var(--canvas) 55%); }

.status {
  height: var(--safe-top);
  padding: 14px 28px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  background: transparent;
}
.status .time {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-top: 2px;
}
.status .island {
  width: 126px;
  height: 36px;
  background: #0e0e0d;
  border-radius: 20px;
  margin-top: -2px;
}
.status .sys {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 4px;
  color: var(--ink);
  opacity: 0.85;
}
.status .sys svg { width: 18px; height: 12px; }

.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
  padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-bottom) + 12px);
}
.scroll.no-mini { padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px); }
.scroll.player-scroll {
  padding: 8px 28px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top bar inside content */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 8px;
}
.logo {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.14em;
  color: var(--primary);
}
.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(44, 42, 38, 0.06);
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 16px;
}
.search-pill svg.i { width: 16px; height: 16px; }

h1.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 4px 0 18px;
}

/* Hero continue */
.hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 28px;
  align-items: center;
}
.hero img.cover, .hero .cv {
  width: 112px; height: 112px;
  border-radius: 12px;
  object-fit: cover;
}
.eyebrow { font-size: 11px; color: var(--muted); letter-spacing: 0.14em; }
.hero h3 { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
.hero .sub { font-size: 13px; color: var(--muted); }
.bar {
  height: 3px; background: var(--line); border-radius: 2px; margin: 10px 0 6px;
  overflow: hidden; position: relative;
}
.bar i, .bar [data-scrub-fill] {
  display: block; height: 100%; background: var(--primary); border-radius: 2px; width: 0;
}
.bar.scrub {
  cursor: pointer; overflow: visible; touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.bar.scrub::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 44px; transform: translateY(-50%); z-index: 0;
}
.bar.scrub i, .bar.scrub [data-scrub-fill] { position: relative; z-index: 1; }
.bar.scrub:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px;
}
.times { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hero-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--primary);
  color: #F7F4EC;
  font-weight: 700;
  border: 0;
  font-size: 14px;
}
.btn svg.i { width: 16px; height: 16px; }
.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--line);
}
.btn.lg { min-height: 44px; padding: 0 22px; border-radius: 22px; font-size: 15px; }

.sec { margin-bottom: 28px; }
.sec-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.sec-h h2 { font-size: 18px; font-weight: 700; }
.sec-h a { color: var(--primary); font-size: 13px; }

.row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
}

.card .cv, .card img.cover {
  aspect-ratio: 1;
  border-radius: 12px;
  width: 100%;
  object-fit: cover;
}
.card b {
  display: block;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card span { font-size: 12px; color: var(--muted); }

.cv {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  color: #F7F4EC;
  overflow: hidden;
  background: #3D5C4A;
}
.cv .t { font-size: 20px; font-weight: 700; letter-spacing: 0.12em; writing-mode: vertical-rl; align-self: flex-end; }
.cv .s { font-size: 10px; letter-spacing: 0.14em; opacity: 0.85; }
.cv .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.c1 { background: #3D5C4A; }
.c2 { background: #2C2A26; }
.c3 { background: #C4A35A; color: #2C2A26; }
.c4 { background: #56705F; }
.c5 { background: #E4DFD4; color: #2C2A26; }
.c6 { background: #6B5A3A; }
.c3 .dot, .c5 .dot { background: #3D5C4A; }

/* Course detail */
.detail { margin-bottom: 20px; }
.detail .cover-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}
.detail img.cover, .detail .cv {
  width: 200px; height: 200px;
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.detail .meta { text-align: center; }
.detail h1 { font-size: 24px; font-weight: 700; margin: 6px 0 4px; }
.detail .sub { color: var(--muted); font-size: 13px; }
.detail p { color: var(--muted); font-size: 14px; margin: 12px 0 16px; text-align: left; }
.detail .actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }

.list { border-top: 1px solid var(--line); }
.li {
  display: grid;
  grid-template-columns: 36px 1fr 56px 40px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
  font-size: 14px;
}
.li .n { color: var(--muted); font-size: 13px; text-align: center; }
.li .n svg.i { width: 16px; height: 16px; margin: 0 auto; }
.li .d { color: var(--muted); font-size: 12px; text-align: right; }
.li.on { color: var(--primary); font-weight: 600; }
.li.on .n { color: var(--accent); }

/* Recent list */
.rlist { border-top: 1px solid var(--line); }
.rli {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.rli.on { color: var(--primary); }
.rli.on b { font-weight: 700; }
.rthumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #3D5C4A;
}
.rthumb.c2 { background: #2C2A26; }
.rthumb.c4 { background: #56705F; }
.rthumb.c5 { background: #E4DFD4; }
.rmeta { min-width: 0; }
.rmeta b {
  display: block; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rmeta span {
  display: block; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rli.on .rmeta span { color: var(--primary); opacity: .85; }
.rprog { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Mini bar — above tab; column = main + scrub */
.mini {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(var(--tab-h) + var(--safe-bottom));
  height: auto;
  min-height: var(--mini-h);
  background: rgba(255, 254, 250, 0.86);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border: 1px solid rgba(228, 223, 212, 0.95);
  border-radius: 29px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  z-index: 20;
  overflow: hidden;
}
.mini-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 6px 8px 0;
  gap: 6px;
  min-height: 50px;
}
.mini .np { display: flex; gap: 10px; align-items: center; min-width: 0; }
.mini .np img, .mini .np .thumb {
  width: 42px; height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #3D5C4A;
  flex-shrink: 0;
}
.mini .np b {
  display: block; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini .np span {
  font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl { display: flex; align-items: center; gap: 0; }

/* mini scrub — thin track, ≥44px touch hit */
.mini-scrub {
  position: relative;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px 4px;
  margin-top: -8px;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.mini-scrub-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}
.mini-scrub-track [data-scrub-fill],
.mini-scrub-track i {
  display: block; height: 100%; background: var(--primary); border-radius: 2px; width: 0;
}
.mini-scrub:active .mini-scrub-track,
.mini-scrub:focus-visible .mini-scrub-track { height: 5px; }
.mini-scrub:focus-visible {
  outline: 2px solid var(--primary); outline-offset: -4px; border-radius: 8px;
}
.ib {
  width: 40px; height: 40px;
  min-width: 40px; min-height: 40px;
  border-radius: 50%; border: 0;
  background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.ib svg.i { width: 20px; height: 20px; }
.ib.play { background: var(--ink); color: var(--surface); }
.ib.play svg.i { width: 16px; height: 16px; }

/* Tab bar */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding: 4px 8px var(--safe-bottom);
  background: rgba(255, 254, 250, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 15;
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--muted);
  min-height: 44px;
}
.tabbar a svg.i { width: 24px; height: 24px; }
.tabbar a.on { color: var(--primary); font-weight: 600; }

.home-ind {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: rgba(44, 42, 38, 0.28);
  z-index: 25;
  pointer-events: none;
}

/* Player */
.player-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.player-top .ghost-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.player img.cover {
  width: 300px; height: 300px;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(44, 42, 38, 0.16);
  margin: 8px 0 28px;
}
.pinfo { width: 100%; max-width: 340px; }
.pinfo h2 { font-size: 22px; font-weight: 700; }
.pinfo > span { color: var(--muted); font-size: 14px; }
.pctl {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 20px 0 16px;
}
.pctl .ib.play { width: 64px; height: 64px; background: var(--ink); color: var(--surface); }
.pctl .ib.play svg.i { width: 26px; height: 26px; }
.pctl .ib svg.i { width: 24px; height: 24px; }
.speed { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 36px; min-width: 52px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  padding: 0 10px;
}
.chip.on { border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* Index hub */
.idx {
  padding: 28px 24px 40px;
  height: 100%;
  overflow-y: auto;
}
.idx .logo { margin-bottom: 6px; }
.idx .hint { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.idx a.rowlink {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.idx a.rowlink span { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  background: rgba(44,42,38,0.06);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .stage { padding: 0; align-items: stretch; }
  .phone {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}
