:root,
html[data-skin="neutral"] {
  --paper: #F1F4F0;
  --paper-2: #FAFBF9;
  --grid: #D5DED8;
  --ink: #22344B;
  --ink-soft: #6B7B8C;
  --maru: #DC4B33;
  --sprout: #5F9E57;
  --sprout-2: #8FBE84;
  --sprout-3: #C4DBBC;
  --sun: #EBAE3C;
  --surface: #ffffff;
  --selected-fill: #EAF3E7;
  --btn-edge: var(--btn-edge);
  --cell-new: #E5EBE6;
  --on-ink: #ffffff;
  --bg-spot-a: transparent;
  --bg-spot-b: transparent;
  --frame-radius: 28px;
  --btn-radius: 20px;
  --shadow: 0 1px 0 rgba(34, 52, 75, .1), 0 18px 44px -18px rgba(34, 52, 75, .35);
  --body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
}

html[data-skin="cool"] {
  --paper: #0c1220;
  --paper-2: #121c2e;
  --grid: rgba(148, 163, 184, .28);
  --ink: #e8eef8;
  --ink-soft: #8b9bb4;
  --maru: #fb7185;
  --sprout: #22d3ee;
  --sprout-2: #67e8f9;
  --sprout-3: #4f6f8f;
  --sun: #f59e0b;
  --surface: #0a101c;
  --selected-fill: rgba(34, 211, 238, .16);
  --btn-edge: #041018;
  --cell-new: #243044;
  --on-ink: #041018;
  --bg-spot-a: rgba(56, 189, 248, .14);
  --bg-spot-b: rgba(14, 165, 233, .08);
  --frame-radius: 14px;
  --btn-radius: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .35);
  --body: "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}

