/* Hormonal Optimization app: cream paper, ink text, gold accent, dark cards. */
:root {
  --bg: #fbf9f4; --surface: #f2eee4; --card: #ffffff; --line: rgba(23,23,27,.12);
  --text: #17171b; --text-2: #44434a; --muted: #6f6b63;
  --dark: #141417; --dark-2: #22222a; --on-dark: #f3eee2; --on-dark-2: #b9b3a6;
  --gold: #d9b45f; --gold-2: #e8c57a; --accent: #8f6a1c; --on-gold: #17120a;
  --c1: #1f6496; --c2: #1f7d4c; --c3: #c2601d; --c4: #6a3ea3; --c5: #b4862c;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px; --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.22,1,.36,1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.end { margin-left: auto; color: var(--accent); width: 18px; height: 18px; }

/* ---------------------------------------------------------------- chrome */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 12px) 16px 12px; background: rgba(251,249,244,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-stretch: 85%; font-size: 17px; }
.brand-mark { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 2.6; }
.streak-chip { display: flex; align-items: center; gap: 4px; padding: 6px 12px 6px 9px; border-radius: 999px; background: var(--dark); color: var(--on-dark); font-weight: 800; }
.streak-chip svg { width: 16px; height: 16px; color: var(--gold); }
main { max-width: 600px; margin: 0 auto; padding: 18px 16px calc(var(--tab-h) + var(--safe-b) + 28px); opacity: 0; transition: opacity .3s; }
body.ready main { opacity: 1; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line); }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 800; text-align: center; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { color: var(--accent); }

