/* The walkthrough runs in the browser, so it stays sharp at every screen size. */
.demo-stage { min-height: 640px; scroll-margin-top: 115px; }
.demo-top { align-items: center; min-height: 25px; }
.demo-controls { display: flex; align-items: center; gap: 5px; }
.demo-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 4px 7px; background: #f7faf1; border: 1px solid #c6d4be; border-radius: 5px; color: #4d6855; font-size: 10px; }
.demo-controls button:hover { background: #fff; }
.demo-controls svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.demo-controls .play-icon { display: none; fill: currentColor; stroke: none; }
.demo-stage[data-playing="false"] .pause-icon { display: none; }
.demo-stage[data-playing="false"] .play-icon { display: block; }
.demo-stage .reading-sheet { margin-top: 18px; }
.demo-stage .word { background: transparent; border-bottom-color: #b4c6a9; transition: background .25s, border-color .25s; }
.demo-stage .word.active { background: #d4e8bb; border-bottom-color: #809e63; }
.demo-stage .lookup-panel { bottom: 138px; transform: rotate(1deg); }
.demo-stage[data-animated] .lookup-panel { opacity: 0; transform: translateY(12px) rotate(1deg) scale(.97); visibility: hidden; pointer-events: none; transition: opacity .1s, transform .14s cubic-bezier(.2,.8,.2,1), visibility .1s; }
.demo-stage[data-phase="lookup"] .lookup-panel,
.demo-stage[data-phase="manual"] .lookup-panel { opacity: 1; transform: translateY(0) rotate(1deg) scale(1); visibility: visible; pointer-events: auto; }
.demo-cursor { display: none; position: absolute; top: 0; left: 0; width: 27px; height: 34px; z-index: 4; pointer-events: none; transition: transform .32s cubic-bezier(.25,.6,.25,1), opacity .1s; filter: drop-shadow(1px 2px 2px #1c473133); }
.demo-stage[data-animated] .demo-cursor { display: block; }
.demo-cursor svg { width: 100%; height: 100%; fill: #173d36; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.cursor-ring { position: absolute; width: 34px; height: 34px; left: -14px; top: -14px; border: 2px solid #087b71; border-radius: 50%; opacity: 0; transform: scale(.4); transition: opacity .08s, transform .12s; }
.demo-stage[data-phase="key"] .cursor-ring { opacity: .45; transform: scale(1); }
.demo-shortcuts { position: absolute; left: 25px; right: 25px; bottom: 73px; display: flex; align-items: center; gap: 10px; }
.demo-shortcuts kbd { width: 58px; height: 49px; display: flex; justify-content: space-between; flex-direction: column; align-items: start; border: 1px solid #c0d0b7; border-radius: 7px; padding: 5px 9px; background: linear-gradient(#fcfdf6,#f0f4e7); box-shadow: 0 3px 0 #bccdb2; font: inherit; color: #58714d; transition: transform .06s, box-shadow .06s, background .06s, color .06s; }
.demo-option>span { font-size: 21px; align-self: end; line-height: 1; }
.demo-shortcuts kbd small { font-size: 9px; line-height: 1; }
.demo-stage[data-phase="key"] .demo-option { transform: translateY(3px); box-shadow: 0 0 0 #bccdb2; background: #087b71; color: #fff; border-color: #087b71; }
.demo-state { margin-left: 7px; font-size: 11px; color: #4c6d53; }
.demo-bottom { display: block; bottom: 20px; }
.demo-steps { display: flex; align-items: center; justify-content: space-between; list-style: none; padding: 0; margin: 0; gap: 8px; }
.demo-steps li { display: flex; align-items: center; gap: 6px; color: #5e7355; font-size: 10px; transition: color .2s; }
.demo-steps li>span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #b1c4a3; border-radius: 50%; font-size: 9px; }
.demo-steps li.current { color: #087b71; font-weight: 650; }
.demo-steps li.current>span { background: #087b71; border-color: #087b71; color: #fff; }
.demo-progress { height: 2px; margin-top: 11px; background: #cedcc3; overflow: hidden; border-radius: 2px; }
.demo-progress>span { display: block; height: 100%; width: 100%; background: #087b71; transform: scaleX(0); transform-origin: left; }
.demo-stage[data-instant] .demo-cursor,
.demo-stage[data-instant] .lookup-panel { transition: none; }
.demo-stage[data-playing="false"] .demo-cursor { transition-duration: 0s; }
@media (min-width: 1450px) { .demo-stage { min-height: 650px; } }
@media (max-width: 1100px) { .demo-stage { min-height: 680px; } .demo-shortcuts { left: 17px; right: 17px; } .demo-state { font-size: 10px; } .demo-steps li { font-size: 9px; gap: 4px; } }
@media (max-width: 800px) { .demo-stage { min-height: 650px; } .demo-shortcuts { left: 28px; right: 28px; } .demo-state { font-size: 11px; } .demo-steps li { font-size: 10px; } }
@media (max-width: 480px) { .demo-stage { min-height: 630px; } .demo-controls { gap: 3px; } .demo-controls button { font-size: 9px; padding: 3px 6px; min-height: 28px; } .demo-top { font-size: 8px; } .demo-stage .reading-sheet { margin-top: 15px; } .demo-stage .lookup-panel { bottom: 137px; } .demo-shortcuts { left: 17px; right: 17px; bottom: 72px; gap: 8px; } .demo-shortcuts kbd { width: 52px; height: 44px; } .demo-state { margin-left: 4px; font-size: 10px; } .demo-steps li { font-size: 9px; gap: 4px; } .demo-steps li>span { width: 15px; height: 15px; font-size: 8px; } .demo-cursor { width: 23px; height: 29px; } }
@media (prefers-reduced-motion: reduce) { .demo-stage .demo-cursor, .demo-stage .lookup-panel, .demo-stage .cursor-ring { transition: none; } }

.demo-stage .reading-sheet { padding-top: 21px; padding-bottom: 65px; }
.demo-stage .reading-sheet h2 { font-size: 26px; line-height: 1.2; margin-top: 8px; }
.demo-stage .paper-body { margin-top: 12px; line-height: 1.8; }