html[data-skin="cute"] {
  --paper: #fff1f5;
  --paper-2: #fffbfd;
  --grid: #f0c9d8;
  --ink: #4a3142;
  --ink-soft: #9a7388;
  --maru: #e86b8a;
  --sprout: #ff7aa2;
  --sprout-2: #8ecae6;
  --sprout-3: #ffc2d4;
  --sun: #ffb087;
  --surface: #ffffff;
  --selected-fill: #ffe0ea;
  --btn-edge: #c45b7a;
  --cell-new: #ffe0ea;
  --on-ink: #fff7fa;
  --bg-spot-a: rgba(255, 173, 198, .55);
  --bg-spot-b: rgba(168, 230, 207, .45);
  --frame-radius: 32px;
  --btn-radius: 999px;
  --shadow: 0 10px 28px rgba(255, 122, 162, .18);
  --body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 100%,
    var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
html[data-skin="cool"] body,
html[data-skin="cute"] body {
  background:
    radial-gradient(circle at 10% -4%, var(--bg-spot-a) 0%, transparent 42%),
    radial-gradient(circle at 92% 108%, var(--bg-spot-b) 0%, transparent 46%),
    var(--paper);
}

.frame {
  width: 100%;
  max-width: 390px;
  height: min(760px, 94vh);
  background: var(--paper-2);
  border-radius: var(--frame-radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.screen { display: none; flex: 1; flex-direction: column; min-height: 0; }
.screen.on { display: flex; }

.home {
  padding: 22px 22px 16px;
  justify-content: flex-start;
  overflow: hidden;
  gap: 0;
}
.home-top { flex: none; }
.home-stack {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 18px;
  padding-right: 2px;
}
.home-layer + .home-layer {
  border-top: 1px solid var(--grid);
  margin-top: 14px;
  padding-top: 14px;
}
.home-layer .pick-label { margin: 0 0 8px; }
.home-layer .picker .pick-label:not(:first-child) { margin-top: 16px; }
.home-layer.is-picker { padding-bottom: 8px; }
.home-layer.is-picker .picker { margin: 0; }
.home-layer.is-picker .pick-label:first-child { margin-top: 0; }
.home-go {
  flex: none;
  padding-top: 12px;
  border-top: 1px solid var(--grid);
  background: var(--paper-2);
}
.home-go .start { margin-top: 0; }
.wordmark { font-weight: 800; font-size: 15px; letter-spacing: .14em; color: var(--ink-soft); }
.headline { font-size: 29px; font-weight: 800; line-height: 1.35; margin: 10px 0 0; }
.headline em { font-style: normal; color: var(--sprout); }
.headline .op { margin: 0 .12em; }
.week { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.wd {
  width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--grid);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-soft);
}
.wd.done { background: var(--sun); border-color: var(--sun); color: var(--on-ink); }
.week-note { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.domain-switch { display: flex; gap: 8px; margin-top: 0; flex-wrap: wrap; }
.dom {
  flex: 1 1 calc(30% - 8px); border: 2px solid var(--grid); background: none; border-radius: 12px;
  font-family: var(--body); font-weight: 700; font-size: 12px; color: var(--ink);
  padding: 8px 0; cursor: pointer;
}
.dom.is-locked {
  opacity: .72; color: var(--ink-soft); border-style: dashed; cursor: pointer;
}
.plus-note {
  margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; text-align: center;
}
.pick-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ink-soft); margin: 16px 0 8px; }
.rowpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.rw {
  border: 2px solid var(--grid); background: none; border-radius: 12px; padding: 10px 0;
  font-family: var(--body); font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer;
}
.rw.all { grid-column: span 3; }
.rw[aria-pressed="true"] { border-color: var(--sprout); background: var(--selected-fill); color: var(--sprout); }
.rowpick.cols-4 { grid-template-columns: repeat(4, 1fr); }
.rowpick.cols-4 .rw.all { grid-column: span 4; }
.modes { display: grid; gap: 8px; }
.mode {
  border: 2px solid var(--grid); background: transparent; border-radius: 16px;
  padding: 12px 14px; font-family: var(--body); font-weight: 700; font-size: 15px;
  color: var(--ink); cursor: pointer; text-align: left;
}
.mode small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.mode[aria-pressed="true"] { border-color: var(--sprout); background: var(--selected-fill); color: var(--sprout); }
.mode[aria-pressed="true"] small { color: var(--sprout); }

.start {
  width: 100%; border: none; border-radius: var(--btn-radius); background: var(--ink); color: var(--on-ink);
  font-family: var(--body); font-weight: 800; font-size: 22px; padding: 19px 0; cursor: pointer;
  box-shadow: 0 6px 0 var(--btn-edge); margin-top: 16px;
}
.start:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--btn-edge); }
.sub { margin-top: 10px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.linkbtn {
  background: none; border: none; font-family: var(--body); font-size: 13px; font-weight: 700;
  color: var(--ink-soft); text-decoration: underline; cursor: pointer; padding: 6px;
}
.foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.sound-toggle { display: flex; gap: 8px; margin-top: 8px; }
.sound-card {
  flex: 1; appearance: none; border: 2px solid var(--grid); background: none;
  border-radius: 12px; padding: 10px 0; font-family: var(--body); font-weight: 800;
  font-size: 14px; color: var(--ink); cursor: pointer;
}
.sound-card[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }

.drill, .done, .map, .parent { padding: 18px 22px 26px; }
.map, .parent { overflow: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; max-width: 70%; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grid); }
.dot.done { background: var(--sprout); }
.dot.now { background: var(--ink); transform: scale(1.25); }
.quit { background: none; border: none; color: var(--ink-soft); font-size: 20px; cursor: pointer; padding: 4px 8px; }

.qwrap { flex: 1; display: grid; place-items: center; min-height: 0; position: relative; }
.prompt { font-size: 48px; font-weight: 800; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; }
.prompt .op { margin: 0 .18em; color: var(--ink-soft); }
.prompt .op.is-text { font-size: 0.55em; font-weight: 700; }
.prompt .blank { color: var(--sprout); }
.maru-host { position: absolute; inset: 0; pointer-events: none; }
.hint { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); min-height: 22px; text-align: center; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opts.nine { grid-template-columns: repeat(3, 1fr); }
.opts.nine .opt { font-size: 26px; padding: 12px 0; }
.opt {
  position: relative; border: 2px solid var(--grid); background: var(--surface); border-radius: 18px;
  font-family: var(--body); font-weight: 800; font-size: 32px; color: var(--ink); padding: 16px 0; cursor: pointer;
}
.opt.is-word { font-size: 22px; padding: 14px 8px; }
.opt:active { transform: scale(.97); }