/* ---------------------------------------------------------------- type */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.h1 { font-stretch: 80%; font-weight: 800; font-size: 40px; line-height: .98; letter-spacing: -.01em; margin: 6px 0 12px; }
.h1.sm { font-size: 30px; margin: 0 0 4px; }
.h2 { font-stretch: 85%; font-weight: 800; font-size: 22px; line-height: 1.15; margin: 28px 0 12px; }
.sub { color: var(--text-2); margin: 0 0 18px; }
.sub.sm { font-size: 14.5px; margin-bottom: 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 10px 2px 0; }
.hint.center { text-align: center; }
.note { font-size: 13.5px; color: var(--text-2); background: rgba(217,180,95,.12); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
.err { color: #a43c12; font-weight: 700; font-size: 14px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: 12px; font-weight: 800; font-size: 16px; text-align: center; transition: transform .2s var(--ease), background-color .2s; }
.btn:active { transform: scale(.98); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--gold); color: var(--on-gold); }
.btn-ghost { background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.btn-block { width: 100%; }
.btn-xl { min-height: 58px; font-size: 17px; }
.btn + .btn, .btn-block + .btn-block { margin-top: 10px; }
.danger { color: #a43c12; margin-top: 26px; }
.link-btn { color: var(--accent); font-weight: 800; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; box-shadow: 0 0 0 1px var(--line) inset; background: var(--card); flex: none; }
.iconbtn .ic { width: 20px; height: 20px; }
.iconbtn:disabled { opacity: .35; cursor: default; }
.iconbtn.lg { width: 56px; height: 56px; border-radius: 16px; }
.iconbtn.xl { width: 76px; height: 76px; border-radius: 50%; background: var(--gold); color: var(--on-gold); box-shadow: none; }
.iconbtn.xl .ic { width: 30px; height: 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 700; font-size: 14px; }
.chip .ic { width: 14px; height: 14px; color: var(--accent); }
.chip.on { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.seg { display: flex; padding: 3px; border-radius: 11px; background: var(--surface); flex: none; }
.seg button { flex: 1; padding: 8px 12px; border-radius: 8px; font-weight: 800; font-size: 14px; color: var(--muted); white-space: nowrap; text-align: center; }
.seg button[aria-checked=true] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.big { margin: 10px 0 14px; }
.seg.big button { padding: 11px 8px; font-size: 15px; }
.tier-pill { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--surface); color: var(--muted); vertical-align: middle; }
.tier-pill.t-basic { background: #e7eef6; color: var(--c1); }
.tier-pill.t-pro { background: var(--gold); color: var(--on-gold); }
.tier-pill.t-elite { background: var(--dark); color: var(--gold); }

/* ---------------------------------------------------------------- today */
.hello { display: flex; align-items: flex-end; justify-content: space-between; }
.hello .h1 { margin-bottom: 14px; }
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daybar-mid { text-align: center; }
.daybar-mid b { display: block; font-size: 17px; }
.daybar-mid span { font-size: 13px; color: var(--muted); }
.banner { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px 44px 14px 14px; border-radius: var(--r); background: var(--dark); color: var(--on-dark); text-align: left; }
.banner > .ic { width: 26px; height: 26px; color: var(--gold); }
.banner b { display: block; font-size: 15.5px; } .banner span { display: block; font-size: 13px; color: var(--on-dark-2); }
.banner-x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--on-dark-2); }
.banner-x .ic { width: 16px; height: 16px; }
.levelup { margin-top: 14px; padding: 16px; border-radius: var(--r); background: rgba(217,180,95,.14); box-shadow: 0 0 0 1px rgba(217,180,95,.5) inset; }
.levelup b { font-size: 17px; } .levelup p { margin: 4px 0 12px; color: var(--text-2); font-size: 14.5px; }
.hero-card { display: flex; gap: 18px; align-items: center; margin: 16px 0 4px; padding: 18px; border-radius: 20px; background: var(--dark); color: var(--on-dark); }
.ring { position: relative; width: 108px; height: 108px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: #2c2c33; }
.ring-fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: calc(326.73 * (1 - var(--p))); transition: stroke-dashoffset .6s var(--ease); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-txt b { font-stretch: 80%; font-weight: 800; font-size: 30px; line-height: 1; }
.ring-txt span { font-size: 12px; color: var(--on-dark-2); margin-top: 2px; }
.hero-side { min-width: 0; }
.hero-msg { margin: 0 0 12px; font-weight: 700; font-size: 17px; line-height: 1.3; }
.today-train { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--on-dark-2); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--c1); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.k-hiit { background: var(--c1) !important; } .k-pull { background: var(--c2) !important; } .k-legs { background: var(--c3) !important; } .k-push { background: var(--c4) !important; } .k-full { background: var(--c3) !important; }
.k-rest, .k-recovery { background: var(--c5) !important; }
.block { margin-top: 20px; }
.block-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; font-weight: 800; font-size: 17px; }
.block-head .ic { color: var(--accent); }
.block-head small { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.items { border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.items.flat { margin-top: 10px; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); transition: background-color .2s; }
.item:first-child { border-top: 0; }
.item:active { background: var(--surface); }
.box { width: 26px; height: 26px; flex: none; border-radius: 8px; box-shadow: 0 0 0 2px #cfc6b2 inset; display: grid; place-items: center; transition: background-color .2s, box-shadow .2s, transform .25s var(--ease); }
.box .tick { width: 16px; height: 16px; color: var(--on-gold); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }
.item.done .box { background: var(--gold); box-shadow: none; transform: scale(1.05); }
.item.done .box .tick { opacity: 1; transform: none; }
.item-txt { min-width: 0; }
.item-txt b { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.item-txt span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.item.done .item-txt b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(111,107,99,.5); }
.new { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 5px; background: var(--gold); color: var(--on-gold); font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.card-row { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 12px; padding: 15px 16px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-align: left; }
.card-row > .ic:first-child { width: 24px; height: 24px; color: var(--accent); }
.card-row b { display: block; font-size: 15.5px; line-height: 1.3; } .card-row span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.card-row.dark { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.card-row.dark > .ic:first-child { color: var(--gold); } .card-row.dark span { color: var(--on-dark-2); }
.card-row.hl { box-shadow: 0 0 0 2px var(--gold) inset; }
.card-row > div { min-width: 0; flex: 1; }
.kdot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.pcard { margin-top: 14px; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.pcard > b { display: block; font-size: 17px; margin-top: 6px; }
.pcard-head { display: flex; align-items: center; justify-content: space-between; }
.pcard .items { box-shadow: none; border-radius: 0; margin: 4px -16px -16px; border-top: 1px solid var(--line); }
.pcard.warn { background: #fdf1ea; box-shadow: 0 0 0 1px #efc7ad inset; }
.pcard.warn .ic { color: var(--c3); }
.pcard.ok { display: flex; gap: 10px; align-items: center; background: #eaf5ee; box-shadow: 0 0 0 1px #b7dcc4 inset; font-weight: 700; }
.pcard ul { margin: 8px 0 0; padding-left: 18px; } .pcard li { margin-bottom: 4px; font-size: 14.5px; }

/* lock */
.lock-card { margin-top: 12px; padding: 18px; border-radius: var(--r); background: linear-gradient(160deg, #1c1c22, #141417); color: var(--on-dark); position: relative; overflow: hidden; }
.lock-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(rgba(217,180,95,.25), transparent 70%); }
.lock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(217,180,95,.16); color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lock-badge .ic { width: 13px; height: 13px; }
.lock-card b { display: block; font-size: 18px; margin: 10px 0 4px; }
.lock-card p { margin: 0 0 14px; color: var(--on-dark-2); font-size: 14.5px; }
.lock-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.lock-actions .btn { min-height: 44px; font-size: 15px; padding: 0 16px; margin: 0; }
.lock-card .btn-ghost { background: transparent; box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset; color: var(--on-dark); }

/* ---------------------------------------------------------------- plan */
.profile-card { margin-top: 6px; padding: 6px 16px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.prow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.prow .ic { color: var(--accent); }
.prow span { color: var(--muted); font-size: 14.5px; }
.prow b { margin-left: auto; text-align: right; font-size: 15px; }
.profile-card .link-btn { display: inline-block; margin-top: 12px; }
.weeks { margin-top: 22px; position: relative; }
.week { display: grid; grid-template-columns: 36px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.week::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.week:last-child::before { display: none; }
.week-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); font-weight: 800; position: relative; z-index: 1; }
.week-dot .tick, .week-dot .ic { width: 18px; height: 18px; }
.week.done .week-dot { background: var(--gold); color: var(--on-gold); }
.week.now .week-dot { background: var(--dark); color: var(--gold); box-shadow: 0 0 0 4px rgba(217,180,95,.35); }
.week-body { padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.week.now .week-body { box-shadow: 0 0 0 2px var(--gold) inset; }
.week.later .week-body { background: transparent; }
.week-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.week-st { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); white-space: nowrap; }
.week-s { margin: 2px 0 6px; font-size: 13.5px; color: var(--muted); }
.week ul { margin: 0; padding-left: 18px; font-size: 14px; } .week li { margin: 2px 0; }
.quiz .qbar { height: 6px; border-radius: 3px; background: var(--surface); margin: 10px 0 4px; overflow: hidden; }
.quiz .qbar i { display: block; height: 100%; background: var(--gold); transition: width .3s var(--ease); }
.opts { display: grid; gap: 10px; }
.opt { padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 700; text-align: left; }
.opt:active, .opt.on { box-shadow: 0 0 0 2px var(--gold) inset; background: rgba(217,180,95,.1); }
.opt.sm { padding: 10px 12px; font-size: 14px; font-weight: 600; }
.scores { display: grid; gap: 8px; margin-top: 10px; }
.result-hero { padding: 20px; border-radius: 20px; background: var(--dark); color: var(--on-dark); }
.result-hero .eyebrow { color: var(--gold); } .result-hero p { color: var(--on-dark-2); margin: 0; }
.dolist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dolist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.dolist .ic { color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.p30-week { margin-bottom: 8px; }
.p30-day { margin-top: 8px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.p30-day summary { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; list-style: none; }
.p30-day summary::-webkit-details-marker { display: none; }
.p30-day summary b { flex: 1; font-size: 15px; } .p30-day summary small { color: var(--muted); font-weight: 700; }
.p30-day.now { box-shadow: 0 0 0 2px var(--gold) inset; }
.p30-day .items { box-shadow: none; border-radius: 0; border-top: 1px solid var(--line); margin: 0; }
.p30-day .note { margin: 0 14px 14px; }
.dnum { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.now > summary .dnum, .rm-week.now .dnum { background: var(--gold); color: var(--on-gold); }
.past > summary .dnum, .rm-week.past .dnum { background: var(--dark); color: var(--gold); }
.phases { display: grid; gap: 10px; margin-bottom: 8px; }
.phase { padding: 14px; border-radius: var(--r); background: var(--dark); color: var(--on-dark); }
.phase .eyebrow { color: var(--gold); } .phase b { display: block; font-size: 17px; margin: 2px 0 6px; }
.phase ul { margin: 0; padding-left: 18px; color: var(--on-dark-2); font-size: 14px; }
.rm-week { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.rm-week:first-child { border-top: 0; }
.rm-week b { display: block; font-size: 15px; } .rm-week span { display: block; font-size: 13px; color: var(--muted); }
.rm-week.now { background: rgba(217,180,95,.1); }
.rm-week .dnum { min-width: 38px; width: auto; padding: 0 6px; }

/* ---------------------------------------------------------------- train */
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 2px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-align: center; }
.wday span { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.wday i { width: 10px; height: 10px; border-radius: 3px; }
.wday b { font-size: 10.5px; line-height: 1.15; font-weight: 700; }
.wday.today { box-shadow: 0 0 0 2px var(--gold) inset; }
.wday.rest { opacity: .6; }
.exlist { display: grid; gap: 8px; }
.ex { padding: 12px 14px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.ex b { display: block; font-size: 15px; } .ex span { display: block; font-size: 13.5px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.ex em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 3px; }
.sticky-cta { position: sticky; bottom: calc(14px + var(--safe-b)); margin-top: 18px; box-shadow: 0 10px 30px -10px rgba(143,106,28,.6); }
details.faq { margin-top: 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; padding: 0 14px; }
details.faq summary { padding: 14px 0; font-weight: 800; cursor: pointer; }
details.faq ul { margin: 0 0 14px; padding-left: 18px; font-size: 14.5px; } details.faq li { margin-bottom: 5px; }
details.faq p { margin: 0 0 12px; font-size: 14.5px; color: var(--text-2); }
ol.how { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--text-2); }

/* ---------------------------------------------------------------- player */
.sheet-page.player .sheet-body { display: flex; flex-direction: column; min-height: calc(100% - 70px); padding-bottom: calc(24px + var(--safe-b)); }
.pl-bar { height: 5px; border-radius: 3px; background: #2c2c33; overflow: hidden; }
.pl-bar i { display: block; height: 100%; background: var(--gold); transition: width .4s var(--ease); }
.pl-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 20px 0; }
.pl-kind { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.pl-kind.rest { color: #8fd1a8; }
.pl-name { font-stretch: 80%; font-weight: 800; font-size: 36px; line-height: 1.02; max-width: 16ch; }
.pl-reps { font-size: 20px; font-weight: 800; color: var(--on-dark); background: #2c2c33; padding: 6px 14px; border-radius: 999px; }
.pl-cue { margin: 0; color: var(--on-dark-2); max-width: 32ch; }
.pl-ring { position: relative; width: 200px; height: 200px; margin-top: 10px; }
.pl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-ring circle { fill: none; stroke-width: 9; }
.pl-ring .ring-fg { stroke-dasharray: 339.3; stroke-dashoffset: calc(339.3 * (1 - var(--p))); transition: stroke-dashoffset 1s linear; }
.is-rest .pl-ring .ring-fg { stroke: #8fd1a8; }
.pl-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-stretch: 80%; font-weight: 800; font-size: 64px; font-variant-numeric: tabular-nums; }
.pl-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pl-ctrl .iconbtn.lg { background: #22222a; box-shadow: none; color: var(--on-dark); }
.pl-main.done { gap: 16px; }

/* ---------------------------------------------------------------- food */
.protein-card { padding: 18px; border-radius: 20px; background: var(--dark); color: var(--on-dark); }
.protein-card .eyebrow { color: var(--gold); }
.protein-card > b { display: block; font-stretch: 80%; font-weight: 800; font-size: 36px; line-height: 1.05; margin: 6px 0 2px; }
.protein-card > span { display: block; color: var(--on-dark-2); font-size: 14.5px; }
.protein-card .link-btn { color: var(--gold); display: inline-block; margin-top: 10px; }
.slider { display: block; margin-top: 14px; }
.slider span { display: flex; justify-content: space-between; font-size: 14px; color: var(--on-dark-2); }
.slider b { color: var(--on-dark); }
.slider input { width: 100%; accent-color: var(--gold); margin-top: 8px; }
.tabs-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 3px; border-radius: 11px; background: var(--surface); }
.tabs-wd button { padding: 8px 0; border-radius: 8px; font-weight: 800; font-size: 13px; color: var(--muted); text-align: center; }
.tabs-wd button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.meal { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; }
.meal:first-child { border-top: 0; }
.meal span { grid-column: 1 / -1; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.meal b { font-size: 15px; } .meal em { font-style: normal; font-size: 13px; color: var(--muted); align-self: center; }
.recipe-hero .rmeta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 14px; }
.rmeta span { display: inline-flex; align-items: center; gap: 6px; }
.rmeta .ic { width: 16px; height: 16px; color: var(--accent); }
ul.ing, ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: 15.5px; }

/* ---------------------------------------------------------------- me */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 16px 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-align: center; }
.stat b { display: block; font-stretch: 80%; font-weight: 800; font-size: 34px; line-height: 1; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.dark { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.stat.dark b { color: var(--gold); } .stat.dark span { color: var(--on-dark-2); }
.heat-legend, .heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.heat-legend span { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.heat { margin-top: 6px; }
.cell { aspect-ratio: 1; border-radius: 8px; background: var(--surface); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.cell.l1 { background: #f0e3c0; } .cell.l2 { background: #e6cd8b; color: var(--text); } .cell.l3 { background: var(--gold); color: var(--on-gold); } .cell.l4 { background: var(--accent); color: #fff; }
.cell.future { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; }
.cell.today { outline: 2px solid var(--text); outline-offset: 1px; }
.habits { border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.habit { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.habit:first-child { border-top: 0; }
.dots { display: flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 3px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.dots i.on { background: var(--gold); box-shadow: none; }
.chart { margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.chart-head { display: flex; justify-content: space-between; font-size: 14px; } .chart-head span { color: var(--muted); }
.chart svg { width: 100%; height: auto; margin-top: 6px; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .pt { fill: var(--dark); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar i { width: 100%; border-radius: 4px 4px 2px 2px; background: var(--gold); min-height: 4px; }
.bar i.q1 { background: #e8b4a0; } .bar i.q2 { background: #ecd09a; } .bar i.q5 { background: var(--accent); }
.bar span { font-size: 10px; color: var(--muted); }
.group { margin-top: 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 13px 14px; border-top: 1px solid var(--line); text-align: left; }
.field-row:first-child { border-top: 0; }
.field-row > div { min-width: 0; }
.field-row b { display: block; font-size: 15.5px; } .field-row span { display: block; font-size: 13px; color: var(--muted); }
.field-row .ic { color: var(--accent); width: 18px; height: 18px; }
.field-row input[type=text], .field-row input[type=time], .field-row select { max-width: 52%; border: 0; border-radius: 10px; background: var(--surface); padding: 8px 10px; font-weight: 700; text-align: right; }
.field-row .seg button { padding: 7px 9px; font-size: 13px; }
.unit { display: flex !important; align-items: center; gap: 6px; font-weight: 700; color: var(--text) !important; font-size: 15px !important; flex: none; }
.unit input { width: 76px; border: 0; border-radius: 10px; background: var(--surface); padding: 8px 10px; font-weight: 800; font-size: 17px; text-align: right; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 700; }
.field input[type=time] { border: 0; background: var(--surface); border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: 18px; }
.code-input { width: 100%; height: 58px; padding: 0 16px; border-radius: var(--r); border: 0; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
.code-input:focus { outline: none; box-shadow: 0 0 0 2px var(--gold) inset; }

/* evening */
.count-card { padding: 22px 18px; border-radius: 20px; background: var(--dark); color: var(--on-dark); text-align: center; }
.count-card .eyebrow { color: var(--gold); }
.count-card b { display: block; font-stretch: 80%; font-weight: 800; font-size: 52px; line-height: 1.05; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.count-sub { font-size: 14px; color: var(--on-dark-2); }
.timeline { list-style: none; margin: 0 0 18px; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 51px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 22px; padding: 10px 0; }
.timeline time { font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; padding-top: 1px; }
.timeline li::after { content: ""; position: absolute; left: 46px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px var(--gold) inset; }
.timeline li.past::after { background: var(--gold); }
.timeline li.next::after { background: var(--gold); box-shadow: 0 0 0 5px rgba(217,180,95,.3); }
.timeline b { display: block; font-size: 15.5px; } .timeline span { display: block; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- sheets */
.sheet-page { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; transform: translateX(100%); transition: transform .28s var(--ease); }
.sheet-page.in { transform: none; }
.sheet-page.dark { background: var(--dark); color: var(--on-dark); }
.sheet-top { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 16px 10px; background: inherit; }
.sheet-page:not(.dark) .sheet-top { background: rgba(251,249,244,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.sheet-title { font-weight: 800; font-size: 16px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-top > span, .sheet-top > .link-btn { min-width: 44px; text-align: right; }
.sheet-page.dark .iconbtn { background: #22222a; box-shadow: none; color: var(--on-dark); }
.sheet-body { max-width: 600px; margin: 0 auto; padding: 16px 16px calc(40px + var(--safe-b)); }
.celebrate .sheet-body { min-height: calc(100% - 70px); display: grid; place-items: center; }
.cele { text-align: center; display: grid; justify-items: center; gap: 10px; }
.cele p { color: var(--on-dark-2); margin: 0 0 16px; }
.cele-mark { width: 84px; height: 84px; fill: none; stroke: var(--gold); stroke-width: 2.2; filter: drop-shadow(0 0 24px rgba(217,180,95,.55)); animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }

/* ---------------------------------------------------------------- onboarding */
.ob { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; opacity: 0; transition: opacity .3s; overflow-y: auto; }
.ob.in { opacity: 1; }
.ob-top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 12px) 16px 6px; min-height: 62px; }
.ob-prog { height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.ob-prog i { display: block; height: 100%; background: var(--gold); transition: width .35s var(--ease); }
.ob-body { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 20px calc(20px + var(--safe-b)); animation: obin .35s var(--ease); }
@keyframes obin { from { opacity: 0; transform: translateY(12px); } }
.ob-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ob-hero p { color: var(--text-2); font-size: 17px; margin: 0 0 22px; }
.ob-mark { width: 64px; height: 64px; fill: none; stroke: var(--gold); stroke-width: 2.2; margin-bottom: 18px; filter: drop-shadow(0 0 18px rgba(217,180,95,.45)); }
.ob-mark.spin { animation: spin 1.3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ob-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-foot { margin-top: auto; padding-top: 18px; }
.ob-q { flex: 1; }
.ob-q .h1 { font-size: 34px; margin-bottom: 18px; }
.ob-opts { display: grid; gap: 10px; }
.ob-opt { display: block; width: 100%; padding: 16px 18px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-align: left; transition: box-shadow .2s, background-color .2s, transform .15s; }
.ob-opt:active { transform: scale(.985); }
.ob-opt b { display: block; font-size: 16.5px; } .ob-opt span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.ob-opt.on { box-shadow: 0 0 0 2px var(--gold) inset; background: rgba(217,180,95,.1); }
.ob-input { width: 100%; height: 60px; padding: 0 18px; border-radius: 16px; border: 0; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-size: 20px; font-weight: 700; }
.ob-input:focus, .ob-time:focus { outline: none; box-shadow: 0 0 0 2px var(--gold) inset; }
.unit.big .ob-input { width: 130px; }
.ob-time { width: 100%; height: 84px; border: 0; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-size: 40px; font-weight: 800; text-align: center; margin-top: 8px; }
.ob-result { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--dark); color: var(--on-dark); }
.ob-result b { display: block; font-size: 22px; color: var(--gold); } .ob-result span { color: var(--on-dark-2); font-size: 14.5px; }
.lbl { display: block; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.ob-building { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--text-2); font-weight: 700; }
.ob-weeks { display: grid; gap: 8px; }
.ob-week { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.ob-week.first { box-shadow: 0 0 0 2px var(--gold) inset; }
.ob-week b { display: block; } .ob-week span { display: block; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- install */
.inst-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.inst-icon { width: 72px; height: 72px; flex: none; border-radius: 18px; box-shadow: 0 14px 30px -12px rgba(20,20,23,.6); }
.inst-hero p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.inst-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.inst-steps li { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.inst-art .art { width: 100%; height: auto; }
.inst-art .art.wide { width: 100%; }
.inst-txt .dnum { background: var(--gold); color: var(--on-gold); margin-bottom: 6px; }
.inst-txt b { display: block; font-size: 16.5px; } .inst-txt p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.ph-frame { fill: #1b1b20; } .ph-screen { fill: #fbf9f4; } .ph-top, .ph-bar { fill: #f0ece2; }
.ph-url { fill: #e3ded2; } .ph-ink { fill: #2a2a30; } .ph-soft { fill: #d9d3c6; } .ph-card { fill: #141417; } .ph-gold { fill: #d9b45f; }
.ph-icon-s { fill: none; stroke: #1f6496; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ph-dot { fill: #555; } .ph-sheet { fill: #ffffff; } .ph-sheet.shadow { filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.ph-row { fill: #f2eee4; } .hl-row { fill: #fbecc6; stroke: #d9b45f; stroke-width: 2; }
.ph-dim { fill: rgba(20,20,23,.35); }
.ph-txt { font: 700 10px var(--font); fill: #17171b; } .ph-txt.b { font-weight: 800; fill: #1f6496; } .ph-txt-s { font: 600 9px var(--font); fill: #6f6b63; }
.hl-ring { fill: none; stroke: #d9b45f; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: ring 1.6s ease-out infinite; }
.hl-ring.d2 { animation-delay: .8s; }
@keyframes ring { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@media (max-width: 380px) { .inst-steps li { grid-template-columns: 104px 1fr; } }
.ph-wall { fill: #2b3a55; } .ph-app { fill: rgba(255,255,255,.28); } .ph-txt.w { fill: #fff; font-size: 9px; }
.inst-card { margin-top: 14px; padding: 18px 16px 20px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-align: center; }
.inst-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.inst-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--surface); transition: width .3s var(--ease); }
.inst-dots i.done { background: #e6cd8b; } .inst-dots i.on { width: 26px; background: var(--gold); }
.inst-big { width: min(40vw, 170px, 26vh); margin: 8px auto 0; }
.inst .inst-hero { margin-bottom: 0; } .inst .inst-hero .h1.sm { font-size: 24px; } .inst .inst-icon { width: 56px; height: 56px; border-radius: 14px; }
.inst .inst-card { margin-top: 10px; padding: 14px 14px 16px; }
.inst-big .art { width: 100%; height: auto; }
.inst-big .art.wide { width: min(80vw, 330px); margin-left: 50%; transform: translateX(-50%); }
.h2.big { font-size: 28px; margin: 12px 0 6px; }
.inst-d { margin: 0 auto; max-width: 30ch; font-size: 17px; color: var(--text-2); }
.inst-card .note { text-align: left; }
.inst-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.inst-nav .btn { margin: 0; } .inst-nav .btn-xl { flex: 1; }
.inst-other { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.pcard.gold { display: flex; gap: 10px; align-items: flex-start; background: rgba(217,180,95,.14); box-shadow: 0 0 0 1px rgba(217,180,95,.5) inset; }
.pcard.gold p, .pcard.warn p { margin: 0; font-size: 14.5px; }
.pcard.gold .ic { color: var(--accent); margin-top: 2px; }
.pcard.warn .btn { margin-top: 10px; }
.ob-num { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.ob-num b { font-stretch: 80%; font-weight: 800; font-size: 44px; } .ob-num b span { font-variant-numeric: tabular-nums; }
.ob-num .iconbtn.lg { font-size: 28px; font-weight: 700; }
.ob-range { width: 100%; margin: 16px 0 4px; accent-color: var(--gold); height: 28px; }
.ob-opt.gold { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.ob-opt.gold b { display: flex; align-items: center; gap: 8px; } .ob-opt.gold span { color: var(--on-dark-2); }
.ob-opt.gold .ic { color: var(--gold); }
.ob-code { display: flex; gap: 8px; } .ob-code .code-input { margin: 0; height: 52px; font-size: 16px; } .ob-code .btn { flex: none; }

/* ---- Gate: in a phone browser only the install steps are shown. */
body.gate .top, body.gate main, body.gate .tabbar { display: none; }
.gate-done { padding-top: 26px; } .gate-done .inst-icon { margin: 0 auto; width: 76px; height: 76px; }

/* ---- Sub-tabs: every tab is split into clear sections. */
.subnav { position: sticky; top: calc(var(--safe-t) + 58px); z-index: 15; display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 6px; padding: 8px 16px; background: rgba(251,249,244,.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { flex: none; padding: 9px 15px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 800; font-size: 14px; color: var(--text-2); }
.subnav button.on { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.subnav button .lk { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; margin-left: 4px; opacity: .6; }
.sec { display: none; animation: obin .25s var(--ease); }
.sec.on { display: block; }
.sec > .h2:first-child { margin-top: 10px; }
/* Today: quick tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-align: left; min-height: 96px; }
.tile .ic { width: 22px; height: 22px; color: var(--accent); }
.tile b { font-size: 15px; line-height: 1.2; } .tile span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tile.dark { background: var(--dark); color: var(--on-dark); box-shadow: none; } .tile.dark .ic { color: var(--gold); } .tile.dark span { color: var(--on-dark-2); }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 4px; font-weight: 800; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 90; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--dark); color: var(--on-dark); font-size: 14px; font-weight: 700; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s; text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; } }

/* ==================================================================
   APP THEME: dark, modern, high contrast. (The website keeps its own look.)
   ================================================================== */
:root {
  --bg: #0d0e12; --surface: #1c1e25; --card: #16181e; --line: rgba(255,255,255,.08);
  --text: #f5f5f7; --text-2: #c8c9d0; --muted: #8d8f9a;
  --dark: #1f2130; --dark-2: #262938; --on-dark: #f5f5f7; --on-dark-2: #a9abb8;
  --gold: #ffb938; --gold-2: #ffc95c; --accent: #ffb938; --on-gold: #14110a;
  --violet: #8b7bff; --mint: #38d39f;
  --r: 18px;
  color-scheme: dark;
}
body { background: var(--bg); }
.top { background: rgba(13,14,18,.88); box-shadow: 0 1px 0 var(--line); }
.brand-mark { stroke: var(--gold); }
.streak-chip { background: linear-gradient(135deg, #ff8a3d, #ffb938); color: #14110a; }
.streak-chip svg { color: #14110a; }
.subnav, .sheet-page:not(.dark) .sheet-top { background: rgba(13,14,18,.92); }
.sheet-page.dark { background: #0d0e12; }
.tabbar { background: rgba(18,19,24,.96); box-shadow: 0 -1px 0 var(--line); height: calc(72px + var(--safe-b)); }
main { padding-bottom: calc(72px + var(--safe-b) + 28px); }
.tabbar button { gap: 4px; color: #6f717c; }
.tabbar button svg { width: 26px; height: 26px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; transition: background-color .2s; }
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { color: var(--on-gold); background: var(--gold); }
/* hero + cards */
.hero-card, .count-card, .protein-card, .result-hero { background: linear-gradient(140deg, #2b2450 0%, #1c1f33 60%, #16181e 100%); box-shadow: 0 0 0 1px rgba(139,123,255,.25) inset; }
.ring-bg { stroke: rgba(255,255,255,.08); }
.ring-fg { stroke: url(#g-gold) var(--gold); }
.items, .card-row, .pcard, .tile, .week-body, .profile-card, .ex, .opt, .ob-opt, .group, .stat, .chart, .habits, .p30-day, details.faq, .field, .inst-card, .ob-num, .ob-week, .code-input, .ob-input, .ob-time, .iconbtn, .chip, .btn-ghost, .wday, .subnav button {
  background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.tile { background: linear-gradient(160deg, #1d2029, #16181e); }
.tile.dark { background: linear-gradient(140deg, #3a2c6e, #1f2130); }
.tile .ic, .card-row > .ic:first-child, .block-head .ic, .prow .ic, .field-row .ic, .dolist .ic { color: var(--gold); }
.item { min-height: 62px; }
.item:active, .opt:active { background: var(--surface); }
.box { width: 30px; height: 30px; border-radius: 10px; box-shadow: 0 0 0 2px #3a3d48 inset; }
.item.done .box { background: linear-gradient(135deg, #38d39f, #20b37f); }
.box .tick { color: #0d0e12; }
.item.done .item-txt b { color: var(--muted); }
.new { background: var(--violet); color: #fff; }
.btn-primary { background: linear-gradient(135deg, #ffb938, #ff8a3d); color: #14110a; box-shadow: 0 10px 24px -12px rgba(255,138,61,.7); }
.btn { min-height: 54px; border-radius: 14px; }
.subnav button.on, .chip.on { background: var(--text); color: #0d0e12; }
.seg { background: var(--surface); }
.seg button[aria-checked=true] { background: var(--gold); color: #14110a; }
.tabs-wd { background: var(--surface); } .tabs-wd button.on { background: var(--gold); color: #14110a; }
.lock-card { background: linear-gradient(150deg, #241f3f, #16181e); box-shadow: 0 0 0 1px rgba(139,123,255,.3) inset; }
.lock-badge { background: rgba(139,123,255,.18); color: #b9afff; }
.week.done .week-dot { background: var(--mint); color: #0d0e12; }
.week.now .week-dot { background: var(--gold); color: #14110a; box-shadow: 0 0 0 4px rgba(255,185,56,.25); }
.week-dot, .dnum { background: var(--surface); color: var(--text-2); }
.cell { background: var(--surface); color: var(--muted); }
.cell.l1 { background: #3a3220; } .cell.l2 { background: #6b5520; color: var(--text); } .cell.l3 { background: #c9902b; color: #14110a; } .cell.l4 { background: var(--mint); color: #0d0e12; }
.cell.today { outline-color: var(--gold); }
.dots i { background: var(--surface); } .dots i.on { background: var(--mint); }
.stat.dark { background: linear-gradient(140deg, #2b2450, #1c1f33); }
.tier-pill { background: var(--surface); color: var(--text-2); }
.tier-pill.t-basic { background: rgba(56,160,255,.18); color: #7cc3ff; }
.tier-pill.t-pro { background: var(--gold); color: #14110a; }
.tier-pill.t-elite { background: var(--violet); color: #fff; }
.note, .pcard.gold, .levelup { background: rgba(255,185,56,.1); box-shadow: 0 0 0 1px rgba(255,185,56,.3) inset; }
.pcard.warn { background: rgba(255,120,80,.1); box-shadow: 0 0 0 1px rgba(255,120,80,.35) inset; }
.pcard.ok { background: rgba(56,211,159,.12); box-shadow: 0 0 0 1px rgba(56,211,159,.35) inset; }
.banner { background: linear-gradient(135deg, #3a2c6e, #1f2130); }
.eyebrow { color: var(--gold); }
.week-st, .meal span, .ex span { color: var(--gold); }
.field-row input, .field-row select, .unit input, .field input[type=time] { background: var(--surface); color: var(--text); }
.toast { background: var(--text); color: #0d0e12; }
.ob-opt.on, .opt.on { box-shadow: 0 0 0 2px var(--gold) inset; background: rgba(255,185,56,.08); }
.ob-opt.gold { background: linear-gradient(135deg, #3a2c6e, #1f2130); }
.ob-result { background: linear-gradient(140deg, #2b2450, #1c1f33); }
.ob-prog, .qbar, .pl-bar { background: var(--surface); }
.timeline li::after { background: var(--bg); }
.inst-dots i { background: var(--surface); }
.wday.today { box-shadow: 0 0 0 2px var(--gold) inset; }
.card-row.hl, .week.now .week-body, .p30-day.now, .ob-week.first { box-shadow: 0 0 0 2px var(--gold) inset; }
a.link-btn, .link-btn { color: var(--gold); }
.plan-card { margin-top: 14px; padding: 18px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.plan-card.best { box-shadow: 0 0 0 2px var(--gold) inset; }
.plan-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.plan-top b { font-stretch: 80%; font-weight: 800; font-size: 32px; }
.plan-card .dolist { margin-bottom: 14px; }
.plan-note { margin: -6px 0 12px; color: var(--gold); font-weight: 800; font-size: 14.5px; }

/* code box: the unlock code, always visible */
.code-box { margin: 14px 0; padding: 16px; border-radius: 16px; background: rgba(255,185,56,.08); box-shadow: 0 0 0 1px rgba(255,185,56,.35) inset; text-align: center; }
.code-big { display: block; margin: 6px 0 4px; font: 800 22px/1.25 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; color: #ffb938; word-break: break-all; user-select: all; -webkit-user-select: all; }
.code-box .note { margin: 0 0 12px; }


/* ================= v4: levels, badges, report, tour, reminders, leaderboard ================= */
.top .lvl-chip { margin-left: auto; margin-right: 8px; background: none; border: 0; padding: 0; cursor: pointer; }
.top .lvl-chip + .streak-chip { margin-left: 0; }
.lvl-mini { --p: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255,255,255,.1) 0); }
.lvl-mini b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--gold); font-weight: 900; font-size: 14px; }
.xp-float { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 24px); transform: translateX(-50%); z-index: 90; padding: 8px 16px; border-radius: 99px; background: linear-gradient(135deg, #ffd36b, #ff8a3d); color: #14110a; font-weight: 900; pointer-events: none; animation: xpUp 1.25s var(--ease) forwards; box-shadow: 0 10px 30px -8px rgba(255,138,61,.8); }
@keyframes xpUp { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.lvl-pop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(5,6,10,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; overflow: hidden; }
.lvl-pop.in { opacity: 1; }
.lvl-box { position: relative; width: 100%; max-width: 360px; text-align: center; padding: 30px 22px 22px; border-radius: 28px; background: radial-gradient(120% 80% at 50% 0%, #2b2450, #16181e 70%); box-shadow: 0 0 0 1px rgba(255,185,56,.35) inset, 0 30px 80px -20px rgba(255,138,61,.5); transform: scale(.7); transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
.lvl-pop.in .lvl-box { transform: scale(1); }
.lvl-box p { color: var(--muted); }
.lvl-btns { display: flex; gap: 10px; margin-top: 18px; } .lvl-btns .btn { flex: 1; }
.lvl-big { --p: 0; width: 150px; height: 150px; margin: 14px auto 6px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ffb938 calc(var(--p) * 360deg), rgba(255,255,255,.08) 0); box-shadow: 0 0 60px -10px rgba(255,170,60,.8); animation: spinIn .9s var(--ease); }
.lvl-big b { width: 122px; height: 122px; border-radius: 50%; display: grid; place-items: center; background: #14151b; font-size: 64px; font-weight: 900; background-clip: padding-box; color: var(--gold); }
@keyframes spinIn { from { transform: rotate(-200deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.badge-big { font-size: 92px; line-height: 1; margin: 16px 0 6px; animation: spinIn .8s var(--ease); filter: drop-shadow(0 10px 30px rgba(255,170,60,.6)); }
.cf { position: absolute; top: 40%; width: 10px; height: 14px; background: var(--c); border-radius: 2px; pointer-events: none; animation: cf var(--d) cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes cf { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(calc(var(--x) * 46vw), 70vh) rotate(var(--r)); opacity: 0; } }
.lvl-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 12px 0 6px; padding: 16px; border: 0; border-radius: var(--r); background: linear-gradient(135deg, rgba(139,123,255,.18), rgba(255,185,56,.12)); box-shadow: 0 0 0 1px rgba(255,185,56,.28) inset; color: var(--text); cursor: pointer; }
.lvl-ring { --p: 0; flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255,255,255,.1) 0); }
.lvl-ring b { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--gold); font-size: 24px; font-weight: 900; }
.lvl-info { flex: 1; min-width: 0; display: grid; gap: 4px; } .lvl-info b { font-size: 20px; font-weight: 900; } .lvl-info > span:last-child { color: var(--muted); font-size: 13px; }
.lvl-badges { display: flex; gap: 2px; font-size: 22px; }
.xpbar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; } .xpbar.big { height: 12px; }
.xpbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd36b, #ff8a3d); transition: width .8s var(--ease); }
.lvl-hero { text-align: center; padding: 6px 0 14px; } .lvl-hero .xpbar { margin: 14px 10% 6px; }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge { padding: 14px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; opacity: .55; display: grid; gap: 2px; }
.badge.on { opacity: 1; box-shadow: 0 0 0 1px rgba(255,185,56,.45) inset; background: linear-gradient(160deg, rgba(255,185,56,.12), var(--card)); }
.badge i { font-style: normal; font-size: 30px; } .badge b { font-size: 15px; } .badge span { color: var(--muted); font-size: 12.5px; }
.lvl-path { display: grid; gap: 6px; }
.lvl-path div { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--card); color: var(--muted); }
.lvl-path b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.lvl-path span { flex: 1; font-weight: 700; } .lvl-path small { font-size: 12px; }
.lvl-path .done { color: var(--text); } .lvl-path .done b { background: var(--gold); color: var(--on-gold); }
.lvl-path .cur { color: var(--text); box-shadow: 0 0 0 2px var(--gold) inset; } .lvl-path .cur b { background: var(--gold); color: var(--on-gold); }
.wbars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 6px; }
.wbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.wbar em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.wcol { flex: 1; width: 100%; display: flex; align-items: flex-end; border-radius: 8px; background: rgba(255,255,255,.05); overflow: hidden; }
.wcol i { width: 100%; border-radius: 8px; background: linear-gradient(180deg, rgba(255,185,56,.55), rgba(255,185,56,.25)); animation: grow .8s var(--ease) both; transform-origin: bottom; }
.wbar.cur .wcol i { background: linear-gradient(180deg, #ffd36b, #ff8a3d); }
.wbar span { font-size: 10px; color: var(--muted); white-space: nowrap; }
@keyframes grow { from { transform: scaleY(0); } }
.row-ic { font-size: 22px; width: 32px; text-align: center; flex: none; }
.field-row .row-ic + div { flex: 1; }
/* report */
.report .sheet-body { padding-bottom: 40px; }
.scan { min-height: 70vh; display: grid; align-content: center; gap: 26px; }
.scan-orb { width: 120px; height: 120px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255,185,56,.35), rgba(255,185,56,0) 70%); animation: pulse 1.2s ease-in-out infinite; }
.scan-orb svg { width: 70px; height: 70px; fill: none; stroke: #ffb938; stroke-width: 2.2; animation: spin 3s linear infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } } @keyframes spin { to { transform: rotate(360deg); } }
.scan-list { display: grid; gap: 12px; }
.scan-row { display: flex; align-items: center; gap: 12px; opacity: .25; transition: opacity .3s; font-weight: 700; }
.scan-row i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); flex: none; transition: all .3s; }
.scan-row.on { opacity: 1; } .scan-row.on i { background: #ffb938; border-color: #ffb938; box-shadow: 0 0 16px rgba(255,185,56,.8); }
.scan .xpbar i { width: 0; transition: width 2.9s linear; }
.rep-head { text-align: center; animation: fadeUp .6s var(--ease) both; }
.rep-score { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 6px; animation: fadeUp .6s .1s var(--ease) both; }
.rep-circle { width: 120px; height: 120px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: rgba(255,255,255,.06); box-shadow: 0 0 0 3px rgba(255,255,255,.12) inset; }
.rep-circle b { font-size: 46px; font-weight: 900; line-height: 1; } .rep-circle span { font-size: 12px; color: var(--muted); }
.rep-circle.pot { background: radial-gradient(circle, rgba(255,185,56,.25), rgba(255,185,56,.05)); box-shadow: 0 0 0 3px #ffb938 inset, 0 0 40px -6px rgba(255,170,60,.8); }
.rep-circle.pot b { color: #ffb938; }
.rep-arrow { font-size: 30px; color: #ffb938; animation: nudge 1s ease-in-out infinite; } @keyframes nudge { 50% { transform: translateX(6px); } }
.center { text-align: center; }
.rep-bars { display: grid; gap: 12px; margin: 18px 0; }
.rep-bar { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 10px; font-weight: 700; } .rep-bar b { text-align: right; }
.rep-bar .xpbar i { width: var(--w); animation: barIn 1.1s var(--ease) both; } @keyframes barIn { from { width: 0; } }
.rep-chart svg { width: 100%; height: auto; }
.rep-line { fill: none; stroke: #ffb938; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s .4s var(--ease) forwards; filter: drop-shadow(0 4px 10px rgba(255,170,60,.6)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.rep-dot { fill: #ffb938; opacity: 0; animation: fadeUp .4s 1.9s forwards; }
.rep-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 8px; }
.rep-focus { display: grid; gap: 10px; }
.rep-f { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.05); animation: fadeUp .5s var(--ease) both; }
.rep-f > b { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ffb938; color: #14110a; }
.rep-f strong { display: block; } .rep-f span { color: var(--muted); font-size: 14px; }
.rep-lvl { margin: 16px 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* tour */
.tour { position: fixed; inset: 0; z-index: 130; }
.tour-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(5,6,10,.78), 0 0 0 3px #ffb938, 0 0 30px 4px rgba(255,185,56,.6); transition: all .35s var(--ease); pointer-events: none; }
.tour-tip { position: fixed; left: 16px; right: 16px; max-width: 420px; margin: 0 auto; padding: 18px; border-radius: 20px; background: #1c1e25; box-shadow: 0 0 0 1px rgba(255,185,56,.4) inset, 0 20px 50px -10px #000; animation: fadeUp .35s var(--ease); }
.tour-tip p { margin: 6px 0 14px; font-size: 16px; line-height: 1.45; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; }
/* reminders, leaderboard, invite, share */
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; flex: none; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch:checked { background: #ffb938; } .switch:checked::after { transform: translateX(20px); }
.lb-join { display: flex; gap: 8px; margin-top: 10px; } .lb-join input { flex: 1; min-width: 0; }
.lb { display: grid; gap: 6px; margin: 12px 0; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.lb-row.me { box-shadow: 0 0 0 2px #ffb938 inset; background: linear-gradient(90deg, rgba(255,185,56,.14), var(--card)); }
.lb-r { width: 30px; text-align: center; font-weight: 900; } .lb-n { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-n i { font-style: normal; color: #ffb938; font-size: 12px; } .lb-l { color: var(--muted); font-size: 13px; } .lb-s { font-weight: 800; }
.loading { text-align: center; padding: 40px; color: var(--muted); }
.invite-hero { font-size: 80px; text-align: center; margin: 10px 0; animation: spinIn .8s var(--ease); }
.code-big.sm { font-size: 15px; }
.share-img { width: 100%; max-width: 360px; display: block; margin: 0 auto 16px; border-radius: 20px; box-shadow: 0 20px 50px -15px #000; }
.sheet-page.report { overflow-x: hidden; } .sheet-page .cf { position: fixed; }

/* ================= v5: exercise animations ================= */
.anim { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 95% at 50% 15%, #262a40 0%, #14151c 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 18px 40px -24px rgba(0,0,0,.8); }
.anim::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 40% at 50% 100%, rgba(255,185,56,.08), transparent 70%); pointer-events: none; }
.anim svg { display: block; width: 100%; height: auto; }
.anim-lab { position: absolute; left: 12px; bottom: 10px; padding: 5px 11px; border-radius: 99px; background: rgba(255,185,56,.16); box-shadow: inset 0 0 0 1px rgba(255,185,56,.35); color: #ffb938; font-weight: 800; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; opacity: 0; transition: opacity .2s; }
.anim-rep { position: absolute; right: 12px; bottom: 10px; color: rgba(255,255,255,.55); font-weight: 900; font-size: 13px; font-variant-numeric: tabular-nums; }
.anim-rep:not(:empty)::before { content: "× "; color: rgba(255,255,255,.3); }
.anim.sm { width: 92px; flex: none; border-radius: 14px; }
.ex.has-anim { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; }
.ex.has-anim .anim { grid-row: span 3; }
.pl-anim { width: 100%; max-width: 360px; margin: 0 auto 10px; }
.pl-anim .anim { border-radius: 26px; }

/* ================= v5: teaser before the paywall ================= */
.tz { position: relative; }
.tz-scan { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); font-weight: 700; animation: tzScan 1.6s ease forwards; }
.tz-scan i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,185,56,.25); border-top-color: #ffb938; animation: spin .8s linear infinite; }
@keyframes tzScan { 0%, 75% { opacity: 1; max-height: 40px; margin-bottom: 8px; } 100% { opacity: 0; max-height: 0; margin: 0; } }
.tz-body > * { animation: fadeUp .6s var(--ease) both; }
.tz-body > *:nth-child(1) { animation-delay: 1.3s; } .tz-body > *:nth-child(2) { animation-delay: 1.4s; } .tz-body > *:nth-child(3) { animation-delay: 1.55s; }
.tz-body > *:nth-child(4) { animation-delay: 1.75s; } .tz-body > *:nth-child(5) { animation-delay: 1.9s; } .tz-body > *:nth-child(6) { animation-delay: 2.05s; }
.tz-hero { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.tz-ring { --p: .4; width: 116px; height: 116px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--card) 80%, transparent 81% 100%), conic-gradient(#ff6b5a calc(var(--p) * 360deg), rgba(255,255,255,.08) 0); }
.tz-ring.pot { background: radial-gradient(closest-side, var(--card) 80%, transparent 81% 100%), conic-gradient(#ffb938 calc(var(--p) * 360deg), rgba(255,255,255,.08) 0); box-shadow: 0 0 40px -8px rgba(255,170,60,.7); }
.tz-ring b { font-size: 40px; font-weight: 900; line-height: 1; } .tz-ring.pot b { color: #ffb938; } .tz-ring span { font-size: 11.5px; color: var(--muted); }
.tz-arrow { font-size: 28px; color: #ffb938; animation: nudge 1s ease-in-out infinite; }
.tz-msg { text-align: center; font-size: 16px; line-height: 1.45; margin: 8px 0 16px; } .tz-msg b { color: var(--text); }
.tz-bars { display: grid; gap: 10px; }
.tz-bar { position: relative; display: grid; grid-template-columns: 86px 1fr 30px; gap: 10px; align-items: center; font-weight: 700; }
.tz-bar b { text-align: right; }
.tz-bar.locked .xpbar, .tz-bar.locked b { filter: blur(4px); opacity: .7; }
.tz-lock { display: inline-grid; place-items: center; color: #ffb938; }
.tz-bar .tz-lock { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; }
.tz-lock .ic { width: 16px; height: 16px; }
.tz-chart { position: relative; margin-top: 16px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.tz-chart svg { width: 100%; filter: blur(5px); opacity: .8; }
.tz-chart > .tz-lock { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,185,56,.16); }
.tz-chart > .tz-lock .ic { width: 20px; height: 20px; }
.tz-chart-lab { position: absolute; left: 14px; right: 14px; bottom: 10px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.tz-foot .btn .ic { margin-right: 6px; }
.tz-compact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,107,90,.12), rgba(255,185,56,.12)); box-shadow: inset 0 0 0 1px rgba(255,185,56,.3); }
.tz-compact p { margin: 0; font-size: 14px; line-height: 1.4; }
.tz-big { display: flex; align-items: center; gap: 6px; font-size: 26px; font-weight: 900; flex: none; } .tz-big .gold { color: #ffb938; } .tz-big .tz-arrow { font-size: 18px; }

/* ================= v5: progress photos ================= */
.pp-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 12px 0 4px; padding: 16px; border: 0; border-radius: var(--r); background: linear-gradient(135deg, rgba(56,211,159,.12), rgba(139,123,255,.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: var(--text); cursor: pointer; }
.pp-card > div { flex: 1; display: grid; gap: 2px; } .pp-card b { font-size: 17px; } .pp-card span { color: var(--muted); font-size: 13.5px; }
.ph-ic { font-size: 28px; }
.ba { --x: 50%; position: relative; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: #000; margin: 6px 0 10px; box-shadow: 0 20px 50px -20px #000; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-clip { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: #ffb938; box-shadow: 0 0 16px rgba(255,185,56,.8); pointer-events: none; }
.ba-line b { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #ffb938; color: #14110a; font-style: normal; font-size: 18px; }
.ba-tag { position: absolute; top: 12px; padding: 5px 10px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.ba-tag.l { left: 12px; } .ba-tag.r { right: 12px; color: #ffb938; }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.ba-pick label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ph-cell { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--card); cursor: pointer; }
.ph-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cell span { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700; }
.ph-full { width: 100%; border-radius: 18px; margin-bottom: 14px; }

/* ================= v5: polish ================= */
#view.enter > * { animation: fadeUp .42s var(--ease) both; }
#view.enter > *:nth-child(2) { animation-delay: .03s; } #view.enter > *:nth-child(3) { animation-delay: .06s; } #view.enter > *:nth-child(4) { animation-delay: .09s; } #view.enter > *:nth-child(5) { animation-delay: .12s; } #view.enter > *:nth-child(n+6) { animation-delay: .15s; }
.card-row, .pcard, .tile, .hero-card, .group, .lvl-card, .stat { background-image: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,0) 45%); }
.btn, .card-row, .tile, .item, .chip, .field-row, .lvl-card, .pp-card, .ob-opt { transition: transform .16s var(--ease), box-shadow .2s, background-color .2s; }
.btn:active, .card-row:active, .tile:active, .item:active, .chip:active, .lvl-card:active, .pp-card:active, .ob-opt:active { transform: scale(.975); }
.btn-primary { box-shadow: 0 12px 28px -14px rgba(255,170,60,.9); }
.top { backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.tabbar { backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); }
.tabbar button { position: relative; }
.tabbar button.on::after { content: ""; position: absolute; top: 4px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: #ffb938; box-shadow: 0 0 12px rgba(255,185,56,.9); }
.tabbar button.on svg { filter: drop-shadow(0 0 6px rgba(255,185,56,.55)); }
.item.done .box { animation: tickPop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes tickPop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.h1 { letter-spacing: -.01em; }
.sheet-page.in .sheet-body > * { animation: fadeUp .4s var(--ease) both; }

/* ================= v6: premium report dashboard ================= */
.rp > * { animation: fadeUp .55s var(--ease) both; }
.rp-head .h1 { font-size: 30px; margin-top: 4px; }
.rp-hero { display: flex; align-items: center; gap: 18px; margin: 14px 0 6px; padding: 18px; border-radius: 24px; background: radial-gradient(120% 120% at 0% 0%, rgba(139,123,255,.18), rgba(255,255,255,.03) 55%), rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.rp-ring { position: relative; width: 132px; height: 132px; flex: none; }
.rp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.rp-ring .bg { stroke: rgba(255,255,255,.08); }
.rp-ring .fg { stroke: url(#g-gold); stroke: #ffb938; filter: drop-shadow(0 0 8px rgba(255,170,60,.55)); animation: ringFill 1.5s .25s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes ringFill { to { stroke-dashoffset: var(--off); } }
.rp-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rp-ring b { font-size: 46px; font-weight: 900; line-height: 1; } .rp-ring span { font-size: 12px; color: var(--muted); }
.rp-side { flex: 1; min-width: 0; display: grid; gap: 8px; }
.rp-side p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.rp-chip { justify-self: start; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; font-style: normal; }
.rp-chip.low { background: rgba(255,107,90,.15); color: #ff8a7a; } .rp-chip.fair { background: rgba(255,185,56,.15); color: #ffc65c; } .rp-chip.good { background: rgba(56,211,159,.15); color: #4fe0ad; }
.rp-chip.sm { padding: 2px 7px; font-size: 10px; margin-left: auto; }
.rp-pot span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.rp-pot b { font-size: 30px; font-weight: 900; color: #ffb938; } .rp-pot em { font-style: normal; } .rp-pot i { font-style: normal; font-size: 13px; color: #4fe0ad; margin-left: 4px; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-card { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); display: grid; gap: 8px; animation: fadeUp .5s var(--ease) both; }
.rp-card-top { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-2); min-width: 0; }
.rp-card-top span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-card-top .ic { width: 16px; height: 16px; color: #ffb938; flex: none; }
.rp-card > b { font-size: 30px; font-weight: 900; line-height: 1; }
.rp-card.lvl > b { font-size: 20px; color: #ffb938; }
.rp-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.rp-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; animation: barIn 1.1s .4s var(--ease) both; }
.rp-bar.low i { background: linear-gradient(90deg, #ff6b5a, #ff8a7a); } .rp-bar.fair i { background: linear-gradient(90deg, #ffb938, #ffd36b); } .rp-bar.good i { background: linear-gradient(90deg, #2fc48f, #5ee8b5); }
.rp-chart { padding: 10px 8px 4px; border-radius: 20px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.rp-chart svg { width: 100%; display: block; overflow: visible; }
.rp-chart .g { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.rp-chart .ax { fill: var(--muted); font-size: 10px; font-weight: 600; }
.rp-chart .ln { fill: none; stroke: #ffb938; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.6s .3s var(--ease) forwards; filter: drop-shadow(0 3px 8px rgba(255,170,60,.5)); }
.rp-chart .area { opacity: 0; animation: fadeIn 1s 1s forwards; }
.rp-chart .now { fill: #fff; stroke: #ffb938; stroke-width: 3; }
.rp-chart .ms { opacity: 0; animation: fadeIn .5s forwards; } .rp-chart .ms circle { fill: #ffb938; stroke: #14151b; stroke-width: 2.5; } .rp-chart .ms text { fill: var(--text); font-size: 10.5px; font-weight: 800; }
@keyframes fadeIn { to { opacity: 1; } }
.rp-proto { display: grid; gap: 10px; }
.rp-step { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); animation: fadeUp .5s var(--ease) both; }
.rp-num { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #ffd36b, #ff8a3d); color: #14110a; font-weight: 900; }
.rp-step > div { flex: 1; min-width: 0; }
.rp-step-top { display: flex; align-items: center; gap: 8px; } .rp-step-top em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; color: #4fe0ad; text-transform: uppercase; letter-spacing: .05em; }
.rp-step p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.rp .btn-xl { margin-top: 18px; }
@media (max-width: 360px) { .rp-hero { flex-direction: column; text-align: center; } .rp-side { justify-items: center; } .rp-chip { justify-self: center; } }

/* ================= v6: training day badges (no more coloured dots) ================= */
.k-hiit, .k-pull, .k-legs, .k-push, .k-full, .k-rest, .k-recovery { background: rgba(255,185,56,.14) !important; color: #ffc65c !important; }
.daybadge { flex: none; min-width: 46px; display: grid; gap: 2px; justify-items: center; padding: 7px 6px; border-radius: 12px; background: rgba(255,185,56,.1); box-shadow: inset 0 0 0 1px rgba(255,185,56,.35); }
.daybadge b { font-size: 11.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #ffc65c; line-height: 1.15; }
.card-row.hl .daybadge { background: linear-gradient(135deg, #ffd36b, #ff8a3d); box-shadow: none; } .card-row.hl .daybadge b { color: #14110a; }
.wday { gap: 6px; }
.wday b { font-size: 11px; }
.wday.today { box-shadow: inset 0 0 0 2px #ffb938; }
.wday.rest { opacity: .55; }

/* ================= v6: looksmax ================= */
.lk-hero { padding: 18px; margin: 4px 0 14px; border-radius: 22px; background: radial-gradient(120% 120% at 100% 0%, rgba(255,185,56,.18), rgba(255,255,255,.03) 60%); box-shadow: inset 0 0 0 1px rgba(255,185,56,.25); }
.lk-hero .h1 { font-size: 26px; margin: 4px 0 6px; } .lk-hero p { margin: 0; color: var(--text-2); line-height: 1.45; }
.lk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lk-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 0; border-radius: 18px; text-align: left; color: var(--text); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); cursor: pointer; min-width: 0; }
.lk-card b { font-size: 16px; } .lk-card > span:not(.lk-ic) { color: var(--muted); font-size: 12.5px; line-height: 1.35; flex: 1; }
.lk-card em { display: flex; align-items: center; gap: 2px; font-style: normal; font-size: 12px; font-weight: 800; color: #ffb938; } .lk-card em .ic { width: 14px; height: 14px; }
.lk-ic { font-size: 26px; line-height: 1; } .lk-ic.big { font-size: 40px; }
.lk-myths { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 16px; border: 0; border-radius: 18px; text-align: left; color: var(--text); background: rgba(255,107,90,.1); box-shadow: inset 0 0 0 1px rgba(255,107,90,.35); cursor: pointer; }
.lk-myths > div { flex: 1; display: grid; gap: 3px; min-width: 0; } .lk-myths span:not(.lk-ic) { color: var(--muted); font-size: 13px; }
.lk-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; } .lk-top p { margin: 0; color: var(--text-2); line-height: 1.45; }
.lk-steps { display: grid; gap: 10px; margin-bottom: 14px; }
.lk-step { display: flex; gap: 12px; padding: 14px; border: 0; border-radius: 16px; text-align: left; color: var(--text); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); cursor: pointer; }
.lk-step > div { flex: 1; display: grid; gap: 3px; min-width: 0; } .lk-step span:not(.lk-n) { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.lk-step em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #ffb938; }
.lk-n { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 900; background: rgba(255,185,56,.14); color: #ffb938; }
.lk-step.done { box-shadow: inset 0 0 0 1.5px rgba(56,211,159,.55); background: rgba(56,211,159,.07); } .lk-step.done .lk-n { background: #38d39f; color: #0d0e12; } .lk-step.done .lk-n .ic { width: 16px; height: 16px; }
.lk-myth { padding: 16px; margin-bottom: 10px; border-radius: 18px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.lk-myth-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 8px; } .lk-myth-head b { font-size: 17px; }
.lk-myth dl { margin: 0; display: grid; gap: 4px; } .lk-myth dt { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.lk-myth dd { margin: 0; line-height: 1.45; font-size: 14px; } .lk-myth dt.ok { color: #4fe0ad; } .lk-myth dd.ok { color: var(--text); }
.rp-card-mid { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .rp-card-mid b { font-size: 30px; font-weight: 900; line-height: 1; } .rp-card-mid .rp-chip.sm { margin-left: 0; }

/* ================= v6: alignment fixes on phones ================= */
.field-row:has(.seg) { flex-wrap: wrap; row-gap: 10px; }
.field-row:has(.seg) > div:first-child { flex: 1 1 100%; }
.field-row:has(.seg) .seg { flex: 1 1 100%; width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.field-row:has(.seg) .seg button { min-width: 0; padding-left: 4px; padding-right: 4px; }
.field-row input[type=time], .field-row select, .field-row .unit { margin-left: auto; text-align: right; }
.subnav { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 24px; }
.btn { justify-content: center; text-align: center; }
.btn .ic { flex: none; }
.card-row > div, .field-row > div { min-width: 0; }
.card-row > .ic.end, .field-row > .ic:last-child { margin-left: auto; flex: none; }

.pcard + .inst-hero, .chips + .pcard + .inst-hero { margin-top: 16px; }
.rp-chip { white-space: nowrap; flex: none; }
