@font-face {
  font-family: Fredoka;
  src: url("/static/fonts/fredoka-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Fredoka;
  src: url("/static/fonts/fredoka-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Nunito;
  src: url("/static/fonts/nunito-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Nunito;
  src: url("/static/fonts/nunito-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #30233e;
  --ink-soft: #5d5366;
  --sky: #cfefff;
  --paper: #fff9ee;
  --yellow: #ffd25a;
  --orange: #ef6e3e;
  --teal: #087b83;
  --line: #d9d5cc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Nunito, "Trebuchet MS", sans-serif; color: var(--ink); line-height: 1.4; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.site-header { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: Fredoka, Nunito, sans-serif; font-size: 27px; font-weight: 600; line-height: 1; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border: 2.5px solid var(--ink); border-radius: 11px; background: var(--yellow); box-shadow: 0 3px 0 var(--ink); font-size: 24px; font-weight: 700; }
.header-link { font-size: 14px; font-weight: 900; white-space: nowrap; }
.header-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer { padding: 24px 0 28px; color: var(--ink-soft); text-align: center; font-size: 12px; font-weight: 700; }
.section-tag { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.primary-button { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--yellow); color: var(--ink); font-size: 18px; font-weight: 900; box-shadow: 0 5px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.primary-button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.primary-button:disabled { opacity: .55; cursor: default; transform: none; box-shadow: 0 3px 0 var(--ink); }
.primary-button span { font-size: 24px; line-height: 1; }
.text-button { border: 0; background: transparent; color: inherit; font-size: 14px; font-weight: 900; padding: 9px 3px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { opacity: .7; }
.small-button { min-height: 42px; border: 1.5px solid currentColor; background: white; color: inherit; border-radius: 10px; padding: 8px 13px; font-size: 14px; font-weight: 900; }
.form-error { min-height: 18px; margin: 10px 0 0; color: #a33225; font-size: 14px; font-weight: 800; }

/* Täheõu: the same place at arrival, practice, and the end of a lesson. */
.student-page {
  min-height: 100vh;
  background-color: #e4eee7;
  background-image: linear-gradient(90deg, rgba(247, 250, 243, .88), rgba(247, 250, 243, .62) 48%, rgba(247, 250, 243, .36)), url("/static/sillu-world-home.webp");
  background-position: center, center;
  background-size: cover;
  background-attachment: fixed;
}
.student-page[data-scene="game"] {
  background-image: linear-gradient(180deg, rgba(255, 249, 237, .72), rgba(255, 249, 237, .84)), url("/static/sillu-world-practice.webp");
  background-position: center, center;
}
.student-page[data-scene="finished"] {
  background-image: linear-gradient(180deg, rgba(255, 249, 237, .42), rgba(255, 249, 237, .54)), url("/static/sillu-world-finish.webp");
  background-position: center, center;
}
.student-page .site-header { border-bottom: 1px solid rgba(48, 35, 62, .16); border-radius: 0 0 16px 16px; background: rgba(255, 249, 238, .78); backdrop-filter: blur(8px); padding-inline: 16px; }
.student-main { min-height: calc(100vh - 132px); }
.welcome-layout { min-height: calc(100vh - 132px); display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: clamp(36px, 6vw, 86px); align-items: center; padding: 24px 0 30px; }
.welcome-copy h1 { max-width: 610px; margin: 18px 0 15px; font: 600 clamp(48px, 5.6vw, 70px)/1.02 Fredoka, Nunito, sans-serif; letter-spacing: -.03em; }
.welcome-copy h1 span { color: #d85f35; }
.welcome-copy > p { max-width: 460px; margin-bottom: 0; font-size: 19px; font-weight: 700; }
.welcome-art { width: min(100%, 470px); height: 315px; position: relative; margin-top: 10px; }
.welcome-art img { width: 350px; height: 315px; object-fit: contain; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); filter: drop-shadow(0 17px 13px rgba(59, 44, 33, .25)); }
.start-card { border: 3px solid var(--ink); border-radius: 24px; background: rgba(255, 249, 238, .96); box-shadow: 0 8px 0 rgba(48, 35, 62, .18); padding: 28px; }
.card-kicker { display: block; margin-bottom: 22px; font: 600 26px/1 Fredoka, Nunito, sans-serif; }
.start-card label[for=display-name], .level-fieldset legend { display: block; margin-bottom: 9px; font-size: 17px; font-weight: 900; }
.start-card input[type=text] { width: 100%; height: 54px; border: 2px solid var(--ink); border-radius: 12px; background: white; padding: 0 14px; font-size: 17px; color: var(--ink); outline: none; }
.start-card input[type=text]:focus { box-shadow: 0 0 0 4px rgba(255, 210, 90, .65); }
.input-note { margin: 5px 0 22px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.level-fieldset { border: 0; margin: 0 0 24px; padding: 0; }
.level-options { display: grid; gap: 8px; }
.level-option { min-height: 72px; display: flex; align-items: center; gap: 12px; border: 2px solid #b9b0b7; border-radius: 13px; background: white; padding: 8px 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.level-option:hover { border-color: var(--ink); }
.level-option:has(input:checked) { border-color: var(--ink); background: #fff0ba; }
.level-option:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.level-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }
.level-number { width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 10px; background: var(--sky); font: 600 22px/1 Fredoka, Nunito, sans-serif; flex: none; }
.level-option:has(input:checked) .level-number { background: var(--yellow); }
.level-copy { display: grid; gap: 1px; }
.level-copy strong { font-size: 16px; line-height: 1.15; }
.level-copy small { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.start-card .primary-button { width: 100%; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 246px; grid-template-areas: "top top" "main side"; gap: 18px 22px; align-items: start; padding: 26px 0 30px; }
.game-top { grid-area: top; border: 1px solid rgba(48, 35, 62, .22); border-radius: 17px; background: rgba(255, 249, 238, .9); padding: 15px 20px; }
.game-top-line, .progress-label { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.game-top-line { margin-bottom: 14px; }
.player-pill { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); padding: 5px 13px; font-size: 14px; font-weight: 900; }
.progress-label { font-size: 15px; font-weight: 900; }
.progress-label span:last-child { color: var(--ink-soft); font-size: 13px; }
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.progress-steps span { height: 12px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); }
.progress-steps span.done { background: var(--yellow); }
.progress-steps span.current { background: #79cdda; }
.game-main { grid-area: main; min-width: 0; }
.practice-card { border: 3px solid var(--ink); border-radius: 24px; background: rgba(255, 249, 238, .97); box-shadow: 0 7px 0 rgba(48, 35, 62, .17); padding: clamp(24px, 4vw, 40px); }
.practice-head { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 900; }
.exercise-number { min-width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--yellow); font: 600 18px/1 Fredoka, Nunito, sans-serif; }
.practice-instruction { margin: 34px 0 6px; color: var(--ink-soft); font-size: 15px; font-weight: 800; }
.typing-prompt { min-height: 82px; overflow-wrap: anywhere; font: 600 clamp(39px, 5.4vw, 64px)/1.32 Fredoka, Nunito, sans-serif; letter-spacing: .015em; }
.typing-prompt span { border-radius: 3px; }
.typing-prompt .typed-correct { color: #14776f; }
.typing-prompt .typed-wrong { background: #ffe0d7; color: #b83725; text-decoration: underline; text-decoration-thickness: 3px; }
.typing-prompt .current-char { border-bottom: 5px solid var(--orange); }
.typing-input { width: 100%; height: 68px; margin-top: 15px; border: 2.5px solid var(--ink); border-radius: 13px; background: #fff; padding: 0 17px; color: var(--ink); font: 600 28px/1 Fredoka, Nunito, sans-serif; outline: none; }
.typing-input:focus { box-shadow: 0 0 0 5px rgba(255, 210, 90, .7); }
.typing-feedback { min-height: 24px; margin: 13px 0 0; font-size: 15px; font-weight: 900; }
.keyboard-panel { margin-top: 16px; border: 1px solid rgba(48, 35, 62, .26); border-radius: 19px; background: rgba(255, 249, 238, .92); box-shadow: 0 8px 24px rgba(48, 35, 62, .08); padding: 19px; }
.keyboard-caption { margin-bottom: 12px; font-size: 13px; font-weight: 900; }
.keyboard { display: grid; gap: 5px; max-width: 720px; }
.key-row { display: flex; justify-content: center; gap: 5px; }
.key { min-width: 0; height: 39px; flex: 1; display: grid; place-items: center; border: 1.5px solid var(--ink); border-bottom-width: 3.5px; border-radius: 7px; background: #fffefa; font-size: 13px; font-weight: 900; line-height: 1; }
.key.active { background: var(--yellow); border-bottom-color: #8b671c; transform: translateY(-2px); }
.key.space { flex: 5; }
.key.shift, .key.backspace { flex: 1.6; font-size: 11px; }
.key.backspace { font-size: 23px; }
.game-side { grid-area: side; position: sticky; top: 20px; }
.qr-card { border: 1.5px solid #9fb9bb; border-radius: 17px; background: #f5fbfa; padding: 17px; text-align: center; }
.qr-card h2 { margin: 0 0 4px; font: 600 19px/1.15 Fredoka, Nunito, sans-serif; }
.qr-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.qr-frame { width: 192px; height: 192px; display: grid; place-items: center; margin: 0 auto; border: 1px solid #d8d1c3; border-radius: 10px; background: #fff; }
.qr-frame img { width: 178px; height: 178px; object-fit: contain; }
.qr-done { color: #127b65; font: 600 84px/1 Fredoka, Nunito, sans-serif; }
.qr-status { display: block; margin-top: 11px; font-size: 12px; font-weight: 900; }
.qr-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--orange); }
.qr-card.is-linked .qr-status::before { background: #127b65; }
.qr-card.is-linked .qr-frame { background: #e8f9ed; }
.finish-screen { max-width: 820px; display: grid; grid-template-columns: minmax(0, 1fr) 246px; gap: 10px 24px; align-items: center; margin: 52px auto 40px; border: 3px solid var(--ink); border-radius: 25px; background: rgba(255, 249, 238, .96); box-shadow: 0 8px 0 rgba(48, 35, 62, .17); padding: clamp(22px, 4vw, 38px); }
.finish-intro { display: flex; align-items: center; gap: 12px; }
.finish-intro img { width: 150px; height: 150px; object-fit: contain; flex: none; }
.finish-intro h1 { margin: 8px 0 10px; font: 600 clamp(33px, 4vw, 49px)/1.04 Fredoka, Nunito, sans-serif; }
.finish-intro h1 span { display: block; color: #bd542f; }
.finish-intro p { margin-bottom: 0; font-weight: 800; }
.finish-qr { grid-column: 2; grid-row: 1 / 3; }
.finish-qr .qr-card { box-shadow: none; }
.finish-actions { grid-column: 1; align-self: end; }
.finish-teacher-note { max-width: 330px; margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; font-weight: 800; }
.finish-actions .primary-button { padding: 0 30px; }
.restart-warning { grid-column: 1 / -1; border-top: 1px solid #c7bdad; padding-top: 14px; }
.restart-warning p { margin: 0 0 7px; font-weight: 800; }
.restart-warning .text-button { margin-right: 15px; }

/* The teacher sees the same world through a quieter, more legible layer. */
.teacher-page {
  min-height: 100vh;
  background-color: #f3f1e9;
  background-image: linear-gradient(180deg, rgba(255, 251, 244, .68), rgba(255, 251, 244, .83)), url("/static/sillu-world-home.webp");
  background-position: center, center;
  background-size: cover;
  background-attachment: fixed;
  color: #24201e;
}
.teacher-page .site-header { border-bottom: 1px solid #e6ded1; border-radius: 0 0 15px 15px; background: rgba(255, 251, 244, .86); backdrop-filter: blur(8px); padding-inline: 14px; }
.teacher-page .brand { font-family: Nunito, sans-serif; font-size: 24px; font-weight: 900; }
.teacher-page .brand-mark { width: 34px; height: 34px; border-color: #24201e; border-radius: 9px; background: #f7bd69; box-shadow: none; font-size: 20px; }
.teacher-page .section-tag { color: #0e7490; }
.teacher-page .primary-button { border: 1px solid #be4b22; background: #ea5e2c; color: white; font-size: 16px; box-shadow: none; }
.teacher-page .primary-button:hover { background: #d84d21; transform: none; box-shadow: none; }
.teacher-page .primary-button:active { background: #bf421b; }
.teacher-page .primary-button:disabled { opacity: .5; box-shadow: none; }
.teacher-page .text-button { color: #0d657a; }
.teacher-page .site-footer { color: #827c72; }
.teacher-main { min-height: calc(100vh - 132px); }
.auth-layout { width: min(830px, 100%); min-height: calc(100vh - 132px); display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: center; gap: 48px; margin-inline: auto; padding: 30px 0; }
.auth-intro h1 { margin: 14px 0 12px; font-size: clamp(38px, 4.5vw, 54px); font-weight: 900; line-height: 1.08; letter-spacing: -.045em; }
.auth-intro p { max-width: 335px; color: #59554d; font-size: 17px; }
.auth-card { display: grid; gap: 8px; border: 1px solid #d8d3c9; border-radius: 18px; background: rgba(255, 252, 247, .96); padding: 28px; box-shadow: 0 11px 32px rgba(42, 35, 27, .1); }
.auth-card h2 { margin: 0 0 12px; font-size: 25px; }
.auth-card label { font-size: 14px; font-weight: 900; }
.auth-card input, .inline-name-form input { width: 100%; min-height: 48px; border: 1.5px solid #9e9a92; border-radius: 10px; background: white; color: #24201e; padding: 9px 13px; outline: none; }
.auth-card input:focus, .inline-name-form input:focus { border-color: #0e7490; box-shadow: 0 0 0 3px rgba(14, 116, 144, .15); }
.auth-card input { margin-bottom: 12px; }
.auth-card .primary-button { width: 100%; margin-top: 5px; }
.auth-card .text-button { justify-self: center; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin: 31px 0 25px; border: 1px solid rgba(115, 118, 109, .22); border-radius: 18px; background: rgba(255, 251, 244, .87); padding: 19px 22px; }
.dashboard-heading h1 { margin: 3px 0 0; font-size: 39px; line-height: 1.05; letter-spacing: -.045em; }
.dashboard-controls { display: flex; align-items: center; gap: 14px; }
.dashboard-controls .small-button { display: none; color: #0d657a; }
.teacher-name { margin: 4px 0 0; color: #746c62; font-size: 13px; font-weight: 800; }
.teacher-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.teacher-content { grid-column: 2; grid-row: 1; min-width: 0; border: 1px solid #ded8ce; border-radius: 18px; background: rgba(255, 253, 249, .97); padding: 28px; }
.lesson-sidebar { grid-column: 1; grid-row: 1; border: 1px solid #ded8ce; border-radius: 18px; background: rgba(255, 253, 249, .97); padding: 18px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.sidebar-head h2 { margin: 0; font-size: 19px; }
.sidebar-head .small-button { color: #0d657a; white-space: nowrap; }
.lesson-list { display: grid; gap: 5px; }
.lesson-item { width: 100%; display: grid; gap: 4px; border: 1.5px solid transparent; border-radius: 11px; background: transparent; padding: 10px; color: #24201e; text-align: left; }
.lesson-item:hover { background: #f7f3ec; }
.lesson-item.selected { border-color: #0e7490; background: #eff8f7; }
.lesson-item strong { font-size: 14px; line-height: 1.2; }
.lesson-item span { color: #746c62; font-size: 12px; font-weight: 700; }
.empty-lesson { max-width: 430px; padding: 38px 10px; }
.empty-number { color: #ea5e2c; font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.empty-lesson h2 { margin: 10px 0; font-size: 31px; }
.empty-lesson p { max-width: 335px; color: #625d55; }
.empty-lesson .primary-button { padding: 0 25px; margin-top: 12px; }
.lesson-top { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 16px; }
.lesson-top > div { min-width: 0; }
.status-pill { display: inline-block; border-radius: 999px; background: #e6f5ed; color: #166348; padding: 5px 9px; font-size: 11px; font-weight: 900; }
.status-pill.closed { background: #eeeae4; color: #5b554e; }
.lesson-date { margin-left: 9px; color: #706960; font-size: 12px; font-weight: 800; white-space: nowrap; }
.lesson-top h2 { margin: 12px 0 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; }
.lesson-top .text-button { white-space: nowrap; }
.inline-name-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 17px; }
.inline-name-form input { flex: 1 1 180px; }
.inline-name-form .small-button { border-color: #0d657a; color: #0d657a; }
.scan-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 13px; background: #eaf5f4; padding: 17px 18px; }
.scan-strip strong { font-size: 16px; }
.scan-strip p { margin: 2px 0 0; color: #5b6764; font-size: 13px; font-weight: 700; }
.scan-strip .primary-button { min-height: 48px; flex: none; padding: 0 17px; border-radius: 10px; }
.scan-strip .primary-button span { font-size: 18px; }
.report-heading { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.report-heading h3 { margin: 0; font-size: 20px; }
.count-badge { border-radius: 999px; background: #f1eee8; padding: 4px 9px; color: #4d4841; font-size: 12px; font-weight: 900; }
.student-results { border-top: 1px solid #e8e1d6; }
.no-students { margin: 0; padding: 31px 10px; color: #676057; font-size: 14px; font-weight: 700; }
.student-card { border-bottom: 1px solid #e8e1d6; }
.student-card-head { min-height: 76px; display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; padding: 9px 0; }
.student-card-head::-webkit-details-marker { display: none; }
.student-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 12px; background: #def1ee; color: #0c6571; font-size: 19px; font-weight: 900; }
.student-name { min-width: 0; flex: 1; }
.student-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.student-name small { color: #69635a; font-size: 12px; font-weight: 800; }
.student-overview { display: grid; justify-items: end; gap: 1px; flex: none; }
.student-overview strong { font-size: 18px; }
.student-overview span { color: #69635a; font-size: 11px; font-weight: 800; white-space: nowrap; }
.student-chevron { color: #716961; font-size: 23px; line-height: 1; transition: transform .15s; }
.student-card[open] .student-chevron { transform: rotate(180deg); }
.student-detail-body { margin: 0 0 14px 54px; border-radius: 12px; background: #faf7f1; padding: 17px; }
.student-key-hint { display: inline-block; margin: 0 0 14px; border-radius: 7px; background: #e8f4ef; padding: 5px 8px; color: #135d4d; font-size: 12px; font-weight: 900; }
.student-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; }
.student-metrics div { min-width: 0; }
.student-metrics dt { color: #6c655d; font-size: 11px; font-weight: 800; }
.student-metrics dd { margin: 2px 0 0; font-size: 17px; font-weight: 900; }
.student-detail-body h4 { margin: 15px 0 5px; font-size: 13px; }
.missed-keys { margin: 12px 0 0; color: #605950; font-size: 12px; font-weight: 800; }
.attempt-list { margin: 0 0 6px; padding-left: 18px; color: #605950; font-size: 13px; }
.attempt-list li { margin: 4px 0; }
.edit-name-button { font-size: 12px; }
.student-detail-body .inline-name-form { margin-bottom: 0; }
.lesson-actions { border-top: 1px solid #e8e1d6; margin-top: 24px; padding-top: 12px; }
.lesson-actions summary { width: fit-content; color: #625c54; font-size: 13px; font-weight: 800; cursor: pointer; }
.lesson-actions > div { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.danger-button { color: #a33327 !important; }
.claim-message { border-radius: 10px; background: #fff0e8; color: #9a3a27; padding: 12px 14px; font-size: 14px; font-weight: 900; margin-bottom: 16px; }
.claim-message.success { background: #e5f4eb; color: #1b6449; }
.pending-claim { margin-bottom: 16px; border: 1.5px solid #e9b594; border-radius: 12px; background: #fff4ea; padding: 15px; }
.pending-claim strong { display: block; font-size: 15px; margin-bottom: 10px; }
.pending-lesson-list { display: flex; flex-wrap: wrap; gap: 7px; }
.pending-lesson-button { border: 1.5px solid #b9542d; border-radius: 9px; background: white; padding: 9px 11px; color: #5c321e; font-size: 13px; font-weight: 900; }
.scan-dock { display: none; }
.scanner-open { overflow: hidden; }
.scanner-panel { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: linear-gradient(rgba(15, 25, 29, .89), rgba(15, 25, 29, .93)), url("/static/sillu-world-teacher.webp") center / cover; color: white; padding: 18px; }
.scanner-shell { width: min(100%, 500px); display: grid; gap: 16px; }
.scanner-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.scanner-header span { display: block; color: #aad7d8; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.scanner-header strong { display: block; margin-top: 3px; font-size: 20px; line-height: 1.15; }
.scanner-close { width: 46px; height: 46px; flex: none; border: 1px solid #7e9194; border-radius: 12px; background: #26363b; color: white; font-size: 20px; }
.scanner-video-wrap { width: 100%; aspect-ratio: 4 / 5; max-height: min(66vh, 620px); position: relative; overflow: hidden; border-radius: 16px; background: #080e11; }
.scanner-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-corner { width: 36px; height: 36px; position: absolute; pointer-events: none; border-color: #ffd25a; border-style: solid; }
.corner-one { top: 15%; left: 13%; border-width: 4px 0 0 4px; }
.corner-two { top: 15%; right: 13%; border-width: 4px 4px 0 0; }
.corner-three { bottom: 15%; left: 13%; border-width: 0 0 4px 4px; }
.corner-four { bottom: 15%; right: 13%; border-width: 0 4px 4px 0; }
.scanner-shell > p { margin: 0; text-align: center; color: #d3dedf; font-size: 14px; font-weight: 800; }
.scanner-result { border-radius: 10px; background: #dff5e8; color: #195638; padding: 12px 14px; text-align: center; font-weight: 900; }
.scanner-result.error { background: #ffe0d6; color: #9a3326; }

@media (max-width: 900px) {
  .welcome-layout { grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; }
  .welcome-copy h1 { font-size: 52px; }
  .welcome-art { height: 265px; }
  .welcome-art img { width: 285px; height: 265px; }
  .teacher-grid { grid-template-columns: 230px minmax(0, 1fr); gap: 15px; }
  .teacher-content { padding: 21px; }
  .scan-strip { align-items: start; flex-direction: column; }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 30px, 620px); }
  .student-page, .teacher-page { background-attachment: scroll; }
  .student-page { background-image: linear-gradient(180deg, rgba(247, 250, 243, .86), rgba(247, 250, 243, .67)), url("/static/sillu-world-teacher.webp"); background-position: center, center top; }
  .student-page[data-scene="game"] { background-image: linear-gradient(180deg, rgba(255, 249, 237, .64), rgba(255, 249, 237, .78)), url("/static/sillu-world-practice.webp"); background-position: center, 58% center; }
  .student-page[data-scene="finished"] { background-image: linear-gradient(180deg, rgba(255, 249, 237, .5), rgba(255, 249, 237, .64)), url("/static/sillu-world-finish.webp"); background-position: center, 70% center; }
  .teacher-page { background-image: linear-gradient(180deg, rgba(255, 251, 244, .7), rgba(255, 251, 244, .86)), url("/static/sillu-world-teacher.webp"); background-position: center, center top; }
  .site-header { height: 68px; }
  .brand { font-size: 24px; }
  .brand-mark { width: 34px; height: 34px; font-size: 20px; }
  .welcome-layout { min-height: auto; grid-template-columns: 1fr; gap: 18px; padding: 26px 0; }
  .welcome-copy h1 { max-width: 500px; margin: 8px 0 7px; font-size: clamp(38px, 8vw, 52px); }
  .welcome-copy > p { font-size: 16px; }
  .welcome-art { width: 100%; height: 176px; margin: 5px 0 0; }
  .welcome-art img { width: 185px; height: 176px; }
  .start-card { padding: 22px; }
  .game-layout { grid-template-columns: 1fr; grid-template-areas: "top" "side" "main"; gap: 14px; padding-top: 17px; }
  .game-top { padding: 12px 14px; }
  .game-side { position: static; }
  .qr-card { display: grid; grid-template-columns: minmax(0, 1fr) 146px; align-items: center; gap: 8px; padding: 10px 12px; text-align: left; }
  .qr-card h2 { font-size: 17px; }
  .qr-card p { display: none; }
  .qr-frame { width: 140px; height: 140px; grid-column: 2; grid-row: 1; }
  .qr-frame img { width: 130px; height: 130px; }
  .qr-copy { grid-column: 1; grid-row: 1; }
  .qr-status { margin-top: 6px; }
  .qr-done { font-size: 65px; }
  .finish-screen { grid-template-columns: 1fr; gap: 18px; margin-top: 23px; }
  .finish-intro img { width: 110px; height: 110px; }
  .finish-qr, .finish-actions { grid-column: 1; grid-row: auto; }
  .finish-qr .qr-card { max-width: 390px; }
  .teacher-page .header-link { font-size: 12px; }
  .auth-layout { min-height: auto; grid-template-columns: 1fr; gap: 17px; padding: 30px 0; }
  .auth-intro h1 { margin: 6px 0 0; font-size: 34px; }
  .auth-intro p { display: none; }
  .auth-card { padding: 22px; }
  .teacher-main { padding-bottom: 90px; }
  .dashboard-heading { flex-wrap: wrap; align-items: start; margin: 20px 0 16px; padding: 17px; }
  .dashboard-heading h1 { font-size: 31px; }
  .dashboard-controls { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
  .dashboard-controls #open-lesson:not(.hidden) { flex-basis: 100%; text-align: left; }
  .dashboard-controls .small-button { display: inline-flex; align-items: center; min-height: 40px; }
  .teacher-name { font-size: 14px; }
  .teacher-grid { display: block; }
  .teacher-content { padding: 19px; }
  .lesson-sidebar { margin-top: 24px; }
  .scan-strip { padding: 14px; }
  .scan-strip .primary-button { display: none; }
  .scan-dock:not(.hidden) { min-height: 59px; position: fixed; left: max(15px, env(safe-area-inset-left)); right: max(15px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: space-between; border: 1px solid #b9431e; border-radius: 14px; background: #ea5e2c; box-shadow: 0 8px 24px rgba(92, 53, 32, .24); padding: 0 18px; color: white; font-size: 17px; font-weight: 900; }
  .scan-dock span { font-size: 26px; }
  .student-detail-body { margin-left: 0; }
  .student-name small, .student-overview span, .student-metrics dt, .lesson-item span { font-size: 13px; }
  .scanner-panel { padding: 0; }
  .scanner-shell { width: 100%; height: 100dvh; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .scanner-video-wrap { max-height: none; aspect-ratio: auto; }
}
@media (max-width: 460px) {
  .welcome-copy h1 { font-size: 39px; }
  .welcome-art { height: 155px; }
  .welcome-art img { width: 165px; height: 155px; }
  .card-kicker { margin-bottom: 17px; }
  .start-card { border-radius: 18px; }
  .level-option { min-height: 65px; }
  .game-top-line { margin-bottom: 9px; }
  .progress-label span:last-child { font-size: 11px; }
  .practice-card { padding: 23px 18px; }
  .typing-prompt { min-height: 62px; font-size: 39px; }
  .typing-input { height: 58px; font-size: 24px; }
  .keyboard-panel { padding: 13px 9px; }
  .key-row, .keyboard { gap: 3px; }
  .key { height: 31px; border-radius: 5px; font-size: 10px; }
  .key.shift { font-size: 8px; }
  .key.backspace { font-size: 17px; }
  .finish-intro { gap: 0; }
  .finish-intro img { width: 93px; height: 100px; }
  .finish-intro h1 { font-size: 33px; }
  .lesson-date { display: block; margin: 8px 0 0; }
  .lesson-top h2 { margin-top: 5px; }
  .lesson-top .text-button { font-size: 12px; }
  .student-avatar { width: 37px; height: 37px; }
  .student-card-head { gap: 8px; }
  .student-overview strong { font-size: 16px; }
  .student-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
