/* Rod Lab styles */
:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --paper: #FFFDF8;
  --line: #E2DED5;
  --line-2: #D8D3C8;
  --line-3: #CFCAC0;
  --ink: #1E2430;
  --ink-2: #2E3545;
  --muted: #4A5263;
  --muted-2: #5A6273;
  --accent: #1F4E8C;
  --accent-dark: #163A69;
  --accent-soft: #EEF2F8;
  --accent-ring: #DCE6F4;
  --ok: #2F7D4F;
  --ok-ink: #1F5A37;
  --ok-soft: #EEF6F0;
  --miss: #8A4B0B;
  --miss-soft: #FDF3E6;
  --grid: #E9EEF5;
  --take: #F1F2F7;
  --rem: #FBF7EC;
  --font: Lexend, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { min-height: 100vh; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #7FA6DB; outline-offset: 2px; }

.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.muted { color: var(--muted-2); font-size: 13px; margin: 0; }

/* ---------- top bar ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar-right { gap: 14px; }
.license { font-size: 12px; color: var(--muted-2); text-decoration: none; white-space: nowrap; }
.license:hover { color: var(--ink); text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 6px; }
.nav a { padding: 10px 14px; border-radius: 10px; text-decoration: none; font-size: 15px; color: var(--muted); }
.nav a:hover { background: #F3F1EC; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.crumb { font-size: 14px; color: var(--muted); }
.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 5px; background: #D5D1C7; }
.dots span.is-done { background: var(--ok); }
.dots span.is-here { box-shadow: 0 0 0 3px var(--accent-ring); background: var(--accent); }
.dots span.is-here.is-done { background: var(--ok); }

.page { width: 100%; max-width: 1376px; margin: 0 auto; padding: 24px 32px 48px; }

/* ---------- buttons & switches ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: #F7F5F0; color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 10px; font-size: 13px; width: 100%; }
.btn-icon { min-width: 40px; min-height: 40px; padding: 0; font-size: 20px; font-weight: 700; }
.btn-block { width: 100%; }
.link-btn { font-size: 14px; }

.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 16px 6px 8px; border-radius: 999px; border: 1px solid var(--line-3); background: var(--surface); font-size: 15px; font-weight: 600; cursor: pointer; }
.switch-track { position: relative; display: block; width: 44px; height: 26px; border-radius: 13px; background: #C9C4B8; transition: background 120ms; flex: 0 0 auto; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: left 120ms; }
.switch[aria-pressed="true"] .switch-track { background: var(--accent); }
.switch[aria-pressed="true"] .switch-knob { left: 21px; }
.switch-bare { border: none; background: transparent; padding: 0; min-width: 52px; justify-content: center; }

.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #F1EEE6; color: var(--muted); white-space: nowrap; }
.levels { display: flex; gap: 4px; align-items: flex-end; }
.levels span { display: block; width: 12px; border-radius: 2px; background: var(--line); }
.levels span.on { background: var(--accent); }

/* ---------- workspace ---------- */
.ws { display: flex; flex-direction: column; gap: 14px; }

.eqbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; box-shadow: 0 1px 2px rgba(30,36,48,0.05); }
.eq-input { flex: 1 1 320px; min-width: 0; font-family: var(--mono); font-size: 30px; font-weight: 700; padding: 10px 16px; border: 2px solid var(--line-2); border-radius: 12px; background: #FBFCFE; }
.eq-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.eq-input[aria-invalid="true"] { border-color: #B4541A; }
.eq-equals { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--muted-2); }
.eq-result { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 130px; font-family: var(--mono); font-size: 30px; font-weight: 700; padding: 10px 18px; border-radius: 12px; background: #ECEAE4; border: 2px dashed #C3BEB2; color: var(--ink); }
.eq-result svg { color: #7A7466; }
.eq-result.is-negative { background: var(--take); border-color: #9AA1B4; color: #2D3550; }
.eq-msg { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted-2); line-height: 1.5; }
.eq-msg.is-error { color: #7A3A10; }
.eq-echo { font-family: var(--mono); font-weight: 700; background: #FBF3EC; padding: 1px 6px; border-radius: 6px; margin-right: 4px; white-space: pre; }
.eq-echo mark { background: transparent; color: #B4541A; text-decoration: underline wavy #B4541A; text-underline-offset: 3px; }

.ws-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-hint { font-size: 14px; color: var(--muted); }

.mode-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: #FFFDF6; border: 1px solid #E8DDB5; border-radius: 14px; padding: 10px 14px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 2px dashed #B9A15A; border-radius: 10px; background: var(--surface); }
.slot-text { font-family: var(--mono); font-weight: 700; font-size: 18px; min-width: 28px; text-align: center; }
.slot-rod .rod { cursor: grab; touch-action: none; }
.strip-hint { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; border: 1px solid var(--line-3); border-radius: 10px; overflow: hidden; background: var(--surface); }
.chip { min-width: 44px; min-height: 44px; border: none; border-right: 1px solid var(--line-3); background: var(--surface); font-family: var(--mono); font-weight: 700; font-size: 16px; cursor: pointer; }
.chip:last-child { border-right: none; }
.chip.is-on { background: var(--ink); color: #fff; }
.chip:disabled { background: #F3F1EC; color: #9096A3; text-decoration: line-through; cursor: not-allowed; }

.board { display: flex; height: 520px; border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; background: var(--surface); user-select: none; -webkit-user-select: none; }
.area { position: relative; min-width: 0; }
.area-pos { flex: 1 1 auto; background-color: #fff; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 34px 34px; }
.layer { position: absolute; inset: 0; }
.layer.is-flow { overflow: auto; padding: 20px 20px 20px 188px; }
.board.is-divide .layer.is-flow { padding: 20px; }

.bin { position: absolute; z-index: 2; top: 14px; left: 14px; width: 150px; padding: 12px; background: var(--paper); border: 2px dashed #BDB6A6; border-radius: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.bin.is-hot { border-color: var(--accent); background: var(--accent-soft); }
.bin-stack { position: relative; width: 56px; height: 50px; cursor: grab; touch-action: none; }
.bin-stack span { position: absolute; width: 34px; height: 34px; background: #F4F1EA; border: 2px solid #8A8578; border-radius: 6px; }
.bin-stack span:nth-child(1) { left: 14px; top: 0; }
.bin-stack span:nth-child(2) { left: 7px; top: 6px; }
.bin-stack span:nth-child(3) { left: 0; top: 12px; box-shadow: 0 2px 0 rgba(30,36,48,0.15); }
.bin-stack:hover span:nth-child(3) { transform: translateY(-2px); }

.divider { flex: 0 0 18px; background: #E6E2D9; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); cursor: col-resize; touch-action: none; }
.divider.is-active { background: var(--accent); }
.divider-handle { width: 18px; height: 64px; padding: 0; border: none; background: transparent; cursor: col-resize; display: flex; align-items: center; justify-content: center; }
.divider-handle svg { fill: #8A8578; }
.divider.is-active .divider-handle svg { fill: #fff; }

.area-neg, .area-rem { flex: 0 0 26%; min-width: 170px; display: flex; flex-direction: column; }
.area-neg { background-color: var(--take); background-image: repeating-linear-gradient(135deg, rgba(90,98,115,0.07) 0 2px, transparent 2px 14px); }
.area-rem { flex-basis: 30%; background: var(--rem); border-left: 1px solid var(--line-2); }
.side-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.side-sign { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: #3D4558; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.side-sign-r { background: #6B5A1C; font-size: 15px; }
.side-title { font-weight: 600; font-size: 16px; }
.side-drop { position: relative; flex: 1 1 auto; margin: 0 14px 14px; border: 2px dashed #B8BDCB; border-radius: 14px; background: rgba(255,255,255,0.45); }
.side-empty { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.rem-drop { border-style: solid; border-color: #E2D2A2; background: rgba(255,255,255,0.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.rem-drop .side-empty { position: static; }
.rem-units { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* rods */
.rod { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.layer .rod { position: absolute; cursor: grab; touch-action: none; }
.layer.is-flow .rod { position: static; cursor: default; }
.rod-badge { height: 22px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 0 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line-3); line-height: 1; }
.rod-bar { display: flex; border: 2px solid; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 0 rgba(30,36,48,0.14); }
.cell { display: block; position: relative; flex: 0 0 auto; }
.cell + .cell { box-shadow: inset var(--cell-line-w, 1px) 0 0 var(--cell-line, rgba(0,0,0,0.2)); }
.cell-x { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--cell-mark, #fff); font-size: 16px; font-weight: 800; line-height: 1; pointer-events: none; user-select: none; }
.rod:focus-visible { outline: none; }
.rod:focus-visible .rod-bar, .rod.is-selected .rod-bar { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }
.rod.is-dragging { position: absolute; transform: rotate(-3deg); cursor: grabbing; }
.rod.is-dragging .rod-bar { box-shadow: 0 12px 22px rgba(30,36,48,0.28); }
.rod.snap-target .rod-bar { box-shadow: 0 0 0 4px #BFD3EE, 0 2px 0 rgba(30,36,48,0.14); }
.rod.split-ready { position: absolute; }
.rod .cut-line { position: absolute; top: 18px; bottom: -10px; width: 0; border-left: 2px dashed var(--ink); pointer-events: none; }
.cell.is-lifting { box-shadow: inset 0 0 0 40px rgba(0,0,0,0.18) !important; }
.rod.unit .rod-bar { box-shadow: 0 1px 0 rgba(30,36,48,0.14); }

.drag-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.snap-ghost { position: fixed; z-index: 40; border: 2px dashed var(--accent); border-radius: 6px; background: rgba(31,78,140,0.07); pointer-events: none; }
.drag-hint { position: fixed; z-index: 60; pointer-events: none; font-size: 13px; font-weight: 600; color: #fff; background: var(--accent); padding: 6px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px rgba(30,36,48,0.18); }
.drag-hint.is-info { background: var(--ink); }
.drag-hint.is-warn { background: #6B4A12; }

.rod-menu { position: fixed; z-index: 70; display: flex; flex-direction: column; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 10px 28px rgba(30,36,48,0.18); }
.rod-menu button { min-height: 40px; padding: 0 12px; border: none; background: transparent; border-radius: 8px; text-align: left; font-size: 14px; cursor: pointer; }
.rod-menu button:hover, .rod-menu button:focus-visible { background: var(--accent-soft); outline: none; }

.ws-status { margin: 0; font-size: 13px; color: var(--muted-2); }

/* division */
.div-flow { display: flex; flex-direction: column; gap: 22px; }
.div-pile { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 2px dashed transparent; border-radius: 14px; align-self: flex-start; max-width: 100%; }
.div-pile.is-hot { border-color: var(--accent); background: var(--accent-soft); }
.pile-units { display: flex; flex-wrap: wrap; gap: 6px; max-width: 560px; }
.div-groups { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.div-group { display: flex; align-items: center; gap: 12px; }
.div-label { width: 64px; font-size: 13px; font-weight: 600; color: var(--muted); }
.div-empty { margin: 0; color: var(--muted); }

/* fractions */
.fraction-board { display: flex; flex-wrap: wrap; width: 100%; overflow: auto; }
.fr-main { flex: 999 1 560px; min-width: 0; padding: 40px 44px; display: flex; flex-direction: column; gap: 22px; background-color: #fff; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 40px 40px; }
.fr-row, .fr-sum { display: flex; align-items: flex-start; gap: 16px; }
.fr-label { width: 90px; flex: 0 0 90px; padding-top: 34px; font-size: 14px; font-weight: 600; color: var(--muted); }
.fr-row:first-child .fr-label { padding-top: 36px; }
.fr-sum .fr-label { padding-top: 0; }
.fr-parts { display: flex; }
.fr-part { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0 4px; border: none; background: transparent; cursor: pointer; min-height: 44px; border-radius: 8px; }
.fr-part:not(.is-picked) .rod-bar { border-style: dashed; box-shadow: none; }
.fr-part:not(.is-picked) .cell { filter: saturate(0.25) brightness(1.45); }
.fr-part-label { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.fr-total { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.fr-side { flex: 1 1 280px; min-width: 0; padding: 26px; background: var(--rem); border-left: 1px solid #E8DDB5; display: flex; flex-direction: column; gap: 12px; }
.fr-side h3 { font-size: 17px; font-weight: 600; }
.fr-side p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

/* ---------- question card ---------- */
.page-ws { display: flex; flex-direction: column; gap: 16px; }
.qcard { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; background: var(--surface); border: 2px solid var(--accent); border-radius: 16px; padding: 14px 18px; box-shadow: 0 0 0 4px var(--accent-ring); }
.qcard-head { display: flex; align-items: center; gap: 12px; flex-basis: 100%; }
.back { font-size: 14px; text-decoration: none; }
.qcard-prompt { margin: 0; font-family: var(--mono); font-size: 26px; font-weight: 700; flex: 1 1 320px; }
.qcard-answer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qcard-answer label { font-size: 14px; font-weight: 600; color: var(--muted); }
.answer-input { width: 140px; min-height: 44px; font-family: var(--mono); font-size: 20px; font-weight: 700; padding: 6px 12px; border: 2px solid var(--line-2); border-radius: 10px; }
.answer-input.is-divide { width: 240px; max-width: 100%; }
.answer-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.qcard-feedback { flex-basis: 100%; margin: 0; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qcard-feedback:empty { display: none; }
.qcard-feedback.is-ok { color: var(--ok-ink); font-weight: 600; }
.qcard-feedback.is-ok svg { color: var(--ok); }
.qcard-feedback.is-miss { color: var(--miss); }
.hint { flex-basis: 100%; color: var(--ink-2); background: var(--miss-soft); padding: 8px 12px; border-radius: 10px; }
.qcard-next { flex-basis: 100%; }

/* ---------- library ---------- */
.page-library { max-width: 1240px; display: flex; flex-direction: column; gap: 24px; padding-top: 32px; }
.lib-top { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.lib-intro { flex: 1 1 420px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.lib-intro h1 { font-size: 34px; letter-spacing: -0.02em; }
.lib-intro p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 560px; }
.continue { flex: 0 1 440px; display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none; }
.continue:hover { color: #fff; background: #2A3242; }
.continue-text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.continue .eyebrow { color: #C9D2E3; }
.continue-title { font-size: 18px; font-weight: 600; }
.continue-sub { font-size: 14px; color: #C9D2E3; }
.continue-btn { min-height: 44px; padding: 0 18px; border-radius: 10px; background: #F2CC3A; color: var(--ink); font-weight: 700; display: flex; align-items: center; }

.strand { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.strand-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.strand-head h2 { font-size: 20px; font-weight: 600; }
.strand-rod .rod-bar { box-shadow: none; }
.strand-blurb { font-size: 14px; color: var(--muted); }
.strand-progress { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-height: 96px; border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); }
.tile:hover { color: var(--ink); border-color: var(--accent); }
.tile-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.tile-dot { width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 1.5px solid #A8A295; }
.tile-title { font-size: 14px; font-weight: 600; line-height: 1.25; }
.tile-sub { font-size: 12px; color: var(--muted-2); }
.tile.is-done { background: var(--ok-soft); border-color: #B9D8C3; }
.tile.is-done .tile-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tile.is-current { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.tile.is-current .tile-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile.is-locked { background: #F3F1EC; border: 1px dashed var(--line-3); color: var(--muted-2); }
.lib-foot { display: flex; justify-content: flex-end; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-height: 44px; }
.check input { width: 18px; height: 18px; }

/* ---------- one sheet ---------- */
.page-sheet { max-width: 1320px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 28px; }
.sheet-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sheet-head { display: flex; flex-direction: column; gap: 6px; }
.sheet-head h1 { font-size: 32px; letter-spacing: -0.02em; }
.sheet-progress { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.progress { width: 220px; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; background: var(--ok); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.qtile { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); min-height: 220px; }
.qtile.is-current { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.qtile.is-upcoming { background: #FAF9F6; border-style: dashed; border-color: var(--line-3); }
.qtile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qtile-num { font-size: 14px; font-weight: 700; }
.qtile-prompt { margin: 0; flex: 1 1 auto; font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1.3; }
.qtile-done { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ok-ink); }
.qtile-done svg { color: var(--ok); }
.settings { flex: 1 1 300px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.settings h2 { font-size: 18px; font-weight: 600; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #EEEAE2; }
.setting > div { display: flex; flex-direction: column; gap: 2px; }
.setting-label { font-size: 15px; font-weight: 500; }
.setting-help { font-size: 12px; color: var(--muted-2); }

@media (max-width: 720px) {
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .eq-input, .eq-result, .eq-equals { font-size: 24px; }
  .board { height: 460px; }
  .area-neg { min-width: 120px; }
  .board.is-divide { flex-direction: column; height: auto; }
  .board.is-divide .area-pos { flex: 0 0 430px; }
  .board.is-divide .layer.is-flow { padding: 20px 16px 16px; }
  .board.is-divide .area-rem { flex: 0 0 auto; min-width: 0; border-left: none; border-top: 1px solid var(--line-2); }
  .board.is-divide .rem-drop { min-height: 190px; }
}
