/* Roux Cube — one committed look: a dark instrument panel, like the app icon (a lit cube in the night).
   Ink-blue ground, hairline rules, the cube's six sticker colors as the only bright accents (each phase keeps the
   app's color). Type: Geist for Latin and numbers, the system's CJK faces beside it, Geist Mono for moves. */
:root {
  --ground: #070a12; --ground-2: #0b0f1a; --panel: #0f1422; --panel-2: #151b2c; --raise: #1b2236;
  --line: rgb(var(--tint) / .08); --line-2: rgb(var(--tint) / .14);
  --ink: #edf0f7; --ink-2: #b5bccd; --ink-3: #7c859b;
  --glow: #4ade80; --glow-ink: #04130a;
  --all: #a594ff; --fb: #6ea2ff; --sb: #ff8c66; --cmll: #3fd59b; --lse: #f5c451;
  --good: #4fd39a; --bad: #ff7a66;
  --s-u: #f6c523; --s-d: #f4f4f1; --s-f: #19a55a; --s-b: #2a66e8; --s-r: #f38a22; --s-l: #df3b2c; /* white at the bottom (the app's faces seen through z2) */
  --sans: "Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "PingFang SC", "PingFang TC", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 18px; --r-s: 12px;
  --tint: 255 255 255; --nav-bg: rgb(7 10 18 / .72); --shadow: rgb(0 0 0 / .5); --ink-hover: #fff; --em-a: #b8ffd2; --em-b: #7ee0ff; --fx-grey: #2a3042; --fx-edge: var(--ground);
  --eo-glass-0: #7a86a0; --eo-glass-1: #6a7690; --eo-glass-2: #5d6882; --eo-back: #46506a; --eo-line: #8a94ad; --eo-a: #6ea2ff; --eo-b: #ff8c66; /* the EO cube: blue grey glass; its edges light on the dark ground */
  color-scheme: dark;
}
/* light: chosen with the switch, or the device's setting when nothing is chosen */
:root[data-theme="light"] {
  --ground: #f7f8fb; --ground-2: #eff1f6; --panel: #ffffff; --panel-2: #eef1f6; --raise: #e5e9f1;
  --line: rgb(15 23 42 / .09); --line-2: rgb(15 23 42 / .16);
  --ink: #0e1526; --ink-2: #3d4659; --ink-3: #697387;
  --glow: #129a48; --glow-ink: #ffffff;
  --all: #6a55e0; --fb: #2c6be0; --sb: #dd5a26; --cmll: #0d9566; --lse: #b07c00;
  --good: #11935c; --bad: #d4442f;
  --tint: 15 23 42; --nav-bg: rgb(247 248 251 / .78); --shadow: rgb(15 23 42 / .16); --ink-hover: #2a3550; --em-a: #0f7a3a; --em-b: #0b6fb0; --fx-grey: #c9cfdb; --fx-edge: #1b1f2a; --eo-line: #3c4660; --eo-a: #1f5fd6; --eo-b: #d9480f;
  color-scheme: light;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --ground: #f7f8fb; --ground-2: #eff1f6; --panel: #ffffff; --panel-2: #eef1f6; --raise: #e5e9f1;
  --line: rgb(15 23 42 / .09); --line-2: rgb(15 23 42 / .16);
  --ink: #0e1526; --ink-2: #3d4659; --ink-3: #697387;
  --glow: #129a48; --glow-ink: #ffffff;
  --all: #6a55e0; --fb: #2c6be0; --sb: #dd5a26; --cmll: #0d9566; --lse: #b07c00;
  --good: #11935c; --bad: #d4442f;
  --tint: 15 23 42; --nav-bg: rgb(247 248 251 / .78); --shadow: rgb(15 23 42 / .16); --ink-hover: #2a3550; --em-a: #0f7a3a; --em-b: #0b6fb0; --fx-grey: #c9cfdb; --fx-edge: #1b1f2a; --eo-line: #3c4660; --eo-a: #1f5fd6; --eo-b: #d9480f;
  color-scheme: light;
} }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; background: var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.8 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--ink); text-decoration-color: rgb(var(--tint) / .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { line-height: 1.22; text-wrap: pretty; font-weight: 650; letter-spacing: -0.022em; margin: 0; }
:lang(ja) :is(h1, h2, h3, .lead, figcaption, .faq summary) { word-break: auto-phrase; }
:is(:lang(ja), :lang(zh-Hans), :lang(zh-Hant), :lang(ko)) :is(h1, h2, h3) { letter-spacing: 0; font-weight: 700; }
::selection { background: rgb(74 222 128 / .3); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--panel); padding: 8px 14px; border-radius: 10px; }
.scroll { overflow-x: auto; }
.mono { font-family: var(--mono); }

