/* Screens. Rhythm: 12 between cards in a group, 32 between sections, 20 inside cards. */
.big-num { font: 600 32px/36px var(--round); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.big-s { font-size: 17px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.h-sm { font: 600 17px/22px var(--round); margin-bottom: 8px; }
.trail { margin: -8px 0 20px; }

/* ---------- week strip (calendar) */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 10px; border-radius: 16px; border: 0; background: transparent; color: var(--text-3); transition: background-color var(--t-fast) var(--ease); }
.wd:active { background: var(--raised); }
.wd-n { font-size: 12px; font-weight: 600; }
.wd-d { font: 600 14px var(--round); color: var(--text-2); }
.wd.today { background: var(--card); box-shadow: 0 0 0 1px var(--line-strong); }
.wd.today .wd-n, .wd.today .wd-d { color: var(--text); }
.wd.future { opacity: .5; }
.wd-r { width: 32px; height: 32px; display: grid; place-items: center; }
.wd-empty { width: 26px; height: 26px; border-radius: 13px; border: 3px solid var(--raised-2); }

/* ---------- rings of the day */
.rings-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 20px; }
.rings-box { padding: 0; border: 0; background: none; border-radius: 50%; }
.rg-legend { display: grid; gap: 14px; min-width: 0; }
.rg-row { display: grid; gap: 2px; text-align: left; padding: 0; border: 0; background: none; min-width: 0; }
.rg-k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-k .dot { background: var(--c); }
.rg-v { font-size: 22px; line-height: 26px; font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rg-v small { font: 500 13px var(--font); color: var(--text-3); }
.day-rings { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }

/* ---------- hero */
.hero { margin-top: 12px; padding: 0; overflow: hidden; }
.hero-top { display: grid; grid-template-columns: 128px 1fr; }
.hero-avatar { border: 0; padding: 0; background: var(--paper); min-height: 196px; margin: 12px 0 12px 12px; border-radius: 18px; overflow: hidden; box-shadow: inset 0 -24px 32px -24px rgba(60, 40, 20, .25); }
.avatar-art { position: relative; width: 100%; height: 100%; min-height: 160px; }
.avatar-art img { position: absolute; inset: 8px 4px 0; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; object-position: bottom; }
.hero-info { padding: 20px 20px 16px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hero-info .rank { font-size: 14px; color: var(--accent-ink); font-weight: 600; }
.lvl { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 10px; }
.lvl-n { font: 700 56px/56px var(--round); letter-spacing: -.02em; }
.lvl-l { color: var(--text-3); font-size: 14px; }
.hero-meta { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.hero-meta .meta { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 6px; border-radius: 17px; border: 0; background: var(--raised); font-size: 14px; color: var(--text-2); }
.hero-meta .meta b { color: var(--text); font: 700 15px var(--round); }
.meta-ic { width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; }
.meta-ic.flame { color: var(--c-str); background: color-mix(in srgb, var(--c-str) 18%, transparent); }
.meta-ic.snow { color: var(--c-dis); }
.meta-ic.coin { width: 16px; height: 16px; border-radius: 8px; background: var(--c-eco); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); margin-left: 2px; }
.hero-stats { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.hex .hex-grid { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.hex .hex-shape { fill: color-mix(in srgb, var(--accent) 20%, transparent); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.hex .hex-ghost { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 3 3; }
.stat-list { display: grid; gap: 2px; min-width: 0; }
.stat { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; min-height: 26px; padding: 0; border: 0; background: none; text-align: left; }
.stat .dot { background: var(--c); }
.stat-n { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { font-size: 16px; color: var(--c); }

/* ---------- posture + quick logs */
.quick-block { margin-top: 12px; }
.posture-btn { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--card); text-align: left;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-menu) var(--ease); }
.posture-btn:active { transform: scale(.98); }
.posture-btn.done { background: color-mix(in srgb, var(--c) 8%, var(--card)); }
.pb-ic { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); flex: none; transition: background-color var(--t-menu) var(--ease), color var(--t-menu) var(--ease); }
.pb-ic.on { background: var(--c); color: var(--bg); }
.posture-btn .t { display: block; font: 600 16px/20px var(--round); }
.posture-btn .s { display: block; font-size: 13px; color: var(--text-3); line-height: 18px; margin-top: 2px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.qbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; min-height: 92px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-align: left;
  transition: transform var(--t-fast) var(--ease); }
.qbtn:active { transform: scale(.96); }
.qbtn .qi { width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); margin-bottom: 8px; }
.qbtn .qv { font-size: 18px; line-height: 22px; font-weight: 700; }
.qbtn .ql { font-size: 12px; color: var(--text-3); line-height: 16px; }

/* ---------- quests */
.quest-bar { margin: -4px 0 12px; height: 6px; }
.quests { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; min-height: 68px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; transition: background-color var(--t-menu) var(--ease); }
.quest .t { font-weight: 600; line-height: 20px; }
.quest .s { font-size: 13px; color: var(--text-3); line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quest.done { background: color-mix(in srgb, var(--c) 7%, var(--card)); }
.quest.done .t { color: var(--text-2); }
.quest .xp-chip { margin-left: 0; }
.quest .reroll { width: 36px; height: 36px; color: var(--text-3); }
.qtext { background: none; border: 0; text-align: left; padding: 0; color: inherit; min-width: 0; font: inherit; }
.li.cur { background: var(--raised); }

/* ---------- boss */
.boss { padding: 16px; }
.boss-row { display: flex; gap: 16px; align-items: center; }
.boss-art { width: 96px; height: 96px; flex: none; border-radius: 18px; }
.boss-art img { width: 100%; height: 100%; object-fit: cover; }
.boss-art.defeated img { filter: grayscale(1) contrast(.9); opacity: .7; }
.boss-art .stamp { position: absolute; transform: rotate(-12deg); border: 2px solid #B4461A; color: #B4461A; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(242, 237, 228, .9); }
.boss-art.shake { animation: shake .36s var(--ease); }
@keyframes shake { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
.boss h3 { font-size: 18px; line-height: 22px; }
.hp { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 10px 0 8px; }
.hp i { height: 12px; border-radius: 4px; background: var(--c-str); transition: background-color 400ms var(--ease); }
.hp i:first-child { border-radius: 6px 4px 4px 6px; } .hp i:last-child { border-radius: 4px 6px 6px 4px; }
.hp i.gone { background: var(--raised-2); }
.boss-conds { margin-top: 12px; }
.bc { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 14px; line-height: 18px; border-top: 1px solid var(--line); }
.bc .check { width: 24px; height: 24px; }
.bc.ok .grow { color: var(--text-3); }
.boss.won { background: color-mix(in srgb, var(--c-cook) 6%, var(--card)); }

/* habits */
.habits { display: flex; flex-wrap: wrap; gap: 8px; }
.habit { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 500; transition: background-color var(--t-menu) var(--ease); }
.habit .check { width: 28px; height: 28px; }
.habit.on { color: var(--text-3); background: var(--raised); }

/* ---------- season calendar */
.season { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; padding: 16px; }
.sc-rows { display: grid; grid-template-rows: repeat(7, 1fr) 16px; gap: 4px; font-size: 10px; align-items: center; }
.sc-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.sc-col { display: grid; grid-template-rows: repeat(7, auto) 16px; gap: 4px; }
.sc-cell { display: block; width: 100%; aspect-ratio: 1; border-radius: 5px; border: 0; padding: 0; background: var(--raised); }
.sc-cell.future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.sc-cell.l1 { background: color-mix(in srgb, var(--accent) 25%, var(--raised)); }
.sc-cell.l2 { background: color-mix(in srgb, var(--accent) 50%, var(--raised)); }
.sc-cell.l3 { background: color-mix(in srgb, var(--accent) 75%, var(--raised)); }
.sc-cell.l4 { background: var(--accent); }
.sc-cell.today { box-shadow: 0 0 0 2px var(--text); }
.sc-w { text-align: center; font-size: 10px; line-height: 16px; }
.sc-legend { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; margin-top: 4px; }
.sc-legend .sc-cell { width: 12px; }

/* ---------- training */
.week-chips .chip { width: 44px; padding: 0; text-align: center; font-family: var(--round); font-weight: 700; }
.week-chips .chip.now:not(.on) { border-color: var(--accent); color: var(--accent-ink); }
.block-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin: 16px 0 12px; }
.block-num { width: 56px; height: 56px; border-radius: 18px; background: color-mix(in srgb, var(--c-str) 16%, transparent); color: var(--c-str); display: grid; place-items: center; font: 700 24px var(--round); }
.session-card { margin-bottom: 12px; padding: 0; overflow: hidden; }
.session-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 20px; }
.session-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 700 20px var(--round); background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); flex: none; }
.session-card.done .session-badge { background: var(--c); color: var(--bg); }
.session-card.today { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.session-card h3 { font-size: 17px; }
.ex-list { margin: 0; padding: 0 20px 8px; list-style: none; counter-reset: ex; }
.ex-list li { counter-increment: ex; border-top: 1px solid var(--line); }
.ex-link, .ex-list li > span { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 0; border: 0; background: none; text-align: left; font-size: 14px; line-height: 18px; }
ol.ex-list .ex-link::before { content: counter(ex); width: 20px; color: var(--text-3); font: 600 13px var(--round); flex: none; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.steps li { line-height: 22px; }
.steps li::marker { color: var(--text-3); font-family: var(--round); font-weight: 600; }
.mistake { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--raised); border-left: 3px solid var(--warn); }
.mistake-art:empty { display: none; }
.variant .btn { flex: 1; }
.exart { aspect-ratio: 4 / 3; max-height: 300px; width: 100%; }
.exart img { object-fit: contain; }
.big-icon { width: 44px; height: 44px; border-radius: 22px; background: var(--paper); display: inline-grid; place-items: center; color: #8C877D; flex: none; overflow: hidden; }
.big-icon img { width: 80%; height: 80%; object-fit: contain; }
.badge { width: 44px; height: 44px; display: inline-grid; place-items: center; color: var(--text-3); flex: none; border-radius: 22px; background: var(--raised); }
.badge img { width: 100%; height: 100%; object-fit: contain; }
.badge.off img { filter: grayscale(1); opacity: .35; }
.badge.on { color: var(--c-eco); background: color-mix(in srgb, var(--c-eco) 16%, transparent); }
.badge.hidden-badge { background: transparent; border: 1.5px dashed var(--line-strong); }
.badge.hidden-badge .icon { width: 14px; height: 14px; }
.scene { width: 100%; margin-bottom: 12px; }
.scene img { object-fit: cover; }

/* runner: one exercise at a time */
.run { display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 0 auto; min-height: calc(100dvh - var(--safe-t) - 24px); padding-bottom: 112px; }
.run-top { display: flex; align-items: center; gap: 12px; }
.run-title { font: 600 22px/28px var(--round); }
.run-progress { display: flex; gap: 4px; }
.run-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--raised-2); transition: background-color var(--t-menu) var(--ease); }
.run-progress i.done { background: var(--c-str); }
.run-progress i.now { background: var(--text); }
.run-art { border: 0; padding: 0; background: none; border-radius: 16px; }
.run-dose { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font: 600 17px/22px var(--round); }
.run-actions { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); max-width: 560px; margin: 0 auto; z-index: 3; }
.sets { display: grid; gap: 8px; }
.set { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: background-color var(--t-menu) var(--ease), opacity var(--t-menu) var(--ease); }
.set.done { background: color-mix(in srgb, var(--c-str) 10%, var(--card)); }
.set .stepper { height: 44px; }
.set .stepper input { width: 44px; }
.set .stepper button { width: 36px; }
.set-n { width: 32px; color: var(--text-3); flex: none; font: 600 14px var(--round); }
.set .check { width: 44px; height: 44px; border-radius: 14px; --c: var(--c-str); }
.rest-dock { position: sticky; bottom: 92px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: var(--primary-bg); color: var(--primary-fg); box-shadow: var(--shadow-f); z-index: 2; }
.rest-dock .mono { color: inherit; opacity: .65; }
.rest-dock .btn { background: color-mix(in srgb, var(--primary-fg) 12%, transparent); color: inherit; border-color: transparent; }
.rest-left { font: 700 30px/34px var(--round); }
.rest-dock.go { background: var(--c-str); color: var(--on-accent); }
.ring { width: 56px; height: 56px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: currentColor; opacity: .15; }
.ring .fg { stroke: var(--c-str); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.rest-dock.go .ring .fg { stroke: currentColor; }
.hold { display: grid; gap: 12px; }
.hold-face { position: relative; display: grid; place-items: center; padding: 8px 0; }
.hold-ring { width: 240px; height: 240px; }
.hold-ring circle { stroke-width: 7; }
.hold-face.rest .ring .fg, .hold-face.switch .ring .fg { stroke: var(--c-dis); }
.hold-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hold-left { font: 700 64px/68px var(--round); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hold-label { color: var(--text-2); font-size: 15px; font-weight: 500; }
.qh-left { text-align: center; padding: 24px 0; }
.finish-hero { text-align: center; padding: 16px 0 4px; }
.finish-hero .big { font: 700 52px/56px var(--round); color: var(--c-str); font-variant-numeric: tabular-nums; }
pre.report { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; line-height: 17px; background: var(--raised); border-radius: 16px; padding: 14px; max-height: 50dvh; overflow: auto; margin: 0; }

/* ---------- food */
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.macro-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.macro-center { position: relative; }
.macro-center .mc-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.mc-in b { font: 700 26px/28px var(--round); font-variant-numeric: tabular-nums; }
.mc-in span { font-size: 12px; color: var(--text-3); }
.macro-list { display: grid; gap: 10px; min-width: 0; }
.mrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 13px; color: var(--text-2); }
.mrow b { font: 700 14px var(--round); color: var(--text); font-variant-numeric: tabular-nums; }
.mrow .bar { grid-column: 1 / -1; height: 6px; }
.meal { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; transition: background-color var(--t-menu) var(--ease); }
.meal-art { width: 68px; height: 68px; flex: none; border: 0; padding: 0; background: none; border-radius: 16px; overflow: hidden; }
.meal-art .plate { width: 100%; height: 100%; border-radius: 16px; }
.meal-name { font: 600 16px/20px var(--round); margin: 2px 0; }
.meal-body .s { font-size: 13px; color: var(--text-3); line-height: 18px; }
.meal-actions { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.meal-actions .check { width: 40px; height: 40px; border-radius: 14px; --c: var(--c-cook); }
.meal.eaten { background: color-mix(in srgb, var(--c-cook) 8%, var(--card)); }
.meal.eaten .meal-name { color: var(--text-2); }
.week-meals { display: grid; gap: 2px; margin-top: 8px; }
.wm { display: grid; grid-template-columns: 72px 1fr; gap: 8px; text-align: left; border: 0; background: none; padding: 6px 0; font-size: 14px; line-height: 18px; }
.card.today { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.thaw { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c-dis) 10%, transparent); font-size: 14px; line-height: 20px; color: var(--text-2); }
.thaw .icon { margin-top: 2px; color: var(--c-dis); }

/* ---------- recipes */
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recipe-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--card); border-radius: 22px; padding: 6px; text-align: left; overflow: hidden; transition: transform var(--t-fast) var(--ease); }
.recipe-card:active { transform: scale(.97); }
.recipe-card .plate { aspect-ratio: 4 / 3; border-radius: 16px; }
.rc-body { padding: 10px 8px 8px; display: grid; gap: 6px; }
.rc-name { font: 600 15px/19px var(--round); }
.rc-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.nutr .card { text-align: center; padding: 14px 8px; }
.step-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.step-meta .ready { width: 100%; font-size: 13px; color: var(--text-2); line-height: 18px; }
.stove-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--c-str); color: #fff; font-size: 11px; font-weight: 700; padding: 0 4px; }
.stove-badge { min-width: 48px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--c-str) 16%, transparent); color: var(--c-str); display: grid; place-items: center; font: 700 14px var(--round); flex: none; padding: 0 6px; }
.cook-dots { display: flex; gap: 4px; }
.cook-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--raised-2); transition: background-color var(--t-menu) var(--ease); }
.cook-dots span.done { background: var(--c-cook); }
.cook-dots span.now { background: var(--text); }
.stove-big { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.stove-n { width: 72px; height: 72px; border-radius: 36px; display: grid; place-items: center; font: 700 40px var(--round); color: var(--c-str); background: color-mix(in srgb, var(--c-str) 14%, transparent); flex: none; }
.stove-scale { display: flex; gap: 3px; margin-top: 6px; }
.stove-scale i { width: 10px; height: 14px; border-radius: 3px; background: var(--raised-2); }
.stove-scale i.on { background: var(--c-str); }
.cook-text { font: 500 20px/30px var(--font); margin: 0; }
.kitchen-dock { display: grid; gap: 8px; }
.kt { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 18px; background: var(--primary-bg); color: var(--primary-fg); }
.kt .icon-btn { color: inherit; width: 40px; height: 40px; }
.kt-left { font: 700 20px var(--round); min-width: 64px; font-variant-numeric: tabular-nums; }
.kt-label { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt.go { background: var(--c-str); color: var(--on-accent); }

/* ---------- charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .goal { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .axis { fill: var(--text-3); font-family: var(--mono); font-size: 10px; }
.chart .line { fill: none; stroke: var(--c, var(--accent)); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) .15s forwards; }
.chart .area { fill: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); stroke: none; opacity: 0; animation: fadein .8s var(--ease) .5s forwards; }
.chart .line-raw { fill: none; stroke: var(--text-3); stroke-width: 1; opacity: .5; }
.chart .pt { fill: var(--card); stroke: var(--text-3); stroke-width: 1.5; }
.chart .pt.last { fill: var(--c, var(--accent)); stroke: var(--card); stroke-width: 2; }
.chart .b { fill: var(--raised-2); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); animation: barup .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 40ms); }
.chart .b.acc { fill: var(--c, var(--accent)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes barup { to { transform: scaleY(1); } }

/* ---------- progress */
.stat-tiles { gap: 12px; }
.tile { padding: 16px; border-radius: 18px; background: var(--raised); }
.tile .big-num { font-size: 26px; line-height: 30px; margin: 4px 0; }
.tile .delta { font-size: 12px; font-weight: 600; }
.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ach { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-align: left; min-height: 72px; }
.ach .badge { grid-row: 1 / 3; }
.ach .ach-n { font-size: 13px; line-height: 17px; font-weight: 600; }
.ach.on { background: color-mix(in srgb, var(--c-eco) 8%, var(--card)); }
.amount { height: 72px; font: 700 36px var(--round); text-align: center; }
.budget-ring { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }

/* ---------- guide */
.li.lvl2 .t { font-weight: 700; }
.li.lvl3 { padding-left: 32px; }
.li.lvl3 .t { font-weight: 500; }

/* ---------- onboarding */
.onb { padding-top: 8px; }
.onb-dots { display: flex; gap: 6px; margin-bottom: 24px; }
.onb-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--raised-2); transition: background-color var(--t-menu) var(--ease); }
.onb-dots span.on { background: var(--accent); }
.onb-title { font-size: 32px; line-height: 36px; }
.onb-hero { background: var(--paper); border-radius: var(--r-panel); height: 260px; overflow: hidden; }
.onb-hero .avatar-art { height: 260px; }
.onb-actions { display: flex; gap: 8px; margin-top: 8px; }

