/* Layout: one narrow phone column, content scrolls, tab bar fixed at the bottom.
   Palette: cream + ink from the brand, gold used only for tiny details. */
:root {
  --bg: #F5EFEA;
  --fg: #141210;
  --muted: #5E564D;
  --card: #E9E0D6;
  --line: #D9CEC1;
  --line2: #C9BDAF;
  --ink: #141210;
  --on-ink: #F5EFEA;
  --hero: #141210;
  --hero-fg: #F5EFEA;
  --hero-sub: #CFC6BC;
  --hero-card: #2A2521;
  --gold: #C98F0A;
  --err: #9A2A22;
  --logo-filter: none;
  --font: 'Times New Roman', Times, 'Liberation Serif', serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141210; --fg: #F5EFEA; --muted: #B3A99E; --card: #231F1C; --line: #3A342F; --line2: #4D463F;
    --ink: #F5EFEA; --on-ink: #141210; --hero: #2A2521; --hero-fg: #F5EFEA; --hero-sub: #CFC6BC; --hero-card: #3A342F;
    --gold: #D9A21E; --err: #E0847B; --logo-filter: invert(1); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141210; --fg: #F5EFEA; --muted: #B3A99E; --card: #231F1C; --line: #3A342F; --line2: #4D463F;
  --ink: #F5EFEA; --on-ink: #141210; --hero: #2A2521; --hero-fg: #F5EFEA; --hero-sub: #CFC6BC; --hero-card: #3A342F;
  --gold: #D9A21E; --err: #E0847B; --logo-filter: invert(1); color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.3; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 480px; margin-inline: auto; padding-inline: 24px; }
.screen { padding-block: 24px 112px; display: flex; flex-direction: column; gap: 16px; min-height: 100vh; }
.screen.tight { gap: 12px; }
.screen.loose { gap: 22px; }
h1 { margin: 0; font-weight: 400; font-size: 40px; line-height: 1.05; text-wrap: balance; }
h2 { margin: 0; font-size: 19px; font-weight: 700; }
.head { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sub { font-size: 16px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); line-height: 1.4; }
.hint { font-size: 15px; color: var(--muted); line-height: 1.35; }
.eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.block { display: flex; flex-direction: column; gap: 10px; }
.block > .tt { display: flex; flex-direction: column; gap: 2px; }
.row { display: flex; align-items: center; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 16px; border-radius: 22px; font-size: 16px; background: transparent; border: 1px solid var(--line2); color: var(--fg); }
.chip.sm { height: 40px; padding: 0 14px; border-radius: 20px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn { height: 52px; border-radius: 26px; background: var(--ink); color: var(--on-ink); border: none; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--ink); }
.btn.small-btn { height: 44px; font-size: 16px; width: auto; padding: 0 20px; }
.link { background: none; border: none; min-height: 44px; padding: 0 4px; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); }
.card { background: var(--card); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.outline { border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.hero { background: var(--hero); color: var(--hero-fg); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.hero .k { font-size: 13px; letter-spacing: 0.14em; color: var(--gold); }
.hero .big { font-size: 34px; line-height: 1.1; }
.hero .meta { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--hero-sub); }
.hero .zoom { display: flex; align-items: center; gap: 12px; background: var(--hero-card); border-radius: 14px; padding: 12px 14px; margin-block: 10px 4px; }
.hero .zoom svg { color: var(--gold); flex-shrink: 0; }
.hero .zoom .l { font-size: 13px; letter-spacing: 0.12em; color: var(--hero-sub); }
.hero .zoom a { font-size: 20px; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.hero .btn { background: #F5EFEA; color: #141210; border: 1px solid #F5EFEA; height: 48px; font-size: 17px; }
.hero .btn.on { background: transparent; color: #F5EFEA; }
.hero .btn.on svg { color: var(--gold); }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); align-self: flex-start; }
.pill i { width: 8px; height: 8px; border-radius: 4px; background: var(--gold); }
.week { display: flex; justify-content: space-between; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week .d span.l { font-size: 14px; color: var(--muted); }
.week .c { width: 36px; height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 16px; border: 1px solid var(--line2); }
.week .c.done { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.week .c.live { background: var(--line); border-color: var(--gold); }
.week .c.today { border-color: var(--fg); }
.bar { height: 6px; border-radius: 3px; background: var(--card); flex: 1; }
.bar > i { display: block; height: 6px; border-radius: 3px; background: var(--ink); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 5; }
.nav .in { max-width: 480px; margin-inline: auto; display: flex; padding: 8px 8px 12px; }
.nav button { flex: 1; min-height: 52px; background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 13px; }
.nav button[aria-current="page"] { color: var(--fg); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 8px; }
.input { height: 52px; border: 1px solid var(--line2); border-radius: 14px; background: transparent; padding: 0 16px; font-size: 18px; width: 100%; }
.input.round { border-radius: 26px; }
textarea.input { height: auto; min-height: 96px; padding: 12px 16px; line-height: 1.35; resize: vertical; }
.search { display: flex; align-items: center; gap: 10px; height: 52px; border: 1px solid var(--line2); border-radius: 26px; padding: 0 18px; }
.search input { flex: 1; min-width: 0; height: 48px; border: none; outline: none; background: transparent; font-size: 18px; }
.search svg { color: var(--muted); flex-shrink: 0; }
.lesson { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 20px; padding: 12px; width: 100%; text-align: left; border: none; }
.lesson .play { width: 64px; height: 64px; border-radius: 14px; background: var(--hero); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson .t { font-size: 19px; font-weight: 700; }
.lesson .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agenda { display: flex; align-items: center; gap: 16px; border-radius: 20px; padding: 16px 18px; border: 1px solid var(--line); }
.agenda.next { background: var(--hero); color: var(--hero-fg); border-color: var(--hero); }
.agenda .dt { width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.agenda .dt .n { font-weight: 700; font-size: 30px; line-height: 1; }
.agenda .dt .w { font-size: 13px; letter-spacing: 0.1em; }
.agenda .tg { font-size: 13px; letter-spacing: 0.14em; }
.agenda.next .m { color: var(--hero-sub); }
.agenda .m { color: var(--muted); font-size: 15px; }
.agenda.next .tg { color: var(--gold); }
.agenda a.z { font-size: 16px; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; margin-top: 4px; display: inline-block; }
.item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 14px; text-align: left; border-radius: 16px; padding: 8px 14px; font-size: 17px; line-height: 1.25; background: transparent; border: 1px solid var(--line); }
.item .box { width: 26px; height: 26px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--muted); color: var(--gold); }
.item[aria-pressed="true"] { background: var(--card); border-color: var(--card); color: var(--muted); }
.item[aria-pressed="true"] .box { background: var(--ink); border-color: var(--ink); }
.energy { display: flex; align-items: center; justify-content: space-between; }
.energy button { width: 52px; height: 52px; border: none; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; }
.energy span { display: block; border-radius: 50%; border: 1.5px solid var(--fg); }
.energy button[aria-pressed="true"] span { background: var(--ink); border-color: var(--ink); }
.moons { display: flex; gap: 8px; }
.moon { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px 10px; border-radius: 18px; background: transparent; border: 1px solid var(--line); }
.moon .nm { font-size: 15px; font-weight: 700; }
.moon .ph { font-size: 13px; color: var(--muted); }
.moon[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.moon[aria-pressed="true"] .ph { color: var(--on-ink); opacity: 0.75; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.cal .wd { text-align: center; font-size: 14px; color: var(--muted); padding-bottom: 4px; }
.cal .cell { height: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal .cell .n { font-size: 13px; color: var(--muted); }
.cal .cell.today .n { color: var(--fg); font-weight: 700; }
.cal .cell .w { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.cal .cell .w i { display: block; border-radius: 50%; }
.hbar { display: flex; align-items: center; gap: 12px; }
.hbar .lb { width: 108px; font-size: 17px; flex-shrink: 0; }
.hbar .tr { flex: 1; height: 10px; border-radius: 5px; background: var(--card); }
.hbar .tr i { display: block; height: 10px; border-radius: 5px; background: var(--ink); }
.hbar .ct { width: 56px; text-align: right; font-size: 15px; color: var(--muted); flex-shrink: 0; }
.hbar.s .lb { font-size: 16px; }
.hbar.s .tr, .hbar.s .tr i { height: 8px; border-radius: 4px; }
.back { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 16px; color: var(--muted); background: none; border: none; padding: 0; margin-top: 8px; align-self: flex-start; }
.poster { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--hero); color: var(--hero-fg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.poster .ring { width: 72px; height: 72px; border-radius: 36px; border: 1.5px solid var(--gold); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.err { font-size: 15px; color: var(--err); }
.dash { border: 1.5px dashed var(--muted); border-radius: 18px; padding: 14px; font-size: 16px; }
.logo { filter: var(--logo-filter); display: block; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px dashed var(--muted); border-radius: 16px; padding: 12px 14px; }
@media (prefers-reduced-motion: no-preference) { .btn, .chip, .item, .lesson { transition: background-color .15s, color .15s; } }
.banner { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; font-size: 16px; margin-bottom: 12px; }
.player { position: relative; width: 100%; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #141210; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tagpill { font-size: 14px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--ink); white-space: nowrap; }
.tagpill.off { border-color: var(--line2); color: var(--muted); }
.cal .cell .dot { width: 6px; height: 6px; border: 1px solid var(--line2); }
.cal .cell .dot.on { width: 18px; height: 18px; background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .5; }