/* The six stickers, the brand's one ornament. */
.stickers { display: inline-flex; gap: 4px; vertical-align: middle; }
.stickers i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); background: var(--nav-bg); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2); }
.nav-links { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.nav-links > a { color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.nav-links > a:hover { color: var(--ink); background: var(--panel-2); }
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; }
.langs summary::-webkit-details-marker { display: none; }
.langs[open] summary, .langs summary:hover { color: var(--ink); background: var(--panel-2); }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px var(--shadow); min-width: 200px; }
.langs li a { display: block; padding: 7px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.langs li a:hover, .langs li a[aria-current] { background: var(--raise); color: var(--ink); }
@media (max-width: 700px) { .langs summary span, .nav .cta span { display: none; } .nav-links > a { padding: 6px 8px; } }
/* Phones: the bar on one line (its links never wrap); the name beside the icon left out where it would not fit. */
.brand, .nav-links > a { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-in { gap: 6px; height: 56px; }
  .brand { font-size: 0; gap: 0; }
  .nav-links { gap: 2px; font-size: 13px; }
  .nav-links > a { padding: 6px 7px; }
}

/* App Store */
.cta { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--ink); color: var(--ground); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgb(var(--tint) / .12); }
.cta.small { height: 36px; padding: 0 14px 0 12px; font-size: 13.5px; margin-left: 6px; }
.cta.soon { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); cursor: default; }
.cta.soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 550; text-decoration: none; font-size: 15px; }
.link-arrow::after { content: "→"; transition: translate .15s; }
.link-arrow:hover::after { translate: 3px 0; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: 72px 40px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(600px 420px at 72% 38%, rgb(74 222 128 / .13), transparent 70%), radial-gradient(520px 380px at 88% 70%, rgb(223 59 44 / .12), transparent 70%), radial-gradient(700px 500px at 15% 0%, rgb(110 162 255 / .08), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 500 13.5px var(--sans); letter-spacing: .02em; color: var(--ink-2); margin: 0 0 22px; }
.hero h1 { font-size: clamp(38px, 6vw, 72px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.04; }
:is(:lang(ja), :lang(zh-Hans), :lang(zh-Hant), :lang(ko)) .hero h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.2; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--em-a), var(--glow) 45%, var(--em-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 24px 0 0; font-size: 17.5px; color: var(--ink-2); max-width: 32em; line-height: 1.8; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 40px; margin: 48px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; }
.stats li { display: grid; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats b { font: 600 28px var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--ink-3); }
.hero-stage { position: relative; }
.hero-stage .cube { background: none; border: 0; padding: 0; grid-template-columns: 1fr; gap: 6px; }
.hero-stage [data-autoplay] .big-play { display: none; }
.hero-stage .cube .stage { max-width: 470px; width: 100%; margin: 0 auto; background: radial-gradient(closest-side, rgb(var(--tint) / .06), transparent); }
.hero-stage .cube .side { max-width: 460px; margin: 0 auto; width: 100%; }
.hero-stage .cube-steps { display: none; }
.hero-stage figcaption { text-align: center; color: var(--ink-3); font-weight: 500; font-size: 13px; }

/* ---------- sections ---------- */
.band { padding-block: 112px; position: relative; }
.band + .band { border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: 56px; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } .band { padding-block: 80px; } }
.sec-head h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.03em; }
.sec-head .lead { margin: 0; }
.kicker { display: block; font: 500 13px var(--sans); letter-spacing: .04em; color: var(--glow); margin-bottom: 16px; }
.lead { color: var(--ink-2); font-size: 17px; line-height: 1.8; max-width: 38em; }

/* phases */
.phase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 1000px) { .phase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .phase-grid { grid-template-columns: 1fr; } }
.phase-card { background: var(--ground-2); padding: 22px 22px 26px; display: grid; gap: 14px; align-content: start; transition: background .2s; }
.phase-card:hover { background: var(--panel); }
.phase-card .num { display: flex; justify-content: space-between; align-items: baseline; font: 500 12.5px var(--mono); color: var(--ink-3); }
.phase-card .num b { color: var(--pc); font-weight: 600; font-size: 13px; }
.phase-card h3 { font: 600 26px var(--sans); letter-spacing: -0.03em; }
.phase-card h3 small { display: block; font: 400 13px var(--sans); color: var(--ink-3); letter-spacing: 0; margin-top: 2px; }
.phase-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.phase-card .link-arrow { font-size: 14px; color: var(--pc); }
.phase-card .cube.bare .stage { background: radial-gradient(closest-side, color-mix(in srgb, var(--pc) 16%, transparent), transparent); }
.first-lesson { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: var(--ink-3); font-size: 14.5px; }

/* ladder: each lesson a dot in its phase's color, one row per Lv */
.ladder-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .ladder-wrap { grid-template-columns: 1fr; gap: 32px; } }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ladder li { display: grid; grid-template-columns: 64px 92px minmax(0, 1fr) 36px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .ladder li { grid-template-columns: 48px minmax(0, 1fr) 30px; } .ladder .lvname { display: none; } }
.ladder .lv { font: 600 14px var(--mono); }
.ladder .lvname { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.ladder .dots { display: flex; flex-wrap: wrap; gap: 5px; }
.ladder .dots a { width: 12px; height: 12px; border-radius: 3px; background: var(--c); opacity: .9; transition: transform .12s, opacity .12s; }
.ladder .dots a:hover { transform: scale(1.35); opacity: 1; }
.ladder .n { font: 500 13px var(--mono); color: var(--ink-3); text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* data */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 820px) { .charts { grid-template-columns: 1fr; } }

/* features */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }
.feature { background: linear-gradient(180deg, var(--panel), var(--ground-2)); border: 1px solid var(--line); border-radius: var(--r); padding: 32px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--raise); color: var(--glow); margin-bottom: 22px; box-shadow: inset 0 0 0 1px var(--line-2); }
.feature h3 { font-size: 22px; margin-bottom: 10px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.practice { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .practice { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .practice { grid-template-columns: 1fr; } }
.practice li { border-top: 1px solid var(--line-2); padding-top: 18px; }
.practice .n { font: 500 12.5px var(--mono); color: var(--ink-3); }
.practice h3 { font-size: 18px; margin: 6px 0 8px; }
.practice p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }

/* faq */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 24px; } }
.faq { border-top: 1px solid var(--line); }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: 17px; font-weight: 550; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 24px/1 var(--sans); color: var(--ink-3); transition: rotate .2s; }
.faq[open] summary::after { rotate: 45deg; }
.faq p { margin: 0 0 24px; color: var(--ink-2); max-width: 44em; }

