:root {
  --bg: #fffaf5; --card: #fff; --ink: #1b1b2f; --muted: #7a7486; --line: #efe7de;
  --ink2: #4b4658; --muted2: #a8a0b3; --track: #ece5dc; --soft: #faf7f3; --soft2: #f1ebe4; --tint: #fff1e6; --tint-line: #ffc9a3;
  --sel-bg: #eef5ff; --sel-ink: #1d4ed8; --sel-line: #93c5fd; --locked: #e7e1da; --locked-d: #cfc7be; --locked-ink: #b3aba2;
  --topbar: rgba(255, 250, 245, .94); --veil: rgba(255, 250, 245, .55); --tip: #1b1b2f;
  --ok-bg: #effaf2; --ok-line: #bbf7d0; --ok-ink: #166534; --warn-bg: #fff7e6; --warn-line: #fde3a7; --warn-ink: #8a5a00;
  --pur-bg: #f5f3ff; --pur-line: #ddd6fe; --pur-ink: #5b21b6; --pur-bg2: #ede9fe; --gold-bg: #fef3c7; --gold-line: #fde68a; --gold-ink: #a16207;
  color-scheme: light;
  --accent: #ff6a00; --accent-d: #cc4a00; --accent-hi: #ffa21f; --blue: #3b82f6; --ok: #16a34a; --bad: #e11d48;
  --r: 18px; --tab-h: 68px;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2 { margin: .2em 0; line-height: 1.15; }
h1 { font-size: 1.7rem; font-weight: 900; }
h2 { font-size: 1.25rem; font-weight: 800; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.pad { padding: 0 18px; } .title { padding: 6px 18px 0; }
#view { max-width: 560px; margin: 0 auto; padding-bottom: 24px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; gap: 6px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--topbar); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.chip { display: flex; align-items: center; gap: 5px; font-size: 1.05rem; padding: 4px 8px; border-radius: 12px; }
.chip b { font-weight: 900; }

/* cards */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 12px 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row + .row { margin-top: 10px; }
/* Progress bars: chunky and glossy; growth slides smoothly and gets one soft shine. */
.bar { position: relative; height: 14px; background: var(--track); border-radius: 99px; flex: 1; overflow: hidden; }
.bar i { position: relative; display: block; height: 100%; background: var(--fill, var(--accent)); border-radius: 99px;
  transition: width .65s cubic-bezier(.22, .9, .3, 1); } /* no overshoot: the fill never pokes past the end */
.bar i::after { content: ""; position: absolute; left: 7px; right: 7px; top: 3px; height: 28%; min-height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .38); }
.bar i[style*="width:0%"]::after { display: none; }
.bar.big { height: 18px; }
.bar.ok i { --fill: var(--ok); }
.bar.lv { margin: 8px 0 2px; } .bar.lv i { --fill: linear-gradient(90deg, #facc15, var(--accent)); }
.bar.combo i { --fill: repeating-linear-gradient(90deg, #ffb21a 0, #ff5a1a 90px, #ffb21a 180px); animation: shimmer 1.6s linear infinite; }
.bar.combo i.grew { animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 0 0; } to { background-position: 180px 0; } } /* one full pattern: seamless loop */
.lesson-top { position: relative; }
.combo-tag { position: absolute; right: 0; top: 40px; font-weight: 900; font-size: .8rem; color: #ff6a00; background: var(--tint); border: 2px solid var(--tint-line); padding: 2px 9px; border-radius: 99px; animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.combo-tag.hot { color: #fff; background: linear-gradient(90deg, #ff9f1a, #ff4d1a); border-color: #ff7a1a; }

.weekdots { display: flex; justify-content: space-between; margin: 12px 0 6px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wd span { width: 34px; height: 34px; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; font-weight: 900; color: #fff; }
.wd.on span { background: var(--accent); box-shadow: 0 3px 0 var(--accent-d); }
.wd.today span { outline: 3px solid var(--tint-line); }
.wd small { color: var(--muted); font-weight: 700; }

.quest { display: grid; grid-template-columns: 1fr; gap: 4px; margin-top: 12px; font-weight: 700; }
.quest small { color: var(--muted); }
.quest.claimed { opacity: .6; } .quest.claimed .bar i { background: var(--ok); }

/* path */
.unit { margin: 22px 0 10px; }
.unit-head { margin: 0 14px; border-radius: var(--r); color: #fff; padding: 14px 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.unit-head small { font-weight: 900; opacity: .85; letter-spacing: .06em; }
.unit-head p { margin: 2px 0 0; opacity: .92; }
.nodes { display: flex; flex-direction: column; align-items: center; padding: 26px 0 6px; gap: 18px; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.node { width: 74px; height: 70px; border-radius: 50%; font-size: 1.7rem; font-weight: 900; color: #fff;
  background: var(--c); box-shadow: 0 7px 0 rgba(0, 0, 0, .22); transition: transform .08s; }
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.node.locked { background: var(--locked); color: var(--locked-ink); box-shadow: 0 7px 0 var(--locked-d); }
.node.done { filter: saturate(.85); }
.node.chest { background: #facc15; box-shadow: 0 7px 0 #ca8a04; }
.node.chest.locked { background: var(--locked); box-shadow: 0 7px 0 var(--locked-d); }
.node.check { width: 86px; height: 82px; background: linear-gradient(#fbbf24, #f59e0b); box-shadow: 0 7px 0 #b45309; }
.node.check.locked { background: var(--locked); box-shadow: 0 7px 0 var(--locked-d); }
.node.current { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { outline: 0 solid rgba(255, 122, 26, .0); } 50% { outline: 10px solid rgba(255, 122, 26, .22); } }
.start-tag { position: absolute; top: -34px; white-space: nowrap; background: var(--card); border: 2px solid var(--line); color: var(--accent);
  font-weight: 900; font-size: .8rem; padding: 4px 10px; border-radius: 12px; animation: bob 1.4s ease-in-out infinite; z-index: 1; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.path-mascot { position: relative; height: 0; margin: -13px 0; z-index: 1; pointer-events: none; } /* floats beside the path: takes no space, so node spacing stays even */
.path-mascot > svg { position: absolute; left: 50%; top: 0; translate: calc(-50% + var(--mx, 0px)) -50%; pointer-events: auto; }
.path-end { padding: 20px 14px 10px; }

/* mascot + speech */
.say { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.say .bell { flex: none; }
.bubble { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; font-weight: 700; line-height: 1.35; }
.bubble::before { content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; background: var(--card);
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translateY(-50%) rotate(45deg); }
/* Bell: idle life. Delays use a page-wide clock (--t) so re-rendered copies keep the same breathing/blink phase. */
.bell { overflow: visible; cursor: pointer; -webkit-user-select: none; user-select: none; }
.bell .b-body { transform-box: view-box; transform-origin: 60px 127px; animation: breathe 3.2s ease-in-out infinite; animation-delay: calc(var(--t) * -1s - var(--o) * 1s); }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.985, 1.03); } }
.bell .b-shadow { transform-box: view-box; transform-origin: 60px 127px; animation: shadow 3.2s ease-in-out infinite; animation-delay: calc(var(--t) * -1s - var(--o) * 1s); }
@keyframes shadow { 50% { transform: scaleX(.94); } }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 35% { transform: translateY(-8px) scale(.96, 1.05) rotate(-2deg); } 60% { transform: translateY(-2px) scale(1, 1) rotate(2deg); } 85% { transform: translateY(0) scale(1.05, .95); } }
@keyframes hopshadow { 35% { transform: scaleX(.75); opacity: .05; } }
.bell.m-sad .b-body { animation-duration: 4.6s; }
.bell.m-sleepy .b-body { animation-duration: 5s; }
.bell .b-blink { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: blink 5.3s infinite; animation-delay: calc(var(--t) * -1s - var(--o) * 1.7s); }
@keyframes blink { 0%, 56%, 61%, 93%, 100% { transform: scaleY(0); } 58%, 95.5% { transform: scaleY(1); } }
.bell.m-sleepy .b-blink { animation-duration: 3.2s; }
.bell .b-look { transition: transform .18s ease-out; animation: look 9s ease-in-out infinite; animation-delay: calc(var(--t) * -1s - var(--o) * 2.3s); }
@keyframes look { 0%, 18% { transform: translate(0, 0); } 22%, 34% { transform: translate(-2.6px, .6px); } 38%, 55% { transform: translate(0, 0); } 59%, 70% { transform: translate(2.6px, -1px); } 74%, 100% { transform: translate(0, 0); } }
.bell.tracking .b-look { animation: none; transform: translate(var(--lx, 0px), var(--ly, 0px)); }
.bell .b-pmood { transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.bell .b-lid { transition: height .3s ease; }
.bell .b-brow { transition: d .38s cubic-bezier(.3, 1.35, .5, 1); }
.bell .b-o, .bell .b-oclip { transition: d .3s ease-in-out; }
.bell.talking .b-o, .bell.talking .b-oclip { transition: none; }
.bell .b-z { font: 900 16px ui-rounded, system-ui, sans-serif; fill: #5b3416; opacity: 0; }
.bell.m-sleepy .b-z { animation: zz 2.4s ease-out infinite; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 6px); } 30% { opacity: .85; } 100% { opacity: 0; transform: translate(9px, -16px); } }
.bell.react .b-body { animation: reacthop .65s ease-out; }
@keyframes reacthop { 0% { transform: scale(1); } 30% { transform: translateY(-11px) scale(.95, 1.07) rotate(-5deg); } 60% { transform: translateY(0) scale(1.08, .9); } 80% { transform: scale(.98, 1.03); } 100% { transform: scale(1); } }
.bell.boop .b-body { animation: boop .5s ease-out; }
@keyframes boop { 0% { transform: scale(1); } 22% { transform: scale(1.14, .82); } 50% { transform: scale(.93, 1.09); } 75% { transform: scale(1.03, .97); } 100% { transform: scale(1); } }
.bubble { transform-origin: left center; }
.bubble.pop { animation: pop .25s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.bubble.typing::after { content: "\200b"; } /* keeps one line of height while the bubble is still empty */

/* tab bar */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 2px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted2); font-size: .72rem; font-weight: 800; }
.tab.on { color: var(--accent); }
.tab.on svg { background: var(--tint); border: 2px solid var(--tint-line); border-radius: 12px; padding: 2px; width: 34px; height: 34px; }

/* buttons */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 13px 18px; border-radius: 16px; font-weight: 900;
  background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); text-transform: uppercase; letter-spacing: .03em; font-size: .95rem; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 0 var(--accent-d); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); box-shadow: 0 4px 0 #9f1239; }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; font-size: .8rem; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn:disabled { background: var(--locked); color: var(--locked-ink); border-color: var(--locked); box-shadow: 0 4px 0 var(--locked-d); }
.btn.stop { background: var(--bad); border-color: var(--bad); box-shadow: 0 4px 0 #9f1239; }
.link { display: block; width: 100%; padding: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: .85rem; }

/* full-screen flows */
#overlay { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; }
.screen { min-height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom)); }
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; }
.x { font-size: 1.4rem; color: var(--muted); padding: 6px 8px; font-weight: 900; }
.ob-body { flex: 1; padding-top: 8px; }
.foot { padding-top: 10px; }
.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px 6px; }
.welcome h1 { font-size: 2.4rem; color: var(--accent); }
.welcome p { font-weight: 700; line-height: 1.4; }
.welcome .bar { width: 80%; flex: none; }
.fill-anim { width: 0; animation: fill 1.7s ease-out forwards; }
@keyframes fill { to { width: 100%; } }

.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.opt { text-align: left; padding: 15px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.opt.sel { border-color: var(--blue); background: var(--sel-bg); color: var(--sel-ink); box-shadow: 0 3px 0 var(--sel-line); }
.opts.fb .opt { font-size: 1.15rem; text-align: center; }
.field { width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; font: inherit; font-weight: 700; font-size: 1.1rem; background: var(--card); }
.field:focus { outline: none; border-color: var(--blue); }
.lbl { display: block; font-weight: 800; margin: 16px 0 6px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 56px; padding: 12px 8px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 900; box-shadow: 0 3px 0 var(--line); }
.seg button.sel { border-color: var(--blue); background: var(--sel-bg); color: var(--sel-ink); box-shadow: 0 3px 0 var(--sel-line); }
.err { color: var(--bad); font-weight: 800; min-height: 1.2em; }
.warn { background: var(--warn-bg); border: 2px solid var(--warn-line); color: var(--warn-ink); padding: 10px 12px; border-radius: 14px; font-weight: 700; font-size: .9rem; }

.placed { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.placed li { display: grid; grid-template-columns: 118px 1fr; grid-template-rows: auto auto; column-gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.placed li span { grid-row: span 2; font-weight: 900; align-self: center; }
.placed li small { color: var(--muted); }
.placed.week li { grid-template-columns: 44px 1fr; }
.placed.week li span { color: var(--muted); font-weight: 800; }

/* lesson */
.intro-list, .cues { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.intro-list li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 800; }
.intro-list li small { margin-left: auto; color: var(--muted); }
.eyebrow { font-weight: 900; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; font-size: .75rem; }
.work h2 { font-size: 1.6rem; }
.target { display: inline-block; background: var(--tint); color: var(--accent-d); font-weight: 900; padding: 6px 12px; border-radius: 12px; margin: 4px 0 6px; }
.cues li { padding-left: 26px; position: relative; font-weight: 700; color: var(--ink2); }
.cues li::before { content: ""; position: absolute; left: 2px; top: .25em; width: 1em; height: 1em; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 22px 0 4px; }
.stepper b { font-size: 4.2rem; font-weight: 900; min-width: 110px; text-align: center; }
.stepper button { width: 64px; height: 64px; border-radius: 50%; font-size: 2rem; font-weight: 900; background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.timer { position: relative; width: 190px; height: 190px; margin: 14px auto; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--soft2); stroke-width: 10; }
.ring { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.timer.hit .ring { stroke: var(--ok); }
.timer b { font-size: 2.6rem; font-weight: 900; }
.big-t b { font-size: 4rem; }
.rest .say { justify-content: center; }

.done-screen { text-align: center; }
.done-screen .say { justify-content: center; flex-direction: column; }
.done-screen .bubble::before { display: none; }
.rewards { display: flex; gap: 12px; margin: 16px 0; }
.rw { flex: 1; border-radius: 16px; padding: 10px; color: #fff; display: flex; flex-direction: column; font-weight: 900; }
.rw b { font-size: 1.3rem; } .rw.xp { background: #facc15; color: #713f12; } .rw.st { background: var(--accent); } .rw.sk { background: #ef4444; }
.toast-in { background: var(--ok-bg); border: 2px solid var(--ok-line); border-radius: 14px; padding: 8px 12px; font-weight: 800; color: var(--ok-ink); }

/* skills */
.skill h2 { margin: 0; }
.ladder { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ladder li { padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); font-weight: 800; }
.ladder li.done { color: var(--muted); background: var(--soft); }
.ladder li.done .note { color: var(--ok); }
.ladder li.cur { border-color: var(--accent); background: var(--tint); }
.ladder li.future { color: var(--muted2); }
.ladder li.lock { color: var(--muted2); background: var(--soft); border-style: dashed; }
.ladder .note { font-size: .8rem; margin-top: 4px; font-weight: 700; }
.ladder li { display: block; } .ladder li > span { display: block; }

/* nutrition */
.coming { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.coming p { font-size: 1.2rem; font-weight: 800; color: var(--muted); }

/* leagues */
.league-head { text-align: center; padding: 14px 18px 4px; }
.shield { font-size: 3.4rem; }
.demo { display: inline-block; font-size: .75rem; font-weight: 800; color: var(--muted); background: var(--soft2); padding: 3px 10px; border-radius: 99px; }
.board { list-style: none; padding: 0 14px; margin: 8px 0; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; font-weight: 800; }
.board li.you { background: var(--tint); border: 2px solid var(--tint-line); }
.board .rk { width: 26px; text-align: center; color: var(--muted); }
.board li.up .rk { color: var(--ok); } .board li.down .rk { color: var(--bad); }
.board .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; }
.board .nm { flex: 1; }
.zone-line { justify-content: center; color: var(--ok); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-top: 2px dashed var(--ok-line); border-radius: 0 !important; }
.zone-line.down { color: var(--bad); border-color: #fecdd3; }

/* profile */
.profile-head { display: flex; gap: 14px; align-items: center; padding: 16px 18px 4px; }
.profile-head > div { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 14px; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat span { font-size: 1.3rem; } .stat b { font-size: 1.15rem; } .stat small { color: var(--muted); font-weight: 700; font-size: .75rem; }
.sub { padding: 14px 18px 0; }
.ach { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px 14px; }
.ach .a { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; opacity: .45; filter: grayscale(1); }
.ach .a.got { opacity: 1; filter: none; border-color: var(--gold-line); background: #fffbeb; }
.ach span { font-size: 1.6rem; } .ach small { color: var(--muted); font-weight: 700; }
select { font: inherit; font-weight: 800; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); }
.setup .btn { margin-top: 14px; }

/* modal sheet */
#modal { position: fixed; inset: 0; z-index: 40; background: rgba(27, 27, 47, .45); display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
.sheet { width: 100%; max-width: 560px; background: var(--card); border-radius: 24px 24px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 8px;
  background: var(--tip); color: #fff; padding: 8px 14px 8px 8px; border-radius: 16px; font-weight: 800; max-width: 92vw; animation: toastIn .25s ease-out; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.toast.out { animation: toastOut .25s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 14px); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: drop 2.2s ease-in forwards; }
@keyframes drop { to { top: 105%; transform: translateX(40px) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.skip { font-weight: 900; color: var(--muted); text-transform: uppercase; font-size: .8rem; padding: 6px 4px; letter-spacing: .03em; }

/* ---------- feedback & rewards ---------- */
.praise { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 55; width: min(520px, calc(100% - 24px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; pointer-events: none; color: #fff; font-weight: 800;
  animation: praiseIn .38s cubic-bezier(.3, 1.5, .5, 1); box-shadow: 0 6px 0 rgba(0, 0, 0, .12); }
.praise.ok { background: #22c55e; } .praise.meh { background: #f59e0b; } .praise.fire { background: linear-gradient(90deg, #ff9f1a, #ff3d1a); }
.praise .pi { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 1.3rem; animation: piSpin .5s ease-out .1s both; }
.praise b { display: block; font-size: 1.2rem; } .praise small { opacity: .9; }
.praise em { margin-left: auto; font-style: normal; background: rgba(255, 255, 255, .25); padding: 4px 10px; border-radius: 99px; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) .2s both; }
.praise.out { animation: praiseOut .3s ease-in forwards; }
@keyframes praiseIn { from { transform: translate(-50%, 120%); } }
@keyframes praiseOut { to { transform: translate(-50%, 130%); opacity: 0; } }
@keyframes piSpin { from { transform: scale(0) rotate(-120deg); } }

.stepper b { transition: color .2s; }
.stepper b.hit { color: var(--ok); }
.stepper b.bump { animation: numBump .25s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes numBump { 40% { transform: scale(1.18); } }
.timer.hit { animation: ringPop .5s cubic-bezier(.3, 1.6, .5, 1); }
.timer.hit b { color: var(--ok); }
@keyframes ringPop { 40% { transform: scale(1.08); } }

.opt.just { animation: optPop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes optPop { 40% { transform: scale(1.04); } }

.chip.bump { animation: chipBump .7s cubic-bezier(.3, 1.6, .5, 1); }
.chip.bump b { color: var(--accent); }
@keyframes chipBump { 30% { transform: scale(1.35) rotate(-6deg); } 60% { transform: scale(.95); } }

.node.just-done { animation: nodePop .7s cubic-bezier(.3, 1.6, .5, 1) .25s both; }
.node.just-done::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 4px solid var(--c); opacity: 0; animation: ring 1s ease-out .45s; }
.node { position: relative; }
@keyframes nodePop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.node.arrive { animation: nodeArrive .6s cubic-bezier(.3, 1.6, .5, 1) .8s both, pulse 1.6s 1.4s infinite; }
@keyframes nodeArrive { 0% { transform: scale(.7); } 100% { transform: scale(1); } }

.done-screen .rw { animation: tileIn .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.done-screen .rw:nth-child(1) { animation-delay: .25s; } .done-screen .rw:nth-child(2) { animation-delay: .45s; } .done-screen .rw:nth-child(3) { animation-delay: .65s; }
.done-screen .rw b.counted { animation: numBump .3s; }
@keyframes tileIn { from { transform: translateY(18px) scale(.8); opacity: 0; } }
.toast-in { animation: tileIn .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.levelup { margin: 8px auto 0; width: fit-content; font-weight: 900; font-size: 1.4rem; color: #fff; padding: 8px 18px; border-radius: 16px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6); box-shadow: 0 4px 0 #4338ca; animation: tileIn .6s cubic-bezier(.3, 1.6, .5, 1) 1.5s both; }
.perfect { margin: 8px auto 0; width: fit-content; font-weight: 900; color: var(--gold-ink); background: var(--gold-bg); border: 2px solid var(--gold-line); padding: 6px 12px; border-radius: 14px; animation: tileIn .5s cubic-bezier(.3, 1.6, .5, 1) .9s both; }
.combo-line { font-weight: 800; color: #ea580c; margin: 4px 0; animation: tileIn .45s cubic-bezier(.3, 1.5, .5, 1) .85s both; }
.confetti.mini i { top: 45%; width: 7px; height: 10px; animation: burst 1.4s ease-out forwards; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(calc((var(--r, .5) - .5) * 300px), 260px) rotate(540deg); opacity: 0; } }

/* ---------- hold controls, auto mode, countdown ---------- */
.hold-ctrl { display: flex; gap: 10px; margin-top: 6px; }
.hold-ctrl .btn.primary { flex: 1; }
.hold-ctrl .btn[hidden] { display: none; }
.btn.pause { background: #f59e0b; border-color: #f59e0b; box-shadow: 0 4px 0 #b45309; }
.timer.paused b { animation: blinkTime 1s steps(2, start) infinite; }
@keyframes blinkTime { to { opacity: .35; } }
.auto { display: flex; align-items: flex-start; gap: 10px; margin: 14px 2px 0; font-weight: 700; font-size: .88rem; color: var(--ink2); cursor: pointer; }
.auto input, input.tog { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.countdown { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; pointer-events: none; background: var(--veil); animation: fadeIn .2s; }
.countdown.out { animation: fadeOut .3s forwards; }
.countdown b { font-size: 9rem; font-weight: 900; color: var(--accent); text-shadow: 0 6px 0 var(--accent-d); animation: cdPop .8s cubic-bezier(.3, 1.6, .5, 1); }
.countdown b.go { color: var(--ok); text-shadow: 0 6px 0 #15803d; font-size: 7rem; }
@keyframes cdPop { 0% { transform: scale(2.2); opacity: 0; } 35% { transform: scale(.92); opacity: 1; } 55% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

/* ---------- plan, hard mode, recovery, swaps, finisher ---------- */
.unit-head { display: flex; align-items: center; gap: 10px; }
.unit-head > div { flex: 1; }
.guide-btn { font-size: 1.3rem; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .35); flex: none; }
.guide { padding-left: 18px; display: grid; gap: 10px; line-height: 1.4; }
.node.challenge { background: linear-gradient(#a855f7, #7c3aed); box-shadow: 0 7px 0 #5b21b6; }
.node.challenge.locked { background: var(--locked); box-shadow: 0 7px 0 var(--locked-d); color: var(--locked-ink); }
.node.resting { background: #cbd5e1; box-shadow: 0 7px 0 #94a3b8; animation: none; }
.start-tag.rest { color: #64748b; animation: none; }
.hard-badge { display: inline-block; vertical-align: middle; font-size: .72rem; font-weight: 900; color: #fff; background: linear-gradient(90deg, #a855f7, #7c3aed); padding: 3px 8px; border-radius: 99px; letter-spacing: .03em; }
.hard-note { background: var(--pur-bg); border: 2px solid var(--pur-line); color: var(--pur-ink); font-weight: 700; padding: 10px 12px; border-radius: 14px; font-size: .9rem; }
.hard-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); font-weight: 800; text-align: left; margin-top: 6px; }
.hard-toggle .knob { width: 40px; height: 24px; border-radius: 99px; background: var(--locked); position: relative; flex: none; transition: background .2s; }
.hard-toggle .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.hard-toggle.on { border-color: #c4b5fd; background: var(--pur-bg); color: var(--pur-ink); }
.hard-toggle.on .knob { background: #7c3aed; } .hard-toggle.on .knob::after { transform: translateX(16px); }
.intro-list.compact li { padding: 8px 10px; font-size: .92rem; }
.xp-parts { margin: 4px 0 0; font-size: .82rem; font-weight: 800; color: var(--muted); animation: tileIn .45s both .3s; }
.muscles { font-size: .72rem; font-weight: 800; color: var(--muted); margin-left: 4px; }
.swap { display: flex; gap: 8px; margin: 8px 0 2px; }
.chipbtn { flex: 1; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-weight: 800; font-size: .8rem; color: var(--ink2); box-shadow: 0 3px 0 var(--line); }
.chipbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.chipbtn:disabled { opacity: .4; }
.fin h2 { font-size: 1.9rem; }
.timer.resting .ring { stroke: #60a5fa; }
.timer.resting b { color: #3b82f6; }

.hard-toggle .ht { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.hard-toggle .ht small { font-weight: 700; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.hard-toggle .x2 { flex: none; font-weight: 900; color: #7c3aed; background: var(--pur-bg2); padding: 4px 9px; border-radius: 99px; font-size: .85rem; }
.hard-toggle.on .x2 { background: #7c3aed; color: #fff; }
.setup .row b { text-align: right; }

/* growth feedback: a single soft shine sweeping across the fill (no glow, no flashing) */
.bar i { overflow: hidden; }
.bar i.grew::before { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); background-size: 250% 100%;
  animation: sweep .9s ease-out .35s both; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
/* equipment chips */
.eq { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.eq small { width: 100%; font-weight: 800; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.eq.none { font-weight: 800; color: var(--muted); font-size: .9rem; margin: 6px 0; }
.eqchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); font-weight: 800; font-size: .82rem; }
.eqchip span { color: var(--muted); font-weight: 900; }
.eqchip.off { text-decoration: line-through; color: var(--muted); background: var(--soft); border-style: dashed; }
.eqchip.off span { text-decoration: none; color: var(--ok); }

/* tap-to-explain words */
.term { display: inline; padding: 0; margin: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: help;
  text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: rgba(122, 116, 134, .55); border-radius: 4px; }
.term.on { background: var(--tint); text-decoration-color: var(--accent); }
.tip { position: fixed; z-index: 70; max-width: min(300px, calc(100vw - 20px)); background: var(--tip); color: #fff; padding: 10px 13px; border-radius: 14px;
  font-size: .9rem; line-height: 1.35; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: tipIn .18s ease-out; text-transform: none; letter-spacing: normal; font-weight: 600; }
.tip b { display: block; font-size: 1rem; margin-bottom: 2px; color: #ffb27a; }
.tip::before { content: ""; position: absolute; left: calc(var(--ax, 50%) - 7px); width: 14px; height: 14px; background: var(--tip); transform: rotate(45deg); border-radius: 2px; }
.tip.below::before { top: -6px; } .tip.above::before { bottom: -6px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
.intro-list li .nm { flex: 1; }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] {
  --bg: #16141f; --card: #221f2e; --ink: #f3f1f8; --muted: #9a94a8; --line: #343044;
  --ink2: #cfcad9; --muted2: #6f6a7d; --track: #2e2a3b; --soft: #1d1b27; --soft2: #2e2a3b; --tint: #3a2618; --tint-line: #6b3a17;
  --sel-bg: #1e2a44; --sel-ink: #93c5fd; --sel-line: #2b4a80; --locked: #2e2a3b; --locked-d: #1f1c29; --locked-ink: #6f6a7d;
  --topbar: rgba(22, 20, 31, .92); --veil: rgba(22, 20, 31, .6); --tip: #0d0c13;
  --ok-bg: #14281c; --ok-line: #1f5132; --ok-ink: #86efac; --warn-bg: #2f2512; --warn-line: #5c4614; --warn-ink: #fcd34d;
  --pur-bg: #241a3a; --pur-line: #3f2d6b; --pur-ink: #c4b5fd; --pur-bg2: #2e2350; --gold-bg: #2f2512; --gold-line: #5c4614; --gold-ink: #fcd34d;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16141f; --card: #221f2e; --ink: #f3f1f8; --muted: #9a94a8; --line: #343044;
    --ink2: #cfcad9; --muted2: #6f6a7d; --track: #2e2a3b; --soft: #1d1b27; --soft2: #2e2a3b; --tint: #3a2618; --tint-line: #6b3a17;
    --sel-bg: #1e2a44; --sel-ink: #93c5fd; --sel-line: #2b4a80; --locked: #2e2a3b; --locked-d: #1f1c29; --locked-ink: #6f6a7d;
    --topbar: rgba(22, 20, 31, .92); --veil: rgba(22, 20, 31, .6); --tip: #0d0c13;
    --ok-bg: #14281c; --ok-line: #1f5132; --ok-ink: #86efac; --warn-bg: #2f2512; --warn-line: #5c4614; --warn-ink: #fcd34d;
    --pur-bg: #241a3a; --pur-line: #3f2d6b; --pur-ink: #c4b5fd; --pur-bg2: #2e2350; --gold-bg: #2f2512; --gold-line: #5c4614; --gold-ink: #fcd34d;
    color-scheme: dark;
  }
}
html { background: var(--bg); color: var(--ink); }
.field, select { color: var(--ink); }

/* ---------- livelier headers ---------- */
.unit-head { position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hc) 82%, #fff) 0%, var(--hc) 45%, color-mix(in srgb, var(--hc) 78%, #000) 100%);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--hc) 62%, #000), inset 0 2px 0 rgba(255, 255, 255, .28); }
.unit-head::before { content: ""; position: absolute; z-index: -1; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.unit-head::after { content: ""; position: absolute; z-index: -1; left: 0; top: 0; width: 40%; height: 100%; will-change: transform;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent); transform: translateX(-100%) skewX(-12deg); animation: sheen 7s ease-in-out infinite; }
/* transform only, so the shine runs on the compositor instead of re-laying out the page every frame */
@keyframes sheen { 0%, 70% { transform: translateX(-100%) skewX(-12deg); } 100% { transform: translateX(325%) skewX(-12deg); } }
.unit-head h2 { text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }

/* ---------- livelier buttons ---------- */
.btn.primary, .btn.danger, .btn.pause, .btn.stop { --bc: var(--accent); --bd: var(--accent-d); position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 78%, #fff) 0%, var(--bc) 48%, color-mix(in srgb, var(--bc) 88%, #000) 100%);
  border-color: color-mix(in srgb, var(--bc) 85%, #000); box-shadow: 0 4px 0 var(--bd), inset 0 2px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.btn.danger { --bc: var(--bad); --bd: #9f1239; }
.btn.pause { --bc: #f59e0b; --bd: #b45309; }
.btn.stop { --bc: var(--bad); --bd: #9f1239; }
.btn.primary:active:not(:disabled), .btn.danger:active:not(:disabled), .btn.pause:active:not(:disabled) { box-shadow: 0 1px 0 var(--bd), inset 0 2px 0 rgba(255, 255, 255, .25); }
.btn:disabled, .btn.primary:disabled { background: var(--locked); color: var(--locked-ink); border-color: var(--locked); box-shadow: 0 4px 0 var(--locked-d); text-shadow: none; }
.btn:disabled::after { display: none; }
.btn:not(.primary):not(.danger):not(.pause):not(:disabled) { box-shadow: 0 4px 0 var(--line), inset 0 -2px 0 rgba(0, 0, 0, .03); }

/* top bar chips are buttons now */
.chip { cursor: pointer; transition: transform .1s, background .2s; }
.chip:active { transform: scale(.94); background: var(--soft2); }
.tab[data-id="path"] svg { width: 32px; height: 32px; }

/* ---------- sliders + body fields ---------- */
.slider { margin: 12px 0 4px; transition: opacity .2s; }
.slider.dim { opacity: .4; }
.sv { text-align: center; font-weight: 800; color: var(--muted); }
.sv b { font-size: 2.6rem; font-weight: 900; color: var(--ink); }
input.rng { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 99px; margin: 12px 0; outline: none;
  background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--track) var(--p, 50%)); }
input.rng::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 4px solid var(--accent); box-shadow: 0 3px 0 var(--accent-d); transition: transform .12s; }
input.rng:active::-webkit-slider-thumb { transform: scale(1.15); }
input.rng::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 4px solid var(--accent); box-shadow: 0 3px 0 var(--accent-d); }
.opt.unsure { margin-top: 8px; width: 100%; text-align: center; }
.bf { margin-top: 10px; }
.bf-head { display: flex; justify-content: space-between; align-items: center; }
.bf-head .lbl { margin: 8px 0 0; }
.bf-row { display: flex; gap: 12px; align-items: center; }
.bf-row .rng { flex: 1; }
.field.num { width: 104px; flex: none; text-align: center; padding: 10px 8px; }
.ferr { color: var(--bad); font-weight: 700; font-size: .82rem; min-height: 1.1em; margin: 0 2px; }
.mini-seg { display: inline-flex; background: var(--soft2); border-radius: 12px; padding: 3px; gap: 3px; }
.mini-seg button { padding: 6px 10px; border-radius: 9px; font-weight: 800; font-size: .8rem; color: var(--muted); }
.mini-seg button.sel { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.edit-title { font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }

/* ---------- profile rows, switches ---------- */
.editrow { width: 100%; text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row.editrow + .row.editrow { margin-top: 0; }
.editrow:last-child { border-bottom: 0; }
.editrow span { flex: none; }
.editrow b { margin-left: auto; text-align: right; font-weight: 800; color: var(--muted); max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editrow i { font-style: normal; color: var(--muted2); font-weight: 900; margin-left: 6px; }
.editrow:active { background: var(--soft); }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--locked); position: relative; transition: background .2s; flex: none; }
.switch span { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.switch.on { background: var(--accent); } .switch.on span { transform: translateX(20px); }

/* ---------- badges ---------- */
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 8px 14px; }
.badge { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.badge .medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; margin-bottom: 4px; position: relative; overflow: hidden;
  background: var(--soft2); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.badge.t0 .medal span { filter: grayscale(1); opacity: .45; }
.badge.t1 .medal { background: radial-gradient(circle at 35% 30%, #f3b88a, #b8743f 60%, #7c4a22); }
.badge.t2 .medal { background: radial-gradient(circle at 35% 30%, #ffffff, #c7ccd4 55%, #8a919c); }
.badge.t3 .medal { background: radial-gradient(circle at 35% 30%, #fff3a8, #f5c518 55%, #b7860b); }
.badge.t4 .medal { background: radial-gradient(circle at 35% 30%, #ffffff, #b9e6f7 50%, #6aa6c4); }
.badge.t5 .medal { background: radial-gradient(circle at 35% 30%, #e6fdff, #7dd3fc 45%, #6366f1); box-shadow: 0 0 14px rgba(99, 102, 241, .45), inset 0 -4px 0 rgba(0, 0, 0, .12); }
.badge.t6 .medal { background: conic-gradient(from 0deg, #a5f3fc, #c4b5fd, #f9a8d4, #fde68a, #86efac, #a5f3fc); animation: crystal 6s linear infinite;
  box-shadow: 0 0 18px rgba(196, 181, 253, .7), inset 0 -4px 0 rgba(0, 0, 0, .1); }
.badge.t6 .medal span { animation: crystalCounter 6s linear infinite; }
@keyframes crystal { to { transform: rotate(360deg); } }
@keyframes crystalCounter { to { transform: rotate(-360deg); } }
.badge:not(.t0) .medal::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 70%; will-change: transform;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5) 50%, transparent); animation: glint 4s ease-in-out infinite; }
@keyframes glint { 0% { transform: translateX(-140%) skewX(-20deg); } 60%, 100% { transform: translateX(200%) skewX(-20deg); } }
.badge.t6 { border-color: #c4b5fd; }
.badge b { font-size: .95rem; } .badge .tier { font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; }
.badge.t0 .tier { color: var(--muted2); }
.badge .bar.thin { height: 8px; width: 100%; margin-top: 6px; }
.badge .bp { color: var(--muted); font-weight: 700; font-size: .72rem; }

/* ---------- wardrobe ---------- */
.wardrobe { display: flex; gap: 10px; overflow-x: auto; padding: 8px 14px 12px; scroll-snap-type: x mandatory; }
.wear { flex: none; width: 112px; scroll-snap-align: start; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 var(--line); }
.wear b { font-size: .82rem; } .wear small { font-weight: 800; color: var(--muted); font-size: .75rem; }
.wear.on { border-color: var(--accent); background: var(--tint); box-shadow: 0 3px 0 var(--tint-line); }
.wear.on small { color: var(--accent); }

/* ---------- stat sheets ---------- */
.sheet-hero { text-align: center; font-size: 2.4rem; line-height: 1.1; }
.sheet-hero b { display: block; font-size: 3rem; font-weight: 900; }
.sheet-hero b small { font-size: 1.4rem; color: var(--muted); }
.sheet-hero span { display: block; font-size: .95rem; font-weight: 800; color: var(--muted); }
.cal { display: grid; gap: 6px; margin: 12px 0; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr) 24px; gap: 6px; align-items: center; padding: 3px; border-radius: 14px; }
.cal-row span { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--muted); background: var(--soft2); }
.cal-row.head span { background: none; aspect-ratio: auto; }
.cal-row span.on { background: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-d); }
.cal-row span.today { outline: 3px solid var(--tint-line); }
.cal-row span.future { opacity: .35; }
.cal-row.met { background: var(--tint); }
.cal-row.frozen { background: var(--sel-bg); }
.cal-row em { font-style: normal; text-align: center; }
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 3px 0 var(--line); }
.pack b { font-weight: 900; } .pack span { font-weight: 800; color: var(--accent); }
.pack:disabled { opacity: .75; }
.pack.wide { width: 100%; margin-top: 10px; }
.milestones { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.milestones li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--soft); font-weight: 800; }
.milestones li span { margin-left: auto; color: var(--muted); } .milestones li i { font-style: normal; width: 18px; color: var(--ok); }
.milestones li.got { background: var(--ok-bg); }

/* lesson sheet rows: changes animate instead of the whole sheet jumping */
.intro-list li.chg { animation: rowFlash .7s ease-out; }
.intro-list li.enter { animation: rowIn .3s ease-out; }
.intro-list li.leave { animation: rowOut .25s ease-in forwards; }
@keyframes rowFlash { 0% { background: var(--pur-bg); border-color: var(--pur-line); transform: scale(1.02); } 100% { background: var(--card); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); max-height: 0; } to { max-height: 60px; } }
@keyframes rowOut { to { opacity: 0; transform: translateX(14px); } }

/* ---------- buttons, take two: built like the week headers ---------- */
.btn.primary, .btn.danger, .btn.pause, .btn.stop {
  background:
    radial-gradient(120% 150% at 88% -35%, rgba(255, 255, 255, .42), transparent 52%),
    linear-gradient(135deg, color-mix(in srgb, var(--bc) 72%, #fff) 0%, var(--bc) 48%, color-mix(in srgb, var(--bc) 78%, #000) 100%);
  box-shadow: 0 5px 0 var(--bd), inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 0, 0, .1);
  transition: transform .08s, box-shadow .08s, filter .2s;
}
.btn.primary::before, .btn.danger::before, .btn.pause::before { content: ""; position: absolute; z-index: -1; left: -18px; bottom: -34px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.btn.primary::after, .btn.danger::after, .btn.pause::after { animation-duration: 4s; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); }
.btn.primary:active:not(:disabled), .btn.danger:active:not(:disabled), .btn.pause:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd), inset 0 2px 0 rgba(255, 255, 255, .3); filter: brightness(1.06); }
/* the main call to action breathes a little */
.foot .btn.primary:not(:disabled), .sheet > .btn.primary:not(:disabled) { animation: ctaBreathe 2.8s ease-in-out infinite; }
@keyframes ctaBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
.foot .btn.primary:active:not(:disabled), .sheet > .btn.primary:active:not(:disabled) { animation: none; }
/* dark mode: deeper base shadow and a coloured glow so buttons don't look flat */
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.danger, :root[data-theme="dark"] .btn.pause {
  box-shadow: 0 5px 0 color-mix(in srgb, var(--bd) 75%, #000), 0 10px 24px -8px color-mix(in srgb, var(--bc) 70%, transparent), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .15); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .btn.danger, :root:not([data-theme="light"]) .btn.pause {
    box-shadow: 0 5px 0 color-mix(in srgb, var(--bd) 75%, #000), 0 10px 24px -8px color-mix(in srgb, var(--bc) 70%, transparent), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .15); }
}
:root[data-theme="dark"] .btn:not(.primary):not(.danger):not(.pause):not(:disabled), :root[data-theme="dark"] .opt, :root[data-theme="dark"] .chipbtn { box-shadow: 0 4px 0 #0f0d16; border-color: var(--line); }

/* ---------- close X on panels where Bell talks, dialogue dots ---------- */
.sheet { position: relative; }
.sheet.has-x { padding-top: 26px; }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; color: var(--muted); background: var(--soft2); font-size: .95rem; z-index: 2; }
.sheet-x:active { transform: scale(.92); }
.sheet.has-x .say { padding-right: 34px; }
.dlg-say { min-height: 120px; display: flex; align-items: center; }
.dlg-say .say { margin: 0; }
.dlg-dots { display: flex; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.dlg-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--track); transition: background .25s, transform .25s; }
.dlg-dots i.on { background: var(--accent); }
.dlg-dots i.on:last-of-type, .dlg-dots i.on + i:not(.on) { transform: none; }

/* ---------- buttons, final: flat and chunky like the rest of the app ----------
   Solid colour, darker ledge underneath, the same glossy strip as the progress bars, and a rare soft sheen. */
.btn.primary, .btn.danger, .btn.pause, .btn.stop {
  background: var(--bc); border: 2px solid var(--bc); text-shadow: none;
  box-shadow: 0 5px 0 var(--bd);
}
.btn.primary::before, .btn.danger::before, .btn.pause::before, .btn.stop::before {
  content: ""; position: absolute; z-index: -1; left: 12px; right: 12px; top: 5px; bottom: auto; width: auto; height: 5px; border-radius: 99px;
  background: rgba(255, 255, 255, .32);
}
.btn.primary::after, .btn.danger::after, .btn.pause::after { animation-duration: 6.5s; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); }
.btn.primary:active:not(:disabled), .btn.danger:active:not(:disabled), .btn.pause:active:not(:disabled), .btn.stop:active:not(:disabled) {
  transform: translateY(4px); box-shadow: 0 1px 0 var(--bd); filter: none; }
.foot .btn.primary:not(:disabled), .sheet > .btn.primary:not(:disabled) { animation: none; }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.danger, :root[data-theme="dark"] .btn.pause { box-shadow: 0 5px 0 color-mix(in srgb, var(--bd) 70%, #000); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .btn.danger, :root:not([data-theme="light"]) .btn.pause { box-shadow: 0 5px 0 color-mix(in srgb, var(--bd) 70%, #000); }
}
.btn:disabled::before { display: none; }

/* combo stripes: one tile = exactly one pattern repeat (no seam), phase follows the page clock (no restart on re-render) */
.bar.combo i, .bar.combo i.grew { background-size: 180px 100%; background-repeat: repeat-x; animation: shimmer var(--spd, 1.6s) linear infinite; animation-delay: calc(var(--t, 0) * -1s); }

/* ---------- vibrant, glossy, alive buttons ---------- */
.btn.primary { --bc: var(--accent); --bc-hi: var(--accent-hi); --bd: var(--accent-d); }
.btn.danger { --bc: #ff1f4f; --bc-hi: #ff6384; --bd: #b80f36; }
.btn.pause { --bc: #ffa600; --bc-hi: #ffd04d; --bd: #c27400; }
.btn.stop { --bc: #ff1f4f; --bc-hi: #ff6384; --bd: #b80f36; }
.btn.primary, .btn.danger, .btn.pause, .btn.stop {
  background: linear-gradient(180deg, var(--bc-hi) 0%, var(--bc) 55%, color-mix(in srgb, var(--bc) 88%, #000) 100%);
  border: 2px solid color-mix(in srgb, var(--bc) 85%, #000);
  box-shadow: 0 5px 0 var(--bd), 0 10px 20px -10px color-mix(in srgb, var(--bc) 80%, transparent);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}
.btn.primary::before, .btn.danger::before, .btn.pause::before, .btn.stop::before { background: rgba(255, 255, 255, .42); height: 6px; top: 4px; }
.btn.primary::after, .btn.danger::after, .btn.pause::after, .btn.stop::after { content: ""; position: absolute; z-index: -1; top: 0; left: 0; width: 45%; height: 100%; will-change: transform;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: translateX(-135%) skewX(-15deg); animation: btnShine 3.6s ease-in-out infinite; }
@keyframes btnShine { 0%, 62% { transform: translateX(-135%) skewX(-15deg); } 100% { transform: translateX(315%) skewX(-15deg); } }
.btn.primary:active:not(:disabled), .btn.danger:active:not(:disabled), .btn.pause:active:not(:disabled), .btn.stop:active:not(:disabled) {
  transform: translateY(4px); box-shadow: 0 1px 0 var(--bd), 0 4px 10px -6px color-mix(in srgb, var(--bc) 80%, transparent); filter: brightness(1.05); }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.danger, :root[data-theme="dark"] .btn.pause {
  box-shadow: 0 5px 0 color-mix(in srgb, var(--bd) 75%, #000), 0 12px 26px -8px color-mix(in srgb, var(--bc) 75%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary, :root:not([data-theme="light"]) .btn.danger, :root:not([data-theme="light"]) .btn.pause {
    box-shadow: 0 5px 0 color-mix(in srgb, var(--bd) 75%, #000), 0 12px 26px -8px color-mix(in srgb, var(--bc) 75%, transparent); }
}

/* ---------- vivid week headers ---------- */
.unit-head { background: linear-gradient(135deg, color-mix(in srgb, var(--hc) 70%, #ffe066) 0%, var(--hc) 42%, color-mix(in srgb, var(--hc) 82%, #3b0a5a) 100%); filter: saturate(1.15); }

/* ---------- post-workout reward cards ---------- */
.rewards-list { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.rcard { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line); animation: rcardIn .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.rcard .ri { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.rcard.quest .ri { background: var(--tint); } .rcard.level .ri { background: var(--pur-bg); }
.rcard div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rcard small { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rcard b { font-weight: 900; font-size: .98rem; }
.rcard em { font-style: normal; font-weight: 900; color: var(--accent); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.coin { display: inline-block; width: 16px; height: 16px; background: var(--coin-img) center / contain no-repeat; vertical-align: -2px; }
.rcard.badgeup .ri { padding: 0; }
.mini-medal { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; }
.rcard.t1 .mini-medal { background: radial-gradient(circle at 35% 30%, #f3b88a, #b8743f 60%, #7c4a22); }
.rcard.t2 .mini-medal { background: radial-gradient(circle at 35% 30%, #fff, #c7ccd4 55%, #8a919c); }
.rcard.t3 .mini-medal { background: radial-gradient(circle at 35% 30%, #fff3a8, #f5c518 55%, #b7860b); }
.rcard.t4 .mini-medal { background: radial-gradient(circle at 35% 30%, #fff, #b9e6f7 50%, #6aa6c4); }
.rcard.t5 .mini-medal { background: radial-gradient(circle at 35% 30%, #e6fdff, #7dd3fc 45%, #6366f1); }
.rcard.t6 .mini-medal { background: conic-gradient(#a5f3fc, #c4b5fd, #f9a8d4, #fde68a, #86efac, #a5f3fc); }
.rcard .tiername { color: var(--ink); background: var(--soft2); padding: 4px 10px; border-radius: 99px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.rcard.t3 .tiername { background: #fde68a; color: #854d0e; } .rcard.t6 .tiername { background: linear-gradient(90deg, #a5f3fc, #c4b5fd, #f9a8d4); color: #3b0764; }
@keyframes rcardIn { from { opacity: 0; transform: translateX(-16px) scale(.96); } }

/* ---------- badge tier-up ceremony ---------- */
.cere { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #2b2450 0%, #120f1f 70%);
  color: #fff; text-align: center; animation: fadeIn .25s; cursor: pointer; overflow: hidden; }
.cere.out { animation: fadeOut .3s forwards; }
.cere-rays { position: absolute; left: 50%; top: 42%; width: 130vmax; height: 130vmax; margin: -65vmax 0 0 -65vmax; will-change: transform; opacity: 0; transition: opacity .5s;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 50%); mask: radial-gradient(circle, #000 20%, transparent 50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .09) 0deg 8deg, transparent 8deg 22deg); animation: crystal 18s linear infinite; }
.cere.revealed .cere-rays { opacity: 1; }
.cere-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cere-kicker { font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .7; animation: tileIn .5s both; }
.cere-medal { background: none; border: 0; padding: 0; }
.cere-medal .medal { width: 150px; height: 150px; font-size: 4.4rem; box-shadow: 0 10px 40px rgba(0, 0, 0, .4), inset 0 -8px 0 rgba(0, 0, 0, .15); animation: medalIn .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.cere-medal.flip .medal { animation: medalFlip .8s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes medalIn { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
@keyframes medalFlip { 0% { transform: rotateY(0) scale(1); } 45% { transform: rotateY(90deg) scale(1.15); filter: brightness(2.5); } 100% { transform: rotateY(0) scale(1); } }
.cere-tier { font-size: 2.6rem; letter-spacing: .08em; text-transform: uppercase; margin: 10px 0 0; opacity: 0; transform: scale(2.2); }
.cere.revealed .cere-tier { animation: tierSlam .5s cubic-bezier(.3, 1.6, .5, 1) .25s forwards; }
@keyframes tierSlam { to { opacity: 1; transform: scale(1); } }
.cere-tier.t1 { color: #f3b88a; } .cere-tier.t2 { color: #e5e7eb; } .cere-tier.t3 { color: #fde047; } .cere-tier.t4 { color: #bae6fd; } .cere-tier.t5 { color: #a5b4fc; }
.cere-tier.t6 { background: linear-gradient(90deg, #a5f3fc, #c4b5fd, #f9a8d4, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cere-name { margin: 0; font-weight: 800; opacity: 0; } .cere.revealed .cere-name { animation: fadeIn .4s .5s forwards; opacity: 1; }
.cere-skip { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.spark { position: absolute; left: 50%; top: 42%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px #ffd166; animation: sparkOut 1s ease-out forwards; }
@keyframes sparkOut { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* ---------- Duolingo-style path nodes: bright face, chunky ledge, gold when done, ring on the current one ---------- */
.node { width: 72px; height: 66px; font-size: 1.75rem; border: 0; position: relative; overflow: visible;
  background: var(--c); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 68%, #000); text-shadow: 0 2px 0 rgba(0, 0, 0, .14);
  transition: transform .08s, box-shadow .08s; }
.node::before { content: ""; position: absolute; left: 14%; right: 14%; top: 9%; height: 42%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.node:active { transform: translateY(6px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 68%, #000); }
.node.done { --c: #ffc800; filter: none; color: #fff; box-shadow: 0 8px 0 #d99a00; }
.node.done:active { box-shadow: 0 2px 0 #d99a00; }
.node.locked, .node.chest.locked, .node.check.locked, .node.challenge.locked { --c: var(--locked); background: var(--locked); color: var(--locked-ink);
  box-shadow: 0 8px 0 var(--locked-d); text-shadow: none; }
.node.locked::before { opacity: .5; }
.node.chest { --c: #ffb300; background: var(--c); box-shadow: 0 8px 0 #c77f00; }
.node.check { width: 84px; height: 78px; --c: #ffb800; background: var(--c); box-shadow: 0 8px 0 #c98700; }
.node.challenge { --c: #a742ff; background: var(--c); box-shadow: 0 8px 0 #6b1fc0; }
.node.resting { --c: #94a3b8; background: var(--c); box-shadow: 0 8px 0 #64748b; }
.node.current { animation: none; }
/* (the old week-progress ring around the current node was removed: it read as a meaningless 2/3 bar) */
.node-wrap.cur::before { display: none; content: ""; position: absolute; left: 50%; top: -11px; width: 96px; height: 96px; margin-left: -48px; border-radius: 50%;
  background: conic-gradient(var(--c) var(--pr, 0%), var(--locked) 0); -webkit-mask: radial-gradient(circle, transparent 41px, #000 42px); mask: radial-gradient(circle, transparent 41px, #000 42px); }
.node-wrap.cur .node.check { margin-top: 0; }
/* START tag: white speech bubble with a pointer, gently bobbing */
.start-tag { top: -50px; background: var(--card); border: 2px solid var(--line); color: var(--c, var(--accent)); box-shadow: 0 3px 0 var(--line); font-size: .85rem; padding: 6px 12px; }
.start-tag::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; margin-left: -6px; background: var(--card);
  border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.nodes { gap: 26px; padding-top: 44px; }

/* rectangular buttons get the same face highlight as the nodes */
.btn.primary::before, .btn.danger::before, .btn.pause::before, .btn.stop::before {
  left: 10px; right: 10px; top: 4px; height: 45%; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0)); }
.btn.primary, .btn.danger, .btn.pause, .btn.stop { box-shadow: 0 6px 0 var(--bd), 0 10px 20px -10px color-mix(in srgb, var(--bc) 80%, transparent); }

/* ---------- how-to guides ---------- */
.info { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-left: 8px; vertical-align: middle; flex: none;
  font: italic 900 .8rem Georgia, serif; color: var(--accent); background: var(--tint); border: 2px solid var(--tint-line); }
.info:active { transform: scale(.9); }
.ex-title { display: flex; align-items: center; flex-wrap: wrap; }
.intro-list li .info { margin: 0 4px 0 0; }
.howto { padding-left: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; margin: 12px 0; }
.howto li { counter-increment: st; display: flex; gap: 12px; align-items: flex-start; font-weight: 700; line-height: 1.35; }
.howto li::before { content: counter(st); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff;
  background: var(--accent); box-shadow: 0 3px 0 var(--accent-d); }
.watch { background: var(--warn-bg); border: 2px solid var(--warn-line); color: var(--warn-ink); border-radius: 14px; padding: 10px 12px; font-weight: 700; margin: 4px 0; }
.watch b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }

/* ---------- profile name, league statuses, water break ---------- */
.name-edit { display: flex; align-items: center; gap: 8px; text-align: left; padding: 0; }
.name-edit span { color: var(--muted2); font-size: 1rem; }
.board .nm small { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); margin-top: 1px; }
.water { display: flex; align-items: center; gap: 10px; margin: 6px auto 0; max-width: 320px; padding: 10px 12px; border-radius: 16px;
  background: var(--sel-bg); border: 2px solid var(--sel-line); box-shadow: 0 4px 0 var(--sel-line); animation: rcardIn .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.water span { font-size: 1.5rem; } .water b { flex: 1; color: var(--sel-ink); }
.water.out { animation: rowOut .25s ease-in forwards; }

/* panels: fade the backdrop in/out, slide the sheet down when closing */
#modal:not([hidden]) { animation: fadeIn .2s ease-out; }
#modal.closing { animation: fadeOut .22s ease-in forwards; pointer-events: none; }
#modal.closing .sheet { animation: sheetDown .22s ease-in forwards; }
@keyframes sheetDown { to { transform: translateY(70px); opacity: 0; } }

/* =====================================================================
   27 Nov (2): glare fix, session overview, lesson intro, plan, quests,
   rewards, day streak, customise, dev panel
   ===================================================================== */

/* glare: no repeating tiles, so the shine crosses once and leaves cleanly; redraws carry the sweep on (--sd) */
.bar i.grew::before { background-repeat: no-repeat; animation: sweep .9s ease-out calc(.35s + var(--sd, 0s)) both; }
.badge:not(.t0) .medal::after { animation-delay: calc(var(--t, 0) * -1s); }
@keyframes sweep { from { background-position: 115% 0; } to { background-position: -15% 0; } }

/* equipment you have: big tappable tiles */
.eqp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.eqt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 16px; font-weight: 800;
  background: var(--soft); border: 2px dashed var(--line); color: var(--muted); transition: transform .12s, background .15s; }
.eqt .eqt-ic { font-size: 1.5rem; filter: grayscale(1); opacity: .45; transition: filter .2s, opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.eqt small { font-size: .72rem; line-height: 1.1; text-align: center; }
.eqt.on { background: var(--card); border: 2px solid var(--sel-line); color: var(--ink); box-shadow: 0 3px 0 var(--sel-line); }
.eqt.on .eqt-ic { filter: none; opacity: 1; }
.eqt.on::after { content: ""; position: absolute; top: -6px; right: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: .7rem; font-weight: 900; box-shadow: 0 2px 0 #1d4ed8; animation: pop .25s cubic-bezier(.3, 1.6, .5, 1); }
.eqt em { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 99px; }
.eqt:active { transform: scale(.94); }
.eqt.on:active .eqt-ic { transform: scale(1.2) rotate(-8deg); }

/* ---------- plan summary ---------- */
.plan2 .say { margin-bottom: 4px; }
.pl-card { background: var(--card); border-radius: 22px; padding: 14px 14px 12px; margin: 12px 0; box-shadow: 0 4px 0 var(--line); }
.pl-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pl-h b { font-size: 1.1rem; font-weight: 900; }
.pl-h span { font-weight: 800; color: var(--accent); font-size: .9rem; }
.pl-h.out { margin: 18px 2px 10px; }
.pw { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.pw-day { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pw-day span { width: 100%; aspect-ratio: .78; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: .62rem; line-height: 1.05; text-align: center; padding: 2px; word-break: break-word; }
.pw-day.on span { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-d); animation: pwIn .45s cubic-bezier(.3, 1.6, .5, 1) var(--d) both; }
.pw-day.rest span { background: var(--soft2); font-size: .9rem; opacity: .7; }
.pw-day small { font-weight: 900; color: var(--muted); font-size: .75rem; }
@keyframes pwIn { from { transform: translateY(10px) scale(.6); opacity: 0; } }
.pblocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; height: 110px; align-items: end; }
.pb { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px; }
.pb i { display: block; height: var(--h); border-radius: 10px 10px 6px 6px; background: var(--c); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), 0 3px 0 color-mix(in srgb, var(--c) 60%, #000);
  transform-origin: bottom; animation: pbUp .6s cubic-bezier(.3, 1.4, .5, 1) var(--d) both; }
.pb small { text-align: center; font-weight: 900; font-size: .74rem; color: var(--ink2); }
@keyframes pbUp { from { transform: scaleY(0); } }
.pl-lads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-lad { background: var(--card); border-radius: 18px; padding: 10px 12px 12px; box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 55%, var(--line)); border-top: 5px solid var(--tc); }
.pl-top { display: flex; align-items: center; gap: 6px; }
.pl-top b { font-weight: 900; color: var(--tc); font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; }
.pl-lad p { margin: 4px 0 8px; font-weight: 800; font-size: .92rem; line-height: 1.2; min-height: 2.4em; }
.rungs { display: flex; gap: 3px; }
.rungs i { flex: 1; height: 6px; border-radius: 3px; background: var(--soft2); }
.rungs i.done { background: color-mix(in srgb, var(--tc) 55%, var(--soft2)); }
.rungs i.now { background: var(--tc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc) 30%, transparent); }

/* ---------- daily quests ---------- */
.quests .qh b { font-size: 1.1rem; font-weight: 900; }
.quest { display: flex; align-items: center; gap: 12px; margin-top: 14px; grid-template-columns: none; }
.q-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: var(--tint); }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-main b { font-weight: 900; font-size: .98rem; }
.q-bar { position: relative; }
.q-bar .bar { height: 20px; }
.q-bar .bar.q i { --fill: #ffb800; }
.q-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem; font-weight: 900; color: var(--ink2); }
.q-rw { flex: none; display: flex; align-items: center; gap: 3px; font-weight: 900; color: var(--gold-ink); font-size: .92rem; }
.q-rw.got { width: 28px; height: 28px; border-radius: 50%; justify-content: center; background: var(--ok); color: #fff; }
.quest.claimed { opacity: 1; } .quest.claimed .q-main b { color: var(--muted); }
.quest.claimed .q-ic { background: var(--ok-bg); }

/* ---------- rewards after a workout: one panel, plain rows ---------- */
.rpanel { margin-top: 14px; text-align: left; background: var(--card); border-radius: 20px; padding: 10px 14px 4px; box-shadow: 0 4px 0 var(--line); }
.rp-h { display: block; font-weight: 900; color: var(--muted); font-size: .8rem; margin-bottom: 2px; }
.rrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; animation: rcardIn .45s cubic-bezier(.3, 1.4, .5, 1) both; }
.rrow + .rrow { border-top: 2px solid var(--soft2); }
.rr-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 900; font-size: .8rem; }
.rrow.lv .rr-ic { background: #7c3aed; }
.rrow.bd .rr-ic { background: none; width: 30px; height: 30px; }
.rrow b { flex: 1; min-width: 0; font-weight: 900; font-size: .95rem; }
.rrow em { font-style: normal; font-weight: 900; color: var(--gold-ink); display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---------- day streak calendar + daily hello ---------- */
.cal-row { grid-template-columns: repeat(7, 1fr); }
.cal-row span.d-train { background: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-d); }
.cal-row span.d-rest { background: var(--tint); color: var(--accent); font-size: .85rem; }
.cal-row span.d-frozen { background: var(--sel-bg); font-size: .85rem; }
.cal-row span.d-future { opacity: .35; }
.cal-key { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: .78rem; font-weight: 800; color: var(--muted); margin: 0 0 12px; }
.cal-key span { display: flex; align-items: center; gap: 5px; }
.cal-key i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; }
.cal-key .k-train { background: var(--accent); color: #fff; } .cal-key .k-rest { background: var(--tint); } .cal-key .k-frozen { background: var(--sel-bg); }
.hello-fire { display: flex; flex-direction: column; align-items: center; margin: 2px 0 8px; }
.hello-fire b { font-size: 2.6rem; font-weight: 900; color: var(--accent); line-height: 1; animation: cdPop .6s ease-out; }
.hello-fire span { font-weight: 800; color: var(--muted); font-size: .9rem; }
.hello-fire.warn b { color: var(--bad); }

/* ---------- profile: mascot button, customise entry, dev panel ---------- */
.me-bell { position: relative; flex: none; }
.me-edit { position: absolute; right: -2px; bottom: 4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem;
  background: var(--card); box-shadow: 0 2px 0 var(--line), 0 0 0 2px var(--line); }
.cz-entry { display: flex; align-items: center; gap: 12px; width: calc(100% - 28px); margin: 14px 14px 4px; padding: 12px 14px; border-radius: 20px; text-align: left;
  background: linear-gradient(135deg, #a66bff, #ff6fb5); color: #fff; box-shadow: 0 5px 0 #7a3ee0; }
.cz-entry > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.cz-entry b { font-weight: 900; font-size: 1.1rem; } .cz-entry small { font-weight: 700; opacity: .92; }
.cz-entry-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: rgba(255, 255, 255, .22); }
.cz-entry i { font-style: normal; font-size: 1.6rem; font-weight: 900; }
.cz-entry:active { transform: translateY(4px); box-shadow: 0 1px 0 #7a3ee0; }
.dev-row { align-items: center; }
.dev-ctl { display: flex; align-items: center; gap: 6px; }
.dev-ctl button { width: 34px; height: 34px; border-radius: 10px; font-weight: 900; font-size: 1.2rem; background: var(--soft2); box-shadow: 0 2px 0 var(--line); }
.dev-ctl button:active { transform: translateY(2px); box-shadow: none; }
.dev-in { width: 74px; text-align: center; padding: 6px 4px; border: 2px solid var(--line); border-radius: 10px; font: inherit; font-weight: 900; background: var(--card); color: var(--ink); }

/* ---------- customise screen ---------- */
#overlay .screen.cz { height: 100dvh; min-height: 0; padding-bottom: 0; }
.screen.cz.enter { animation: czIn .28s cubic-bezier(.2, 1, .4, 1); }
.screen.cz.leave { animation: czOut .2s ease-in forwards; }
@keyframes czIn { from { transform: translateY(40px); opacity: 0; } }
@keyframes czOut { to { transform: translateY(40px); opacity: 0; } }
.cz-top { display: flex; align-items: center; gap: 10px; }
.cz-top > b { flex: 1; text-align: center; font-size: 1.15rem; font-weight: 900; }
.cz-top .chip { background: var(--card); box-shadow: 0 2px 0 var(--line); }
.cz-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; flex: none; }
.cz-spot { position: absolute; top: 8px; width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--mc) 32%, transparent) 0%, color-mix(in srgb, var(--mc) 10%, transparent) 55%, transparent 70%); transition: background .3s; }
.cz-stage svg.bell { position: relative; }
.cz-name { position: relative; margin: 2px 0 0; color: var(--muted); font-weight: 800; }
.cz-name b { color: var(--ink); font-weight: 900; }
.cz-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 8px; flex: none; scrollbar-width: none; }
.cz-tabs button { flex: 1; padding: 9px 12px; border-radius: 99px; font-weight: 900; font-size: .9rem; background: var(--soft2); color: var(--muted); white-space: nowrap; }
.cz-tabs button.on { background: var(--ink); color: var(--bg); }
.cz-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; padding: 6px 2px 12px; }
.cz-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 8px; border-radius: 18px; background: var(--card); box-shadow: 0 3px 0 var(--line); border: 3px solid transparent; transition: transform .12s; }
.cz-tile:active { transform: scale(.95); }
.cz-tile.sel { border-color: var(--blue); box-shadow: 0 3px 0 #1d4ed8; }
.cz-prev { height: 70px; display: grid; place-items: center; pointer-events: none; }
.cz-tile b { font-weight: 900; font-size: .84rem; line-height: 1.1; text-align: center; display: flex; flex-direction: column; }
.cz-tile b em { font-style: normal; font-weight: 800; font-size: .68rem; color: var(--muted); }
.cz-tile small { display: flex; align-items: center; gap: 3px; font-weight: 900; font-size: .78rem; color: var(--gold-ink); }
.cz-tile small.own { color: var(--muted); }
.cz-tile.sel small.own { color: var(--blue); }
.cz-tile .coin, .cz-cart .coin, .cz-top .coin { width: 13px; height: 13px; }
.cz-foot { flex: none; background: var(--bg); padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 14px -8px var(--bg); }
.cz-cart { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cz-cart span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; background: var(--gold-bg); color: var(--gold-ink); font-weight: 900; font-size: .8rem; animation: pop .25s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------- questionnaire additions ---------- */
.wkpick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0 6px; }
.wkpick button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0 9px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line);
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.wkpick b { font-size: 1.2rem; font-weight: 900; } .wkpick small { font-size: .62rem; font-weight: 800; color: var(--muted); }
.wkpick button.sel { background: var(--accent); border-color: var(--accent-d); color: #fff; box-shadow: 0 3px 0 var(--accent-d); transform: translateY(-2px); }
.wkpick button.sel small { color: #fff; opacity: .85; }
.wkpick button:active { transform: scale(.92); }
.wk-note { margin: 4px 2px 14px; font-weight: 800; font-size: .88rem; color: var(--muted); min-height: 1.2em; }
.lift-unit { margin: 10px 0 0 auto; width: max-content; }
.lifts { display: grid; gap: 8px; margin: 10px 0 12px; }
.lift { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 6px 8px 6px 12px; }
.lift span { font-size: 1.3rem; } .lift b { flex: 1; font-weight: 900; }
.lift .field { width: 90px; padding: 9px 10px; text-align: center; font-weight: 900; }
.lift em { font-style: normal; font-weight: 800; color: var(--muted); width: 20px; }
.pl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.pl-tags span { padding: 6px 11px; border-radius: 99px; background: var(--card); box-shadow: 0 2px 0 var(--line); font-weight: 900; font-size: .84rem; animation: pwIn .4s cubic-bezier(.3, 1.6, .5, 1) var(--d) both; }

/* recovery countdown */
.start-tag .cd { font-variant-numeric: tabular-nums; }
.unlock-cd { display: flex; flex-direction: column; align-items: center; margin: 4px 0 12px; }
.unlock-cd small { font-weight: 800; color: var(--muted); }
.unlock-cd b { font-size: 2rem; font-weight: 900; color: var(--blue); font-variant-numeric: tabular-nums; }

/* equipment line + pop-up menu */
.eq { align-items: center; }
.eq-edit { margin-left: auto; padding: 6px 12px; border-radius: 99px; font-weight: 900; font-size: .8rem; color: var(--blue); background: var(--sel-bg); box-shadow: 0 2px 0 var(--sel-line); }
.eq-edit:active { transform: translateY(2px); box-shadow: none; }
#eqmenu { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s; }
#eqmenu.out { animation: fadeOut .2s forwards; }
#eqmenu.out .eqm-sheet { animation: sheetDown .2s forwards; }
.eqm-sheet { width: 100%; max-width: 560px; background: var(--card); border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .22s ease-out; }
.eqm-sheet h3 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.eqm-sheet p { margin: 2px 0 14px; }
.eqm-sheet .eqp { margin-bottom: 16px; }

/* START / READY tag: centred with `translate` so the bob (which uses transform) can't shove it sideways,
   and the ticking countdown gets a fixed width so the tag doesn't change size every second */
.start-tag { left: 50%; translate: -50% 0; }
.start-tag .cd { display: inline-block; min-width: 6.4em; text-align: center; font-variant-numeric: tabular-nums; }
/* overviews: calmer, less template-y */
.eyebrow.plain { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.intro-list li { background: none; border: 0; border-radius: 0; padding: 11px 2px; border-bottom: 2px solid var(--soft2); }
.intro-list li:last-child { border-bottom: 0; }
.intro-list.compact li { padding: 10px 2px; }
.hard-toggle .ht { font-size: 1rem; }

/* ---------- level-up ceremony ---------- */
.lvup { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; overflow: hidden; cursor: pointer; color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 46%, #4c2a9e 0%, #23164d 45%, #0f0b1e 80%); animation: fadeIn .25s; }
.lvup.out { animation: fadeOut .3s forwards; }
.lv-rays { position: absolute; left: 50%; top: 46%; width: 130vmax; height: 130vmax; margin: -65vmax 0 0 -65vmax; will-change: transform; opacity: 0; transform: scale(.6);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 50%); mask: radial-gradient(circle, #000 20%, transparent 50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 90, .16) 0deg 7deg, transparent 7deg 20deg); transition: opacity .4s, transform .6s cubic-bezier(.2, 1.4, .4, 1); }
.lvup.boom .lv-rays { opacity: 1; transform: scale(1); animation: crystal 14s linear infinite; }
.lv-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.lvup.boom .lv-in { animation: lvShake .45s ease-out; }
@keyframes lvShake { 10% { transform: translate(-7px, 3px); } 25% { transform: translate(6px, -4px); } 40% { transform: translate(-4px, 2px); } 60% { transform: translate(3px, -1px); } 80% { transform: translate(-1px, 1px); } }
.lv-bell { margin-bottom: 6px; z-index: 2; animation: lvDrop .7s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes lvDrop { from { transform: translateY(-260px) rotate(-20deg); } }
.lv-badge { position: relative; width: 170px; height: 170px; display: grid; place-items: center; animation: medalIn .55s cubic-bezier(.3, 1.6, .5, 1) .1s both; }
.lvup.boom .lv-badge { animation: lvPunch .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes lvPunch { 0% { transform: scale(1); } 30% { transform: scale(1.32); } 60% { transform: scale(.94); } 100% { transform: scale(1); } }
.lv-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lv-ring-bg { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 9; }
.lv-ring-fg { fill: none; stroke: #ffd23f; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; filter: drop-shadow(0 0 6px rgba(255, 210, 63, .8));
  animation: lvFill .85s cubic-bezier(.5, 0, .9, .6) .4s forwards; }
.lvup.boom .lv-ring-fg { stroke-dashoffset: 0; animation: none; }
@keyframes lvFill { to { stroke-dashoffset: 0; } }
.lv-core { width: 128px; height: 128px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 28%, #c4a3ff, #8b5cf6 45%, #5b21b6); box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .22), inset 0 6px 0 rgba(255, 255, 255, .25), 0 10px 30px rgba(0, 0, 0, .45); }
.lvup.boom .lv-core { background: radial-gradient(circle at 35% 28%, #fff3b0, #ffc82e 45%, #d68a00); transition: background .2s; }
.lv-core small { font-weight: 900; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin-bottom: -4px; }
.lv-num { position: relative; display: flex; flex-direction: column; height: 1em; overflow: hidden; font-size: 3.6rem; line-height: 1; font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.lv-num span { display: block; height: 1em; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.lvup.boom .lv-num span { transform: translateY(-100%); }
.lv-wave { position: absolute; inset: 10px; border-radius: 50%; border: 6px solid #ffd23f; opacity: 0; pointer-events: none; }
.lvup.boom .lv-wave { animation: lvWave .8s ease-out; }
@keyframes lvWave { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; border-width: 1px; } }
.lv-title { margin: 22px 0 0; font-size: 3rem; font-weight: 900; letter-spacing: .04em; display: flex; }
.lv-title span { display: inline-block; opacity: 0; transform: translateY(40px) scale(2.2); color: #ffd23f; text-shadow: 0 4px 0 #b45309, 0 0 24px rgba(255, 210, 63, .5); }
.lvup.boom .lv-title span { animation: lvLetter .45s cubic-bezier(.3, 1.7, .5, 1) calc(.08s + var(--i) * .05s) forwards; }
@keyframes lvLetter { to { opacity: 1; transform: none; } }
.lv-reward { margin-top: 14px; display: flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-weight: 900; font-size: 1.4rem;
  opacity: 0; transform: scale(.4); }
.lv-reward .coin { width: 22px; height: 22px; }
.lvup.boom .lv-reward { animation: lvLetter .5s cubic-bezier(.3, 1.7, .5, 1) .75s forwards; }
.lvup .cere-skip { z-index: 3; }
.lvup .spark { z-index: 3; }
/* developer skip-to-end */
.dev-skip { flex: none; padding: 6px 10px; border-radius: 10px; font-weight: 900; font-size: .85rem; color: #7c3aed; background: var(--pur-bg); box-shadow: 0 2px 0 var(--pur-line); }
/* schedule: pick days or let Bell choose */
.wk-mode { width: 100%; margin: 12px 0 4px; display: grid; grid-template-columns: 1fr 1fr; }
.wk-mode button { padding: 9px 6px; }
.wk-count { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 0; }
.wk-count b { font-size: 2.2rem; font-weight: 900; color: var(--accent); min-width: 1.2em; text-align: center; }
.wk-count span { font-weight: 800; color: var(--muted); margin-left: -8px; }
.wk-count button { width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; font-weight: 900; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.wkpick.auto button { pointer-events: none; }
.wkpick button:disabled { opacity: 1; }
/* week circles: rest check-ins and freezes */
.wd.rest span { background: var(--tint); color: var(--accent); font-size: .95rem; }
.wd.frozen span { background: var(--sel-bg); font-size: .95rem; }
.wd.pop span { animation: nodePop .5s cubic-bezier(.3, 1.6, .5, 1); }
.dev-shift { font-style: normal; font-weight: 900; color: #7c3aed; margin-left: 4px; }
.dev-ctl .dev-today { width: auto; padding: 0 10px; font-size: .8rem; }

/* ---------- path: Bell doing different things ---------- */
.path-mascot > svg { animation-delay: var(--ad, 0s); }
.path-mascot.act-squat > svg { animation: mSquat 1.4s ease-in-out infinite var(--ad); transform-origin: 50% 100%; }
@keyframes mSquat { 0%, 100% { transform: scale(1, 1); } 45%, 55% { transform: scale(1.08, .8); } }
.path-mascot.act-hop > svg { animation: mHop .9s cubic-bezier(.3, 0, .5, 1) infinite var(--ad); }
@keyframes mHop { 0%, 100% { transform: translateY(0) scale(1.06, .94); } 15% { transform: translateY(0) scale(.95, 1.06); } 50% { transform: translateY(-16px); } }
.path-mascot.act-sway > svg { animation: mSway 3s ease-in-out infinite var(--ad); transform-origin: 50% 100%; }
@keyframes mSway { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
.path-mascot.act-spin > svg { animation: mSpin 4s ease-in-out infinite var(--ad); }
@keyframes mSpin { 0%, 70% { transform: scaleX(1); } 80% { transform: scaleX(-1); } 90% { transform: scaleX(1) translateY(-6px); } 100% { transform: scaleX(1); } }
.path-mascot.act-run > svg { animation: mRun .42s ease-in-out infinite var(--ad); }
@keyframes mRun { 0%, 100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(10deg) translateY(-5px); } }
.path-mascot.act-stretch > svg { animation: mStretch 2.6s ease-in-out infinite var(--ad); transform-origin: 50% 100%; }
@keyframes mStretch { 0%, 100% { transform: scale(1, 1); } 40%, 60% { transform: scale(.9, 1.16); } }
.path-mascot.act-lift > svg { animation: mSquat 1.6s ease-in-out infinite var(--ad); transform-origin: 50% 100%; }
.prop-db { position: absolute; left: 50%; top: 0; width: 56px; height: 12px; translate: calc(-50% + var(--mx, 0px)) -58px; animation: mPress 1.6s ease-in-out infinite var(--ad);
  background: linear-gradient(90deg, #4a4f5e 0 14px, #8b93a7 14px 42px, #4a4f5e 42px); border-radius: 4px; }
@keyframes mPress { 0%, 100% { transform: translateY(14px); } 45%, 55% { transform: translateY(-4px); } }
/* learn tile */
.learn h2 { margin: 4px 0 8px; }
.quiz .opt.right { background: var(--ok-bg); border-color: var(--ok); color: var(--ok-ink); animation: optPop .3s; }
.quiz .opt.wrong { background: #fde8ec; border-color: var(--bad); color: var(--bad); animation: shake .35s; }
.quiz .opt:disabled { opacity: 1; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- exercise demos ---------- */
.demo { color: var(--ink); background: var(--soft); border-radius: 18px; overflow: hidden; }
.demo svg { display: block; width: 100%; height: auto; }
.demo.big { margin: 6px 0 12px; }
.demo.work { max-width: 230px; margin: 4px auto 8px; }
.demo.mini { width: 120px; flex: none; border-radius: 14px; }
.demo.thumb { width: 64px; flex: none; border-radius: 12px; }
.next-up { display: flex; align-items: center; gap: 12px; margin: 14px auto 0; padding: 8px; border-radius: 18px; background: var(--card); box-shadow: 0 3px 0 var(--line); max-width: 360px; text-align: left; }
.next-up p { margin: 0; display: flex; flex-direction: column; }
.next-up small { font-weight: 800; color: var(--muted); font-size: .75rem; }
.next-up b { font-weight: 900; line-height: 1.2; }
.next-up span { font-weight: 700; color: var(--muted); font-size: .82rem; }
/* ---------- exercise index ---------- */
.sk-seg { margin: 0 14px 10px; display: grid; grid-template-columns: 1fr 1fr; }
.sk-seg button { padding: 9px 6px; }
.ix-search { padding: 0 14px; }
.ix-search .field { padding: 12px 14px; font-size: 1rem; }
.ix-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 4px; scrollbar-width: none; }
.ix-chips button { flex: none; padding: 7px 12px; border-radius: 99px; font-weight: 900; font-size: .82rem; background: var(--soft2); color: var(--muted); }
.ix-chips button.on { background: var(--ink); color: var(--bg); }
.ix-count { margin: 8px 16px 4px; font-weight: 800; font-size: .8rem; color: var(--muted); }
#ix-list { padding: 0 14px 20px; }
.ix-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 4px; border-bottom: 2px solid var(--soft2); }
.ix-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ix-t b { font-weight: 900; } .ix-t small { color: var(--muted); font-weight: 700; }
.ix-row i { font-style: normal; color: var(--muted2); font-weight: 900; font-size: 1.3rem; }
.ex-desc { margin: 0 0 10px; color: var(--ink2); font-weight: 600; line-height: 1.4; }
.ex-desc b { color: var(--ink); }
.ex-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ex-meta span { padding: 5px 10px; border-radius: 99px; background: var(--soft2); font-weight: 800; font-size: .8rem; }
/* ---------- weights + failure ---------- */
.load { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 10px; }
.load b { min-width: 92px; text-align: center; font-size: 1.3rem; font-weight: 900; padding: 6px 10px; border-radius: 12px; background: var(--sel-bg); color: var(--sel-ink); }
.load button { width: 40px; height: 40px; border-radius: 50%; font-weight: 900; font-size: 1.3rem; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.load .load-x { width: 30px; height: 30px; font-size: .8rem; box-shadow: none; border: 0; color: var(--muted); background: none; }
.add-load { display: block; margin: 0 auto 10px; padding: 8px 14px; border-radius: 99px; font-weight: 900; font-size: .85rem; color: var(--blue); background: var(--sel-bg); box-shadow: 0 2px 0 var(--sel-line); }
.fail-tog { display: block; margin: 10px auto 0; padding: 7px 14px; border-radius: 99px; font-weight: 900; font-size: .82rem; color: var(--muted); background: var(--soft2); }
.fail-tog.on { color: #fff; background: var(--bad); box-shadow: 0 2px 0 #9f1239; }
.rrow.pr .rr-ic { background: #ffc800; }
.rrow em.small { font-size: .8rem; color: var(--ink2); white-space: normal; text-align: right; max-width: 52%; }

/* ---------- calendar path tiles ---------- */
/* every node's ledge is a darker shade of its own face, so colours always match */
.node.done { box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 62%, #000); }
.node.done:active { box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 62%, #000); }
.node.missed { --c: #5b5668; background: var(--c); color: #ff6b81; box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 62%, #000); font-size: 1.9rem; }
.node.frozen { --c: #7dd3fc; background: var(--c); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 62%, #000); }
.node.restday { --c: #8b8fd8; background: var(--c); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 62%, #000); font-size: 1.5rem; }
.node.locked.restday { --c: var(--locked); background: var(--locked); box-shadow: 0 8px 0 var(--locked-d); opacity: .8; }
.node.pre { --c: transparent; background: none; box-shadow: none; width: 40px; height: 40px; border: 3px dashed var(--line); pointer-events: none; }
.node.pre::before { display: none; }
/* today's ring goes round the whole button, ledge included, with the same gap all the way round (never touching it) */
.node.is-today:not(.just-done)::after { content: ""; position: absolute; inset: -10px -10px -18px -10px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--c) 45%, transparent); pointer-events: none; }
.node.is-today:active::after { inset: -10px -10px -12px -10px; }
.node-day { margin-top: 12px; font-weight: 800; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.node-day.today { color: var(--accent); font-weight: 900; }
.nodes { gap: 14px; }
/* Bell stands still on the path (his face still breathes and blinks) */
.path-mascot > svg { animation: none !important; transform: none !important; }
.prop-db { display: none; }
/* week circles */
.wd.missed span { background: #5b5668; color: #ff6b81; }
.wd.plan span { box-shadow: inset 0 0 0 3px var(--tint-line); }
.cal-row span.d-miss { background: #5b5668; color: #ff6b81; }
.cal-key .k-miss { background: #5b5668; color: #ff6b81; }
/* fixed colours for special tiles (the week colour is set inline on every tile, so these can't rely on --c) */
.node.restday:not(.locked) { background: #8b8fd8; box-shadow: 0 8px 0 #5c60a8; }
.node.restday.is-today { outline-color: rgba(139, 143, 216, .45); }
.node.missed { background: #5b5668; box-shadow: 0 8px 0 #3a3644; }
.node.frozen { background: #7dd3fc; box-shadow: 0 8px 0 #3a9cc8; }
.node.chest:not(.locked) { background: #ffb300; box-shadow: 0 8px 0 #c77f00; }
.node.chest.done { background: #ffb300; box-shadow: 0 8px 0 #c77f00; opacity: .75; }
.node.chest.locked { background: var(--locked); box-shadow: 0 8px 0 var(--locked-d); }
.node.current.restday-today { background: #8b8fd8; box-shadow: 0 8px 0 #5c60a8; }
.load-sug { text-align: center; margin: 0 0 10px; }
.load-sug small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.load-sug > div { display: flex; gap: 8px; justify-content: center; }
.load-sug .add-load { display: inline-block; margin: 0; }
.load-sug .add-load.alt { color: var(--muted); background: var(--card); box-shadow: 0 2px 0 var(--line); border: 2px solid var(--line); }
/* ---------- floating developer panel ---------- */
#devtab { position: fixed; left: 0; top: 42%; z-index: 9000; width: 30px; height: 42px; border: 0; border-radius: 0 12px 12px 0; font-size: 1rem;
  background: color-mix(in srgb, var(--card) 85%, transparent); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); opacity: .75; padding: 0; }
#devtab.on, #devtab:hover { opacity: 1; }
#devtab.shifted { background: #f59e0b; }
#devpanel { position: fixed; left: 36px; top: calc(42% - 110px); z-index: 9001; width: min(300px, calc(100vw - 48px)); padding: 10px 12px 12px; border-radius: 16px;
  background: var(--card); border: 2px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-size: .9rem; }
.devp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.devp-x { border: 0; background: none; color: var(--muted); font-size: 1rem; width: 28px; height: 28px; }
.devp-date { display: grid; grid-template-columns: 38px 38px 1fr 38px 38px; gap: 4px; align-items: center; }
.devp-date button { height: 36px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); font-weight: 900; font-size: .8rem; color: var(--ink); }
.devp-date span { text-align: center; line-height: 1.15; } .devp-date small { display: block; color: var(--muted); font-size: .72rem; }
.devp-today { width: 100%; margin: 6px 0 4px; height: 30px; border-radius: 10px; border: 0; background: var(--sel-bg); color: var(--sel-ink); font-weight: 800; font-size: .8rem; }
.devp-today:disabled { opacity: .4; }
.devp-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); }
.devp-row .dev-ctl { display: flex; gap: 4px; align-items: center; }
.devp-row .dev-ctl button { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); background: var(--bg); font-weight: 900; color: var(--ink); }
.devp-row .dev-in { width: 62px; height: 30px; text-align: center; border-radius: 9px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 800; }

/* =====================================================================
   28 Nov: performance. Anything scrolled out of view stops animating.
   ===================================================================== */
.off, .off *, .behind *, .behind *::before, .behind *::after { animation-play-state: paused !important; }
.ix-row { content-visibility: auto; contain-intrinsic-size: auto 72px; }
.demo.thumb[data-thumb] { aspect-ratio: 160 / 116; }

/* =====================================================================
   28 Nov: badge pages, league mascots, effects
   ===================================================================== */
/* badge cards are buttons now: tap one to open its page */
button.badge { font: inherit; color: inherit; cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
button.badge:active { transform: translateY(3px) scale(.98); box-shadow: 0 0 0 var(--line); }
.sub-n { font-size: .78rem; font-weight: 800; color: var(--muted); margin-left: 6px; letter-spacing: 0; }

/* 3D tilt that follows your finger (set by JS as --rx/--ry, light spot at --mx/--my) */
.tilt { transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
  transform-style: flat; backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform; } /* flat + one stable layer: no 3D flicker */
.tilt .medal::after, .tilt .medal span { will-change: auto; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tilt.tilting { transition: transform .06s linear; }
.badge.tilt:not(.t0)::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .28), transparent 55%); }
.badge.tilt { position: relative; }
.badge.tilt.tilting::before { opacity: 1; }
/* Diamond and Crystal cards get a holographic foil that shifts as they tilt */
.badge.t5.tilt::before, .badge.t6.tilt::before { opacity: .55;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 50%),
    linear-gradient(calc(110deg + var(--ry, 0deg) * 4), transparent 20%, rgba(165, 243, 252, .22) 35%, rgba(249, 168, 212, .22) 50%, rgba(253, 230, 138, .22) 65%, transparent 80%); }

/* badge page */
.bs-m { background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; display: inline-grid !important; flex: none; }
.bs-m .medal { width: 40px; height: 40px; font-size: 1.2rem; margin: 0; }
.bs-m.big .medal { width: 112px; height: 112px; font-size: 3.4rem; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45), inset 0 -6px 0 rgba(0, 0, 0, .14); }
.bs-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; }
.bs-head h2 { margin: 0; }
.bs-head .muted { margin: 0 12px; }
.bs-big { position: relative; display: grid; place-items: center; width: 170px; height: 150px; margin-bottom: 2px; }
.bs-big .bs-m { z-index: 1; animation: medalIn .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.bs-rays { position: absolute; inset: -10px; border-radius: 50%; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 40%, transparent) 0 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: crystal 18s linear infinite; }
.bs-big:has(.t0) .bs-rays { display: none; }
.bs-stat { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.bs-stat b { font-size: 2rem; font-weight: 900; line-height: 1; }
.bs-stat span { color: var(--muted); font-weight: 800; }
.bs-next { margin: 2px 0 6px; font-weight: 700; color: var(--ink2); }
.tc { font-weight: 900; }
.tc.t1 { color: #c27c45; } .tc.t2 { color: #8a919c; } .tc.t3 { color: #d4a20b; } .tc.t4 { color: #4f9cc0; } .tc.t5 { color: #6366f1; }
.tc.t6 { background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bs-tiers { list-style: none; margin: 6px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bs-tiers li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--card);
  animation: rowIn2 .35s cubic-bezier(.3, 1.3, .5, 1) calc(var(--i) * 45ms + .15s) both; }
@keyframes rowIn2 { from { opacity: 0; transform: translateY(10px); } }
.bs-tiers li.cur { border-color: var(--tint-line); background: var(--tint); box-shadow: 0 3px 0 var(--tint-line); }
.bs-tiers li.locked { opacity: .55; }
.bs-tiers li.locked .medal { background: var(--soft2) !important; }
.bs-tiers li.t6.locked .bs-t b { background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bs-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bs-t b { font-size: .95rem; } .bs-t small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.bs-t .bar.thin { height: 8px; margin-top: 5px; }
.bs-tiers em { font-style: normal; font-weight: 900; font-size: .8rem; white-space: nowrap; }
.bs-ok { color: var(--ok); } .bs-now { color: var(--accent); } .bs-lock { font-size: 1rem !important; }

/* league board: mascot portraits, medal ranks, tap a row for their card */
.lg-av { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--av) 22%, var(--card)), color-mix(in srgb, var(--av) 38%, var(--soft2)));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--av) 55%, #fff 0%), 0 0 0 1px color-mix(in srgb, var(--av) 25%, transparent); }
.lg-av svg { margin-top: 5px; }
.board li { cursor: pointer; transition: background .15s, transform .15s; animation: rowIn2 .35s cubic-bezier(.3, 1.3, .5, 1) calc(min(var(--i), 12) * 30ms) both; -webkit-tap-highlight-color: transparent; }
.board li:active { transform: scale(.98); background: var(--soft); }
.board li.you:active { background: var(--tint); }
.board li.zone-line { cursor: default; } /* rises in with the rows around it */
.board .rk.m1, .board .rk.m2, .board .rk.m3 { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff !important; font-size: .8rem; position: relative; overflow: hidden;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.board .rk.m1 { background: radial-gradient(circle at 35% 30%, #fff3a8, #f5c518 55%, #b7860b); }
.board .rk.m2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c7ccd4 55%, #8a919c); }
.board .rk.m3 { background: radial-gradient(circle at 35% 30%, #f3b88a, #b8743f 60%, #7c4a22); }
.board .rk.m1::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: glint 3s ease-in-out infinite; }
.board li.you { position: relative; overflow: hidden; }
.board li.you::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; pointer-events: none; will-change: transform;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: translateX(-100%) skewX(-12deg); animation: sheen 6s ease-in-out 1s infinite; }
.rival { text-align: center; }
.rival-stage { display: grid; place-items: center; height: 150px; margin: 4px auto 0; width: 170px; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, var(--tint), transparent 70%); }
.rival h2 { margin: 6px 0 0; }
.rival-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.rival-stats span { background: var(--soft); border: 2px solid var(--line); border-radius: 14px; padding: 10px 4px; font-size: .75rem; font-weight: 800; color: var(--muted); display: flex; flex-direction: column; }
.rival-stats b { font-size: 1.15rem; color: var(--ink); font-weight: 900; }
.rival .btn { margin-top: 8px; }

/* tab switches: the new page glides in from the side of the tab you picked */
#view.tab-in > :not(.topbar) { animation: tabIn .32s cubic-bezier(.2, .9, .3, 1) both; }
#view.tab-in > :nth-child(3) { animation-delay: 30ms; } #view.tab-in > :nth-child(4) { animation-delay: 60ms; } #view.tab-in > :nth-child(n+5) { animation-delay: 90ms; }
@keyframes tabIn { from { opacity: 0; transform: translateX(var(--dx, 0)); } }
.tab svg { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tab.on svg { animation: tabPop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tabPop { 0% { transform: scale(.7) translateY(4px); } 100% { transform: scale(1); } }
.tab:active svg { transform: scale(.88); }

/* streak flame: flickers once today counts, sits cold and grey while today's workout is still to do */
.flame { display: inline-block; position: relative; transform-origin: 50% 85%; }
.flame.lit { animation: flicker 2.4s ease-in-out infinite; filter: drop-shadow(0 0 4px rgba(255, 140, 0, .55)); }
.flame.cold { filter: grayscale(1) brightness(1.1); opacity: .6; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 20% { transform: scale(1.06, .96) rotate(-3deg); } 45% { transform: scale(.97, 1.05) rotate(2deg); } 70% { transform: scale(1.04, .98) rotate(-1deg); } }
.spark.ember { top: 50%; width: 6px; height: 6px; margin: -3px; background: #ffb020; box-shadow: 0 0 8px #ff7a1a; animation-duration: .8s; }

/* coins flying into the counter */
.fly-coin { position: fixed; left: 0; top: 0; z-index: 100; font-size: 22px; line-height: 1; font-style: normal; pointer-events: none; will-change: transform; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
.chip .coin-ic { display: inline-block; }
.chip.coin-hit .coin-ic { animation: coinHit .25s ease-out; }
.chip.coin-hit b { color: #f5b301; }
@keyframes coinHit { 40% { transform: scale(1.35) rotate(-12deg); } }

/* weekly gift opening */
.sheet[data-sheet="chest"] { overflow: hidden; }
.chest-open { position: relative; height: 290px; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.co-box { font-size: 6.5rem; line-height: 1; z-index: 2; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35)); animation: coWobble 1.2s ease-in-out .1s both; transform-origin: 50% 90%; }
@keyframes coWobble { 0% { transform: scale(.4); opacity: 0; } 12% { transform: scale(1); opacity: 1; }
  20% { transform: rotate(-8deg); } 26% { transform: rotate(8deg); } 32% { transform: rotate(0); }
  48% { transform: rotate(-12deg) scale(1.05); } 54% { transform: rotate(12deg) scale(1.05); } 60% { transform: rotate(0); }
  76% { transform: rotate(-16deg) scale(1.12); } 82% { transform: rotate(16deg) scale(1.12); } 88% { transform: rotate(-6deg) scale(1.15); } 100% { transform: scale(1.18, 1.08); } }
.co-hint { position: absolute; bottom: 10px; margin: 0; font-weight: 800; color: var(--muted); font-size: .85rem; animation: fadeIn .4s .6s both; }
.co-rays { position: absolute; width: 520px; height: 520px; left: 50%; top: 50%; margin: -260px; opacity: 0; pointer-events: none; will-change: transform;
  background: repeating-conic-gradient(from 0deg, rgba(255, 196, 46, .38) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); mask: radial-gradient(circle, #000 10%, transparent 60%); }
.co-flash { position: absolute; inset: -40px; background: radial-gradient(circle, #fff, rgba(255, 220, 120, .6) 30%, transparent 65%); opacity: 0; pointer-events: none; z-index: 3; }
.co-reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; z-index: 2; pointer-events: none; }
.co-reveal h2 { margin: 2px 0 0; font-size: 2.2rem; } .co-reveal p { margin: 4px 0 0; }
.co-btn { opacity: 0; pointer-events: none; transition: opacity .3s .9s; }
.opened .co-box { animation: coBurst .45s cubic-bezier(.5, 0, .7, .4) forwards; }
.opened .co-hint { display: none; }
.opened .co-flash { animation: coFlash .7s ease-out; }
.opened .co-rays { opacity: 1; transition: opacity .5s .1s; animation: crystal 14s linear infinite; }
.opened .co-reveal { opacity: 1; transition: opacity .3s .25s; }
.opened .co-reveal .co-bell { animation: medalIn .6s cubic-bezier(.3, 1.6, .5, 1) .2s both; }
.opened .co-reveal h2 { animation: tierSlam2 .5s cubic-bezier(.3, 1.6, .5, 1) .35s both; }
@keyframes tierSlam2 { from { transform: scale(2.4); opacity: 0; } }
.chest-open.opened + .co-btn, .sheet:has(.opened) .co-btn { opacity: 1; pointer-events: auto; }
@keyframes coBurst { to { transform: scale(2.4); opacity: 0; } }
@keyframes coFlash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.chest-open .spark { top: 50%; z-index: 4; }

/* a soft ripple from the exact spot you touch on cards and rows */
.rip { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .12; transform: scale(0); animation: rip .55s ease-out forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
/* rest: a blue ring drains as the break runs out */
.rest-timer { width: 210px; height: 210px; }
.rest-timer .ring { transition: stroke-dashoffset .25s linear; }
.rest-timer b { font-size: 3.4rem; }

/* =====================================================================
   28 Nov (2): finished path tiles look finished. Gold for done days, rest
   days that have passed and opened gifts; prismatic after a full Hard workout.
   ===================================================================== */
.node.done, .node.restday.rest-done, .node.current.restday-today.rest-done, .node.chest.opened {
  --c: #ffc21a; color: #fff;
  background: radial-gradient(circle at 32% 26%, #fff6c2 0%, #ffd84a 22%, #ffb800 55%, #e08e00 100%);
  box-shadow: 0 8px 0 #b86f00, inset 0 -4px 0 rgba(150, 80, 0, .25), 0 0 18px -4px rgba(255, 190, 0, .55);
  text-shadow: 0 2px 0 rgba(150, 80, 0, .45); opacity: 1; }
.node.done:not(.is-today):not(.prism) { overflow: hidden; }
.node.done:active, .node.rest-done:active, .node.chest.opened:active { box-shadow: 0 2px 0 #b86f00; }
/* a glint crosses each gold tile now and then (transform only) */
.node.done:not(.is-today):not(.prism)::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: glint 5s ease-in-out infinite; animation-delay: calc(var(--gd, 0) * 1s); }

.node.is-today, .node.chest.opened { overflow: visible; }
.node-wrap:nth-child(2n) .node { --gd: .8; } .node-wrap:nth-child(3n) .node { --gd: 1.9; } .node-wrap:nth-child(5n) .node { --gd: 3.1; }
/* prismatic diamond: a full Hard workout */
.node.done.prism { --c: #b9a7ff;
  background: conic-gradient(from 210deg at 50% 45%, #a5f3fc, #c4b5fd, #f9a8d4, #fde68a, #86efac, #7dd3fc, #a5f3fc);
  box-shadow: 0 8px 0 #6d5bd0, inset 0 -4px 0 rgba(60, 30, 140, .25), 0 0 22px -2px rgba(196, 181, 253, .8); text-shadow: 0 2px 0 rgba(60, 30, 140, .5); }
.node.done.prism:active { box-shadow: 0 2px 0 #6d5bd0; }
.node.done.prism::before { background: radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%); }
.node-sub { position: absolute; right: -6px; bottom: -4px; font-size: .95rem; line-height: 1; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--card); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); text-shadow: none; z-index: 2; }
.node.rest-done, .node.done.prism { overflow: visible; }
/* opened gift: gold, with the lid popped up off the box */
.chest-lid { display: inline-block; transform: translateY(-6px) rotate(-14deg) scale(.92); filter: drop-shadow(0 3px 0 rgba(150, 80, 0, .35)); }


/* mascot backgrounds */
.mbg { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; font-style: normal; }
.lg-av { position: relative; }
.lg-av.has-bg svg { position: relative; }
.cz-prev { position: relative; width: 84px; border-radius: 16px; overflow: hidden; }
.cz-prev svg { position: relative; }
.cz-prev.has-bg svg { margin-top: 6px; }
.mbg.stage { inset: 2px 50% auto auto; width: 230px; height: 174px; margin-right: -115px; border-radius: 28px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 10px 24px -12px rgba(0, 0, 0, .5); animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.cz-stage:has(.mbg.stage) .cz-spot { display: none; }
.cz-stage:has(.mbg.stage) .cz-name { margin-top: 10px; }
.me-bell.has-bg { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; overflow: visible; }
.me-bell.has-bg .mbg { border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .3); }
.me-bell.has-bg svg.bell { position: relative; margin-top: 4px; }
.rival-stage { position: relative; overflow: hidden; border-radius: 28px; }
.rival-stage .mbg { border-radius: 28px; }
.rival-stage svg.bell { position: relative; }
/* room above today's tile for its tag, so it never covers the day before */
.node-wrap:has(> .start-tag) { margin-top: 50px; }
.unit .nodes > .node-wrap:first-child:has(> .start-tag) { margin-top: 10px; }

/* one canvas draws every particle (see FX in app.js) */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }
.cz-tile .l-on { display: none; } .cz-tile.sel .l-on { display: inline; } .cz-tile.sel .l-own { display: none; }

/* Bell's tour: everything dims except a spotlight on the thing Bell is talking about */
#tour { position: fixed; inset: 0; z-index: 70; }
.tour-hole { position: fixed; pointer-events: none; box-shadow: 0 0 0 200vmax rgba(10, 8, 20, .66); transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease, border-radius .3s; }
.tour-hole::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 3px solid var(--accent); animation: tourPulse 1.4s ease-out infinite; }
@keyframes tourPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
.tour-hole.none { left: 50%; top: 40%; width: 0; height: 0; }
.tour-hole.none::after { display: none; }
.tour-card { position: fixed; left: 50%; bottom: 0; translate: -50% 0; z-index: 71; }
.tour-card.top { bottom: auto; top: 0; border-radius: 0 0 24px 24px; padding-top: calc(16px + env(safe-area-inset-top)); animation: tourDown .25s ease-out; }
@keyframes tourDown { from { transform: translateY(-40px); opacity: 0; } }
.btn-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-row .btn { flex: 1; }

/* Bellbound icons (icons.js): sized to the text around them, like the emoji they replace */
.ic { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.24em; flex: none; overflow: visible; }
.bubble.typing .ic { visibility: hidden; }
.node .ic { width: 1.05em; height: 1.05em; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .14)); }
.medal .ic { width: 1.1em; height: 1.1em; vertical-align: middle; }
.eqt.on::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/68% no-repeat, var(--blue); }
.opt .ic { width: 1.65em; height: 1.65em; vertical-align: -.5em; margin-right: 4px; }
.q-ic .ic, .stat > span .ic, .rr-ic .ic { width: 1.35em; height: 1.35em; }
.sheet-hero .ic { width: 1.1em; height: 1.1em; }
/* body diagrams and movement figures need room to be read */
.opt svg[class*="ic-m-"], .opt svg[class*="ic-j-"], .opt svg.ic-pull, .opt svg.ic-pushup, .opt svg.ic-press, .opt svg.ic-squat, .opt svg.ic-hinge, .opt svg.ic-plank,
.opt svg.ic-invert, .opt svg.ic-pistol, .opt svg.ic-lsit, .opt svg.ic-muscleup, .lift svg.ic { width: 2.4em; height: 2.4em; vertical-align: middle; margin: -6px 6px -6px -4px; }
.ix-t small svg[class*="ic-m-"], .eyebrow svg[class*="ic-m-"] { width: 1.6em; height: 1.6em; vertical-align: -.5em; }

/* ---------- account + friends ---------- */
.acct .acct-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.acct .acct-top .ic { width: 34px; height: 34px; flex: none; }
.acct .acct-top b { display: block; font-size: 1.05rem; }
.acct .acct-top small, .person small, .cz-entry small { color: var(--muted); font-weight: 700; }
.acct .row .link { display: inline; width: auto; padding: 0; text-transform: none; font-size: 1rem; color: var(--accent); }
.acct .cz-entry { margin: 10px 0; width: 100%; }
.acct .btn-row { display: flex; gap: 8px; } .acct .btn-row .btn { flex: 1; }
.danger-t { color: var(--bad); }
.pill-n { font-style: normal; background: var(--bad); color: #fff; border-radius: 99px; min-width: 22px; padding: 2px 7px; font-size: .78rem; font-weight: 900; text-align: center; }
.btn.google { background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn.google .ic { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; font-size: .8rem; margin: 12px 0; text-transform: uppercase; }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.acct-form { display: grid; gap: 10px; }
.acct-err { color: var(--bad); font-weight: 800; font-size: .88rem; margin: 0; }
.un-wrap { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.2rem; color: var(--muted); }
.un-wrap .field { flex: 1; }
.ok-t { color: var(--ok-ink); font-weight: 800; } .bad-t { color: var(--bad); font-weight: 800; }
[data-sheet="friends"] { max-height: 82vh; overflow-y: auto; }
[data-sheet="friends"] #fr-q { margin: 6px 0 4px; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person > div { flex: 1; min-width: 0; } .person b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { display: block; font-size: .78rem; }
/* "Browse as guest": deliberately quiet, at the very bottom */
.guest-btn { display: block; width: 100%; margin-top: 18px; padding: 10px; color: var(--muted2); font-weight: 700; font-size: .85rem; background: none; }
.welcome .dev-link { font-size: .72rem; opacity: .6; margin-top: 8px; }
.welcome .btn + .btn { margin-top: 10px; }

/* =====================================================================
   3 Dec: the ANDROID LOOK. The native app's look is now the reference, so
   these rules restyle the web app to match it (values from the Kotlin code).
   The web's polish stays: highlights, shine sweeps, glints, glows, animations.
   ===================================================================== */
/* buttons: flat face, 2px border, a 4px ledge, 16px corners; the highlight and the shine sweep stay */
.btn { border-radius: 16px; padding: 13px 18px; font-size: 15px; letter-spacing: .03em; box-shadow: 0 4px 0 var(--line); }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.primary, .btn.danger, .btn.pause, .btn.stop { background: var(--bc) !important; border-color: var(--bc); box-shadow: 0 4px 0 var(--bd) !important; text-shadow: none; }
.btn.primary { --bc: var(--accent); --bd: var(--accent-d); }
.btn.ghost { background: transparent; }
.btn:disabled, .btn.primary:disabled { background: var(--locked) !important; border-color: var(--locked-d); color: var(--locked-ink); box-shadow: 0 4px 0 var(--locked-d) !important; }
.btn:active:not(:disabled), .btn.primary:active:not(:disabled), .btn.danger:active:not(:disabled), .btn.pause:active:not(:disabled), .btn.stop:active:not(:disabled) {
  transform: translateY(3px); box-shadow: 0 1px 0 var(--bd, var(--line)) !important; filter: none; }
.link { font-size: 13.6px; }
/* progress bars: 12px, 6px corners, one solid colour (the top highlight and growth shine stay) */
.bar, .bar.big { height: 12px; border-radius: 6px; } .bar i { border-radius: 6px; }
.bar.lv i { --fill: var(--accent-hi); }
/* cards */
.card { border-radius: 18px; margin: 6px 14px; padding: 14px 16px; }

/* welcome */
.welcome { gap: 0; padding: 24px; }
.welcome h1 { font-size: 44px; margin: 0; }
.welcome p { font-size: 18px; font-weight: 800; margin: 18px 0; }
.welcome .btn.wide { margin-top: 0; }
.welcome .btn.wide + .btn.wide { margin-top: 18px; }
.welcome .dev-link { opacity: 1; font-size: 13.6px; color: var(--muted2); margin-top: 4px; }

/* path: week headers (Android gradient, no ledge; the glow and sheen stay) */
.unit { margin: 18px 0 0; }
.unit-head { background: linear-gradient(135deg, color-mix(in srgb, var(--hc) 70%, #ffe066) 0%, var(--hc) 50%, color-mix(in srgb, var(--hc) 82%, #3b0a5a) 100%);
  filter: none; box-shadow: none; padding: 14px 18px; }
.unit-head small { font-size: 12px; } .unit-head h2 { font-size: 21px; font-weight: 900; margin: 0; } .unit-head p { font-size: 14px; font-weight: 700; }
.guide-btn { width: 44px; height: 44px; border: 0; }
.nodes { gap: 18px; padding-top: 26px; }
.node-day { font-size: 13px; }
/* path tiles: the Android colours and ledges; the face highlight, inner shade, glow and glint stay */
.node.done, .node.restday.rest-done, .node.current.restday-today.rest-done, .node.chest.opened {
  background: #ffc800; box-shadow: 0 8px 0 #d99a00, inset 0 -4px 0 rgba(150, 80, 0, .25), 0 0 18px -4px rgba(255, 190, 0, .55); }
.node.done:active, .node.rest-done:active, .node.chest.opened:active { box-shadow: 0 2px 0 #d99a00; }
.node.current:not(.done):not(.restday-today) { background: var(--c); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 75%, #000); }
.node.current.challenge { background: #8b5cf6; box-shadow: 0 8px 0 #5b21b6; }
.node.missed { background: var(--locked); color: var(--locked-ink); box-shadow: 0 8px 0 var(--locked-d); }
.node.frozen { background: #7dd3fc; box-shadow: 0 8px 0 #0284c7; }
.node.restday:not(.locked):not(.rest-done) { background: var(--locked); color: var(--locked-ink); box-shadow: 0 8px 0 var(--locked-d); }
.node.chest:not(.locked):not(.opened) { background: #facc15; box-shadow: 0 8px 0 #ca8a04; }
.node.is-today.done:not(.just-done)::after, .node.is-today.rest-done:not(.just-done)::after { border-color: rgba(255, 200, 0, .45); }
.start-tag { color: var(--accent); }

/* profile */
.cz-entry { background: var(--card) !important; color: var(--ink); border: 2px solid var(--line); box-shadow: none !important; border-radius: 18px; margin: 12px 14px 0; padding: 14px; }
.cz-entry-ic { background: var(--tint); }
.cz-entry b { font-size: 17px; } .cz-entry small { font-size: 13px; color: var(--muted); opacity: 1; }
.cz-entry i { font-size: 24px; color: var(--muted2); }
.cz-entry:active { transform: none; }
.grid { gap: 8px; padding: 0 14px; }
.stat { border-radius: 16px; padding: 12px 8px; }
.stat span { font-size: 28px; line-height: 1; } .stat b { font-size: 20px; font-weight: 900; } .stat small { font-size: 12px; font-weight: 800; }
.sub { font-size: 20px; font-weight: 900; padding: 18px 18px 6px; }
.badge { border-radius: 16px; }
.badge .medal { width: 58px; height: 58px; }
.badge b { font-size: 15px; font-weight: 900; } .badge .tier { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: none; }

/* leagues */
.league-head h1 { font-size: 28px; font-weight: 900; margin: 0; } .league-head .muted { font-size: 15px; font-weight: 700; margin: 0; }
.demo { background: none; color: var(--muted2); font-size: 12px; padding: 4px 0 0; }
.board { padding: 0 14px; }
.board li { margin: 3px 0; padding: 10px; gap: 8px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); }
.board li.you { background: var(--tint); border-color: var(--tint-line); }
.board .rk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px; flex: none; }
.board .rk.m1, .board .rk.m2, .board .rk.m3 { color: #fff; } .board .rk.m1 { background: #ffc800; } .board .rk.m2 { background: #c0c0c0; } .board .rk.m3 { background: #cd7f32; }
.board .nm { font-size: 15px; font-weight: 900; } .board .nm small { font-size: 12px; } .board li > b { font-size: 15px; font-weight: 900; }
.board li.zone-line { background: none; border: 0; justify-content: center; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 900; padding: 8px; }

/* index */
.ix-chips button { padding: 7px 14px; border-radius: 20px; font-size: 14px; background: var(--card); border: 2px solid var(--line); color: var(--ink2); }
.ix-chips button.on { background: var(--accent); border-color: var(--accent-d); color: #fff; }
.ix-count { font-size: 13px; font-weight: 800; color: var(--muted); padding: 10px 18px 4px; margin: 0; }
#ix-list { padding: 0 14px; }
.ix-row { margin: 4px 0; padding: 8px; gap: 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); }
.ix-row .thumb { width: 84px; flex: none; border-radius: 10px; }
.ix-row b { font-size: 16px; font-weight: 900; } .ix-row small { font-size: 13px; font-weight: 700; }
.ix-row i { font-size: 22px; }

/* skills: numbered rungs, done ones green with the tick on the right */
.card.skill h2 { font-size: 20px; font-weight: 900; margin: 0; }
.card.skill h2 .muscles { display: block; margin: 2px 0 0; font-size: 13px; font-weight: 700; }
.ladder { counter-reset: rung; gap: 6px; }
.ladder li { counter-increment: rung; position: relative; padding: 9px 12px 9px 34px; border-radius: 12px; background: var(--soft); border: 2px solid var(--line); font-size: 15px; font-weight: 800; }
.ladder li::before { content: counter(rung); position: absolute; left: 12px; top: 10px; font-size: 13px; font-weight: 900; color: var(--muted); }
.ladder li.done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ink); }
.ladder li.done .note { position: absolute; right: 12px; top: 8px; margin: 0; font-size: 18px; color: var(--ok); }
.ladder li.cur { background: var(--tint); border-color: var(--tint-line); }
.ladder li.future, .ladder li.lock { color: var(--muted); }
.ladder li.lock { border-style: solid; }
.ladder .note { font-size: 12px; }
.welcome { padding: 24px 6px; }
.sub { display: flex; align-items: baseline; } .sub .sub-n { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--muted); }

/* Android look, part 2: workout overview, equipment line, auto-complete switch, streak calendar, customise */
.intro-list li, .intro-list.compact li { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.intro-list li:last-child { border-bottom: 2px solid var(--line); }
.intro-list li small { font-size: 14px; font-weight: 800; }
.hard-badge { background: none; color: #7c3aed; font-size: 14px; padding: 0; letter-spacing: 0; }
.eqchip { background: var(--soft); border: 0; border-radius: 10px; padding: 5px 8px; font-size: 13px; color: var(--ink2); }
.eq-edit { background: none !important; border: 0 !important; box-shadow: none !important; color: var(--accent); font-weight: 900; font-size: 13px; padding: 5px 8px; margin: 0; }
/* the auto-complete checkbox drawn as the app's switch, label on the left */
.auto { flex-direction: row-reverse; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 800; margin: 10px 0 0; }
.auto input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--locked); position: relative; transition: background .2s; cursor: pointer; }
.auto input::before { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.auto input:checked { background: var(--accent); } .auto input:checked::before { transform: translateX(20px); }
/* streak calendar: rounded squares, colour only where something happened */
.cal-row { gap: 4px; padding: 0; }
.cal-row span { aspect-ratio: auto; height: 38px; border-radius: 10px; background: transparent; font-size: 13px; box-shadow: none !important; outline: 0; }
.cal-row span.d-train { background: var(--accent); } .cal-row span.d-rest { background: var(--soft2); } .cal-row span.d-frozen { background: #bae6fd; }
.cal-row span.d-miss { background: var(--warn-bg); color: var(--bad); }
.cal-row span.today { border: 2px solid var(--tint-line); }
.cal-row span.d-future { opacity: 1; color: var(--muted2); }
.cal-key i { background: none !important; color: var(--muted); }
/* customise */
.cz-tabs button { flex: none; padding: 8px 14px; border-radius: 12px; background: var(--soft); color: var(--ink2); border: 2px solid var(--line); font-size: 14px; }
.cz-tabs button.on { background: var(--tint); color: var(--accent); border-color: var(--tint-line); }
.cz-tile { border-radius: 16px; border: 2px solid var(--line); box-shadow: none; padding: 6px; }
.cz-tile.sel { background: var(--tint); border-color: var(--accent); box-shadow: none; }
.cz-tile b { font-size: 13px; } .cz-tile b em { font-size: 11px; }
.cal-key i, .cal-key i * { color: var(--muted) !important; fill: currentColor; }

/* account setup + welcome (full screen, can't be skipped) */
#setup { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.setup-body { flex: 1; overflow-y: auto; padding: 12px 18px; max-width: 560px; width: 100%; margin: 0 auto; }
.setup-foot { padding: 8px 18px 14px; max-width: 560px; width: 100%; margin: 0 auto; display: grid; gap: 6px; }
.setup-l { display: block; margin: 18px 0 8px; } .setup-l b { display: block; font-size: 1rem; font-weight: 900; } .setup-l small { color: var(--muted); font-weight: 700; font-size: .82rem; }
.setup-err { margin: 6px 0 0; color: var(--bad); font-weight: 800; font-size: .82rem; } .setup-err:empty { display: none; }
.setup-st { margin: 6px 0 0; font-weight: 800; }
.welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.wl-bell { animation: cdPop .7s ease-out; } .wl-h { margin: 14px 0 0; font-size: 1.75rem; animation: tileIn .5s cubic-bezier(.3, 1.5, .5, 1) .25s both; }
.wl-sub { margin: 2px 0 0; font-weight: 800; animation: tileIn .5s cubic-bezier(.3, 1.5, .5, 1) .4s both; }
.wl-gift { margin: 14px 0 0; padding: 8px 12px; border-radius: 14px; background: var(--gold-bg); color: var(--gold-ink); font-weight: 900; animation: tileIn .5s cubic-bezier(.3, 1.5, .5, 1) .55s both; }
.wl-code { margin-top: 22px; width: 100%; padding: 16px; animation: tileIn .5s cubic-bezier(.3, 1.5, .5, 1) .7s both; }
.wl-code small { display: block; color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: .8rem; } .wl-code b { display: block; font-size: 2.1rem; color: var(--accent); margin: 4px 0; letter-spacing: .04em; }

/* profile top row: title, friends, settings */
.pf-top { display: flex; align-items: center; gap: 4px; padding: 6px 10px 0 18px; } .pf-top h1 { flex: 1; margin: 0; font-size: 1.4rem; }
.pf-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; color: var(--ink2); }
.pf-btn svg { width: 26px; height: 26px; } .pf-btn:active { background: var(--soft); }
.pf-btn .pill-n { position: absolute; top: 2px; right: 2px; }
/* the Settings page slides in from the right over the tabs (under sheets and the answer editor) */
#settings { position: fixed; inset: 0; z-index: 15; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
#settings.enter { animation: stIn .26s cubic-bezier(.2, .9, .3, 1); } #settings.leave { animation: stOut .2s ease-in forwards; }
@keyframes stIn { from { transform: translateX(100%); opacity: .7; } } @keyframes stOut { to { transform: translateX(100%); opacity: .7; } }
.st-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 6px; } .st-top h1 { margin: 0; font-size: 1.25rem; }
.st-back { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; color: var(--ink); } .st-back svg { width: 24px; height: 24px; }
.st-body { flex: 1; overflow-y: auto; padding: 0 14px calc(32px + env(safe-area-inset-bottom)); }
.st-out { margin-top: 18px; } .st-ver { text-align: center; margin-top: 18px; }
.row.editrow[disabled] { opacity: 1; cursor: default; }
/* online status: a dot on the avatar's corner (green online, grey offline) and a text line on cards */
.av-wrap { position: relative; display: inline-flex; flex: none; }
.pres { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted2); border: 2.5px solid var(--card); transition: background .3s; }
.pres.on { background: #22c55e; animation: presOn .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes presOn { from { transform: scale(.4); } }
.board .pres { width: 13px; height: 13px; }
.rival-stage { position: relative; } .pres-big { position: absolute; left: 50%; bottom: 10px; transform: translateX(34px); }
.pres-big .pres { position: static; display: block; width: 20px; height: 20px; border-width: 3px; }
.pres-t { font-weight: 800; color: var(--muted); } .pres-t.on { color: var(--ok); }
.pres-t.on::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #22c55e; vertical-align: 1px; }
.person[data-act] { cursor: pointer; }
