/* Letterline 99: natural content height; no nested-scroll puzzle or modal viewport.
   Game logic and tap-target geometry are not scaled or transformed to force a fit. */
html,body{min-height:0!important;height:auto!important;overflow-x:clip;scroll-behavior:auto}
body{background:var(--bg)}
body:has(#help-dialog[open])>.workspace,body:has(#help-dialog[open])>.topbar{display:none!important}
#help-dialog.intro99{position:relative!important;inset:auto!important;display:none;margin:0 auto!important;width:100%!important;max-width:1000px!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:22px 26px 12px!important;border:1px solid var(--line-soft)!important;border-radius:14px!important;background:var(--panel)!important;color:var(--ink);box-shadow:0 8px 28px var(--shadow)!important;transform:none!important}
#help-dialog.intro99[open]{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(330px,1.02fr);gap:14px 38px;align-items:start}
#help-dialog .dialog-close{top:8px;right:8px;z-index:3;width:40px;height:40px}
#help-dialog:not([data-started=true]) .dialog-close{display:none}
.intro-copy99{padding:6px 0 0;min-width:0}
#help-dialog.intro99>.intro-copy99>.eyebrow{font-size:9px;letter-spacing:1.8px}
#help-dialog.intro99 h2{font:400 clamp(32px,4.3vw,48px)/1.02 Georgia,serif;letter-spacing:-1.25px;margin:11px 0 14px;color:var(--ink)}
#help-dialog.intro99 .lead{font-size:14px;line-height:1.6;color:var(--muted);margin:0 0 18px}
#help-dialog.intro99 .lead strong{font-weight:550;color:var(--ink)}
.intro-rules99{display:grid;gap:14px;list-style:none;margin:0 0 20px;padding:0}
.intro-rules99 li{display:flex;align-items:flex-start;gap:12px;min-width:0}
.intro-rules99 li>span{display:grid;place-items:center;flex:none;width:24px;height:24px;border:1px solid var(--line);border-radius:50%;font:600 11px system-ui;color:var(--gold);margin-top:1px}
.intro-rules99 b{font-size:13px;line-height:1.5;font-weight:650}.intro-rules99 p{font-size:12px;line-height:1.5;color:var(--muted);margin:3px 0 0}
.intro-actions99{display:grid;gap:8px}.intro-actions99 button{min-height:48px;width:100%;max-width:none;padding:12px 18px;font-size:14px;border-radius:8px}
.intro-actions99>.primary-button{background:#ecd69f;color:#1c3035;border:1px solid #d0b06b;box-shadow:inset 0 1px #ffefc9,0 2px 0 #80632855;font-weight:700;display:flex;align-items:center;justify-content:center}
.practice-button99{display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;background:transparent;border:1px solid var(--brass);color:var(--ink);font-weight:650}
.practice-button99 small{color:var(--muted);font-size:10px;font-weight:450}.practice-button99[aria-pressed=true]{background:var(--surface)}
.intro-cost99{font-size:10px;line-height:1.65;color:var(--muted);margin:12px 0 0}
.intro-example99{min-width:0;padding-top:3px}
.example-toolbar99{display:flex;justify-content:space-between;gap:8px;align-items:center;min-height:27px;margin-bottom:7px;font-size:8px;font-weight:650;letter-spacing:1.5px;color:var(--gold)}
.example-only99{color:var(--muted);font-size:7px;letter-spacing:1px;font-weight:450}
#back-to-watch{font-size:10px;letter-spacing:0;font-weight:550;color:var(--muted);background:none;min-height:32px;padding:5px 8px}
#demo-stage,.lesson-stage{position:relative;min-height:0!important;padding:14px 18px!important;border:1px solid var(--brass);border-radius:11px;background:linear-gradient(150deg,var(--panel-top),var(--panel));overflow:visible;box-shadow:inset 0 1px var(--glint),0 3px 0 var(--shadow)}
#demo-stage .demo-head,.lesson-stage .demo-head{display:flex;align-items:center;justify-content:space-between;padding:0 0 10px;border-bottom:1px solid var(--line-soft);margin:0}
.demo-head>div{display:grid;gap:4px}.demo-head small{font-size:8px;font-weight:600;letter-spacing:1.7px;color:var(--muted)}
#demo-stage .demo-head strong,.lesson-stage .demo-head strong{font:400 29px/1.1 Georgia,serif;color:var(--ink);letter-spacing:-.4px}
#demo-count99,#lesson-count99{font:650 15px/1.3 system-ui;color:var(--muted)}
#help-dialog .demo-carry-line,#help-dialog .lesson-dock{display:flex;align-items:center;gap:13px;margin:0;padding:11px 0 12px;min-height:70px;border-bottom:1px solid var(--line-soft)}
#help-dialog .demo-carry-line>.carry-tile,#help-dialog .lesson-dock>.carry-tile{width:44px;height:46px;font-size:27px;margin:0}
#help-dialog .demo-carry-line>div,#help-dialog .lesson-dock>div{display:grid;gap:5px}
#help-dialog .demo-carry-line .eyebrow,#help-dialog .lesson-dock .eyebrow{font-size:8px;letter-spacing:1.5px}
.example-helper99{font-size:11px!important;line-height:1.45;color:var(--muted)}
.demo-rows,#lesson-words{display:grid;gap:4px!important;padding:10px 0 0;margin:0}
#help-dialog .demo-word,#help-dialog .lesson-word{position:relative;display:grid;grid-template-columns:22px minmax(0,1fr) 18px;gap:8px;align-items:center;min-height:46px;padding:0;margin:0;isolation:isolate}
.example-letters99{display:flex;gap:5px;justify-content:center;min-width:0}
#help-dialog .demo-letter,#help-dialog .lesson-letter{display:grid;place-items:center;position:relative;flex:none;width:40px;height:40px;min-width:0;min-height:0;padding:0;line-height:1;border:1px solid var(--edge);border-bottom-color:var(--brass);border-radius:6px;background:linear-gradient(150deg,var(--tile-top),var(--tile));box-shadow:inset 0 1px var(--tile-glint),0 2px 0 var(--tile-base);color:var(--tile-ink);font-size:22px;font-weight:650;touch-action:manipulation}
#help-dialog .lesson-letter{width:44px;height:44px;min-width:44px;min-height:44px}
.example-stop99{width:22px;height:26px;display:grid;place-items:center;color:var(--train-idle)}
.example-stop99 svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
#help-dialog .demo-word:not(:last-child)::before,#help-dialog .lesson-word:not(:last-child)::before{content:'';position:absolute;left:7px;top:calc(50% + 15px);height:calc(100% - 26px);width:7px;background:linear-gradient(90deg,var(--track) 1px,transparent 1px,transparent 6px,var(--track) 6px),repeating-linear-gradient(180deg,transparent 0 4px,var(--track) 4px 5px,transparent 5px 8px);opacity:.6;z-index:-1}
.example-check99{color:var(--green);font-size:18px;opacity:0;text-align:center}.solved>.example-check99{opacity:1}.solved>.example-stop99{color:var(--gold)}
#help-dialog .solved .demo-letter,#help-dialog .lesson-word.solved .lesson-letter,#help-dialog .lesson-word.solved .lesson-letter:first-child{color:var(--solved-ink);background:linear-gradient(145deg,var(--solved-top),var(--solved));border-color:var(--green-edge);box-shadow:0 2px var(--changed-base)}
#help-dialog .solved .demo-letter.changed,#help-dialog .lesson-word.solved .lesson-letter.changed{background:var(--changed);color:var(--changed-ink)}
#help-dialog .lesson-letter.drop-target{outline:2px solid var(--gold);outline-offset:2px;background:var(--target)}
#help-dialog .demo-word.example-active99:not(.solved) .example-stop99{color:var(--gold)}
#help-dialog .demo-caption,#help-dialog #lesson-message{font-size:11px;line-height:1.5;color:var(--ink);text-align:center;min-height:36px;margin:11px 0 0;padding:0 8px}
#help-dialog #lesson-message.practice-complete99{color:var(--green);font-weight:600}
#help-dialog .demo-controls{display:flex;gap:10px;align-items:center;min-height:44px;border-top:0;margin:0}
#help-dialog .demo-controls button{min-width:44px;min-height:44px;font-size:11px;padding:6px 8px}
#help-dialog .demo-progress{flex:1;height:3px;margin:0;background:var(--line-soft)}#help-dialog .demo-progress span{background:var(--gold);height:3px}
#help-dialog .demo-duration{font-size:9px;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}
#help-dialog .demo-ghost{z-index:5;pointer-events:none;transform-origin:0 0}
#help-dialog .static-demo{padding:14px;gap:7px;border-color:var(--brass)}#help-dialog .static-demo h3{margin:0;font:400 25px Georgia,serif;color:var(--ink)}
#static-chain99{display:grid;gap:7px}#static-chain99 p{font-size:11px;margin:0;color:var(--muted);line-height:1.8}#static-chain99 b{display:block;color:var(--ink);font-weight:600;font-size:15px}.static-demo>p{font-size:12px;line-height:1.6;color:var(--muted);margin:0}
.lesson-actions99{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px}.lesson-actions99 button{font-size:11px;min-height:44px}
#help-dialog .intro-settings99{grid-column:1/-1;width:100%;margin:0;padding:0;border-top:1px solid var(--line-soft)}
#help-dialog .settings-grid99{display:grid;grid-template-columns:1.1fr 1fr;gap:30px}#help-dialog .intro-settings99 summary{font-size:11px;min-height:40px}
/* The iframe only contains the game, not a second website header. */
html.is-integrated99{background:transparent!important}html.is-integrated99 body{background:transparent!important}
html.is-integrated99 .brand,html.is-integrated99 .top-label,html.is-integrated99 #theme,html.is-integrated99 #sound{display:none!important}
html.is-integrated99 .topbar{height:38px!important;max-width:560px;width:100%;margin:0 auto;padding:0 7px;justify-content:flex-end;background:transparent;border:0}
html.is-integrated99 .help-label{min-height:36px;height:36px;padding:0 10px;border:0;text-decoration:underline;text-underline-offset:4px}
html.is-integrated99 .help-text{display:inline!important}html.is-integrated99 .help-symbol{display:none!important}
body>.workspace{display:block!important;max-width:560px!important;width:100%;padding:0 4px 8px!important;margin:0 auto;}
body>.workspace>.intro{display:none!important}.workspace>.board-column{width:100%}
html.is-integrated99 .board-picker,html.is-integrated99 .page-footer{display:none!important}
.workspace .game{padding:15px 18px 7px!important;max-height:none!important;overflow:visible!important}
.workspace .board-ticket{font-size:8px;padding-bottom:8px;letter-spacing:1.4px}
.workspace .game-top{padding:10px 0}.workspace .game-top h2{font-size:32px}
.workspace .carrybar,.workspace .finish{position:relative!important;top:auto;min-height:70px;padding:9px 0;margin:0 0 5px;box-shadow:none}
.workspace .word-row{min-height:54px}.workspace .letter{width:46px;height:46px;min-width:44px;min-height:44px;font-size:25px}
.workspace .message{min-height:40px;padding:9px 2px;font-size:11px}.workspace .game-bottom{min-height:46px}
html[data-host-compact99=true] .workspace .board-ticket{display:none}
html[data-host-compact99=true] .workspace .game{padding-top:7px!important}
html[data-host-compact99=true] .workspace .game-top{padding:6px 0 8px}.workspace .game-top .eyebrow{font-size:8px}
html[data-host-compact99=true] .workspace .game-top h2{font-size:29px}
html[data-host-compact99=true] .workspace .word-row{min-height:49px}
html[data-host-compact99=true] .workspace .letter{width:44px;height:44px;font-size:24px}
html[data-host-compact99=true] .workspace .carrybar{min-height:62px;padding:6px 0;margin-bottom:2px}
html[data-host-compact99=true] .workspace .carry-tile{width:44px;height:46px;font-size:28px}
html[data-host-compact99=true] .workspace .carry-socket{padding:3px}
html[data-host-compact99=true] .workspace .message{min-height:32px;padding:7px 1px}
@media(min-width:720px){
 html[data-host-compact99=true] #help-dialog.intro99{padding:15px 22px 7px!important;column-gap:28px}
 html[data-host-compact99=true] #help-dialog.intro99 h2{font-size:38px;margin:8px 0 10px}
 html[data-host-compact99=true] #help-dialog.intro99 .lead{font-size:12px;margin-bottom:12px}
 html[data-host-compact99=true] .intro-rules99{gap:9px;margin-bottom:13px}.intro-rules99 p{font-size:12px}
 html[data-host-compact99=true] .intro-actions99 button{min-height:44px;padding:9px 14px;font-size:13px}
 html[data-host-compact99=true] .intro-cost99{margin-top:8px;font-size:9px}
 html[data-host-compact99=true] #demo-stage,html[data-host-compact99=true] .lesson-stage{padding:10px 15px!important}
 html[data-host-compact99=true] #help-dialog .demo-word{min-height:40px}
 html[data-host-compact99=true] #help-dialog .demo-letter{width:36px;height:36px;font-size:21px}
 html[data-host-compact99=true] #help-dialog .demo-carry-line{min-height:59px;padding:7px 0}
 html[data-host-compact99=true] #help-dialog .demo-caption{min-height:32px;margin-top:6px}
}
@media(max-width:719px){
 #help-dialog.intro99[open]{display:flex!important;flex-direction:column;gap:17px;max-width:530px!important;padding:21px 18px 8px!important}
 .intro-copy99,.intro-example99{width:100%}.intro-copy99{display:grid;grid-template-columns:1fr;gap:0;padding:0}
 #help-dialog.intro99 h2{font-size:37px;line-height:1.06;margin:8px 0 10px}#help-title br{display:none}#help-title br::after{content:' '}
 #help-dialog.intro99 .lead{font-size:12px;margin-bottom:14px}
 .intro-rules99{gap:10px;margin-bottom:16px}.intro-rules99 li>span{width:22px;height:22px;font-size:10px}.intro-rules99 b{font-size:12px}.intro-rules99 p{font-size:11px;margin-top:1px}
 .intro-actions99{grid-template-columns:1fr 1fr;gap:8px}.intro-actions99 button{font-size:12px;min-height:52px;padding:10px 8px}.practice-button99 small{font-size:9px}
 .intro-cost99{font-size:9px;margin-top:10px}
 #help-dialog .demo-word,#help-dialog .lesson-word{min-height:49px;gap:6px;grid-template-columns:22px minmax(0,1fr) 18px}
 #help-dialog .demo-letter,#help-dialog .lesson-letter{width:44px;height:44px;min-height:44px;min-width:44px;font-size:24px}
 #help-dialog .settings-grid99{grid-template-columns:1fr;gap:0}
 .workspace .game{padding-inline:13px!important}.workspace .letters{gap:5px}
}
@media(max-width:365px){
 #help-dialog.intro99[open]{padding:18px 12px 7px!important}
 #help-dialog.intro99 h2{font-size:32px}
 #demo-stage,.lesson-stage{padding:10px 9px!important}
 #help-dialog .demo-word,#help-dialog .lesson-word{grid-template-columns:18px minmax(0,1fr) 14px;gap:3px}
 .example-letters99{gap:3px}.example-stop99{width:18px}.example-stop99 svg{width:18px}
 .workspace .game{padding-inline:9px!important}.workspace .letters{gap:3px}
}
@media(hover:hover){.practice-button99:hover{background:var(--surface);border-color:var(--gold)}.intro-actions99>.primary-button:hover{filter:brightness(1.04)}}
@media(prefers-reduced-motion:reduce){html,body{scroll-behavior:auto!important}.intro99 *, .intro99 *::before,.intro99 *::after{transition:none!important}}
/* Keep the native dialog focus outline visible without creating a clip boundary. */
#help-dialog:focus{outline:none}.intro99 button:focus-visible,.intro99 summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* A short phone introduction keeps both actions ahead of the optional details. */
.mobile-rules99{display:none;border-block:1px solid var(--line-soft);margin:0 0 12px}
.mobile-rules99>summary{min-height:38px;display:flex;align-items:center;justify-content:space-between;list-style:none;font-size:11px;color:var(--muted);cursor:pointer}
.mobile-rules99>summary::-webkit-details-marker{display:none}.mobile-rules99>summary::after{content:'+';color:var(--gold);font-size:18px}.mobile-rules99[open]>summary::after{content:'−'}
@media(max-width:719px){.intro-copy99>.intro-rules99{display:none}.mobile-rules99{display:block}.mobile-rules99 .intro-rules99{padding:6px 0;margin:0 0 8px}}
@media(min-width:720px){
 html[data-host-compact99=true] #help-dialog.intro99 h2{font-size:33px;line-height:1.08;letter-spacing:-.9px}html[data-host-compact99=true] #help-title br{display:none}
 html[data-host-compact99=true] #demo-stage .demo-head{padding-bottom:6px}html[data-host-compact99=true] #demo-stage .demo-head strong{font-size:25px}
 html[data-host-compact99=true] #help-dialog .demo-carry-line{padding:5px 0;min-height:54px}
 html[data-host-compact99=true] #help-dialog .demo-word{min-height:36px}html[data-host-compact99=true] #help-dialog .demo-letter{width:33px;height:33px;font-size:20px}
 html[data-host-compact99=true] .demo-rows{gap:3px!important;padding-top:8px}
 html[data-host-compact99=true] #help-dialog .demo-controls{padding-bottom:0;border-bottom:0;height:44px}
}
html.is-integrated99{color-scheme:normal!important}
html.is-integrated99 .help-label{width:auto!important;min-width:44px!important;white-space:nowrap}
@media(min-width:720px){html[data-host-compact99=true] .intro-actions99{grid-template-columns:1fr 1fr}.intro-actions99 .practice-button99{min-height:48px}}
/* Keep both decisions visible on short laptop screens without shrinking game tiles. */
@media(min-width:720px){
 html[data-host-compact99=true] #help-dialog .intro-rules99{gap:6px;margin-bottom:10px}
 html[data-host-compact99=true] #help-dialog .intro-rules99 p{font-size:11px;line-height:1.35;margin-top:1px}
 html[data-host-compact99=true] #help-dialog .intro-rules99 li>span{width:22px;height:22px}
}
