@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f3f4f8; --surface: #ffffff; --surface2: #f0f2f7; --line: #e3e6ee; --text: #0c1220; --mute: #667085; --faint: #98a2b3;
  --accent: #ff5a1f; --accent2: #ff8a3d; --accent-soft: #fff0e8; --accent-ink: #ffffff;
  --ok: #109a4e; --ok-soft: #e6f6ed; --warn: #b7791f; --warn-soft: #fff4dc; --bad: #d92d20;
  --stage: linear-gradient(180deg, #f9fafd 0%, #e1e6f0 100%);
  --shadow1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow2: 0 12px 32px rgba(16, 24, 40, .10), 0 2px 6px rgba(16, 24, 40, .05);
  --nav: rgba(255, 255, 255, .86);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #090c12; --surface: #121722; --surface2: #1a2130; --line: #252d3d; --text: #f4f6fa; --mute: #98a2b6; --faint: #6b7589;
  --accent: #ff6a2b; --accent2: #ff9a4d; --accent-soft: #2a1a12; --ok: #3ddc84; --ok-soft: #12291d; --warn: #f2c14e; --warn-soft: #2b2412; --bad: #ff6b6b;
  --stage: linear-gradient(180deg, #202838 0%, #0f141d 100%);
  --shadow1: 0 1px 2px rgba(0, 0, 0, .4); --shadow2: 0 14px 34px rgba(0, 0, 0, .45);
  --nav: rgba(18, 23, 34, .86);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090c12; --surface: #121722; --surface2: #1a2130; --line: #252d3d; --text: #f4f6fa; --mute: #98a2b6; --faint: #6b7589;
    --accent: #ff6a2b; --accent2: #ff9a4d; --accent-soft: #2a1a12; --ok: #3ddc84; --ok-soft: #12291d; --warn: #f2c14e; --warn-soft: #2b2412; --bad: #ff6b6b;
    --stage: linear-gradient(180deg, #202838 0%, #0f141d 100%);
    --shadow1: 0 1px 2px rgba(0, 0, 0, .4); --shadow2: 0 14px 34px rgba(0, 0, 0, .45);
    --nav: rgba(18, 23, 34, .86);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.has-timer { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
body.noscroll { overflow: hidden; }
h1 { font-size: 30px; line-height: 1.12; margin: 2px 0 4px; letter-spacing: -0.035em; font-weight: 750; }
h2 { font-size: 13px; margin: 28px 0 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); font-weight: 650; }
h3 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 6px 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 560px; margin: 0 auto; padding: 18px 18px 8px; }
.mute { color: var(--mute); } .small { font-size: 13px; } .tiny { font-size: 12px; } .center { text-align: center; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 12px; } .row.between { justify-content: space-between; } .gap { gap: 8px; }
.hidden { display: none !important; }
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
.ico.sm { width: 18px; height: 18px; } .ico.lg { width: 28px; height: 28px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--accent-ink); border: 0; border-radius: 16px; padding: 0 20px; height: 54px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; box-shadow: 0 8px 20px rgba(255, 90, 31, .28); transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow1); font-weight: 650; }
.btn.soft { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; box-shadow: none; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; }
.iconbtn { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--text); box-shadow: var(--shadow1); flex: none; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin: 12px 0; box-shadow: var(--shadow1); }
.card.tap { display: block; width: 100%; text-align: left; font: inherit; color: inherit; }
.card.tap.row { display: flex; }
.card.tight { padding: 12px 14px; }
.chip { display: inline-flex; align-items: center; background: var(--surface2); border: 1px solid transparent; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; color: var(--mute); margin: 2px 5px 2px 0; }
.chip.p { background: var(--accent-soft); color: var(--accent); }
button.chip { cursor: pointer; font-family: inherit; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 4px 18px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { flex: none; margin: 0; padding: 8px 14px; font-size: 13px; background: var(--surface); border-color: var(--line); }
.chips .chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .01em; }
.badge.draft { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.pill { font-weight: 700; color: var(--accent); }
.err { color: var(--bad); min-height: 1.3em; font-size: 14px; }
.banner { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 10px 14px; font-size: 13px; margin: 10px 0; font-weight: 550; }
.banner.info { background: var(--surface2); color: var(--mute); }

/* forms */
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; width: 100%; height: 50px; font-size: 16px; }
textarea { height: auto; padding: 12px 14px; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 12px; color: var(--mute); margin: 14px 0 6px; font-weight: 600; letter-spacing: .02em; }
.search { position: relative; } .search .ico { position: absolute; left: 14px; top: 14px; color: var(--faint); } .search input { padding-left: 44px; }
.seg { display: flex; background: var(--surface2); border-radius: 14px; padding: 4px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 11px; padding: 9px 6px; font-size: 13px; font-weight: 650; color: var(--mute); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow1); }

