:root {
  --bg: #15121f;
  --bg2: #1b1728;
  --card: #221d33;
  --card2: #2b2541;
  --line: #3a3352;
  --ink: #f4f1fb;
  --muted: #9a93b3;
  --accent: #ff2d6f;
  --accent-2: #3fb6c6;
  --ok: #39d98a;
  --warn: #ffb648;
  --radius: 18px;
  --studio: linear-gradient(160deg, #eeecf3, #d6d2df);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: clip; overscroll-behavior-x: none; max-width: 100%; }
body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); position: relative; }
#app, .view, main { overflow-x: clip; }
h1, h2, h3 { margin: .5em 0 .35em; letter-spacing: -.01em; }
h1 { font-size: 1.8rem; font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
.title { font-weight: 850; font-style: italic; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
.link { color: var(--accent); font-weight: 700; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; justify-content: center; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 10px; }
.note { color: var(--accent-2); }
.warn { color: var(--warn); }
svg { display: block; }

/* header + nav */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(21, 18, 31, .9); backdrop-filter: blur(14px); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 1.15rem; box-shadow: 0 4px 16px rgba(255, 45, 111, .35); }
.plan-pill { border: 0; background: var(--card2); color: var(--ink); font: 800 .82rem var(--sans); letter-spacing: .08em; padding: 10px 16px; border-radius: 999px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.plan-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.plan-pill .caret { color: var(--muted); }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-around; background: rgba(27, 23, 40, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .7rem; color: var(--muted); padding: 4px 8px; min-width: 58px; font-weight: 600; }
.tabs a svg, .icon-btn svg, .btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn svg { width: 18px; height: 18px; }
.tabs a.on { color: var(--accent); }

.view { max-width: 760px; margin: 0 auto; padding: 6px 16px 24px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 14px 0; border: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 800; color: var(--accent); }
.eyebrow.hard { color: var(--warn); }

/* buttons */
.btn { appearance: none; border: 1px solid var(--line); background: var(--card2); color: var(--ink); border-radius: 14px; padding: 12px 16px; font: 700 .95rem var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(255, 45, 111, .3); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff7b8f; border-color: #5a2a3b; background: transparent; }
.btn.small { padding: 7px 12px; font-size: .84rem; min-height: 36px; border-radius: 11px; }
.btn.big { padding: 15px 20px; font-size: 1.05rem; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn[disabled] { opacity: .4; box-shadow: none; }
.icon-btn { border: 1px solid var(--line); background: var(--card2); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; flex: none; color: var(--ink); }
.icon-btn.plain { background: transparent; border: 0; }
.icon-btn.on { color: var(--accent); }
.icon-btn.small { width: 30px; height: 30px; font-size: .8rem; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.chips > *, .tabs a, .seg a { flex-shrink: 0; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip-btn { border: 1px solid var(--line); background: var(--card2); border-radius: 999px; padding: 9px 14px; font: 600 .88rem var(--sans); cursor: pointer; white-space: nowrap; color: var(--ink); }
.chip-btn.small { padding: 6px 11px; font-size: .8rem; }
.chip-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 11px; font-size: .78rem; font-weight: 700; border: 0; cursor: pointer; font-family: inherit; }
.chip-p { background: var(--accent); color: #fff; }
.chip-s { background: #4a2a3e; color: #ffb3c9; }
.chip-eq { background: #1f3a40; color: #9ee6ef; cursor: default; }
.chip-eq.missing { background: #46351a; color: var(--warn); }
.pill { font-size: .75rem; background: var(--card2); border-radius: 999px; padding: 3px 9px; vertical-align: middle; font-style: normal; }
.lbl { display: block; font-size: .74rem; font-weight: 800; margin: 16px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.input, .select, .search { border: 1px solid var(--line); background: var(--bg2); border-radius: 12px; padding: 11px 12px; font: 16px var(--sans); color: var(--ink); min-height: 44px; }
.input.wide, .select { width: 100%; }
.search { width: 100%; margin: 8px 0; }
.input:focus, .select:focus, .search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* banners */
.banner { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(135deg, #3a1630, #2a1b3f); border: 1px solid #5c2547; border-radius: 16px; padding: 14px 16px; margin: 10px 0; }
.banner b { color: #fff; }
.banner span { color: #e6c4d6; font-size: .9rem; }
.banner.calm { background: linear-gradient(135deg, #12343a, #1d2a3f); border-color: #245a62; }
.banner.calm span { color: #bfe3e8; }
.banner .link { align-self: flex-start; }

/* hero */
.hero { background: linear-gradient(180deg, #2a2240 0%, var(--card) 60%); border: 1px solid var(--line); border-radius: 22px; padding: 18px 16px; margin: 10px 0; }
.hero .title { font-size: 1.9rem; margin: .25em 0 .15em; }
.hero-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.hero-actions > :only-child { grid-column: 1 / -1; }
.makeup { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card2); border-radius: 14px; padding: 10px 12px; margin: 12px 0; }
.rec-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 6px; }
.rec { background: var(--card2); border-radius: 14px; padding: 8px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; border: 1px solid var(--line); }
.rec-icon { width: 52px; height: 62px; }
.rec-pct { position: absolute; top: 46px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.rec-pct.fresh { background: var(--ok); color: #0c2a1b; }
.rec-pct.sore { background: var(--warn); color: #3a2400; }
.rec-name { font-size: .72rem; color: var(--muted); margin-top: 12px; text-align: center; line-height: 1.15; }
.stats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat b { font-size: 2.6rem; font-weight: 850; font-style: italic; line-height: 1; }
.stat span { font-size: .66rem; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin-top: 6px; }

/* week */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0; }
.day { border: 1px solid var(--line); background: var(--card2); border-radius: 14px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-family: inherit; color: var(--ink); }
.day .dn { font-size: .7rem; color: var(--muted); font-weight: 800; }
.day .di { font-size: 1.15rem; }
.day.is-today { border: 2px solid var(--accent); }
.day.done { background: #173a2a; border-color: #2a6b4b; }
.day.done .di { color: var(--ok); font-weight: 800; }
.day.is-rest { opacity: .55; }
.week-card { padding: 12px 14px; margin: 10px 0; }
.week-card h3 { margin: 0 0 2px; }
.progress-bar { height: 6px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff6b9a); border-radius: 99px; transition: width .3s; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.q { border: 1px solid var(--line); background: var(--card2); border-radius: 14px; padding: 12px; text-align: left; font: 700 .88rem var(--sans); cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--ink); min-height: 50px; }
.q span { font-size: 1.2rem; }
.tipcard p { margin: 6px 0 0; font-size: 1.02rem; }
.score { display: flex; flex-direction: column; gap: 8px; }
.score-row { display: grid; grid-template-columns: 36px 1fr repeat(3, 58px); align-items: center; gap: 8px; background: var(--card2); border-radius: 14px; padding: 8px 10px; }
.score-row.me { outline: 2px solid var(--accent); }
.score-row > span:not(.avatar):not(.sname) { display: flex; flex-direction: column; align-items: center; }
.score-row b { font-size: 1.15rem; }
.score-row small { color: var(--muted); font-size: .66rem; }
.sname { font-weight: 700; }

/* avatars + who */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; border: 0; cursor: pointer; font-family: inherit; flex: none; }
.who-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.who-btn { display: flex; align-items: center; gap: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--ink); font: 700 1rem var(--sans); cursor: pointer; }
.who-btn.on { border-color: var(--accent); }

/* anatomy */
.anat-wrap { display: flex; justify-content: center; }
.anat-wrap svg { width: 100%; max-width: 380px; }
.anat-wrap.small svg { max-width: 260px; }
.anatomy .sil { fill: #4a4462; }
.anatomy .m { fill: #625b7f; stroke: #2a2540; stroke-width: 1.1; transition: fill .25s; }
.anatomy .m.p { fill: var(--accent); }
.anatomy .m.s { fill: #ff8fb0; }
.anatomy .m.heat { fill: color-mix(in srgb, var(--accent) calc(var(--h) * 100%), #625b7f); }
.anatomy.clickable .m, .anatomy.pickable .m { cursor: pointer; }
.anatomy.clickable .m:hover, .anatomy.pickable .m:hover { filter: brightness(1.25); }
.anatomy .eye { fill: #2a2540; }
.anatomy .an-label { font: 800 13px var(--sans); fill: var(--muted); text-anchor: middle; letter-spacing: .14em; }
.anatomy .badge rect { fill: #fff; }
.anatomy .badge text { font: 800 10px var(--sans); fill: #1b1728; text-anchor: middle; }
.anatomy .heart { fill: #ff4d6d; }
.heartbeat { transform-origin: 100px 115px; animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
.micon { width: 100%; height: 100%; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: .82rem; color: var(--muted); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg.p { background: var(--accent); }
.lg.s { background: #ff8fb0; }
.picker { background: linear-gradient(180deg, #2a2240, var(--card)); }
.picker h3 { margin-top: 0; }
.picker .anatomy .m:not(.p) { fill: #6d6690; }

/* figures (studio look) */
.fig { width: 100%; height: auto; }
.fig .ground { stroke: #b9b3c6; stroke-width: 2; }
.fig .pr-plate { fill: #26242b; stroke: #111; stroke-width: 1.5; }
.fig .pr-plate-ring { fill: none; stroke: #45424b; stroke-width: 2; }
.fig .pr-hub { fill: #c9c4d2; }
.fig .pr-hubdk { fill: #47434f; }
.fig .pr-db, .fig .pr-kb { fill: #2d2a33; }
.fig .pr-kbh { fill: none; stroke: #2d2a33; stroke-width: 3.5; }
.fig .pr-dbbar { fill: #a9a3b4; }
.fig .pr-pad { fill: #34303f; }
.fig .pr-padline { stroke: #34303f; stroke-width: 8; stroke-linecap: round; }
.fig .pr-frame { fill: #8e8999; }
.fig .pr-leg { stroke: #8e8999; stroke-width: 4; stroke-linecap: round; }
.fig .pr-box { fill: #b8b1c6; }
.fig .pr-rail { stroke: #3f3b47; stroke-width: 6; stroke-linecap: round; }
.fig .pr-post { stroke: #9d97a8; stroke-width: 6; fill: #9d97a8; }
.fig .pr-wall { fill: #c9c3d3; }
.fig .pr-band { stroke: var(--accent); stroke-width: 3.5; fill: none; stroke-linecap: round; }
.fig .pr-machine line, .fig .pr-mframe, .fig .pr-mpost { stroke: #5d5866; stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig .pr-deck { fill: #4a4652; }
.fig .pr-console { fill: #3a3642; }
.fig .pr-seat { fill: #2d2a33; }
.fig .pr-fly { fill: #3a3642; stroke: #5d5866; stroke-width: 3; }
.fig .pr-chain { stroke: #5d5866; stroke-width: 2; stroke-dasharray: 4 3; }

/* lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.ex-row + .ex-row { border-top: 1px solid var(--line); padding-top: 10px; }
.ex-row.missing { opacity: .65; }
.thumb { width: 72px; height: 72px; flex: none; background: var(--studio); border-radius: 14px; position: relative; overflow: hidden; display: grid; place-items: center; }
.thumb .fig { width: 100%; }
.mtile { width: 46px; height: 66px; flex: none; background: var(--card2); border-radius: 12px; padding: 4px 3px; }
.ex-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ex-info b { font-size: 1rem; }
.list-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.list-item > span:first-child:not(.li-icon), .list-item > span:nth-child(2) { flex: 1; }
.li-icon { font-size: 1.4rem; }
.chev { color: var(--muted); font-size: 1.4rem; }
.price { color: var(--accent-2); font-weight: 800; white-space: nowrap; }
.block h3 { margin-top: 20px; }
.block .list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 12px; gap: 0; }
.title-input { font: italic 850 1.75rem/1.12 var(--sans); letter-spacing: -.02em; margin: 8px 0 4px; color: var(--ink); overflow-wrap: anywhere; text-wrap: balance; outline: none; }
.title-input:focus { box-shadow: 0 2px 0 var(--accent); }
.rec-label { font-size: .72rem; color: var(--muted); font-weight: 700; margin-top: 10px; }
.sticky-actions { position: fixed; left: 50%; transform: translateX(-50%); width: min(728px, calc(100% - 24px)); bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 25; display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; padding: 10px; background: #1b1728; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0, 0, 0, .4); }
.view:has(.sticky-actions) { padding-bottom: 110px; }

/* segmented */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card2); border-radius: 14px; padding: 4px; margin: 8px 0; }
.seg a { text-align: center; padding: 10px; border-radius: 11px; font-weight: 800; color: var(--muted); }
.seg a.on { background: var(--accent); color: #fff; }

/* library */
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; margin-top: 10px; }
.ex-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.ex-card.locked .ex-fig { opacity: .7; }
.ex-card.locked b { color: var(--muted); }
.lockbadge { position: absolute; left: 6px; bottom: 6px; right: 6px; background: rgba(21, 18, 31, .85); color: #fff; font-size: .64rem; font-weight: 700; padding: 3px 7px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-card b { font-size: .92rem; line-height: 1.25; padding: 0 2px; }
.ex-card .muted { padding: 0 2px; }
.ex-fig { background: var(--studio); border-radius: 12px; position: relative; }
.vbadge { position: absolute; top: 6px; right: 6px; background: rgba(21, 18, 31, .8); color: #fff; font-size: .66rem; font-weight: 800; padding: 3px 7px; border-radius: 99px; }
.tag { white-space: nowrap; align-self: flex-start; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; border-radius: 6px; padding: 3px 7px; background: var(--card2); color: var(--muted); margin: 2px; }
.tag-cardio, .tag-hiit { background: #3d1b2b; color: #ff9ab8; }
.tag-mobility { background: #173a40; color: #9ee6ef; }
.tag-core { background: #3a3117; color: #ffd27a; }

/* exercise detail */
.media { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin: 12px 0; align-items: center; }
.media.single { grid-template-columns: 1fr; max-width: 380px; margin-inline: auto; }
.video-thumb { position: relative; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; cursor: pointer; width: 100%; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.vplay { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.vplay svg { width: 64px; height: 64px; fill: none; stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5)); }
.vplay svg path { fill: var(--accent); stroke: none; }
.vlabel { position: absolute; left: 10px; bottom: 8px; color: #fff; font-weight: 800; font-size: .8rem; text-shadow: 0 1px 4px #000; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; width: 100%; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.anim-hero { background: var(--studio); border-radius: 16px; display: grid; place-items: center; }
.steps { padding-left: 0; list-style: none; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.steps.pics li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; background: var(--card2); border-radius: 16px; padding: 8px; }
.steps.pics.compact li { grid-template-columns: 84px 1fr; }
.step-fig { background: var(--studio); border-radius: 12px; position: relative; }
.snum { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .78rem; }
.steps p { margin: 0; line-height: 1.45; }
.tips ul { margin: 0 0 10px; padding-left: 20px; line-height: 1.5; }
.tipgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tipgrid > div { background: var(--card2); border-radius: 14px; padding: 12px; }
.tipgrid p, .tipgrid ul { margin: 6px 0 0; font-size: .92rem; }
.tipgrid ul { padding-left: 18px; }
.eh { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eh > div { background: var(--card2); border-radius: 14px; padding: 12px; }
.eh p { margin: 6px 0 0; }
.mlinks { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mlink { background: var(--card2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }

/* muscles */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.mcard { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.mc-icon { width: 46px; height: 64px; flex: none; }
.mc-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mc-pct { font-weight: 850; font-style: italic; font-size: 1.2rem; }
.bar { display: block; height: 6px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar i.fresh { background: var(--ok); }
.bar i.sore { background: var(--warn); }
.rec-big { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 12px; }
.mdesc { display: grid; gap: 14px; }
.mdesc p { margin: 4px 0 0; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ex-mini { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
.ex-mini.locked { opacity: .55; }
.mini-fig { background: var(--studio); border-radius: 10px; }

/* gym */
.gym-sum { display: flex; align-items: center; gap: 16px; }
.ring-stat { --pct: 0; width: 96px; height: 96px; flex: none; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--pct) * 360deg), var(--card2) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.ring-stat::before { content: ''; position: absolute; inset: 9px; background: var(--card); border-radius: 50%; }
.ring-stat b, .ring-stat span { position: relative; }
.ring-stat b { font-size: 1.7rem; font-weight: 850; font-style: italic; line-height: 1; }
.ring-stat span { font-size: .72rem; color: var(--muted); }
.equip { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.eq { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; cursor: pointer; background: var(--card); }
.eq-name { font-weight: 700; font-size: .92rem; }
.eq-check { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--card2); color: var(--muted); }
.eq.on { border-color: var(--accent); background: #2e1a31; }
.eq.on .eq-check { background: var(--accent); color: #fff; }
.eq.fixed { cursor: default; }
.buy-list { display: flex; flex-direction: column; gap: 10px; }
.buy { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; position: relative; }
.buy.first { border: 2px solid var(--accent); background: linear-gradient(180deg, #2e1a33, var(--card)); }
.buy p { margin: 6px 0; }
.best { display: inline-block; font-size: .66rem; font-weight: 900; letter-spacing: .1em; color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 6px; margin-bottom: 8px; }
.unlock { color: var(--ok); font-weight: 800; font-size: .85rem; }

/* gear + shopping */
.eq-wrap { display: flex; flex-direction: column; gap: 4px; }
.eq-wrap .eq { flex: 1; }
.eq-edit { border: 0; background: none; color: var(--accent-2); font: 700 .8rem var(--sans); text-align: left; padding: 2px 4px; cursor: pointer; }
.buy-top { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; margin: 6px 0; }
.buy-art { background: var(--studio); border-radius: 14px; padding: 6px; }
.gear-art { width: 100%; height: auto; }
.unlock-list { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.ul-ex { flex: none; width: 92px; display: flex; flex-direction: column; gap: 4px; font-size: .72rem; line-height: 1.2; color: var(--ink); }
.ul-fig { background: var(--studio); border-radius: 10px; display: block; }
.brands { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.brand { font-size: .78rem; font-weight: 700; background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.brand.used { color: var(--ok); border-color: #2a6b4b; }
.seg.mini { width: 110px; margin: 0; }
.seg.mini a { padding: 6px; }
.sheet label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); flex: 1; }
.sheet label .input { width: 100%; }
select.wsel { width: 84px; text-align: center; appearance: none; -webkit-appearance: none; padding: 8px; }

/* goals + bonus */
.bonus { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.bonus-btn { display: flex; gap: 12px; align-items: center; text-align: left; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--ink); font: inherit; cursor: pointer; }
.bonus-btn > span:first-child { font-size: 1.5rem; }
.goal-list { display: flex; flex-direction: column; gap: 8px; }
.goal-card { display: flex; align-items: center; gap: 12px; background: var(--card2); border-radius: 14px; padding: 12px; }
.card.goal-card { background: var(--card); }
.goal-card.won { outline: 2px solid var(--ok); }
.g-icon { font-size: 1.7rem; flex: none; }
.g-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.stage.cur { border-color: var(--accent); }
.stage.done { opacity: .6; }
.st-n { width: 32px; height: 32px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-weight: 850; flex: none; }
.stage.cur .st-n { background: var(--accent); color: #fff; }
.stage.done .st-n { background: var(--ok); color: #0c2a1b; }
.goal-after { text-align: center; }
.goal-after .row { justify-content: center; }
.big-time { font-size: 2.4rem; font-style: italic; }

/* progress */
.chart { margin: 10px 0; }
.wchart { width: 100%; height: auto; }
.wchart .wline { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.wchart .wdot { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.wchart .axis { font: 10px var(--sans); fill: var(--muted); }
.wchart .gridline { stroke: var(--line); stroke-width: 1; }
.wchart .goal-line { stroke: var(--accent-2); stroke-dasharray: 5 4; stroke-width: 1.6; }
.wchart .goal-txt { fill: var(--accent-2); font-weight: 700; }
.stats4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin: 10px 0; }
.stats4 > div { background: var(--card2); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; }
.stats4 span { font-size: .72rem; color: var(--muted); }
.stats4 b { font-size: 1.15rem; font-weight: 850; font-style: italic; }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; color: var(--accent-2); padding: 8px 0; }
.entries { list-style: none; padding: 0; margin: 6px 0; }
.entries li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.entries li span:first-child { flex: 1; }
#wform .input { flex: 1; }

/* year plan */
.hero input[type=date] { width: 100%; margin-bottom: 12px; }
.yr-line { display: flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--accent-2); margin: 2px 0 8px; }
.yr-line .chev { font-size: 1.1rem; margin-left: auto; }
.yr-card { display: flex; align-items: center; gap: 12px; }
.yr-card > span:nth-child(2) { flex: 1; }
.yr-lock { background: var(--card2); border-radius: 12px; padding: 10px 12px; margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.ph-icon { font-size: 1.5rem; flex: none; }
.ystrip { display: grid; grid-template-columns: repeat(26, 1fr); gap: 3px; margin: 10px 0; }
.ys { display: inline-block; height: 18px; border-radius: 4px; background: var(--card2); position: relative; }
.ys.past { opacity: .45; }
.ys.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.ys.easy { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0 3px, transparent 3px 6px); }
.ph-foundation { --pc: #6e6a8a; } .ph-build { --pc: #3fb6c6; } .ph-strength { --pc: #ff2d6f; } .ph-engine { --pc: #ffb648; }
.ph-muscle, .ph-push { --pc: #b06bff; } .ph-peak { --pc: #ff5a36; } .ph-finish { --pc: #39d98a; }
.ys[class*="ph-"] { background-color: var(--pc); }
.ylegend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .74rem; color: var(--muted); }
.ylegend span { display: inline-flex; align-items: center; gap: 5px; }
.ylegend i.ys { width: 12px; height: 12px; }
.ylegend i.ys.easy { background-color: var(--card2); }
.how { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.phase-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: 16px; padding: 4px 12px; margin: 10px 0; }
.phase-card summary { display: flex; align-items: center; gap: 10px; list-style: none; color: var(--ink); padding: 10px 0; }
.phase-card summary::-webkit-details-marker { display: none; }
.ph-head { display: flex; flex-direction: column; }
.ph-why { margin: 0 0 8px; color: var(--muted); }
.yweek { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.yweek.cur { background: rgba(255, 45, 111, .1); margin: 0 -12px; padding: 9px 12px; border-left: 3px solid var(--accent); }
.yweek.past { opacity: .55; }
.yw-n { width: 42px; flex: none; display: flex; flex-direction: column; align-items: center; }
.yw-n b { font-size: 1.2rem; font-weight: 850; font-style: italic; }
.yw-n span { font-size: .66rem; color: var(--muted); }
.yw-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.yw-top { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.yw-icons { font-size: 1rem; letter-spacing: 2px; }
.yw-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ytag { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; }
.ytag.y-easy { background: #12343a; color: #9ee6ef; }
.ytag.y-check { background: #3a3117; color: #ffd27a; }
.ytag.y-up { background: var(--accent); color: #fff; }

/* settings */
.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 10px; }
.person span { flex: 1; font-weight: 700; }
.person.on span::after { content: ' · active'; color: var(--muted); font-weight: 400; font-size: .85rem; }
#addp .input { flex: 1; }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(8, 6, 14, .7); display: grid; place-items: center; z-index: 60; padding: 18px; backdrop-filter: blur(4px); }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; width: min(380px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.sheet.wide { width: min(720px, 100%); display: flex; flex-direction: column; gap: 12px; }
.sheet.center { text-align: center; }
.sheet-msg { font-size: 1.05rem; margin: 4px 0 18px; }
.sheet .row.gap .btn { flex: 1; }
.rest-tip { background: var(--card2); border-radius: 12px; padding: 10px; text-align: left; }

/* player */
body:has(.player-wrap) { padding-bottom: 0; }
.player-wrap { min-height: 100vh; }
.player { max-width: 620px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 110px; }
.p-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.player .ex-name { margin: 6px 0 4px; font-size: 1.6rem; font-weight: 850; font-style: italic; }
.p-fig { max-width: 300px; margin: 6px auto; background: var(--studio); border-radius: 20px; }
.p-media { margin: 8px 0; }
.target { text-align: center; font-weight: 800; font-size: 1.05rem; margin: 12px 0; color: var(--accent-2); }
.prog-hint { background: #173a2a; color: #bdf3d6; border-radius: 12px; padding: 10px 12px; margin: 8px 0; text-align: center; font-size: .92rem; }
.prog-hint.calm { background: #12343a; color: #bfe3e8; }
.sets { display: flex; flex-direction: column; gap: 8px; }
.set { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.set.done { background: #173a2a; border-color: #2a6b4b; }
.set .sn { font-weight: 850; width: 26px; text-align: center; color: var(--muted); }
.set .input { width: 78px; text-align: center; padding: 8px; }
.check { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: var(--card2); font-size: 1.3rem; color: #fff; cursor: pointer; flex: none; }
.set.done .check { background: var(--ok); border-color: var(--ok); color: #0c2a1b; font-weight: 900; }
.ring { --pct: 1; width: 160px; height: 160px; border-radius: 50%; margin: 12px auto; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--pct) * 360deg), var(--card2) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; font-size: 2.5rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.ring.big { width: 180px; height: 180px; }
.phase { text-align: center; font-weight: 900; font-size: 1.4rem; letter-spacing: .06em; }
.phase.work { color: var(--accent); }
.phase.easy { color: var(--accent-2); }
.howto { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 12px 12px; margin-top: 14px; }
.p-nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(21, 18, 31, .96); border-top: 1px solid var(--line); max-width: 620px; margin: 0 auto; }
.p-nav .btn { flex: 1; padding: 15px; font-size: 1.05rem; }
.done-screen .confetti { font-size: 4rem; text-align: center; margin-top: 30px; animation: pop .6s ease; }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* gym mode — big everything */
body.gym-mode .player .ex-name { font-size: 2.2rem; }
body.gym-mode .player .target { font-size: 1.35rem; }
body.gym-mode .p-fig { max-width: 360px; }
body.gym-mode .ring, body.gym-mode .ring.big { width: 240px; height: 240px; }
body.gym-mode .ring span { font-size: 3.6rem; }
body.gym-mode .p-nav .btn { padding: 22px; font-size: 1.35rem; border-radius: 18px; }
body.gym-mode .set { padding: 12px; }
body.gym-mode .set .input { width: 96px; font-size: 1.3rem; min-height: 54px; }
body.gym-mode .check { width: 62px; height: 62px; font-size: 1.7rem; }
body.gym-mode .player .btn.big { padding: 20px 28px; font-size: 1.3rem; }
body.gym-mode .player { padding-bottom: 140px; }

.toast { position: fixed; left: 50%; max-width: calc(100vw - 32px); text-align: center; bottom: 100px; transform: translate(-50%, 20px); background: #fff; color: #15121f; font-weight: 700; padding: 11px 18px; border-radius: 14px; opacity: 0; transition: all .25s; z-index: 80; font-size: .92rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.pad { padding: 20px; }

@media (max-width: 520px) {
  h1 { font-size: 1.6rem; }
  .hero .title { font-size: 1.6rem; }
  .media { grid-template-columns: 1fr; }
  .anim-hero { max-width: 300px; margin: 0 auto; width: 100%; }
  .steps.pics li { grid-template-columns: 96px 1fr; }
  .score-row { grid-template-columns: 34px 1fr repeat(3, 46px); }
  .eh { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .heartbeat { animation: none; } }