.chip-board { display: block; overflow: auto; margin-top: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-cell {
  border: 1.5px solid var(--grid); background: var(--surface); border-radius: 10px;
  font-family: var(--body); font-weight: 800; font-size: 18px; color: var(--ink-soft);
  padding: 8px 10px; position: relative; cursor: pointer;
}
.chip-cell.is-word { font-size: 14px; }
.chip-cell.new { background: var(--surface); }
.chip-cell.learning { background: var(--sprout-3); border-color: var(--sprout-3); color: var(--ink); }
.chip-cell.acquired { background: var(--sprout-2); border-color: var(--sprout-2); color: var(--on-ink); }
.chip-cell.mastered { background: var(--sprout); border-color: var(--sprout); color: var(--on-ink); }
.chip-cell.needs-review::after {
  content: ""; position: absolute; top: 3px; right: 3px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--maru);
}
.opt.dim { opacity: .32; }
.opt.show { border-color: var(--ink); border-style: dashed; }
.opt.is-speaking {
  border-color: var(--ink);
  background: var(--selected-fill);
  transform: scale(1.04);
}
.opt svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.pad[hidden] { display: none !important; }
.pad-key {
  border: 2px solid var(--grid); background: var(--surface); border-radius: 14px;
  font-family: var(--body); font-weight: 800; font-size: 24px; padding: 14px 0; cursor: pointer;
}
.pad-display {
  grid-column: span 3; text-align: center; font-size: 36px; font-weight: 800; min-height: 48px;
  border: 2px dashed var(--grid); border-radius: 14px; padding: 8px;
}

.map-board.ku-board {
  display: grid;
  grid-template-columns: 28px repeat(9, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.ku-axis { font-size: 11px; font-weight: 700; color: var(--ink-soft); display: grid; place-items: center; }
.ku-axis.is-corner { font-size: 10px; }
.ku-cell {
  aspect-ratio: 1; border: none; border-radius: 6px; cursor: pointer; background: var(--cell-new);
}
.ku-cell.new { background: var(--cell-new); }
.ku-cell.learning { background: var(--sprout-3); }
.ku-cell.acquired { background: var(--sprout-2); }
.ku-cell.mastered { background: var(--sprout); }
.ku-cell.weak { box-shadow: inset 0 0 0 2px var(--maru); }
.ku-cell.needs-review { position: relative; }
.ku-cell.needs-review::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--maru);
}
.legend { list-style: none; padding: 0; margin: 16px 0 0; font-size: 12px; color: var(--ink-soft); }
.legend li { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .dot.new { background: var(--cell-new); }
.legend .dot.learning { background: var(--sprout-3); }
.legend .dot.acquired { background: var(--sprout-2); }
.legend .dot.mastered { background: var(--sprout); }
.legend .dot.weak { background: var(--maru); }
.legend .dot.cf { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sun); }

.prompt.is-kana { font-size: inherit; }
.kana-q { font-size: 88px; font-weight: 800; line-height: 1; }
.kana-q.is-word { font-size: 40px; word-break: keep-all; }
.kana-q.is-kanji { font-size: 72px; }
.seclabel.is-char { font-size: 20px; color: var(--ink); font-weight: 800; }
.chip-cell.is-kanji { font-size: 20px; }
.chip-cell.is-latin { font-size: 18px; letter-spacing: .03em; }
.speaker {
  width: 124px; height: 124px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--surface); font-size: 28px; font-weight: 800; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 5px 0 var(--btn-edge); font-family: var(--body); color: var(--ink);
}
.speaker:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--btn-edge); }
.replay {
  margin: 0 auto 10px; border: 2px solid var(--grid); background: var(--surface); border-radius: 999px;
  font-family: var(--body); font-weight: 700; font-size: 14px; color: var(--ink-soft);
  padding: 10px 20px; cursor: pointer; align-self: center;
}
.replay[hidden] { display: none !important; }

.kana-board { display: block; overflow: auto; margin-top: 8px; }
.seclabel { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 14px 0 6px; }
.goju { display: grid; grid-template-columns: 26px repeat(5, 1fr); gap: 4px; }
.goju .hd { font-size: 11px; font-weight: 700; color: var(--ink-soft); display: grid; place-items: center; height: 22px; }
.kana-cell {
  appearance: none; -webkit-appearance: none; margin: 0; font-family: var(--body);
  aspect-ratio: 1; border-radius: 8px; background: var(--surface); border: 1.5px solid var(--grid);
  display: grid; place-items: center; font-size: 17px; font-weight: 700; color: var(--ink-soft);
  position: relative; cursor: pointer;
}
.kana-cell.void { background: transparent; border: none; }
.kana-cell.new { background: var(--surface); }
.kana-cell.learning { background: var(--sprout-3); border-color: var(--sprout-3); color: var(--ink); }
.kana-cell.acquired { background: var(--sprout-2); border-color: var(--sprout-2); color: var(--on-ink); }
.kana-cell.mastered { background: var(--sprout); border-color: var(--sprout); color: var(--on-ink); }
.kana-cell.cf { box-shadow: inset 0 0 0 2px var(--sun); }
.kana-cell.needs-review::after {
  content: ""; position: absolute; top: 3px; right: 3px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--maru);
}