/* final */
.final { text-align: center; padding-block: 120px; background: radial-gradient(600px 300px at 50% 100%, rgb(74 222 128 / .12), transparent 70%); }
.final img { border-radius: 26px; box-shadow: 0 30px 80px var(--shadow), 0 0 0 1px var(--line-2); }
.final h2 { font-size: clamp(30px, 4vw, 46px); margin: 28px 0 12px; letter-spacing: -0.03em; }
.final p { color: var(--ink-2); margin: 0 auto 32px; max-width: 30em; }

/* ---------- charts & tables (numbers always shown) ---------- */
.chart, .tbl { margin: 24px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.chart figcaption, .tbl figcaption { font-weight: 600; font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.chart table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chart th { text-align: left; font-weight: 400; padding: 7px 14px 7px 0; width: 40%; color: var(--ink-2); }
.chart th small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.chart td { padding: 7px 0; }
.chart .bar { display: block; height: 8px; background: rgb(var(--tint) / .05); border-radius: 4px; overflow: hidden; }
.chart .bar span { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--pc, var(--glow)) 55%, transparent), var(--pc, var(--glow))); border-radius: 4px; }
.chart td.num { width: 1%; white-space: nowrap; padding-left: 14px; font: 500 13.5px var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.tbl table { border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 100%; }
.tbl th, .tbl td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--ink-3); font-weight: 500; font-size: 12.5px; text-transform: none; }
.note { color: var(--ink-3); font-size: 13px; margin: 12px 0 0; }

/* ---------- the cube player ---------- */
.cube { --pc-l: var(--pc, var(--glow)); margin: 28px 0; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
@media (max-width: 640px) { .cube { grid-template-columns: 1fr; } .cube .stage { max-width: 340px; margin: 0 auto; width: 100%; } }
.cube .stage { position: relative; aspect-ratio: 1; border-radius: 14px; background: radial-gradient(closest-side, rgb(var(--tint) / .07), rgb(var(--tint) / .015) 70%, transparent); }
.cube canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.cube canvas:active { cursor: grabbing; }
.big-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgb(var(--tint) / .14); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgb(var(--tint) / .25), 0 10px 30px rgb(0 0 0 / .4); transition: transform .15s, background .15s; }
.big-play:hover { transform: scale(1.06); background: rgb(var(--tint) / .22); }
.big-play svg { margin-left: 3px; }
.cube:not(.ready) .big-play, .cube:not(.ready) .ctl { visibility: hidden; }
.cube .side { min-width: 0; display: grid; gap: 14px; align-content: start; }
.cube figcaption { font-weight: 600; font-size: 15px; }
.timeline { height: 3px; border-radius: 2px; background: rgb(var(--tint) / .08); overflow: hidden; }
.timeline i { display: block; height: 100%; width: calc(var(--prog, 0) * 100%); background: var(--pc-l); transition: width .25s; }
.moves { display: flex; flex-wrap: wrap; gap: 2px 2px; font: 500 14px/1.6 var(--mono); }
.moves span { padding: 1px 6px; border-radius: 6px; color: var(--ink-3); transition: color .15s, background .15s; }
.moves span.done { color: var(--ink); }
.moves span.now { background: var(--pc-l); color: var(--ground); }
.moves .cnt { align-self: center; padding: 0 2px; font: 400 12.5px/1.6 var(--sans); font-style: normal; color: var(--ink-3); white-space: nowrap; }
.ctl { display: flex; align-items: center; gap: 4px; }
.ctl button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.ctl button:hover:not(:disabled) { background: var(--raise); color: var(--ink); }
.ctl button.main { width: auto; height: 38px; border-radius: 999px; padding: 0 18px 0 14px; display: inline-flex; gap: 8px; background: var(--ink); color: var(--ground); font: 600 14px var(--sans); }
.ctl button.main:hover { background: var(--ink-hover); }
.ctl button:disabled { opacity: .3; cursor: default; }
.ctl .i-pause { display: none; }
.ctl button.main[aria-pressed="true"] .i-play { display: none; }
.ctl button.main[aria-pressed="true"] .i-pause { display: block; }
.cube-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 2px; }
.cube-steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14.5px; line-height: 1.65; cursor: pointer; color: var(--ink-2); transition: background .15s, color .15s; }
.cube-steps li:hover { background: rgb(var(--tint) / .03); }
.cube-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); display: grid; place-items: center; font: 500 11.5px var(--mono); margin-top: 1px; }
.cube-steps li.on { background: color-mix(in srgb, var(--pc-l) 10%, transparent); color: var(--ink); }
.cube-steps li.on::before { background: var(--pc-l); box-shadow: none; color: var(--ground); }
.cube.compact { grid-template-columns: 1fr; padding: 14px; gap: 10px; }
.cube.compact .stage { max-width: 220px; margin: 0 auto; width: 100%; }
.cube.compact .ctl { justify-content: center; }
.cube.bare { border: 0; padding: 0; margin: 0; background: transparent; }
.cube.bare .side { display: none; }
.cube.bare .stage { max-width: 220px; margin: 0 auto; width: 100%; }
.cube.bare .big-play { width: 48px; height: 48px; }
.cube.failed .stage::after { content: "3D"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--mono); padding: 3px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); text-decoration: none; white-space: nowrap; }
.pill.all, .c-all { --c: var(--all); } .pill.fb, .c-fb { --c: var(--fb); } .pill.sb, .c-sb { --c: var(--sb); } .pill.cmll, .c-cmll { --c: var(--cmll); } .pill.lse, .c-lse { --c: var(--lse); }

