:root {
  --bg: #0b0b0c;
  --panel: #141416;
  --panel-2: #1b1b1e;
  --line: #2a2a2e;
  --text: #f4f0e8;
  --muted: #a7a29a;
  --gold: #d5b46b;
  --gold-dark: #b8964f;
  --danger: #e2766b;
  --ok: #7fc49a;
  --radius: 12px;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--gold); }
img { max-width: 100%; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 96px; }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.brand-name { font-family: var(--display); font-size: 26px; letter-spacing: 1px; color: var(--text); text-decoration: none; }
.brand-name span { color: var(--gold); }
.eyebrow { font-family: var(--display); color: var(--gold); letter-spacing: 3px; font-size: 15px; margin: 0 0 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.5px; margin: 0 0 12px; line-height: 1.05; }
h1 { font-size: 44px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h1 em, h2 em { color: var(--gold); font-style: normal; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card.gold { border-color: var(--gold-dark); }

label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font: inherit; min-height: 48px;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row > div { min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--gold); color: #0b0b0c; border: 0; border-radius: 10px; min-height: 52px; padding: 0 20px;
  font-family: var(--display); font-size: 22px; letter-spacing: 1px; cursor: pointer; text-decoration: none; margin-top: 18px;
}
.btn:hover { background: #e0c27c; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold-dark); }
.btn.small { min-height: 40px; font-size: 18px; width: auto; margin-top: 8px; }
.linkbtn { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

.msg { border-radius: 10px; padding: 12px 14px; margin: 14px 0 0; font-size: 14px; }
.msg.error { background: rgba(226, 118, 107, 0.12); border: 1px solid var(--danger); color: #f3b5ad; }
.msg.ok { background: rgba(127, 196, 154, 0.12); border: 1px solid var(--ok); color: #bfe6cc; }
.msg.info { background: rgba(213, 180, 107, 0.1); border: 1px solid var(--gold-dark); }
[hidden] { display: none !important; }

.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--gold); }

.spinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; margin: 8px auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* app */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #0f0f11; border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom);
}
.tabs button { background: none; border: 0; color: var(--muted); font-family: var(--display); font-size: 17px; letter-spacing: 1px; padding: 14px 0; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--gold); box-shadow: inset 0 3px 0 var(--gold); }
.day { padding: 0; overflow: hidden; }
.day summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.day summary::-webkit-details-marker { display: none; }
.day summary::after { content: "+"; color: var(--gold); font-size: 24px; }
.day[open] summary::after { content: "–"; }
.day .body { padding: 0 20px 20px; }
.ex { border-top: 1px solid var(--line); padding: 12px 0; }
.ex-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.ex-meta { color: var(--gold); white-space: nowrap; font-size: 14px; }
.sets { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.sets .n { color: var(--muted); font-size: 13px; }
.sets input { min-height: 44px; padding: 8px 10px; }
.list { margin: 0; padding-left: 20px; }
.list li { margin-bottom: 6px; }
.stat { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat:last-child { border-bottom: 0; }
.stat > * { min-width: 0; }
.stat > :last-child { text-align: right; overflow-wrap: anywhere; }
.chart { width: 100%; height: 180px; display: block; }
.history-item { border-top: 1px solid var(--line); padding: 12px 0; }

@media (max-width: 420px) {
  h1 { font-size: 38px; }
  .row { grid-template-columns: 1fr; gap: 0; }
}
.center { text-align: center; }

/* premium app layer */
.avatar { background: var(--panel-2); border: 1px solid var(--gold-dark); color: var(--gold); border-radius: 999px; padding: 6px 14px; font: 600 13px var(--body); cursor: pointer; min-height: 36px; }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 15px; padding: 10px 0 12px; }
.tabs .ti { font-size: 16px; line-height: 1; font-family: var(--body); }
.hero-card { background: radial-gradient(120% 140% at 0% 0%, #2a2414 0%, var(--panel) 55%); }
.hero-row { display: flex; align-items: center; gap: 20px; }
.ring { width: 108px; height: 108px; flex: none; }
.big { font-family: var(--display); font-size: 30px; line-height: 1; margin: 2px 0 6px; }
.next-card { background: linear-gradient(135deg, #1e1a10, var(--panel) 70%); }
.next-card h2 { margin-bottom: 4px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-tile strong { font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: .5px; }
.stat-tile .small-strong { font-size: 20px; }
.stat-tile .linkbtn { align-self: flex-start; font-size: 13px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 6px 0 16px; scrollbar-width: none; }
.chip { flex: none; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 8px 14px; font: 600 14px var(--body); cursor: pointer; min-height: 40px; }
.chip[aria-selected="true"] { background: var(--gold); color: #0b0b0c; border-color: var(--gold); }
.ex-card { padding: 0 20px; }
.ex-card summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; }
.ex-card summary::-webkit-details-marker { display: none; }
.ex-card[open] { padding-bottom: 18px; }
.ex-num { color: var(--gold); font-family: var(--display); font-size: 20px; margin-right: 10px; }
.last { color: var(--gold); margin: 4px 0 6px; }
.sets.head { margin-top: 10px; }
.done-card { padding: 40px 20px; }
.meal { border-top: 1px solid var(--line); padding: 10px 0; }
.meal p { margin: 4px 0 0; }
.lib-grid { display: grid; gap: 10px; }
.lib-card { display: grid; grid-template-columns: 48px 1fr 24px; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); text-decoration: none; }
.lib-card:hover { border-color: var(--gold-dark); }
.lib-icon { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: rgba(213,180,107,.12); color: var(--gold); font: 700 12px var(--body); }
.lib-go { color: var(--gold); font-size: 20px; }
.block { display: block; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 16px 16px; color: var(--text); text-decoration: none; }
.price-card strong { font-family: var(--display); font-size: 26px; font-weight: 400; }
.price-card.best { border-color: var(--gold); }
.badge { position: absolute; top: -10px; left: 14px; background: var(--gold); color: #0b0b0c; font: 700 11px var(--body); letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; }
.danger { color: var(--danger); }
.legal a { color: var(--muted); }
.legal-page h2 { margin-top: 28px; font-size: 26px; }
.legal-page p, .legal-page li { color: #d9d4cb; }
@media (max-width: 420px) { .price-grid { grid-template-columns: 1fr; } .hero-row { gap: 14px; } .ring { width: 92px; height: 92px; } }

/* ===== premium visual layer v2 ===== */
body { background: radial-gradient(120% 60% at 50% -10%, #1c1810 0%, var(--bg) 55%) fixed, var(--bg); }
.wrap { max-width: 760px; }
.brand { border-bottom: 0; margin-bottom: 8px; padding: 14px 0; }
.avatar { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; background: rgba(255,255,255,.04); }
.avatar::before { content: attr(data-initial); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #f0d28c, #a8813a); color: #0b0b0c; font: 700 14px var(--body); }
.page { display: grid; gap: 16px; }
.page > * { margin-bottom: 0; }
.ic { display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--gold); flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.inline { width: 15px; height: 15px; vertical-align: -2px; }
.tiny { font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; background: rgba(213,180,107,.16); border: 1px solid rgba(213,180,107,.45);
  color: #f0d28c; border-radius: 999px; padding: 5px 12px; font: 700 11px var(--body); letter-spacing: 1.2px; text-transform: uppercase; backdrop-filter: blur(6px); }
.tiny-pill { padding: 3px 9px; font-size: 10px; }
.card.glass { background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)), var(--panel);
  border: 1px solid rgba(213,180,107,.14); box-shadow: 0 18px 40px -24px rgba(0,0,0,.9); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 0 2px; }
.sec-head h3 { margin: 0; font-size: 26px; }

/* hero */
.hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 440px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(11,11,12,0) 25%, rgba(11,11,12,.72) 62%, #0b0b0c 100%), var(--img) center 18% / cover no-repeat, #15130e;
  border: 1px solid rgba(213,180,107,.25); box-shadow: 0 30px 60px -30px rgba(213,180,107,.35); }
.hero.ty { background: linear-gradient(90deg, rgba(11,11,12,.85) 0%, rgba(11,11,12,.25) 55%, rgba(11,11,12,0) 75%),
  linear-gradient(180deg, rgba(11,11,12,0) 45%, rgba(11,11,12,.8) 80%, #0b0b0c 100%), var(--img) 72% 12% / cover no-repeat, #15130e; }
.hero.short { min-height: 220px; }
.hero-in { position: relative; display: grid; gap: 10px; padding: 22px 20px 18px; }
.hero-title { font-size: clamp(46px, 11vw, 64px); line-height: .92; margin: 4px 0 0; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.hero-title em { display: block; }
.hero-name { display: block; font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; color: #e9e3d6; margin-top: 10px; text-shadow: none; }
.hero-next { margin: 0; font-size: 14px; }
.hero-cta { margin-top: 4px; width: auto; justify-self: start; padding: 0 22px; box-shadow: 0 10px 30px -10px rgba(213,180,107,.8); }
.hero-cta .ic { color: #0b0b0c; }
.hero-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.08); background: rgba(11,11,12,.55); backdrop-filter: blur(8px); }
.hero-stats > div { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; text-align: center; }
.hero-stats > div + div { border-left: 1px solid rgba(255,255,255,.08); }
.hero-stats strong { font-family: var(--display); font-size: 26px; font-weight: 400; line-height: 1; }
.hero-stats span:last-child { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* charts */
.bars, .chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.bars .bar { fill: url(#barg); opacity: .55; }
.bars .bar.hi { opacity: 1; }
.bars .bar.empty { fill: #26262b; opacity: 1; }
.bars .grid, .chart .grid { stroke: #26262b; stroke-dasharray: 3 5; }
.bars .bar-val, .chart .bar-val { fill: #f4f0e8; font: 600 11px var(--body); }
.bars .bar-lab, .chart .axis { fill: #8f8a81; font: 500 11px var(--body); }
.bars .bar-lab.hi { fill: var(--gold); font-weight: 700; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #0b0b0c; stroke: var(--gold); stroke-width: 3; }
.ring-row { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ring-row .big { margin-bottom: 4px; }
.ring-row p { margin: 0; }
.ring { width: 96px; height: 96px; }
.ring-track { stroke: #26262b; }
.ring-num { fill: #f4f0e8; font: 400 30px var(--display); }
.ring-lab { fill: #8f8a81; font: 700 9px var(--body); letter-spacing: 1.5px; }

/* tiles */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile-grid.four { grid-template-columns: repeat(4, 1fr); }
.tile { display: grid; gap: 4px; justify-items: start; text-align: left; background: linear-gradient(160deg, rgba(213,180,107,.10), rgba(255,255,255,.02) 60%), var(--panel);
  border: 1px solid rgba(213,180,107,.16); border-radius: 16px; padding: 14px; color: var(--text); font: inherit; min-width: 0; cursor: default; }
button.tile { cursor: pointer; }
.tile strong { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.05; overflow-wrap: anywhere; }
.big-tile strong { font-size: 30px; }

/* rail of day cards */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.day-tile { scroll-snap-align: start; position: relative; min-height: 190px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(11,11,12,.05) 30%, rgba(11,11,12,.92) 100%), var(--img) center 20% / cover no-repeat, #15130e;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; padding: 14px; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.day-tile.next { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 14px 30px -18px rgba(213,180,107,.8); }
.day-tile .pill { position: absolute; top: 12px; left: 12px; }
.day-tile strong { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; }
.day-tile span:last-child { font-size: 12px; color: #d8d2c6; }

/* achievements */
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge-grid.three { grid-template-columns: repeat(3, 1fr); }
.badge-tile { display: grid; justify-items: center; gap: 4px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 8px; min-width: 0; }
.badge-tile strong { font-size: 12px; line-height: 1.2; }
.badge-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #1d1d21; color: #5d5a54; transform: rotate(45deg); margin: 4px 0 6px; }
.badge-ic .ic { transform: rotate(-45deg); color: inherit; }
.badge-tile.got { border-color: rgba(213,180,107,.4); background: linear-gradient(180deg, rgba(213,180,107,.12), transparent 70%), var(--panel); }
.badge-tile.got .badge-ic { background: linear-gradient(135deg, #f0d28c, #a8813a); color: #0b0b0c; box-shadow: 0 8px 20px -8px rgba(213,180,107,.8); }

/* train */
.day-hero { position: relative; border-radius: 20px; overflow: hidden; padding: 150px 18px 16px; border: 1px solid rgba(213,180,107,.2);
  background: linear-gradient(180deg, rgba(11,11,12,.05) 0%, rgba(11,11,12,.88) 70%), var(--img) center 22% / cover no-repeat, #15130e; }
.day-hero h1 { font-size: 46px; margin: 0; }
.day-focus { color: #e2dccf; margin: 2px 0 10px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: #e2dccf; }
.prog { display: grid; gap: 6px; }
.prog-track { display: block; height: 8px; border-radius: 99px; background: #222226; overflow: hidden; }
.prog-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #a8813a, #f0d28c); transition: width .25s ease; }
.ex-card { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), var(--panel); border-color: rgba(213,180,107,.12); }
.ex-title { display: flex; align-items: center; min-width: 0; }
.ex-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(213,180,107,.14); font-size: 18px; margin-right: 12px; flex: none; }
.last { display: block; background: rgba(213,180,107,.08); border-radius: 10px; padding: 8px 10px; }
.btn .ic { color: inherit; }
.done-card { display: grid; justify-items: center; gap: 6px; text-align: center; border-radius: 22px; padding: 48px 20px 28px; border: 1px solid rgba(213,180,107,.3);
  background: linear-gradient(180deg, rgba(11,11,12,.6), #0b0b0c 75%), var(--img) center 20% / cover no-repeat, #15130e; }
.done-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #f0d28c, #a8813a); color: #0b0b0c; }
.done-ic .ic { width: 32px; height: 32px; color: #0b0b0c; }
.done-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 10px 0; }
.done-stats div { display: grid; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; }
.done-stats strong { font-family: var(--display); font-size: 30px; font-weight: 400; }
.done-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* progress */
.pb-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pb-row:last-child { border-bottom: 0; }
.pb-row strong { color: var(--gold); white-space: nowrap; }

/* meals */
.water { display: flex; gap: 14px; align-items: flex-start; }
.water .ic { width: 34px; height: 34px; }
.water p { margin: 4px 0 0; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 18px; border-left: 2px solid rgba(213,180,107,.3); display: grid; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(213,180,107,.18); }
.timeline p { margin: 2px 0 0; }
.checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.checks .ic { margin-top: 3px; }

/* library */
.lib-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 210px; border-radius: 18px; overflow: hidden; padding: 12px;
  color: var(--text); text-decoration: none; border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(11,11,12,0) 35%, rgba(11,11,12,.92) 100%), var(--img) center 20% / cover no-repeat, #15130e; transition: transform .15s ease, border-color .15s; }
.lib-cover:hover { transform: translateY(-2px); border-color: var(--gold-dark); }
.lib-cover.wide { min-height: 200px; background-position: center 30%; }
.lib-text { display: grid; gap: 2px; }
.lib-text strong { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; }
.lib-text span { font-size: 12px; color: #d8d2c6; }
.lib-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* tab bar */
.tabs { left: 50%; right: auto; bottom: 12px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); border: 1px solid rgba(213,180,107,.18);
  border-radius: 22px; background: rgba(16,16,18,.92); box-shadow: 0 20px 40px -12px rgba(0,0,0,.8); padding: 6px; margin-bottom: env(safe-area-inset-bottom); }
.tabs button { border-radius: 16px; font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: .3px; gap: 4px; padding: 8px 0; }
.tabs button .ic { color: inherit; width: 22px; height: 22px; }
.tabs button[aria-selected="true"] { box-shadow: none; color: #0b0b0c; background: linear-gradient(135deg, #f0d28c, #c9a25a); }
.wrap { padding-bottom: 120px; }

@media (min-width: 640px) {
  .rail { grid-auto-columns: 32%; }
  .hero { min-height: 480px; }
}
@media (max-width: 520px) {
  .tile-grid.four { grid-template-columns: 1fr 1fr; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .badge-grid.three { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 380px) { .hero-title { font-size: 42px; } .lib-grid2 { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .prog-fill, .lib-cover { transition: none; } }

/* ===== cleaner home: smaller type ===== */
.hero { min-height: 360px; }
.hero-in { gap: 8px; padding: 18px 18px 16px; }
.hero-title { font-size: clamp(30px, 8vw, 40px); line-height: .95; }
.hero-title em { display: inline; }
.hero-name { font-size: 14px; font-weight: 600; margin-top: 6px; }
.hero-next { font-size: 13px; }
.hero-cta { min-height: 44px; font-size: 18px; padding: 0 18px; }
.hero-stats > div { padding: 10px 4px; }
.hero-stats strong { font-size: 22px; }
.hero-stats span:last-child { font-size: 10px; }
.sec-head h3 { font-size: 20px; }
.big { font-size: 22px; }
.ring { width: 80px; height: 80px; }
.tile strong { font-size: 19px; }
.day-tile { min-height: 160px; }
.day-tile strong { font-size: 20px; }
.badge-ic { width: 42px; height: 42px; border-radius: 13px; }
.badge-tile strong { font-size: 11px; }
@media (min-width: 640px) { .hero { min-height: 400px; } }
.hero-in p.hero-name { margin: 0; }

/* ===== home hero: Big TY fully visible, text below the photo ===== */
.hero.ty { min-height: 0; justify-content: flex-start; background: var(--panel); }
.hero-photo { position: relative; height: 340px; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; display: block; }
.hero-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(180deg, rgba(20,20,22,0), var(--panel)); pointer-events: none; }
.hero-photo .pill { position: absolute; top: 14px; left: 14px; background: rgba(11,11,12,.6); }
.hero.ty .hero-in { padding-top: 6px; }
.hero.ty .hero-title { text-shadow: none; }
@media (min-width: 640px) { .hero-photo { height: 420px; } .hero.ty { min-height: 0; } }

/* ===== Big TY daily message ===== */
.daily { position: relative; border-radius: 18px; padding: 16px 16px 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(213,180,107,.16), rgba(213,180,107,.04) 55%, transparent), var(--panel);
  border: 1px solid rgba(213,180,107,.35); }
.daily::after { content: "\201C"; position: absolute; right: 12px; top: -18px; font: 400 120px/1 var(--display); color: rgba(213,180,107,.12); pointer-events: none; }
.daily-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.daily-head div { display: grid; }
.daily-head strong { font-size: 14px; }
.daily-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; border: 2px solid var(--gold); flex: none; }
.daily-title { font-family: var(--display); font-size: 24px; line-height: 1.05; letter-spacing: .5px; color: var(--gold); margin: 0 0 6px; }
.daily-body { margin: 0; font-size: 15px; color: #e9e3d6; }