@media (max-width: 370px) {
  .hero-top { grid-template-columns: 112px 1fr; }
  .lvl-n { font-size: 46px; line-height: 48px; }
  .rings-card { gap: 14px; padding: 16px; }
  .hero-stats { gap: 10px; padding: 14px 16px 16px; }
}

/* training calendar of the week */
.plan-strip .wd { cursor: default; }
.plan-badge { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; font: 700 14px var(--round); color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.plan-badge.done { background: var(--c); color: var(--bg); }
.plan-badge.rest { background: transparent; color: var(--text-3); }
.session-card .tag.c { --c: inherit; }
.macro-card { grid-template-columns: auto 1fr; }
.macro-card .mini-macros { grid-column: 1 / -1; margin-top: 4px; }
.mini-m { padding: 12px; border-radius: 14px; }
.mm-v { font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mm-v small { font: 500 12px var(--font); color: var(--text-3); }
.mm-v.ok { color: var(--c-cook); }
.tile-k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.tile-k .dot { background: var(--c); }
.tile .big-num { color: var(--c); }


/* exercise infographic preview + full-screen viewer */
.ex-info { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #ECECEC; }
.ex-info img { width: 100%; height: 280px; object-fit: cover; object-position: top; }
.ex-info-cap { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: rgba(20, 18, 16, .8); color: #F2EEE6; font-size: 13px; font-weight: 600; }
.iv { position: fixed; inset: 0; z-index: 90; background: rgba(8, 7, 6, calc(.96 - var(--drag, 0) * .6)); display: flex; flex-direction: column; opacity: 0; transition: opacity 220ms var(--ease); }
.iv.in { opacity: 1; }
.iv-top { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 12px) 16px 12px; color: #F2EEE6; }
.iv-title { flex: 1; font: 600 17px var(--round); }
.iv-top .icon-btn { color: #F2EEE6; background: rgba(255, 255, 255, .12); }
.iv-stage { flex: 1; overflow: hidden; display: grid; place-items: center; touch-action: none; padding-bottom: var(--safe-b); }
.iv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; will-change: transform; user-select: none; -webkit-user-select: none; }
.iv-stage img.anim { transition: transform 250ms var(--ease); }

/* animated icons: 5-frame strip played once on an event */
.anim-icon { display: inline-grid; place-items: center; flex: none; }
.anim-icon.has { background: none !important; }
.ai-frame { display: block; width: 100%; height: 100%; aspect-ratio: 1; background-size: contain; background-position: center; background-repeat: no-repeat; }
.ai-frame.play { background-size: 500% 100%; animation: strip 550ms steps(5, jump-none) 1 forwards; }
.ai-frame.play.loop { animation: strip 900ms steps(5, jump-none) infinite; }
@keyframes strip { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.qbtn .anim-icon.has { width: 40px; height: 40px; margin: -4px 0 4px -4px; }
.meta .anim-icon.has { width: 24px; height: 24px; }

.sheet-icon { width: 56px; height: 56px; }
.card-icon { width: 44px; height: 44px; }
.title-icon { width: 32px; height: 32px; margin-right: 8px; vertical-align: middle; }
.with-icon { display: flex; align-items: center; }
.mode-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; }
.mode-icon { width: 24px; height: 24px; }
.anim-icon:not(.has) .icon { width: 60%; height: 60%; max-width: 24px; max-height: 24px; }

/* animated avatar: 5-frame strip, 3:4 frames, positioned like the static image */
.avatar-strip { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); background-size: 500% 100%; background-repeat: no-repeat; background-position: 0 0; }

.stat .anim-icon { width: 30px; height: 30px; }
.stat { grid-template-columns: 30px 1fr auto; min-height: 32px; }
.hero-stats { gap: 12px; padding: 16px 16px 20px; }
.hero-stats .stat-n { font-size: 13px; }
.stat { gap: 8px; }

/* boss teasing loop */
.strip-sq { position: absolute; inset: 0; background-size: 500% 100%; background-repeat: no-repeat; background-position: 0 0; }
/* achievement celebration */
.ai-frame.play.slow { animation-duration: 900ms; }
.badge.has { background: none; }
.badge-xl { width: 160px; height: 160px; border-radius: 80px; margin: 4px auto 16px; }
.badge-xl .icon { width: 56px; height: 56px; }
.ach-up-name { font: 700 26px/30px var(--round); margin: 4px 0 6px; }
.ach-up-reward { display: inline-flex; margin: 0 auto 20px; padding: 6px 14px; border-radius: 16px; background: color-mix(in srgb, var(--c-eco) 16%, transparent); color: var(--c-eco); font: 700 15px var(--round); }
.ach-up .lu-rank { margin-bottom: 12px; }
/* shopping list product pictures */
.shop-pic { width: 44px; height: 44px; flex: none; }
.shop-pic .plate { width: 44px; height: 44px; border-radius: 12px; }
.shop-pic .plate .icon { width: 18px; height: 18px; }
.li .end { white-space: nowrap; }