/* ---------- lessons list ---------- */
.page-head { padding-block: 72px 24px; }
.page-head h1 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.035em; }
.page-head .lead { margin: 20px 0 0; }
/* lessons: the Lv × step map */
.matrix-sec { margin-top: 48px; }
.matrix-sec h2, .lv-list > h2 { font-size: 30px; letter-spacing: -0.03em; }
.matrix-lead { color: var(--ink-2); max-width: 760px; margin: 12px 0 0; }
.matrix-scroll { overflow-x: auto; margin: 24px auto 0; max-width: 1720px; padding: 0 max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left)); }
.matrix { border-collapse: separate; border-spacing: 0; margin: 0 auto; font-size: 12.5px; }
.matrix th, .matrix td { padding: 6px 6px; vertical-align: top; border-bottom: 1px solid var(--line); }
/* Columns: the Lv (its number and name). Rows: a step's kinds of lesson, the step named once at the left. */
.matrix thead .lvh { text-align: left; min-width: 96px; padding: 8px 8px 10px; border-bottom: 2px solid var(--line-2); }
.matrix thead .lvh b { display: block; font: 600 14px var(--mono); color: var(--ink); }
.matrix thead .lvh span { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.matrix .ph { position: sticky; left: 0; z-index: 2; width: 64px; min-width: 64px; text-align: left; font: 600 14px var(--sans); color: var(--c); background: var(--ground); padding: 8px 10px; border-left: 3px solid var(--c); }
.matrix .ph a { color: inherit; text-decoration: none; }
.matrix .ln { position: sticky; left: 64px; z-index: 1; width: 92px; min-width: 92px; max-width: 92px; text-align: left; font: 500 11px/1.35 var(--mono); color: var(--ink-3); background: var(--ground); padding: 8px 10px 8px 6px; border-right: 1px solid var(--line-2); }
.matrix tr.grp > * { border-top: 2px solid var(--line-2); }
.matrix td { min-width: 96px; }
.matrix td .chip { display: block; width: max-content; max-width: 112px; margin-bottom: 4px; padding: 3px 8px; border-radius: 7px; font: 500 12px/1.4 var(--mono); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); text-decoration: none; transition: background .15s, transform .15s; }
.matrix td .chip:hover { background: color-mix(in srgb, var(--c) 26%, transparent); transform: translateY(-1px); }
.matrix tbody tr:hover td, .matrix tbody tr:hover .ln { background: rgb(var(--tint) / .025); }

