:root {
  --bg: #0f1115; --surface: #1a1d23; --surface-2: #23272f; --surface-3: #2b3038;
  --text: #e6e8ec; --muted: #9aa0aa; --primary: #ff7a00; --primary-dim: #b85600; --accent: #b6f36b;
  --danger: #ff5252; --ok: #4cd964; --outline: #3a3f49; --radius: 14px; --font: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 999px; padding: 9px 16px; background: var(--surface-3); color: var(--text); font-weight: 600; }
button.primary { background: var(--primary); color: #000; }
button.ghost { background: transparent; border: 1px solid var(--outline); }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--outline); }
button.icon { padding: 6px 10px; background: transparent; font-size: 16px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { background: var(--surface); border: 1px solid var(--outline); border-radius: 10px; padding: 9px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
input.num { text-align: center; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
h1 { font-size: 28px; margin: 0 0 6px; } h2 { font-size: 20px; margin: 22px 0 10px; } h3 { font-size: 16px; margin: 14px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .accent { color: var(--accent); } .primary-text { color: var(--primary); }
.topbar { display: flex; align-items: center; gap: 18px; padding: 12px 20px; background: var(--surface); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--outline); }
.topbar .brand { font-weight: 800; font-size: 20px; color: var(--primary); letter-spacing: -.5px; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.topbar nav a.active { background: var(--surface-3); color: var(--text); }
.topbar .spacer { flex: 1; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card.clickable { cursor: pointer; } .card.clickable:hover { background: var(--surface-2); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row > .grow { flex: 1; min-width: 120px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--surface); border-radius: var(--radius); padding: 14px; } .tile .v { font-size: 22px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; } th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 6px; }
td { padding: 4px 6px; vertical-align: middle; } tr.done td { color: var(--accent); }
td input, td select { padding: 7px 8px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 600; margin-right: 6px; }
.chip.ok { background: #2e3a1e; color: var(--accent); } .chip.warn { background: #3a2a1e; color: var(--primary); } .chip.bad { background: #3a1e1e; color: var(--danger); }
.thumb { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: #000; }
.exercise-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-3); }
.video-card video, .video-card .poster { width: 100%; aspect-ratio: 9/14; background: #000; border-radius: 10px; object-fit: cover; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; padding: 20px; width: min(720px, 100%); max-height: 92vh; overflow: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-3); padding: 10px 18px; border-radius: 999px; z-index: 30; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.toast.err { background: #4a1f1f; color: #ffb4b4; }
.tree .block { margin: 14px 0 6px; font-size: 20px; font-weight: 700; } .tree .week { margin: 10px 0 4px 14px; font-weight: 600; }
.tree .day { margin-left: 28px; }
.login { max-width: 420px; margin: 10vh auto; }
.login .brand { font-size: 56px; font-weight: 900; color: var(--primary); letter-spacing: -2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.ok-dot { background: var(--ok); } .bad-dot { background: var(--danger); }
.set-row td:first-child { width: 36px; color: var(--muted); }
.pre { white-space: pre-wrap; }
@media (max-width: 640px) { main { padding: 12px; } .topbar { padding: 10px 12px; gap: 10px; } h1 { font-size: 22px; } table { font-size: 14px; } }


/* ===== "Glow" visual language (14 Oct): deep base, soft radial glows, pastel bento tiles, dotted gauges, pill controls ===== */
:root {
  --ink: #0b0c10; --ink-2: #14161c;
  --sage: #cfe3d3; --blush: #f1c9d6; --lav: #d6d1ee; --sand: #f0dfc2; --sky: #c9dcef; --coral: #e8714f; --cobalt: #3a5ad9;
  --on-pastel: #15171c; --on-pastel-dim: rgba(21,23,28,.62);
  --glow-pink: #ff5fa8; --glow-lime: #b6f36b; --glow-blue: #5aa9ff; --glow-amber: #ff9f3d;
  --r-xl: 28px; --r-lg: 22px;
}
.glow-page { background: var(--ink); }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--ink-2); padding: 26px 22px 22px; text-align: center; isolation: isolate; }
.hero .orb { position: absolute; left: 50%; top: 46%; width: 420px; height: 420px; transform: translate(-50%, -50%); border-radius: 50%; filter: blur(42px); opacity: .75; z-index: -1;
  background: radial-gradient(circle at 50% 50%, var(--orb-c, var(--glow-pink)) 0%, rgba(0,0,0,0) 60%); animation: breathe 5.5s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: translate(-50%, -50%) scale(1); opacity: .7; } 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .9; } }
.hero .label { font-size: 15px; color: var(--muted); letter-spacing: .2px; }
.hero .big { font-size: 96px; line-height: 1; font-weight: 300; letter-spacing: -3px; font-variant-numeric: tabular-nums; margin: 6px 0 2px; color: #fff; }
.hero .unit { font-size: 16px; color: var(--muted); }
.hero .meaning { margin-top: 10px; font-size: 14px; color: var(--text); opacity: .85; }
.tick-gauge { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 34px; margin: 14px auto 0; max-width: 420px; }
.tick-gauge i { display: block; width: 3px; border-radius: 2px; background: rgba(255,255,255,.14); height: 14px; transition: height .5s cubic-bezier(.2,.8,.2,1), background .5s; }
.tick-gauge i.on { background: #fff; height: 26px; }
.tick-gauge i.marker { background: var(--glow-lime); height: 34px; width: 4px; }
.bento { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 12px 0; }
.bento .wide { grid-column: 1 / -1; }
.tile2 { border-radius: var(--r-lg); padding: 16px 16px 14px; color: var(--on-pastel); min-height: 118px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.tile2:active { transform: scale(.98); }
.tile2 .k { font-size: 13px; color: var(--on-pastel-dim); font-weight: 600; }
.tile2 .v { font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile2 .v small { font-size: 14px; font-weight: 600; color: var(--on-pastel-dim); margin-left: 4px; letter-spacing: 0; }
.tile2 .sub { font-size: 12px; color: var(--on-pastel-dim); margin-top: 2px; }
.tile2.sage { background: var(--sage); } .tile2.blush { background: var(--blush); } .tile2.lav { background: var(--lav); } .tile2.sand { background: var(--sand); } .tile2.sky { background: var(--sky); }
.tile2.dark { background: var(--ink-2); color: var(--text); } .tile2.dark .k, .tile2.dark .sub, .tile2.dark .v small { color: var(--muted); }
.tile2 .blob { position: absolute; right: -30px; bottom: -40px; width: 150px; height: 150px; border-radius: 50%; filter: blur(26px); opacity: .55; z-index: -1; background: radial-gradient(circle, var(--blob-c, #fff) 0%, rgba(255,255,255,0) 65%); }
.dots { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(21,23,28,.16); transition: background .3s, transform .3s; }
.dots i.on { background: var(--on-pastel); } .dots i.pr { background: var(--coral); transform: scale(1.25); }
.tile2.dark .dots i { background: rgba(255,255,255,.16); } .tile2.dark .dots i.on { background: #fff; }
.spark { width: 100%; height: 44px; margin-top: 6px; }
.body-map { width: 120px; height: 200px; margin: -4px 0 0 12px; display: block; flex: 0 0 auto; }
.body-map path { fill: rgba(21,23,28,.10); stroke: rgba(21,23,28,.28); stroke-width: 1; transition: fill .4s; }
.body-map path.m1 { fill: rgba(232,113,79,.45); } .body-map path.m2 { fill: rgba(232,113,79,.75); } .body-map path.m3 { fill: var(--coral); }
.muscle-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.muscle-list .row { gap: 8px; } .muscle-list .name { width: 96px; text-transform: capitalize; font-size: 13px; font-weight: 600; }
.muscle-list .bar { flex: 1; height: 10px; border-radius: 6px; background: rgba(21,23,28,.12); overflow: hidden; } .muscle-list .bar b { display: block; height: 100%; width: 0; background: var(--coral); border-radius: 6px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.muscle-list .n { width: 22px; text-align: right; font-size: 13px; font-weight: 700; }
.timeline { position: relative; height: 56px; margin-top: 10px; }
.timeline .axis { position: absolute; left: 0; right: 0; bottom: 14px; height: 2px; background: rgba(21,23,28,.15); }
.timeline .seg { position: absolute; bottom: 10px; height: 10px; border-radius: 6px; background: var(--cobalt); opacity: .9; cursor: pointer; transition: height .2s; min-width: 6px; }
.timeline .seg:hover, .timeline .seg.lift { height: 16px; }
.timeline .seg.strength { background: var(--coral); } .timeline .seg.walk { background: #3f8f5a; } .timeline .seg.ride { background: var(--cobalt); } .timeline .seg.run { background: #d9603a; }
.timeline .hour { position: absolute; bottom: -2px; font-size: 10px; color: var(--on-pastel-dim); transform: translateX(-50%); }
.timeline .tip { position: absolute; top: 0; left: 0; transform: translateX(-50%); background: var(--on-pastel); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.timeline .tip.show { opacity: 1; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn { border-radius: 999px; padding: 10px 16px; font-weight: 700; background: #fff; color: #000; }
.pill-btn.coral { background: var(--coral); color: #fff; } .pill-btn.cobalt { background: var(--cobalt); color: #fff; }
.count { font-variant-numeric: tabular-nums; }
.ex { border-top: 0; background: var(--ink-2); border-radius: var(--r-lg); padding: 14px; margin-top: 10px; }
.ex .sets-inline .pill.done { background: var(--sage); color: var(--on-pastel); }
.ex .sets-inline .pill.skip { background: rgba(255,255,255,.06); }
.ex .vid { background: #000; }
.legend { font-size: 12px; color: var(--on-pastel-dim); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
@media (max-width: 640px) { .body-map { width: 96px; height: 170px; margin-left: 6px; } .hero .big { font-size: 76px; } .hero .orb { width: 300px; height: 300px; } .bento { gap: 10px; } .tile2 { min-height: 108px; padding: 14px; } .tile2 .v { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { .hero .orb, .tick-gauge i, .muscle-list .bar b { animation: none; transition: none; } }