/* navigation */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 0 14px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.tabs .in { pointer-events: auto; display: flex; width: 100%; max-width: 532px; background: var(--nav); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow2); padding: 6px; }
.tabs button { flex: 1; background: none; border: 0; border-radius: 20px; padding: 9px 2px 8px; color: var(--mute); font-size: 11px; font-weight: 650; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabs button.on { color: var(--accent); background: var(--accent-soft); }
.topbar { position: sticky; top: 0; z-index: 15; margin: 0 -18px; padding: 12px 18px 10px; background: var(--nav); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-bottom: 1px solid var(--line); }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; background: var(--surface2); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--surface2); border-radius: 99px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width .3s ease; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; }

/* today */
.hello { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 0; box-shadow: 0 6px 16px rgba(255, 90, 31, .3); }
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 20px 20px; margin: 14px 0; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #ff9a4d 0%, #ff5a1f 45%, #c2410c 100%); box-shadow: 0 18px 40px rgba(255, 90, 31, .32); }
.hero h2 { color: rgba(255, 255, 255, .8); margin: 0 0 6px; }
.hero h3 { font-size: 24px; letter-spacing: -0.03em; font-weight: 750; max-width: 66%; line-height: 1.15; }
.hero .meta { margin: 8px 0 18px; font-size: 14px; color: rgba(255, 255, 255, .88); max-width: 62%; }
.hero .btn { background: #fff; color: #c2410c; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.hero .figure { position: absolute; right: -4px; top: 4px; width: 44%; max-width: 190px; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); }
.hero .figure img { width: 100%; display: block; }
.week { display: flex; align-items: center; gap: 16px; }
.ring { width: 78px; height: 78px; flex: none; }
.ring .bg { stroke: var(--surface2); fill: none; stroke-width: 9; } .ring .fg { stroke: var(--accent); fill: none; stroke-width: 9; stroke-linecap: round; }
.ring text { fill: var(--text); font-weight: 800; font-size: 22px; text-anchor: middle; dominant-baseline: central; }
.dots { display: flex; gap: 6px; flex: 1; justify-content: space-between; }
.dot { flex: 1; text-align: center; font-size: 11px; font-weight: 650; color: var(--faint); }
.dot i { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 4px auto 0; border-radius: 50%; background: var(--surface2); color: #fff; font-style: normal; }
.dot.done i { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.dot.today { color: var(--accent); }
.dot.today i { box-shadow: inset 0 0 0 2px var(--accent); }
.dayrow { display: flex; align-items: center; gap: 14px; }
.dayrow .badge-ico { width: 46px; height: 46px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }

/* workout */
.group { margin: 22px 2px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); font-weight: 750; }
.exhead { display: flex; gap: 12px; align-items: center; }
.thumb { width: 76px; height: 76px; flex: none; border-radius: 18px; background: var(--stage); border: 1px solid var(--line); padding: 0; overflow: hidden; display: block; position: relative; }
.thumb img, .thumb svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.thumb.skel { background: linear-gradient(100deg, var(--surface2) 30%, var(--surface) 50%, var(--surface2) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.setshead { display: grid; grid-template-columns: 30px 1fr 1fr 52px; gap: 8px; margin: 14px 0 2px; font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .08em; text-align: center; }
.sets { display: grid; grid-template-columns: 30px 1fr 1fr 52px; gap: 8px; align-items: center; margin-top: 8px; }
.sets .n { color: var(--faint); text-align: center; font-weight: 750; }
.sets input { text-align: center; font-weight: 750; font-size: 19px; height: 52px; background: var(--surface2); border-color: transparent; padding: 0 6px; }
.sets.done input { background: var(--ok-soft); color: var(--ok); }
.sets .tick { background: var(--surface2); border: 0; border-radius: 15px; height: 52px; color: var(--faint); display: flex; align-items: center; justify-content: center; }
.sets .tick.on { background: var(--ok); color: #fff; }
.sets .tick.edit { background: var(--accent); color: #fff; }
.last { font-size: 13px; color: var(--mute); }
.timer { position: fixed; left: 14px; right: 14px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: 532px; margin: 0 auto; z-index: 25; background: var(--text); color: var(--bg); border-radius: 24px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow2); }
.timer .ring { width: 52px; height: 52px; } .timer .ring .bg { stroke: rgba(128, 128, 128, .35); stroke-width: 7; } .timer .ring .fg { stroke: var(--accent); stroke-width: 7; }
.timer .t { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; }
.timer .btn { background: rgba(128, 128, 128, .28); color: inherit; box-shadow: none; }

/* lessons */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-align: left; padding: 0; box-shadow: var(--shadow1); display: block; width: 100%; font: inherit; color: inherit; }
.lcard .thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; border: 0; border-radius: 0; }
.lcard .body { padding: 10px 12px 13px; }
.lcard h3 { font-size: 14px; line-height: 1.25; min-height: 35px; }
.sheet-back { position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet { max-width: 560px; margin: 0 auto; padding: 0 18px 60px; }
.stage3d { position: relative; width: 100%; aspect-ratio: 1 / 1.02; max-height: 62vh; border-radius: 26px; overflow: hidden; background: var(--stage); border: 1px solid var(--line); box-shadow: var(--shadow1); }
.stage-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.stage-canvas:active { cursor: grabbing; }
.stage-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 99px; transition: opacity .4s; pointer-events: none; }
.stage-hint.gone { opacity: 0; }
.stage2d svg { width: 100%; display: block; border-radius: 26px; background: var(--stage); }
.phase { text-align: center; font-weight: 700; margin: 12px 0 2px; min-height: 26px; font-size: 15px; }
.controls { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; flex-wrap: wrap; }
.steps { list-style: none; padding: 0; margin: 6px 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; margin: 10px 0; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.avoid { list-style: none; padding: 0; margin: 6px 0; }
.avoid li { display: flex; gap: 10px; margin: 8px 0; align-items: flex-start; }
.avoid li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-top: 8px; }

/* progress and charts */
.stat { display: flex; gap: 10px; }
.stat > div { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 12px; text-align: left; box-shadow: var(--shadow1); }
.stat b { display: block; font-size: 28px; letter-spacing: -0.03em; font-weight: 780; line-height: 1.1; }
.chart { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow1); }
.chart .ax { stroke: var(--line); stroke-width: 1; } .chart .l1 { stroke: var(--accent); fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .l2 { stroke: var(--faint); fill: none; stroke-width: 1.6; stroke-dasharray: 4 4; } .chart .pt { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; } .chart text { fill: var(--mute); font-size: 10px; font-weight: 600; }
.chart .area { fill: var(--accent); opacity: .12; }
.login { max-width: 400px; margin: 0 auto; padding: 9vh 22px 40px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.logo { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; box-shadow: 0 14px 30px rgba(255, 90, 31, .35); }
.logo .ico { width: 34px; height: 34px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; z-index: 60; font-size: 14px; font-weight: 600; box-shadow: var(--shadow2); max-width: 90vw; }
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; } .kv:last-child { border-bottom: 0; }
.thumb-btn { background: none; border: 0; padding: 0; flex: none; display: block; }
.hero .thumb { background: none; border: 0; width: 100%; height: auto; aspect-ratio: 1; }
.hero .thumb img { object-fit: contain; }
.hero .thumb.skel { background: none; animation: none; }
.lcard .body { display: block; }
.lcard .body .badge { margin-top: 6px; }
.hero .figure { width: 52%; max-width: 230px; right: -10px; top: -6px; }
.row.head { margin-bottom: 14px; align-items: flex-start; }
.row.head h1 { font-size: 26px; }
.center .logo { margin-left: auto; margin-right: auto; }

/* guidance */
.wrapline { flex-wrap: wrap; }
.hero .btn.hero-ghost { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .45); }
.tip { border-color: var(--accent); background: var(--accent-soft); }
.tip h3 { color: var(--accent); }
.tiplist { list-style: none; padding: 0; margin: 10px 0 0; }
.tiplist li { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: 14px; color: var(--text); }
.tipico { flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.swatch { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ffb066); display: block; }
.tour-back { position: fixed; inset: 0; z-index: 80; background: rgba(8, 10, 16, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.tour { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 24px 22px 18px; box-shadow: var(--shadow2); }
.tour p { color: var(--mute); font-size: 15px; margin: 6px 0 16px; }
.tour-title { font-size: 22px; text-transform: none; letter-spacing: -0.02em; color: var(--text); margin: 4px 0 0; font-weight: 750; }
.tour-ico { width: 60px; height: 60px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; box-shadow: 0 12px 26px rgba(255, 90, 31, .3); }
.tour-dots { display: flex; gap: 6px; margin: 0 0 16px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: width .2s; }
.tour-dots i.on { width: 22px; background: var(--accent); }
@media (min-width: 640px) { .tour-back { align-items: center; } }
/* the figure sits in the top-right corner; the buttons always stay on top of it */
.hero .figure { width: 38%; max-width: 170px; top: 6px; right: 2px; }
.hero .wrapline { position: relative; z-index: 2; }
.hero h3, .hero .meta { position: relative; z-index: 2; }

/* the guided tour: a dimmed screen with a lit hole around the thing to use */
.tour-block { position: fixed; inset: 0; z-index: 90; }
.tour-hole { position: fixed; z-index: 91; border-radius: 18px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(8, 10, 16, .62); pointer-events: none; transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease, opacity .2s; animation: tourpulse 1.6s ease-in-out infinite; }
@keyframes tourpulse { 0%, 100% { box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(8, 10, 16, .62); } 50% { box-shadow: 0 0 0 6px var(--accent2), 0 0 0 9999px rgba(8, 10, 16, .62); } }
.tour-bubble { position: fixed; z-index: 92; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 22px; padding: 16px 16px 14px; box-shadow: var(--shadow2); transition: top .25s ease, left .25s ease, opacity .15s; }
.tour-bubble.moving { opacity: .0; }
.tour-bubble h3 { font-size: 18px; margin: 2px 0 4px; }
.tour-bubble p { margin: 0 0 12px; color: var(--mute); font-size: 15px; }
body.touring .tabs { z-index: 10; }
@media (prefers-reduced-motion: reduce) { .tour-hole { animation: none; transition: none; } .tour-bubble { transition: none; } }

/* muscle map */
.bm { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--stage); border-radius: 18px; padding: 12px 8px 6px; }
.bm-view { margin: 0; text-align: center; }
.bm-view svg { width: 100%; max-height: 260px; display: block; }
.bm-view figcaption { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.bm polygon { stroke: var(--surface); stroke-width: .35; transition: fill .3s; }
.bm .bm-off { fill: #c9ced8; } .bm .bm-head { fill: #b9bfca; }
:root[data-theme="dark"] .bm .bm-off { fill: #3a4252; } :root[data-theme="dark"] .bm .bm-head { fill: #2f3644; }
.bm .bm-p, .bm-legend .bm-p, .ml .bm-p { fill: var(--accent); background: var(--accent); }
.bm .bm-s, .bm-legend .bm-s, .ml .bm-s { fill: #ffa25e; background: #ffa25e; }
.bm .bm-x, .bm-legend .bm-x, .ml .bm-x { fill: #ffd8b3; background: #ffd8b3; }
.bm-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 10px 0 4px; font-size: 12px; color: var(--mute); }
.bm-legend span, .ml-h { display: inline-flex; align-items: center; gap: 6px; }
.bm-legend i, .ml-h i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.ml { margin-top: 12px; }
.ml-h { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin-bottom: 4px; }
.ml-r { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ml-r:last-child { border-bottom: 0; }
.ml-r span { text-align: right; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bm .bm-off { fill: #3a4252; } :root:not([data-theme="light"]) .bm .bm-head { fill: #2f3644; } }

/* ways to do a move */
.ways { margin: 10px 0 8px; }
.ways-bar { display: flex; align-items: center; gap: 10px; }
.ways-bar h3 { font-size: 16px; }
.way-dots { display: flex; gap: 5px; justify-content: center; margin: 8px 0 2px; }
.way-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); }
.way-dots i.on { width: 18px; background: var(--accent); }
.way p { margin: 6px 0 10px; }
.way-row { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.way-k { color: var(--mute); font-weight: 650; font-size: 13px; }
.way .btn { margin-top: 10px; }
.stage3d.noanim { display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; aspect-ratio: 16 / 9; }
.waychip { margin-top: 10px; width: 100%; text-align: left; background: var(--surface2); border: 1px dashed var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--mute); }
.waychip u { color: var(--accent); text-decoration: none; }
.waychip.on { background: var(--accent-soft); color: var(--accent); border-style: solid; border-color: var(--accent); }
.srcs { margin-top: 12px; font-size: 13px; }
.srcs summary { cursor: pointer; font-weight: 650; color: var(--accent); }
.srcs ol { padding-left: 18px; margin: 8px 0; }
.srcs li { margin: 6px 0; }
.srcs a { color: var(--text); }