/* lessons: every lesson by Lv */
.lv-list { margin-block: 88px; }
.lv-block { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding-block: 28px; border-bottom: 1px solid var(--line); }
@media (max-width: 680px) { .lv-block { grid-template-columns: 1fr; gap: 12px; } }
.lv-tag b { display: block; font: 600 17px var(--mono); color: var(--ink); }
.lv-tag span { display: block; color: var(--ink-2); font-size: 13.5px; }
.lv-tag em { display: block; font: 500 12px var(--mono); color: var(--ink-3); font-style: normal; margin-top: 4px; }
.lv-groups { display: grid; gap: 22px; }
.lv-group h3 { font: 600 14px var(--mono); color: var(--pc); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.lv-group h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--pc); }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.lesson-list a { display: grid; gap: 4px; align-content: start; height: 100%; padding: 16px 18px; border-radius: var(--r-s); background: var(--ground-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s, transform .15s; }
.lesson-list a:hover { border-color: color-mix(in srgb, var(--pc) 50%, transparent); background: var(--panel); transform: translateY(-1px); }
.lesson-list .lt { font-weight: 600; line-height: 1.5; }
.lesson-list .wn { font: 500 12px var(--mono); color: var(--pc); }
.lesson-list .ab { font-size: 13.5px; color: var(--ink-3); line-height: 1.65; }

/* ---------- a lesson ---------- */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 72px; align-items: start; padding-block: 48px 96px; }
@media (max-width: 1040px) { .lesson-wrap { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.lesson { min-width: 0; max-width: 760px; }
.crumbs { font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.lesson-head { margin: 28px 0 8px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.lesson-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; color: var(--ink-3); font-size: 13.5px; }
.lesson-head .lv { font: 600 13.5px var(--mono); color: var(--pc); }
.lesson-head h1 { font-size: clamp(26px, 4vw, 40px); margin: 18px 0 14px; letter-spacing: -0.03em; }
.boost { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14.5px; margin: 0; }
.boost::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 10px var(--pc); }
.prose { font-size: 16.5px; }
.prose > h2 { font-size: 26px; margin: 64px 0 16px; letter-spacing: -0.025em; display: flex; align-items: center; gap: 14px; }
.prose > h2::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: var(--pc); }
.prose > h2:first-child { margin-top: 40px; }
.prose h3 { font-size: 19px; margin: 40px 0 10px; color: var(--ink); }
.prose p { margin: 12px 0; color: var(--ink-2); }
.prose p.pro, .prose p.con { margin: 6px 0; padding-left: 30px; position: relative; }
.prose p.pro::before, .prose p.con::before { position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--mono); }
.prose p.pro::before { content: "+"; color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.prose p.con::before { content: "−"; color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.prose ol.steps { list-style: none; padding: 0; counter-reset: st; display: grid; gap: 4px; }
.prose ol.steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.prose ol.steps li::before { content: counter(st, decimal-leading-zero); font: 500 13px/1.9 var(--mono); color: var(--pc); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 500 14px var(--mono); }
.flow span { padding: 5px 12px; border-radius: 999px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.flow span.on { background: color-mix(in srgb, var(--pc) 16%, var(--panel-2)); box-shadow: inset 0 0 0 1.5px var(--pc); color: var(--ink); font-weight: 700; }
.flow span:not(.on) { color: var(--ink-3); }
.flow i { color: var(--ink-3); font-style: normal; }
.badge { margin-top: 40px; }
.badge + h3 { margin-top: 10px; }
.lesson-links { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.lesson-links a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--ground-2); text-decoration: none; color: var(--ink); font-weight: 550; transition: border-color .15s, background .15s; }
.lesson-links a::after { content: "→"; margin-left: auto; color: var(--ink-3); }
.lesson-links a:hover { border-color: var(--line-2); background: var(--panel); }
.algs > h2 { font-size: 26px; margin: 64px 0 16px; letter-spacing: -0.025em; }
.alg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.alg-grid .cube { margin: 0; }
.appbox { margin: 72px 0 32px; padding: 36px; border-radius: 22px; background: radial-gradient(400px 200px at 90% 0%, rgb(74 222 128 / .14), transparent 70%), var(--panel); border: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.appbox > div { flex: 1 1 320px; }
.appbox h2 { font-size: 22px; margin-bottom: 8px; }
.appbox p { margin: 0; color: var(--ink-2); font-size: 15px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; color: var(--ink); background: var(--ground-2); transition: border-color .15s; }
.pager a:hover { border-color: var(--line-2); }
.pager a small { color: var(--ink-3); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.pager a span { font-weight: 550; line-height: 1.5; }
.pager .next { text-align: right; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }
.toc { position: sticky; top: 96px; font-size: 13.5px; }
.toc p { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.5; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--pc); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 48px calc(48px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-3); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
@media (max-width: 700px) { .foot-in { grid-template-columns: 1fr; } }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.credits { grid-column: 1 / -1; margin: 0; font-size: 12.5px; line-height: 1.7; padding-top: 24px; border-top: 1px solid var(--line); }

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

/* the features' looping figures */
.fx-box { height: 150px; display: grid; place-items: center; margin: -6px 0 18px; border-radius: 14px; background: radial-gradient(closest-side, rgb(var(--tint) / .04), transparent); }
.fx-box.wide { height: 180px; margin-bottom: 22px; }
.practice .fx-box { margin: 0 0 14px; }
.fx { width: 100%; max-width: 320px; height: 100%; overflow: visible; }
.fx text { font-family: var(--mono); }
.fx-coach .lbl { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.fx-coach .track { fill: rgb(var(--tint) / .05); }
.fx-coach .num { fill: var(--ink-2); font-size: 11.5px; }
.fx-coach .shrink { transform-box: fill-box; transform-origin: left; animation: fx-shrink 6s ease-in-out infinite; }
.fx-coach .mark { fill: none; stroke: #f5b83d; stroke-width: 1.5; animation: fx-mark 6s ease-in-out infinite; }
.fx-coach .num.a { animation: fx-a 6s infinite; } .fx-coach .num.b { fill: var(--glow); animation: fx-b 6s infinite; }
.fx-coach .gain rect { fill: color-mix(in srgb, var(--glow) 18%, transparent); stroke: color-mix(in srgb, var(--glow) 50%, transparent); }
.fx-coach .gain text { fill: var(--glow); font-size: 11px; text-anchor: middle; font-weight: 600; }
.fx-coach .gain { animation: fx-b 6s infinite; }
@keyframes fx-shrink { 0%, 35% { transform: scaleX(1); } 55%, 90% { transform: scaleX(var(--to)); } 100% { transform: scaleX(1); } }
@keyframes fx-mark { 0%, 8% { opacity: 0; } 15%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fx-a { 0%, 45% { opacity: 1; } 50%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fx-b { 0%, 45% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
.fx-cube, .fx-drill { position: relative; display: grid; place-items: center; }
.fx-cube .cube.bare .stage, .fx-drill .cube.bare .stage { max-width: 170px; }
.practice .fx-drill .cube.bare .stage { max-width: 140px; }
.fx .big-play { display: none !important; }
.fx-cube .ble { position: absolute; right: 14%; top: 10%; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fb); background: color-mix(in srgb, var(--fb) 14%, transparent); animation: fx-ping 2s ease-out infinite; }
@keyframes fx-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fb) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 14px transparent; } }
.fx-find .hit { animation: fx-hit 3.2s ease-in-out infinite; }
.fx-find .ring { fill: none; stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: fx-ring 3.2s ease-out infinite; }
.fx-find .dot { fill: var(--ink); animation: fx-dot 3.2s infinite; }
@keyframes fx-hit { 0%, 40% { opacity: .35; } 55%, 100% { opacity: 1; } }
@keyframes fx-ring { 0%, 40% { opacity: 0; transform: scale(.4); } 45% { opacity: 1; } 75%, 100% { opacity: 0; transform: scale(2.2); } }
@keyframes fx-dot { 0%, 38% { opacity: 0; } 42%, 60% { opacity: .9; } 70%, 100% { opacity: 0; } }
.fx-pick .opt rect { fill: var(--panel-2); stroke: var(--line-2); }
.fx-pick .k { fill: var(--ink-3); font-size: 12px; text-anchor: middle; }
.fx-pick .m { fill: var(--ink); font-size: 26px; font-weight: 600; text-anchor: middle; }
.fx-pick .u { fill: var(--ink-3); font-size: 10px; text-anchor: middle; }
.fx-pick .best rect { animation: fx-best 4s ease-in-out infinite; }
.fx-pick .ok { fill: var(--glow); } .fx-pick .okp { fill: none; stroke: var(--glow-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fx-pick .best .ok, .fx-pick .best .okp { animation: fx-b 4s infinite; }
.fx-pick .opt { animation: fx-dim 4s ease-in-out infinite; } .fx-pick .opt.best { animation: none; }
@keyframes fx-best { 0%, 40% { stroke: var(--line-2); fill: var(--panel-2); } 50%, 92% { stroke: var(--glow); fill: color-mix(in srgb, var(--glow) 12%, var(--panel-2)); } 100% { stroke: var(--line-2); } }
@keyframes fx-dim { 0%, 40% { opacity: 1; } 50%, 92% { opacity: .45; } 100% { opacity: 1; } }
.fx-colors .cf { stroke: var(--fx-edge); stroke-width: 3; stroke-linejoin: round; }
.fx-colors .ans { animation: fx-b 4s infinite; }
.fx-colors .qm { fill: var(--ink-2); font-size: 26px; font-weight: 600; text-anchor: middle; animation: fx-a 4s infinite; }
@media (prefers-reduced-motion: reduce) { .fx *, .fx-cube .ble { animation: none !important; } }
.fx-find, .fx-colors, .fx-pick { width: auto; height: 128px; max-width: 100%; }
.fx-coach { height: auto; }
/* 「Roux とは?」 */
.way-card { margin: 18px 0; padding: 22px 24px; border-radius: var(--r); background: var(--ground-2); border: 1px solid var(--line); border-top: 2px solid var(--pc); }
.way-card h3 { margin: 0 0 6px; font-size: 20px; display: flex; align-items: baseline; gap: 10px; color: var(--ink); }
.way-card h3 span { font: 500 12px var(--mono); color: var(--pc); }
.way-card > p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.way-card ol { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.way-card li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 64px; align-items: center; gap: 10px; font-size: 14px; }
.way-card .i { font: 500 12px var(--mono); color: var(--ink-3); }
.way-card .n { color: var(--ink); line-height: 1.45; }
.way-card .bar { height: 8px; border-radius: 4px; background: rgb(var(--tint) / .05); overflow: hidden; }
.way-card .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 55%, transparent), var(--pc)); }
.way-card .m { font: 500 12.5px var(--mono); color: var(--ink-2); text-align: right; }
/* Phones: the bar on its own line under the name (the moves at the right of the name), never left out. */
@media (max-width: 560px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  /* The cards in their frames, a little less padding inside. */
  .way-card { padding: 20px 16px; }
  /* As the charts: the name, the bar and the moves on one line (the name wraps). */
  .way-card ol { gap: 12px; }
  .way-card li { grid-template-columns: minmax(0, 1.15fr) minmax(64px, 1fr) 56px; }
}
.vs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.vs { padding: 18px 20px; border-radius: var(--r-s); background: var(--ground-2); border: 1px solid var(--line); }
.vs .what { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.vs div { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; border-top: 1px solid var(--line); font-size: 14px; }
.vs div span { color: var(--ink-3); font-family: var(--mono); }
.vs b { font-weight: 600; text-align: right; } .vs b.roux { color: var(--glow); }
.dots-list { padding-left: 1.2em; } .dots-list li { margin-block: 6px; }
.roux-next { margin: 40px 0 0; }

/* the light / dark switch */
.theme-btn { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.theme-btn:hover { color: var(--ink); background: var(--panel-2); }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; } :root[data-theme="light"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="dark"]) .theme-btn .i-moon { display: none; } }
.stickers i { box-shadow: inset 0 0 0 1px var(--line-2); }

/* the hero's moves, split as the app's review splits a solve */
.moves.parted { display: grid; gap: 6px; }
.moves.parted .part { --c: var(--all); display: grid; grid-template-columns: 50px minmax(0, 1fr) 26px; gap: 8px; align-items: start; padding: 6px 8px; border-radius: 10px; transition: background .2s; }
.moves.parted .part.c-fb { --c: var(--fb); } .moves.parted .part.c-sb { --c: var(--sb); } .moves.parted .part.c-cmll { --c: var(--cmll); } .moves.parted .part.c-lse { --c: var(--lse); }
.moves.parted .part.on { background: color-mix(in srgb, var(--c) 10%, transparent); }
.moves.parted .ph { font: 600 11.5px/22px var(--mono); color: var(--c); text-align: center; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.moves.parted .pm { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.moves.parted .n { font: 500 11px/22px var(--mono); color: var(--ink-3); font-style: normal; text-align: right; }
.moves.parted .grp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 1px 4px 1px 2px; border-radius: 8px; font-style: normal; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.moves.parted .grp b { font: 600 10.5px/1 var(--sans); color: var(--c); padding: 4px 6px; margin-right: 2px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.moves.parted span.now { background: var(--c); }

/* App Store: a light sweeping across the button */
.cta:not(.soon) { position: relative; overflow: hidden; isolation: isolate; }
.cta:not(.soon)::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, color-mix(in srgb, var(--ground) 30%, transparent) 50%, transparent 62%); transform: translateX(-120%); animation: cta-shine 4.5s ease-in-out infinite 1.2s; }
@keyframes cta-shine { 0%, 70% { transform: translateX(-120%); } 90%, 100% { transform: translateX(120%); } }
.cta.big { height: 56px; padding: 0 26px 0 20px; font-size: 16.5px; box-shadow: 0 14px 40px color-mix(in srgb, var(--glow) 25%, transparent); }
.cta.big svg { width: 22px; height: 22px; }
.show-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.free { font: 500 13px var(--mono); color: var(--ink-3); }

/* a phone with the app's screens, one after another */
.phone { position: relative; width: 300px; max-width: 100%; aspect-ratio: 430 / 932; padding: 11px; border-radius: 48px; background: linear-gradient(145deg, #2b2f3a, #0b0d12 45%, #1c1f27); box-shadow: 0 0 0 1px rgb(255 255 255 / .08) inset, 0 40px 90px var(--shadow), 0 0 0 1px var(--line-2); }
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 30%; height: 22px; transform: translateX(-50%); border-radius: 999px; background: #05060a; z-index: 2; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #fff; }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .9s ease; }
.phone img.on { opacity: 1; }
.phone.small { width: 190px; border-radius: 34px; padding: 8px; } .phone.small .screen { border-radius: 27px; } .phone.small::before { top: 15px; height: 15px; }
.showcase { overflow: hidden; }
.show-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: center; }
@media (max-width: 900px) { .show-grid { grid-template-columns: 1fr; gap: 40px; } .show-stage { order: -1; } }
.show-copy h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; margin: 14px 0 28px; }
.show-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.show-list li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: 14px; cursor: pointer; transition: background .3s; overflow: hidden; }
.show-list li:hover { background: var(--panel-2); }
.show-list li.on { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.show-list .n { font: 500 12.5px/24px var(--mono); color: var(--ink-3); }
.show-list li.on .n { color: var(--glow); }
.show-list b { display: block; font-size: 16.5px; }
.show-list p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; max-height: 0; opacity: 0; transition: max-height .5s, opacity .5s; }
.show-list li.on p { max-height: 120px; opacity: 1; }
.show-list .bar { position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; background: var(--glow); transform: scaleX(0); transform-origin: left; }
.show-list li.on .bar { animation: show-bar var(--cycle, 4200ms) linear forwards; }
@keyframes show-bar { to { transform: scaleX(1); } }
.show-stage { position: relative; display: grid; place-items: center; }
.show-stage .phone { z-index: 1; }
.show-stage .halo { position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 22%, transparent), transparent 70%); }
.appbox.with-phone { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; overflow: hidden; }
.appbox.with-phone .phone { margin-bottom: -90px; transform: rotate(4deg); }
@media (max-width: 640px) { .appbox.with-phone { grid-template-columns: 1fr; } .appbox.with-phone .phone { margin: 8px auto -120px; } }

/* the dock: the app, one tap away, once the top of the page is passed */
.dock { position: fixed; z-index: 40; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 20px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 20px 60px var(--shadow), inset 0 0 0 1px var(--line-2); transition: transform .5s cubic-bezier(.2, .9, .3, 1.2); width: min(440px, calc(100% - 24px)); }
.dock.show { transform: translate(-50%, 0); }
.dock img { border-radius: 10px; flex: none; }
.dock div { flex: 1; min-width: 0; line-height: 1.3; }
.dock b { display: block; font-size: 15px; }
.dock span { font: 500 12px var(--mono); color: var(--ink-3); }
.dock-btn { flex: none; padding: 9px 22px; border-radius: 999px; background: var(--glow); color: var(--glow-ink); font-weight: 700; font-size: 14.5px; text-decoration: none; animation: dock-pulse 2.6s ease-in-out infinite; }
@keyframes dock-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 50%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.dock-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 18px; cursor: pointer; }
.dock-x:hover { background: var(--raise); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .cta::after, .dock-btn { animation: none !important; } }
.nav-links > a.cta { color: var(--ground); padding: 0 14px 0 12px; border-radius: 999px; }
.nav-links > a.cta:hover { color: var(--ground); background: var(--ink); }

