/* Letterline 05. Shared geometry, two fully tokenized palettes.
   Decorative rail segments stop before each locomotive. No implied row order. */
:root {
 color-scheme:dark;
 --bg:#102023;--header:#192c30;--panel:#1c3135;--panel-top:#20373b;--surface:#15282c;
 --ink:#f5f0df;--muted:#b1c1bd;--subtle:#9aacaa;--gold:#e7ca8a;--brass:#ad9257;--edge:#ad9868;
 --line:#52615b;--line-soft:#38504e;--track:#7f8d78;--train-idle:#8d937c;
 --tile:#2b4247;--tile-top:#344c50;--tile-base:#10262b;--tile-ink:#fcf5e4;--tile-glint:#f8eac32b;
 --solved:#284e3e;--solved-top:#325d4b;--solved-ink:#dbf2e1;--green:#b9e3c8;--green-edge:#7da586;
 --changed:#c0ddbf;--changed-ink:#193d2c;--changed-base:#183d2c;
 --error:#ffc5b5;--error-surface:#50342e;--error-edge:#ec9b83;--error-ink:#ffede2;
 --target:#405a50;--wash:#9cc9a728;--veil:#0a171bd4;--gate:#172b30f5;
 --shadow:#03101138;--shadow-deep:#061316;--glint:#f3e4b815;--steam:#dbe1d3;
 --accent-text:#142c2b;--range:#e0c186;
 --ease:cubic-bezier(.2,.75,.2,1);--tile-size:49px;--row-size:65px;--rail-x:14px;--rail-gap:17px;
}
:root[data-theme="light"] {
 color-scheme:light;
 --bg:#f2efe6;--header:#faf8f1;--panel:#fbf9f2;--panel-top:#fffdf7;--surface:#eeeade;
 --ink:#203538;--muted:#536963;--subtle:#637670;--gold:#806026;--brass:#9a793c;--edge:#987c43;
 --line:#c5bc9e;--line-soft:#d8d3c2;--track:#a59a78;--train-idle:#9c8d68;
 --tile:#f7f2e5;--tile-top:#fffdf5;--tile-base:#c4b89b;--tile-ink:#243a3c;--tile-glint:#fffdf5;
 --solved:#e0eddb;--solved-top:#e9f2e3;--solved-ink:#28523d;--green:#276344;--green-edge:#74966b;
 --changed:#3d7152;--changed-ink:#fffaf0;--changed-base:#284e3b;
 --error:#a0392b;--error-surface:#f7e1d5;--error-edge:#b74e35;--error-ink:#802c20;
 --target:#f3e4ba;--wash:#67905816;--veil:#273a3b65;--gate:#faf8eff5;
 --shadow:#4d49251a;--shadow-deep:#c9c1a8;--glint:#ffffffad;--steam:#647970;
 --accent-text:#1c302c;--range:#85632c;
}
*{box-sizing:border-box}[hidden]{display:none!important}
html{min-height:100%;background:var(--bg);scroll-behavior:smooth;scroll-padding-top:15px}
body{margin:0;min-height:100svh;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer;touch-action:manipulation;border:0}button:disabled{cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--gold);outline-offset:4px}a{color:inherit}svg{display:block}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:8px;left:8px;z-index:99;background:var(--gold);color:var(--bg);padding:12px;transform:translateY(-180%)}.skip-link:focus{transform:none}
.topbar{height:72px;padding:0 max(28px,calc((100vw - 1240px)/2));display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--header);border-bottom:1px solid var(--line-soft)}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:12px;font-weight:750;letter-spacing:1.5px;white-space:nowrap}.brand-train{width:34px;height:32px;stroke:var(--ink);fill:none;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}.top-label{color:var(--subtle);font-size:9px;letter-spacing:2.3px}.top-actions{display:flex;align-items:center;gap:9px}.icon-button{width:44px;height:44px;border:1px solid var(--line-soft);border-radius:50%;display:grid;place-items:center;background:transparent;position:relative;flex:none}.icon-button:hover,.help-label:hover{border-color:var(--brass)}.sound-slash{position:absolute;width:24px;height:1px;background:var(--muted);transform:rotate(-45deg)}#sound[aria-pressed=true] .sound-slash{display:none}#sound[aria-pressed=true]{color:var(--gold);border-color:var(--brass)}.help-label{min-height:44px;padding:10px 16px;border:1px solid var(--line-soft);border-radius:24px;background:transparent;font-size:12px;font-weight:600}.help-symbol{display:none}
.workspace{max-width:1064px;margin:0 auto;display:grid;grid-template-columns:330px minmax(0,526px);gap:64px;align-items:start;padding:42px 30px 30px}.intro{padding-top:30px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--gold);text-transform:uppercase;line-height:1.5}.station-tag{display:flex;gap:11px;align-items:center}.railmark{position:relative;width:29px;height:13px;border-top:1px solid var(--brass);border-bottom:1px solid var(--brass)}.railmark:after{content:'';position:absolute;inset:-3px 7px;border-left:1px solid var(--brass);border-right:1px solid var(--brass)}h1{font:400 74px/1.04 Georgia,"Times New Roman",serif;letter-spacing:-3px;margin:21px 0 18px}.wordmark-end{color:var(--gold)}.tagline{font-size:21px;margin:0;letter-spacing:-.4px}.intro-copy{font-size:14px;line-height:1.75;color:var(--muted);margin:25px 0 23px;max-width:300px}.rules{list-style:none;margin:0;padding:0;display:grid;gap:17px}.rules li{display:grid;grid-template-columns:26px 1fr;gap:12px;font-size:13px;line-height:1.6;color:var(--muted)}.rule-number{font-size:10px;color:var(--gold);margin-top:3px;border:1px solid var(--line);border-radius:50%;width:24px;height:24px;display:grid;place-items:center}.rules strong{color:var(--ink);font-weight:600}.watch-button{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:22px;padding:11px 0;background:none;color:var(--gold);font-size:13px;text-decoration:underline;text-underline-offset:5px;text-decoration-color:var(--line)}.watch-button:hover{text-decoration-color:var(--gold)}.watch-button svg{width:16px}.mini-landscape{width:260px;height:72px;margin-top:28px;color:var(--track);opacity:.7}.byline{font-size:9px;letter-spacing:1.4px;color:var(--subtle);margin:12px 0 0;text-transform:uppercase}
.board-column{min-width:0}.game{position:relative;min-width:0;isolation:isolate;padding:20px 26px 10px;background:linear-gradient(150deg,var(--panel-top),var(--panel) 65%);border:1px solid var(--brass);border-radius:15px;box-shadow:inset 0 1px var(--glint),0 4px 0 var(--shadow-deep),0 16px 45px var(--shadow)}.game:before,.game:after{content:'';position:absolute;top:10px;width:4px;height:4px;background:var(--brass);border-radius:50%;box-shadow:inset 0 1px var(--glint),0 1px var(--shadow)}.game:before{left:10px}.game:after{right:10px}.board-ticket{display:flex;justify-content:space-between;gap:12px;color:var(--subtle);font-size:9px;letter-spacing:2px;padding-bottom:13px;border-bottom:1px solid var(--line-soft)}.ticket-mark{display:flex;align-items:center;gap:6px;color:var(--gold)}.ticket-mark:before{content:'';width:4px;height:4px;background:currentColor;border-radius:50%}.game-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 0 16px}.game-top .eyebrow{font-size:8px;letter-spacing:2px;color:var(--muted)}.game-top h2{font:400 36px/1.1 Georgia,serif;letter-spacing:-.6px;margin:4px 0 0}.progress-block{text-align:right;flex:none}#progress-label{font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted)}#progress-label strong{font-size:23px;color:var(--ink);font-weight:650}.progress-track{display:flex;gap:9px;position:relative;margin-top:10px;justify-content:flex-end}.progress-track:before{content:'';position:absolute;height:1px;top:3px;left:3px;right:3px;background:var(--line)}.progress-track span{position:relative;width:7px;height:7px;background:var(--panel);border:1px solid var(--track);border-radius:50%}.progress-track .passed{background:var(--green);border-color:var(--green)}
.carrybar{position:relative;display:flex;align-items:center;gap:15px;min-height:89px;padding:13px 0;margin-bottom:7px;border-top:1px solid var(--line);border-bottom:1px solid var(--line-soft)}.carry-socket{position:relative;flex:none;padding:5px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:inset 0 2px 4px var(--shadow)}.carry-tile{display:grid;place-items:center;position:relative;width:54px;height:55px;flex:none;border:1px solid #edcf8e;border-bottom-color:#b68b43;border-radius:7px;background:linear-gradient(145deg,#f7e1aa,#dbb771);box-shadow:inset 0 0 0 3px #ffefbe65,inset 0 1px #fff6dc,0 3px 0 #886630,0 5px 8px var(--shadow);color:#20332d;font-size:31px;font-weight:750;line-height:1;padding:0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;cursor:grab;text-shadow:0 1px #fff5d54d}.carry-tile i{position:absolute;right:5px;bottom:5px;width:2px;height:2px;background:#99783f;border-radius:50%;box-shadow:-4px 0 #99783f,0 -4px #99783f,-4px -4px #99783f}.carry-tile:active{cursor:grabbing}.carry-tile.is-picked{opacity:.25;box-shadow:none}.carry-tile:disabled{cursor:default}.carry-copy{min-width:0}.carry-copy .eyebrow{font-size:9px;letter-spacing:1.8px}.carry-copy p{font-size:12px;font-weight:600;line-height:1.5;margin:5px 0 2px}.carry-detail{font-size:11px;color:var(--muted);line-height:1.4}
.words{display:grid;position:relative;padding:2px 0}.word-row{position:relative;isolation:isolate;display:grid;grid-template-columns:28px minmax(0,1fr) 22px;gap:8px;align-items:center;min-height:var(--row-size);border-radius:8px}
/* Gap runs from the bottom clearance of this marker to the top of the next. */
.word-row:not(:last-child):before{content:'';position:absolute;z-index:-1;left:calc(var(--rail-x) - 4px);top:calc(50% + var(--rail-gap));height:calc(100% - 2 * var(--rail-gap));width:8px;background:linear-gradient(90deg,transparent 1px,var(--track) 1px,var(--track) 2px,transparent 2px,transparent 6px,var(--track) 6px,var(--track) 7px,transparent 7px),repeating-linear-gradient(180deg,transparent 0px,transparent 6px,var(--track) 6px,var(--track) 7px,transparent 7px,transparent 11px);opacity:.6}
.word-stop{display:grid;place-items:center;position:relative;width:28px;height:28px;color:var(--train-idle);opacity:.65;pointer-events:none;user-select:none}.station-train{width:25px;height:23px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}.word-row.locked .word-stop{color:var(--gold);opacity:1}.word-row.locked .train-boiler{fill:currentColor;fill-opacity:.16}.word-row.locked .station-train{stroke-width:1.6}.steam-puff{position:absolute;left:18px;top:1px;width:5px;height:5px;border:1px solid var(--steam);border-radius:50%;background:var(--steam);opacity:0;pointer-events:none;transform-origin:50% 50%}.letters{display:flex;gap:7px;justify-content:center;min-width:0}.letter{position:relative;display:grid;place-items:center;flex:none;width:var(--tile-size);height:var(--tile-size);padding:0;border:1px solid var(--edge);border-bottom-color:var(--brass);border-radius:6px;background:linear-gradient(145deg,var(--tile-top),var(--tile));box-shadow:inset 0 1px var(--tile-glint),0 3px 0 var(--tile-base),0 4px 5px var(--shadow);color:var(--tile-ink);font-size:25px;font-weight:660;line-height:1;font-variant-ligatures:none;user-select:none;-webkit-user-select:none;touch-action:manipulation;transition:transform 90ms var(--ease),border-color 90ms,background 90ms}
.letter:before{opacity:.65;content:'';position:absolute;inset:3px;border:1px solid var(--tile-glint);border-radius:3px;pointer-events:none}.letter:after{content:'';position:absolute;right:4px;bottom:4px;width:2px;height:2px;background:var(--edge);opacity:.65;border-radius:50%;box-shadow:-4px 0 var(--edge)}.letter:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 2px 3px var(--shadow),0 1px var(--tile-base)}.word-state{font-size:21px;line-height:1;min-width:20px;text-align:center;color:var(--green);font-weight:600;justify-self:center}.word-row.locked .letter{background:linear-gradient(145deg,var(--solved-top),var(--solved));color:var(--solved-ink);border-color:var(--green-edge);box-shadow:inset 0 1px var(--glint),0 3px var(--tile-base)}.word-row.locked .letter.changed{background:var(--changed);color:var(--changed-ink);border-color:var(--green-edge);box-shadow:inset 0 1px var(--glint),0 3px var(--changed-base)}.word-row.locked .letter:after{background:var(--green-edge);box-shadow:-4px 0 var(--green-edge)}.word-row.locked .letter.changed:before{border-color:var(--green-edge);opacity:.4}.word-row.hinted{outline:1px dashed var(--brass);outline-offset:2px;background:var(--wash)}.letter.hint-letter{outline:2px solid var(--gold);outline-offset:2px}
.letter.drop-target,.lesson-letter.drop-target{background:var(--target)!important;border-color:var(--gold)!important;box-shadow:0 0 0 2px var(--gold),0 3px var(--tile-base)!important;transform:translateY(-1px)}.letter.accepted-tile{background:var(--target);border-color:var(--gold);outline:1px solid var(--gold)}#words .word-row.rejected .rejected-tile,.lesson-letter.rejected-tile{background:var(--error-surface);border-color:var(--error-edge);box-shadow:0 0 0 1px var(--error-edge),0 3px var(--tile-base);color:var(--error-ink)}.word-row.rejected .word-state{color:var(--error)}.word-row.rejected .word-stop{color:var(--error-edge)}body.dragging,body.dragging *{cursor:grabbing!important}body.dragging{user-select:none;-webkit-user-select:none}
.message{display:flex;gap:8px;align-items:center;justify-content:flex-start;min-height:60px;padding:10px 3px;text-align:left;font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}.message.success{color:var(--green)}.message.error{color:var(--error)}.message.hint{color:var(--gold)}.message-icon{display:grid;place-items:center;width:19px;height:19px;flex:none;border:1px solid currentColor;border-radius:50%;font-size:14px;line-height:1;font-weight:700}.message.error .message-icon{border-radius:5px}.game-bottom{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:9px;border-top:1px solid var(--line-soft)}.text-button{min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:6px;padding:9px 3px;background:none;font-size:12px;font-weight:600}.text-button:hover{color:var(--gold)}.text-button:disabled{opacity:.45}.text-button svg{width:17px;height:17px}.counts{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums;text-align:center}.primary-button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:11px 17px;background:linear-gradient(145deg,#f0d8a0,#ddbd7c);border:1px solid #c4a064;border-radius:6px;box-shadow:inset 0 1px #fff0c566,0 2px #83652c;color:var(--accent-text);font-size:13px;font-weight:700;text-decoration:none;transition:transform 90ms,filter 90ms}.primary-button:hover{filter:brightness(1.035)}.primary-button:active{transform:translateY(1px);box-shadow:0 1px #83652c}.next-wrap{display:flex;gap:8px;align-items:center}.next-wrap .primary-button{font-size:12px;padding:10px 13px}
.finish{display:flex;align-items:center;gap:15px;min-height:89px;border-top:1px solid var(--green-edge);border-bottom:1px solid var(--line-soft);padding:12px 0;margin-bottom:7px}.finish-symbol{width:55px;height:55px;display:grid;place-items:center;flex:none;border:1px solid var(--green-edge);border-radius:50%;color:var(--green);background:var(--wash);box-shadow:inset 0 0 0 4px var(--panel)}.finish-symbol svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}.finish-symbol path{stroke-dasharray:32;stroke-dashoffset:0}.finish .eyebrow{font-size:8px;color:var(--green);letter-spacing:2px}.finish h3{font:400 28px/1.1 Georgia,serif;margin:4px 0 6px}.finish p{font-size:11px;color:var(--muted);margin:0}.game.complete{border-color:var(--green-edge)}.row-wash{position:absolute;inset:4px -4px;z-index:-1;border-radius:8px;background:var(--wash);pointer-events:none}.carry-halo{position:absolute;inset:-3px;border:1px solid var(--gold);border-radius:13px;pointer-events:none}.completion-glow{position:absolute;inset:-2px;border:2px solid var(--green-edge);border-radius:16px;box-shadow:0 0 24px var(--wash);pointer-events:none}
.board-picker{border-top:1px solid var(--line-soft);margin:23px 1px 0}.board-picker summary{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;font-size:11px;letter-spacing:.2px;list-style:none;color:var(--muted)}summary::-webkit-details-marker{display:none}.board-picker summary strong{color:var(--ink);font-weight:550}.board-picker summary:after{content:'+';color:var(--gold);font-size:20px}.board-picker[open] summary:after{content:'−'}.board-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.board-tab{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:3px;padding:9px 10px;border:1px solid var(--line-soft);border-radius:5px;background:var(--panel);color:var(--muted);font-size:11px}.board-tab[aria-pressed=true],.board-tab:hover{border-color:var(--brass);color:var(--gold)}.tab-number{font-size:9px;margin-right:6px;color:var(--subtle)}.board-tab small{font-size:9px}.picker-note{font-size:10px;line-height:1.6;color:var(--muted);margin:13px 0}.page-footer{font-size:10px;color:var(--subtle);text-align:center;line-height:1.5;margin:17px 0 0}.start-gate{position:absolute;inset:160px 20px 63px;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:22px;border:1px solid var(--line);border-radius:10px;text-align:center;background:var(--gate);backdrop-filter:blur(4px)}.start-gate h3{font:400 30px Georgia,serif;margin:0}.start-gate p{max-width:280px;font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 4px}
.flight{position:fixed;top:0;left:0;z-index:60;display:grid;place-items:center;pointer-events:none;background:linear-gradient(145deg,#f7e1aa,#dbb771);border:1px solid #edcf8e;border-radius:7px;box-shadow:inset 0 0 0 3px #ffefbe65,0 6px 15px var(--shadow);color:#20332d;font-size:28px;font-weight:750;transform-origin:top left;will-change:transform;user-select:none;-webkit-user-select:none}.flight.outgoing{background:linear-gradient(145deg,var(--tile-top),var(--tile));color:var(--tile-ink);border-color:var(--edge)}.flight.is-drag{box-shadow:inset 0 0 0 3px #ffefbe65,0 4px #8b6d37,0 14px 24px var(--shadow)}
.modal{width:min(520px,calc(100vw - 28px));max-height:calc(100svh - 28px);padding:27px;border:1px solid var(--brass);border-radius:14px;background:var(--panel);color:var(--ink);box-shadow:0 24px 80px var(--shadow);overflow:auto;overscroll-behavior:contain}.modal::backdrop{background:var(--veil);backdrop-filter:blur(5px)}.dialog-close{position:absolute;top:8px;right:8px;z-index:2;background:var(--panel);border-color:transparent;font-size:26px}.modal>.eyebrow{display:block;padding-right:24px;font-size:9px}.modal h2{font:400 35px/1.08 Georgia,serif;letter-spacing:-.7px;margin:10px 0 13px}.modal .lead{font-size:13px;line-height:1.65;color:var(--muted);margin:0 0 16px;max-width:420px}.modal .lead strong{color:var(--ink);font-weight:650}.demo-stage{position:relative;min-height:224px;padding:14px 19px 17px;border:1px solid var(--line);border-radius:9px;background:var(--surface);overflow:hidden}.demo-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;color:var(--muted);letter-spacing:.5px}.demo-head strong{font-size:12px;font-weight:600;color:var(--ink);letter-spacing:0}.demo-carry-line{display:flex;align-items:center;gap:12px;margin:13px 0 15px}.demo-carry-line .carry-tile{width:44px;height:45px;font-size:26px;cursor:default}.demo-carry-line .eyebrow{font-size:8px}.demo-rows{display:grid;gap:11px}.demo-word{position:relative;display:flex;justify-content:center;gap:6px}.demo-letter{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--edge);border-radius:5px;background:linear-gradient(145deg,var(--tile-top),var(--tile));color:var(--tile-ink);font-size:23px;font-weight:650;box-shadow:0 2px var(--tile-base)}.demo-word.solved .demo-letter{background:var(--solved);color:var(--solved-ink);border-color:var(--green-edge)}.demo-word.solved .demo-letter:first-child{background:var(--changed);color:var(--changed-ink)}.demo-check{position:absolute;right:8px;top:10px;font-size:18px;color:var(--green)}.demo-ghost{position:absolute;top:0;left:0;z-index:3;display:grid;place-items:center;background:#e5c384;border:1px solid #edcf8e;border-radius:6px;color:#20332d;font-size:25px;font-weight:700;pointer-events:none;transform-origin:top left;box-shadow:0 4px 12px var(--shadow)}.demo-ghost.outgoing{z-index:4;background:var(--tile);color:var(--tile-ink);border-color:var(--edge)}.demo-cursor{position:absolute;right:-9px;bottom:-14px;width:23px;height:29px;fill:var(--ink);stroke:var(--bg);stroke-width:2;filter:drop-shadow(0 2px 3px var(--shadow))}.demo-caption{min-height:54px;display:flex;align-items:center;justify-content:center;text-align:center;padding:10px 2px;margin:0;font-size:12px;line-height:1.5;color:var(--ink)}.demo-controls{display:flex;align-items:center;justify-content:space-between;gap:13px;padding-bottom:5px;border-bottom:1px solid var(--line-soft)}.demo-controls .text-button{font-size:11px}.demo-duration{font-size:10px;font-variant-numeric:tabular-nums;color:var(--muted)}.demo-progress{height:2px;background:var(--line);flex:1;max-width:120px;overflow:hidden}.demo-progress span{display:block;height:100%;background:var(--gold);transform-origin:left;transform:scaleX(0)}.demo-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.demo-actions .text-button{font-size:12px;color:var(--muted)}.demo-actions .primary-button{flex:1;max-width:245px}.modal-footnote{font-size:10px;color:var(--muted);text-align:center;line-height:1.6;margin:13px 0 0}.settings{margin-top:12px;border-top:1px solid var(--line-soft)}.settings summary{display:flex;align-items:center;min-height:44px;font-size:11px;color:var(--muted);list-style:none;cursor:pointer}.settings summary:after{content:'+';margin-left:auto}.settings[open] summary:after{content:'−'}.transcript{font-size:12px;line-height:1.7;color:var(--muted);margin:8px 0}.transcript strong{color:var(--ink)}.preference{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:48px;font-size:12px;color:var(--ink)}.preference input[type=checkbox]{width:22px;height:22px;margin:11px;accent-color:var(--range)}.preference select{min-height:44px;max-width:150px;padding:7px 12px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:6px;font-size:12px}.preference .help-note,.sound-preference output{font-size:10px;color:var(--muted)}.preference input[type=range]{height:44px;width:135px;max-width:45%;accent-color:var(--range)}#sound-preview{color:var(--gold);font-size:12px}.static-demo{display:grid;gap:13px;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:9px}.static-step{font-size:12px;line-height:1.7;color:var(--muted)}.static-step strong{display:block;font:600 18px/1.5 ui-monospace,monospace;color:var(--ink);letter-spacing:.5px}.static-step b{color:var(--gold);font-weight:600}.lesson-stage{padding:15px 18px;background:var(--surface);border:1px solid var(--line);border-radius:9px}.lesson-stage>.eyebrow{font-size:9px}.lesson-dock{display:flex;align-items:center;gap:14px;margin:14px 0 17px}.lesson-dock span{font-size:11px;line-height:1.5;color:var(--muted)}#lesson-words{display:grid;gap:12px}.lesson-word{display:flex;justify-content:center;gap:7px}.lesson-letter{width:46px;height:46px;padding:0;background:linear-gradient(145deg,var(--tile-top),var(--tile));border:1px solid var(--edge);border-radius:5px;box-shadow:0 2px var(--tile-base);font-size:25px;font-weight:650;color:var(--tile-ink)}.lesson-word.solved .lesson-letter{background:var(--solved);color:var(--solved-ink);border-color:var(--green-edge)}.lesson-word.solved .lesson-letter:first-child{background:var(--changed);color:var(--changed-ink)}#lesson-message{min-height:58px;font-size:12px;line-height:1.5;text-align:center;margin:12px 0 0;color:var(--ink)}.small-modal{max-width:390px}.small-modal h2{font-size:29px}.small-modal p{font-size:13px;line-height:1.65;color:var(--muted)}.dialog-actions{display:flex;gap:18px;justify-content:flex-end;margin-top:22px}textarea{width:100%;background:var(--surface);border:1px solid var(--line);color:var(--ink);font:14px/1.7 ui-monospace,monospace;padding:13px;border-radius:7px;resize:vertical}.noscript{padding:18px;margin:15px auto;max-width:650px;background:var(--panel);line-height:1.7;color:var(--ink)}
@media(hover:hover) and (pointer:fine){.letter:not(:disabled):hover{background:var(--target);border-color:var(--gold);transform:translateY(-1px)}.carry-tile:not(:disabled):hover{filter:brightness(1.035)}}
@media(max-width:1000px) and (min-width:761px){.workspace{grid-template-columns:265px minmax(0,1fr);column-gap:30px;padding:32px 24px}.intro h1{font-size:63px}.game{padding:19px 18px 9px}.letter{--tile-size:45px}.letters{gap:5px}.word-row{grid-template-columns:26px minmax(0,1fr) 19px;gap:6px;--rail-x:13px}.word-stop{width:26px}.top-label{display:none}}
@media(max-width:760px){:root{--tile-size:46px;--row-size:57px}.topbar{height:56px;padding:0 15px;gap:5px}.brand{font-size:10px;letter-spacing:1.05px;gap:8px}.brand-train{width:28px;height:28px}.top-label{display:none}.top-actions{gap:3px}.icon-button,.help-label{border-color:transparent}.help-label{width:44px;min-width:44px;padding:0}.help-text{display:none}.help-symbol{display:inline;font-size:20px;font-weight:500}.workspace{display:block;max-width:506px;padding:17px 14px 22px}.intro{position:relative;padding:0;margin-bottom:17px}.station-tag{font-size:8px;letter-spacing:1.7px;gap:8px}.railmark{width:21px;height:9px}.railmark:after{inset:-3px 5px}.intro h1{font-size:47px;letter-spacing:-1.8px;margin:9px 0 6px}.tagline{font-size:14px}.intro-copy,.rules,.mini-landscape,.byline{display:none}.watch-button{position:absolute;right:0;bottom:0;min-height:44px;margin:0;padding:10px 0;font-size:11px;gap:5px}.watch-button svg{width:13px}.game{padding:16px 15px 7px;border-radius:12px}.board-ticket{font-size:8px;padding-bottom:10px;letter-spacing:1.8px}.game-top{padding:13px 0 12px}.game-top h2{font-size:30px}.game-top .eyebrow{font-size:8px}.progress-track{gap:8px}#progress-label strong{font-size:21px}.carrybar,.finish{min-height:80px;padding:10px 0;margin-bottom:5px}.carrybar{gap:12px}.carry-socket{padding:4px;border-radius:10px}.carry-tile{width:47px;height:49px;font-size:28px}.carry-copy .eyebrow{font-size:8px;letter-spacing:1.6px}.carry-copy p{font-size:11px}.carry-detail{font-size:10px}.word-row{grid-template-columns:28px minmax(0,1fr) 20px;gap:6px}.letters{gap:5px}.letter{font-size:24px}.station-train{width:23px;height:22px}.word-state{font-size:20px}.message{min-height:54px;font-size:11px;padding:9px 1px;gap:7px}.message-icon{width:18px;height:18px;font-size:13px}.game-bottom{min-height:50px}.text-button{font-size:11px}.counts{font-size:9px}.finish h3{font-size:26px}.finish-symbol{width:49px;height:49px}.finish p{font-size:10px}.board-picker{margin-top:19px}.page-footer{font-size:9px;margin-top:11px}.start-gate{inset:140px 14px 57px}.modal{padding:25px 21px 21px;width:min(500px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}.modal h2{font-size:30px}.modal .lead{font-size:12px}.demo-stage{padding:12px 15px}.demo-actions{gap:8px}.demo-actions .primary-button{font-size:12px;padding:11px}.demo-actions .text-button{font-size:11px}.completion-glow{border-radius:13px}}
@media(max-width:380px){:root{--tile-size:44px;--row-size:54px;--rail-x:11px;--rail-gap:16px}.topbar{padding:0 9px}.brand{font-size:9px;letter-spacing:.7px;gap:6px}.brand-train{width:25px}.top-actions{gap:0}.workspace{padding:13px 9px 20px}.intro{margin-bottom:13px}.intro h1{font-size:42px}.tagline{font-size:12px}.watch-button{font-size:10px;gap:4px}.game{padding:15px 9px 6px}.game-top h2{font-size:28px}.word-row{grid-template-columns:22px minmax(0,1fr) 18px;gap:4px;--rail-x:11px}.word-stop{width:22px;height:28px}.station-train{width:21px;height:21px}.letters{gap:3px}.letter{font-size:23px}.steam-puff{left:15px}.carrybar{gap:10px}.carry-copy p{font-size:10.5px}.carry-detail{font-size:10px}.message{font-size:10.5px;min-height:54px}.modal{padding:25px 16px 18px}.modal h2{font-size:27px}.modal .lead{font-size:12px}.demo-stage{padding:12px}.demo-check{right:1px}.demo-controls{gap:8px}.demo-actions .primary-button{font-size:11px;padding:10px}.demo-actions .text-button{font-size:10.5px}.board-tab{padding:8px 5px;font-size:10px}.tab-number{margin-right:4px}.next-wrap .primary-button{font-size:11px;padding:10px}.finish-symbol{width:46px;height:46px}}
@media(max-height:760px) and (max-width:760px){:root{--row-size:52px}.workspace{padding-top:10px}.intro{margin-bottom:12px}.station-tag{display:none}.intro h1{font-size:40px;margin-top:0;margin-bottom:5px}.game{padding-top:13px}.board-ticket{padding-bottom:8px}.game-top{padding:10px 0}.game-top h2{font-size:28px}.carrybar,.finish{min-height:73px;padding-top:7px;padding-bottom:7px}.message{min-height:48px}.game-bottom{min-height:48px}.board-picker{margin-top:16px}}
/* On short devices, natural scrolling is allowed. Never shrink tap targets.
   The carried letter stays available as the lower words enter view. */
@media(max-height:680px) and (max-width:760px){.carrybar{position:sticky;top:5px;z-index:4;background:var(--panel);box-shadow:0 4px 0 var(--panel)}.modal h2{font-size:26px}.modal .lead{margin-bottom:12px}.demo-stage{min-height:210px}.demo-caption{min-height:48px}.modal>.eyebrow{font-size:8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}.steam-puff,.row-wash,.carry-halo,.completion-glow{display:none!important}}
html.reduce-motion{scroll-behavior:auto}html.reduce-motion *,html.reduce-motion *:before,html.reduce-motion *:after{animation:none!important;transition:none!important}html.reduce-motion .steam-puff,html.reduce-motion .row-wash,html.reduce-motion .carry-halo,html.reduce-motion .completion-glow{display:none!important}
@media(forced-colors:active){.letter,.carry-tile{border:1px solid ButtonText}.word-row.locked .letter{border:2px solid Highlight}.word-state,.word-stop{color:CanvasText}.word-row:not(:last-child):before{border-left:1px solid CanvasText;border-right:1px solid CanvasText}.message-icon{border-color:CanvasText}.letter.drop-target{outline:2px solid Highlight}}

/* Landscape phones can scroll without losing the active letter. */
@media(max-height:500px) and (min-width:761px) and (max-width:1000px){.carrybar{position:sticky;top:5px;z-index:4;background:var(--panel);box-shadow:0 4px 0 var(--panel)}}

/* The surrounding site owns navigation, official timer and results. */
html,body{background:var(--bg);min-height:100%;overscroll-behavior-y:contain}body{margin:0}.topbar{height:48px;padding:0 10px;border:0;max-width:560px;margin:0 auto;background:transparent}.topbar .brand,.top-label{display:none}.top-actions{margin-left:auto}.workspace{display:block;max-width:560px;padding:0 8px 10px;margin:0 auto}.intro,.board-picker,#reset,#replay-board,#share,#next-wrap,.skip-link{display:none!important}.game{max-width:520px;margin:0 auto}.page-footer{max-width:510px;margin:10px auto;font-size:11px;line-height:1.5;text-align:center}.modal{max-height:calc(100dvh - 20px)}.start-gate{background:var(--panel)}
@media(max-width:420px){.topbar{height:42px}.workspace{padding:0 4px 8px}.game{padding-left:12px;padding-right:12px}.word-row{min-height:52px}.page-footer{font-size:10px;padding:0 8px}.carrybar{position:static}.game-top{margin-bottom:8px}}