.make-ten-board { display: block; margin-top: 12px; }
.make-ten-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.make-ten-cell {
  display: grid; place-items: center; align-content: center; gap: 2px;
  font-family: var(--body); font-weight: 800; color: var(--ink); line-height: 1.05;
}
.make-ten-cell .bond-n { font-size: 16px; }
.make-ten-cell .bond-pair { font-size: 10px; font-weight: 700; color: var(--ink-soft); }

.add-sub-board { display: block; overflow: auto; margin-top: 8px; }
.add-grid, .sub-grid {
  display: grid;
  grid-template-columns: 22px repeat(9, minmax(0, 1fr));
  gap: 2px;
}
.add-grid .ku-cell, .sub-grid .ku-cell { border-radius: 4px; }
.ku-cell.void { background: transparent; pointer-events: none; }
.ku-cell.is-selected { box-shadow: inset 0 0 0 2px var(--ink); }
.kana-cell.is-selected, .chip-cell.is-selected {
  outline: 2px solid var(--ink); outline-offset: 1px;
}
.map-detail {
  margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--ink);
  line-height: 1.45; min-height: 2.6em;
}
.map-howto { margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--ink-soft); line-height: 1.5; }
.map-howto p { margin: 4px 0; }

.parent-view { margin-top: 8px; padding-bottom: 12px; }
.parent-pack { margin: 4px 0 0; font-size: 18px; font-weight: 800; }
.parent-note { margin: 6px 0 14px; font-size: 12px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; }
.parent-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.parent-kpi {
  background: var(--paper); border-radius: 14px; padding: 12px 8px 10px; text-align: center;
}
.parent-kpi-n { display: block; font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.parent-kpi-l { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.parent-sec { margin-top: 18px; }
.parent-h { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.parent-empty { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.parent-list { list-style: none; margin: 0; padding: 0; }
.parent-list li {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--grid); font-size: 13px; font-weight: 700;
}
.parent-list li:last-child { border-bottom: 0; }
.parent-li-label { min-width: 0; overflow-wrap: anywhere; }
.parent-li-n { flex: none; color: var(--ink-soft); font-size: 12px; text-align: right; }

@keyframes maru-draw {
  from { stroke-dashoffset: 120; }
  to { stroke-dashoffset: 0; }
}
.maru-stroke {
  fill: none; stroke: var(--maru); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 120; animation: maru-draw .42s ease forwards;
}

.subject-switch { display: flex; gap: 8px; margin-top: 0; }
.subtab {
  flex: 1; border: 2px solid var(--grid); background: none; border-radius: 12px;
  font-family: var(--body); font-weight: 800; font-size: 14px; color: var(--ink-soft);
  padding: 8px 0; cursor: pointer;
}
.subtab[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.domain-switch { margin-top: 0; }
.dom { flex: 1 1 calc(25% - 8px); min-width: 72px; font-size: 12px; padding: 7px 0; }
.start:disabled { opacity: .42; cursor: default; box-shadow: none; transform: none; }
.unlock-hint {
  margin: 12px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-soft); line-height: 1.45;
}

.opts.twenty { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.opts.twenty .opt { font-size: 20px; padding: 10px 0; border-radius: 14px; }
.opts.is-fractions { grid-template-columns: 1fr 1fr; gap: 10px; }
.opts.is-clock { grid-template-columns: repeat(4, 1fr); }
.opts.is-clock .opt { font-size: 16px; padding: 10px 0; }

.clock-face {
  position: relative;
  width: min(52vw, 220px);
  aspect-ratio: 1;
  margin: 10px auto 0;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 15px;
}
.clock-tick {
  position: absolute; inset: 0; transform: rotate(var(--a)); pointer-events: none;
}
.clock-tick::after {
  content: ''; position: absolute; left: 50%; top: 8px;
  width: 3px; height: 9px; margin-left: -1.5px;
  background: var(--ink); border-radius: 99px;
}
.clock-num {
  position: absolute; left: 50%; top: 50%;
  width: 1.4em; margin-left: -0.7em; margin-top: -0.7em;
  text-align: center; font-weight: 800; font-size: 14px; color: var(--ink);
  transform: rotate(var(--a)) translateY(-5.4em) rotate(calc(-1 * var(--a)));
}
.clock-hand {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 28%;
  margin-left: -3px; margin-top: -28%;
  background: var(--ink);
  border-radius: 99px;
  transform: rotate(var(--hour));
  transform-origin: bottom center;
  z-index: 2;
}
.clock-hub {
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: var(--ink); border-radius: 50%; z-index: 3;
}
.clock-row { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
.prompt .clock-face { font-weight: 800; }
.opts.is-number-line {
  display: block; gap: 0; margin-top: 8px; background: none;
}

.prompt-lead { letter-spacing: .02em; font-size: .55em; font-weight: 700; }
.prompt .frac { font-size: .72em; margin: 0 .08em; }
.frac {
  display: inline-flex; flex-direction: column; align-items: center;
  line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; vertical-align: middle;
}
.frac-num { padding: 0 .22em .12em; border-bottom: 2px solid currentColor; }
.frac-den { padding: .12em .22em 0; }

.make-twenty-board { display: block; margin-top: 12px; }
.make-twenty-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.make-twenty-row .bond-n { font-size: 13px; }
.make-twenty-row .bond-pair { font-size: 9px; }

.ku-cell.locked { background: var(--cell-new); opacity: .42; }
.legend .dot.locked { background: var(--cell-new); border: 1px solid var(--grid); opacity: .55; }

.number-line-wrap { position: relative; padding: 4px 2px 0; }
.number-line-bar {
  position: absolute; left: 8px; right: 8px; top: 18px; height: 4px;
  background: var(--ink); border-radius: 99px; pointer-events: none; z-index: 0;
}
.number-line-rail {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr));
  align-items: start; position: relative; z-index: 1;
}
.opts.is-number-line.cols-21 .number-line-rail { grid-template-columns: repeat(21, minmax(0, 1fr)); }
.nl-tick {
  appearance: none; -webkit-appearance: none; width: 100%; margin: 0; padding: 2px 0;
  border: 0; background: transparent; color: var(--ink); display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer; position: relative; z-index: 1; min-width: 0;
  font-family: var(--body);
}
.nl-tick-mark { width: 3px; height: 18px; background: var(--ink); border-radius: 99px; flex: none; }
.nl-tick.is-mid .nl-tick-mark { height: 16px; }
.nl-tick.is-end .nl-tick-mark { height: 21px; }
.nl-tick-label { font-size: 13px; font-weight: 700; line-height: 1.2; }
.nl-tick.is-unlabeled { color: transparent; }
.nl-tick:active .nl-tick-mark { background: var(--sprout); }
.nl-tick.dim { opacity: .32; }
.nl-tick.show .nl-tick-mark { background: var(--ink); outline: 2px dashed var(--ink); outline-offset: 4px; }

.nl-band-label { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.nl-band-label:first-child { margin-top: 0; }
.nl-row { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.nl-row.is-high { grid-template-columns: repeat(10, minmax(0, 1fr)); }

.frac-board .frac-row { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 4px; }
.ku-cell.frac-cell {
  aspect-ratio: auto; min-height: 52px; display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 2px 4px; padding: 4px 2px;
}
.ku-cell.frac-cell .frac { font-size: 12px; }
.ku-cell.frac-cell .frac-pair-mark { font-size: 13px; font-weight: 700; opacity: .7; }

.skin-setup {
  padding: 28px 22px 24px;
  justify-content: center;
}
.skin-setup .headline { margin-bottom: 4px; }
.skin-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}
@media (min-width: 360px) {
  .skin-picker { grid-template-columns: repeat(3, 1fr); }
}
.parent-view .skin-picker { margin-top: 4px; }
.skin-card {
  appearance: none;
  border: 2px solid var(--grid);
  border-radius: 16px;
  padding: 16px 8px;
  font-family: var(--body);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.skin-card[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px currentColor;
}
.skin-card.preview-cool {
  background: #121c2e;
  color: #e8eef8;
  border-color: #38bdf8;
}
.skin-card.preview-neutral {
  background: #fafbf9;
  color: #22344b;
  border-color: #5f9e57;
}
.skin-card.preview-cute {
  background: #fff1f5;
  color: #4a3142;
  border-color: #ff7aa2;
}