/* A way's lesson, as a card to its page. */
.lesson-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 14px 0 6px; padding: 12px 14px; border-radius: var(--r-s); border: 1px solid color-mix(in srgb, var(--pc) 45%, transparent); background: var(--panel); color: var(--ink); text-decoration: none; transition: background .15s, transform .15s, border-color .15s; }
.lesson-card:hover { background: color-mix(in srgb, var(--pc) 7%, var(--panel)); border-color: var(--pc); transform: translateY(-1px); }
.lesson-card .lc-text { display: grid; gap: 2px; }
.lesson-card small { font-size: 12px; color: var(--ink-3); }
.lesson-card b { font-weight: 600; line-height: 1.45; }
.lesson-card .lc-go { font-size: 22px; line-height: 1; color: var(--pc); }

/* A heading over a group of a way's step examples (① … ⑤): a section of its own. */
.prose h3.guide-sec { margin-top: 48px; padding: 12px 16px; border-radius: 10px; border-left: 5px solid var(--pc, var(--glow)); background: color-mix(in srgb, var(--pc, var(--glow)) 12%, transparent); color: var(--pc, var(--glow)); font-size: 21px; }
.prose h4.guide-item { font-size: 16px; margin: 28px 0 10px; color: var(--ink); }
.prose h3.guide-sec + h4.guide-item { margin-top: 14px; }

/* Merits (+), costs (−) and points to check (✓): a list, each line its mark in front. */
.prose ul.marks { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 6px; }
.prose ul.marks li { position: relative; padding-left: 30px; line-height: 1.6; }
.prose ul.marks li::before { position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--mono); }
.prose ul.marks li.pro::before { content: "+"; color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.prose ul.marks li.con::before { content: "−"; color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.prose ul.marks li.check::before { content: "✓"; color: var(--pc, var(--glow)); background: color-mix(in srgb, var(--pc, var(--glow)) 14%, transparent); }
.prose ul.marks li.dot::before { content: ""; width: 7px; height: 7px; top: .7em; left: 7px; background: var(--ink-3); }
.matrix thead .corner { position: sticky; left: 0; z-index: 3; background: var(--ground); border-bottom: 2px solid var(--line-2); }

/* A way taught case by case: each case its diagram, what tells it, its moves. */
.prose ul.cases { list-style: none; margin: 12px 0 18px; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.prose ul.cases li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; background: var(--panel); }
.prose ul.cases .case-fig { width: 76px; height: 76px; }
/* Other views of a case beside its figure, each labelled. */
.prose ul.cases li:has(> .figs) { grid-template-columns: auto minmax(0, 1fr); }
.prose ul.cases .figs { display: flex; flex-wrap: wrap; gap: 4px; }
.prose ul.cases li:has(> .stack) { grid-template-columns: auto minmax(0, 1fr); }
.prose ul.cases .stack { display: flex; flex-direction: column; gap: 8px; }
.prose ul.cases li.group { grid-template-columns: minmax(0, 1fr); }
.prose ul.cases li.group .figs { margin: 6px 0 2px; }
.prose ul.cases .figs figure { margin: 0; text-align: center; }
.prose ul.cases .figs figcaption { font-size: 11px; color: var(--ink-3); line-height: 1.2; }
.prose ul.cases b { display: block; font-weight: 650; line-height: 1.45; }
.prose ul.cases p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.prose ul.cases code { display: inline-block; margin-top: 4px; font: 600 13px var(--mono); color: var(--pc, var(--glow)); }

/* LSE's EO as a flowchart: each shape joined by an arrow to the shape its trigger leads to, the trigger on the arrow;
   scrolls sideways on a phone. */
.prose .eo-flow { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.prose .eo-flow figcaption { font-weight: 650; margin-bottom: 8px; }
.prose .eo-scroll { overflow-x: auto; }
.prose .eo-chart { display: block; width: 100%; max-width: 620px; min-width: 440px; height: auto; margin: 0 auto; }
.eo-chart .eo-line { fill: none; stroke: var(--ink-3); stroke-width: 1.4; }
.eo-chart .eo-arrowhead { fill: var(--ink-3); }
.eo-chart .eo-move { font: 700 10.5px var(--mono); fill: var(--pc, var(--glow)); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.eo-chart .eo-head-t { font: 650 10.5px var(--sans); fill: var(--pc, var(--glow)); }
.eo-chart .eo-name { font: 600 10px/1.25 var(--sans); color: var(--ink); text-align: center; }
.eo-chart .eo-box { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.eo-chart .eo-done { fill: color-mix(in srgb, var(--pc, var(--glow)) 16%, transparent); stroke: var(--pc, var(--glow)); }
.eo-chart .eo-done-t { font: 700 11.5px var(--sans); fill: var(--ink); }

/* EO's two triggers: M' U' M' (arrow) and M U' M (anti-arrow), each its own color */
.eo-chart .eo-line.eo-a { stroke: var(--eo-a); stroke-width: 1.8; }
.eo-chart .eo-line.eo-b { stroke: var(--eo-b); stroke-width: 1.8; }
.eo-chart .eo-arrowhead.eo-a { fill: var(--eo-a); }
.eo-chart .eo-arrowhead.eo-b { fill: var(--eo-b); }
.eo-chart .eo-move.eo-a { fill: var(--eo-a); }
.eo-chart .eo-move.eo-b { fill: var(--eo-b); }
.eo-a { color: var(--eo-a); font-weight: 700; }
.eo-b { color: var(--eo-b); font-weight: 700; }
.eo-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; font-size: 13px; }
.eo-keys code { font-weight: 700; margin-right: 4px; }
/* a folded step's cases (the app's "N ケースを表示する") */
.fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 8px; padding: 6px 12px; border-radius: 999px; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate .2s, translate .2s; }
.fold[open] > summary::before { rotate: -135deg; translate: 0 2px; }
.fold > summary:hover { color: var(--ink); }
.fold > summary .less, .fold[open] > summary .more { display: none; }
.fold[open] > summary .less { display: inline; }

/* A table's section title across it (the rows below are its group). */
.tbl tr.sec th { text-align: left; font-weight: 800; padding-top: 10px; background: color-mix(in srgb, var(--line) 35%, transparent); }

/* A case's line that stands out (fewer moves than the way taught), in red. */
.prose ul.cases p.alert { color: var(--bad, #d32f2f); font-weight: 700; }
