:root { color-scheme: light; --tl-bg: var(--a-bg); --tl-surface: var(--a-surface); --tl-ink: var(--a-text); --tl-muted: var(--a-muted); --tl-line: var(--a-line); --tl-blue: var(--a-accent); --tl-blue-soft: var(--a-accent-soft); --tl-orange: #f97316; --tl-mint: #22b8a7; --tl-yellow: #ffdd57; --tl-red: var(--a-bad); --tl-shadow: var(--a-shadow-lg); --tl-font: var(--a-font); }
:root[data-theme="dark"] { color-scheme: dark; --tl-orange: #ff9c56; --tl-mint: #66dbc9; --tl-yellow: #ffe37a; }
* { box-sizing: border-box; }
body.typingland-page { margin: 0; min-height: 100vh; color: var(--tl-ink); background: radial-gradient(circle at 16% 16%, rgba(96, 165, 250, .12), transparent 28rem), var(--tl-bg); font: var(--a-fs-base)/1.55 var(--tl-font); }
.typingland-page .home-site-header { --ui-font: var(--tl-font); }
.typingland-page [hidden] { display: none !important; }
.typingland-page button, .typingland-page input { font: inherit; }
.typingland-page :is(button, input, a):focus-visible { outline: 3px solid rgba(37, 99, 235, .42); outline-offset: 3px; }
.typingland-page .home-site-header :is(a, button, span, strong, code) { font-family: var(--tl-font) !important; }

.tl-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 54px; }
.tl-skip-row { position: absolute; left: -9999px; }
.tl-skip-row:focus-within { position: static; margin-bottom: 10px; }
.tl-skip { display: inline-block; padding: 8px 12px; border-radius: 8px; color: var(--tl-blue); background: var(--tl-surface); }
.tl-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: center; min-height: 280px; overflow: hidden; padding: clamp(28px, 5vw, 58px); border: 1px solid rgba(37, 99, 235, .12); border-radius: 30px; background: linear-gradient(130deg, #14213d 0%, #214e84 52%, #3b82b8 100%); box-shadow: var(--tl-shadow); color: #f8fbff; }
.tl-hero::after { position: absolute; right: 35%; bottom: -110px; width: 360px; height: 230px; border-radius: 50%; background: rgba(255, 221, 87, .18); content: ""; transform: rotate(-14deg); }
.tl-hero-copy { position: relative; z-index: 1; max-width: 620px; }
.tl-kicker, .tl-overline { margin: 0 0 10px; color: var(--tl-orange); font-size: var(--a-fs-2xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tl-hero .tl-kicker { color: #ffdd57; }
.tl-hero h1 { margin: 0; color: #fff; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.05em; }
.tl-hero p:not(.tl-kicker) { max-width: 540px; margin: 18px 0 0; color: rgba(248, 251, 255, .82); font-size: clamp(1rem, 1.4vw, 1.14rem); }
.tl-hero-actions, .tl-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tl-hero-art { position: relative; z-index: 1; justify-self: end; width: min(100%, 360px); filter: drop-shadow(0 22px 18px rgba(5, 16, 36, .28)); }
.tl-hero-art img { display: block; width: 100%; height: auto; }

.tl-content { margin-top: 28px; }
.tl-screen { animation: tl-enter .22s ease both; }
@keyframes tl-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.tl-panel { border: 1px solid var(--tl-line); border-radius: 22px; background: var(--tl-surface); box-shadow: 0 12px 35px rgba(25, 48, 82, .06); }
.tl-welcome-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: end; padding: clamp(22px, 4vw, 40px); }
.tl-welcome-panel h2, .tl-section-heading h2, .tl-result-card h2 { margin: 0; color: var(--tl-ink); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
.tl-muted { color: var(--tl-muted); }
.tl-welcome-panel .tl-muted { max-width: 560px; margin: 12px 0 0; }
.tl-form-grid { display: grid; gap: 16px; }
.tl-field, .tl-fieldset { display: grid; gap: 7px; margin: 0; color: var(--tl-muted); font-size: var(--a-fs-sm); font-weight: 600; }
.tl-field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--tl-line); border-radius: 12px; color: var(--tl-ink); background: var(--tl-bg); }
.tl-fieldset { padding: 0; border: 0; }
.tl-fieldset legend { padding: 0; }
.tl-choice-row { display: flex; gap: 8px; }
.tl-choice, .tl-button, .tl-icon-button { cursor: pointer; }
.tl-choice { flex: 1; min-height: 42px; padding: 0 10px; border: 1px solid var(--tl-line); border-radius: 11px; color: var(--tl-muted); background: var(--tl-bg); font-size: var(--a-fs-xs); font-weight: 700; }
.tl-choice.is-selected, .tl-choice[aria-pressed="true"] { border-color: var(--tl-blue); color: var(--tl-blue); background: var(--tl-blue-soft); }
.tl-button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; color: var(--tl-ink); background: transparent; font-weight: 700; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.tl-button:hover { transform: translateY(-1px); }
.tl-button-primary { color: var(--a-on-primary) !important; background: var(--a-primary); box-shadow: 0 8px 20px rgba(50, 100, 234, .22); }
.tl-button-primary:hover { background: var(--a-primary-hover); }
.tl-button-quiet { border-color: var(--tl-line); background: var(--tl-surface); }
.tl-hero .tl-button-quiet { border-color: rgba(255, 255, 255, .3); color: #fff; background: rgba(255, 255, 255, .08); }
.tl-button-small { min-height: 36px; padding: 0 12px; border-color: var(--tl-line); color: var(--tl-muted); font-size: var(--a-fs-xs); }

.tl-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.tl-lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tl-lesson { position: relative; display: flex; flex-direction: column; min-height: 220px; padding: 20px; border: 1px solid var(--tl-line); border-radius: 19px; background: var(--tl-surface); box-shadow: 0 10px 30px rgba(25, 48, 82, .05); }
.tl-lesson.is-locked { opacity: .63; }
.tl-lesson.is-current { border-color: var(--tl-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), 0 10px 30px rgba(25, 48, 82, .05); }
.tl-lesson-badge { display: flex; align-items: center; justify-content: space-between; color: var(--tl-muted); font-size: var(--a-fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tl-lesson-number { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--tl-ink); background: var(--tl-yellow); font-size: 17px; }
.tl-lesson h3 { margin: 17px 0 7px; font-size: 1.13rem; letter-spacing: -.02em; }
.tl-lesson p { margin: 0; color: var(--tl-muted); font-size: var(--a-fs-sm); }
.tl-lesson-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; }
.tl-lesson-score { color: var(--tl-mint); font-size: var(--a-fs-xs); font-weight: 700; }
.tl-lesson .tl-button { min-height: 34px; padding: 0 11px; border-color: var(--tl-line); font-size: var(--a-fs-xs); }
.tl-lesson.is-locked .tl-button { cursor: not-allowed; }

.tl-practice-heading { align-items: center; }
.tl-practice-actions { display: flex; align-items: center; gap: 8px; }
.tl-icon-button { width: 42px; height: 42px; border: 1px solid var(--tl-line); border-radius: 12px; color: var(--tl-muted); background: var(--tl-surface); font-size: 20px; }
.tl-progress-line { display: flex; justify-content: space-between; margin: 0 2px 7px; color: var(--tl-muted); font-size: var(--a-fs-xs); font-weight: 600; }
.tl-progress-line strong { color: var(--tl-blue); }
.tl-progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--tl-line); }
.tl-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--tl-mint), var(--tl-blue)); transition: width .2s ease; }
.tl-practice-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .85fr); gap: 18px; margin-top: 18px; }
.tl-practice-panel, .tl-keyboard-panel { padding: clamp(20px, 3vw, 32px); }
.tl-target-wrap { min-height: 190px; }
.tl-phrase { min-height: 76px; margin-top: 20px; color: var(--tl-ink); font-size: clamp(1.35rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.45; letter-spacing: .015em; word-break: break-word; }
.tl-phrase span { display: inline-block; min-width: .42em; border-bottom: 3px solid transparent; }
.tl-phrase span.is-typed { color: var(--tl-mint); }
.tl-phrase span.is-wrong { color: var(--tl-red); border-bottom-color: var(--tl-red); }
.tl-phrase span.is-next { border-bottom-color: var(--tl-blue); }
.tl-hint { margin: 4px 0 0; color: var(--tl-muted); font-size: var(--a-fs-xs); }
.tl-input-label { display: block; margin-bottom: 7px; color: var(--tl-muted); font-size: var(--a-fs-xs); font-weight: 700; }
.tl-typing-input { width: 100%; height: 58px; padding: 0 15px; border: 2px solid var(--tl-line); border-radius: 14px; color: var(--tl-ink); background: var(--tl-bg); font-size: 1.2rem; }
.tl-typing-input:focus { border-color: var(--tl-blue); outline: none; }
.tl-stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--tl-line); }
.tl-stat-row div { display: grid; gap: 2px; }
.tl-stat-row span { color: var(--tl-muted); font-size: var(--a-fs-2xs); }
.tl-stat-row strong { font-size: 1.03rem; }
.tl-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--tl-muted); font-size: var(--a-fs-2xs); font-weight: 700; letter-spacing: .1em; }
.tl-panel-heading strong { color: var(--tl-blue); letter-spacing: 0; }
.tl-keyboard { display: grid; gap: 7px; margin-top: 27px; }
.tl-key-row { display: flex; justify-content: center; gap: 6px; }
.tl-key { display: grid; flex: 1; min-width: 0; max-width: 34px; height: 34px; place-items: center; border: 1px solid var(--tl-line); border-radius: 8px; color: var(--tl-muted); background: var(--tl-bg); font-size: 12px; font-weight: 700; transition: background .12s ease, color .12s ease, transform .12s ease; }
.tl-key.is-next { border-color: var(--tl-orange); color: var(--tl-ink); background: var(--tl-yellow); transform: translateY(-3px); box-shadow: 0 4px 0 rgba(20, 33, 61, .12); }
.tl-key.is-space { max-width: 150px; }
.tl-key.is-shift { max-width: 75px; }
.tl-content { scroll-margin-top: 100px; }
.tl-shell.is-practicing .tl-hero { display: none; }
.tl-shell:fullscreen { width: 100%; overflow-y: auto; margin: 0; padding: 24px; background: var(--tl-bg); }
.tl-shell:fullscreen .tl-content { max-width: none; }
.tl-keyboard-tip { margin-top: 22px; color: var(--tl-muted); font-size: var(--a-fs-2xs); text-align: center; }
.tl-key-dot { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; background: var(--tl-yellow); }
.tl-motion-panel { margin-top: 18px; padding: clamp(14px, 2vw, 22px); overflow: hidden; }
.tl-motion-panel .tl-panel-heading { margin: 0 4px 10px; }
#motionCanvas { display: block; width: 100%; height: auto; min-height: 150px; border-radius: 15px; background: #d4f1ff; box-shadow: inset 0 0 0 1px rgba(22, 48, 74, .08); }
#motionCanvas[data-motion-state="correct"] { animation: tl-motion-correct .24s ease-out; }
#motionCanvas[data-motion-state="wrong"] { animation: tl-motion-wrong .24s ease-out; }
#motionCanvas[data-motion-state="complete"] { animation: tl-motion-complete .42s ease-out; }
@keyframes tl-motion-correct { 50% { filter: saturate(1.35) brightness(1.06); transform: translateY(-2px); } }
@keyframes tl-motion-wrong { 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
@keyframes tl-motion-complete { 50% { box-shadow: 0 0 0 5px rgba(54, 200, 162, .25); } }

.tl-result-card { max-width: 680px; margin: 18px auto 0; padding: clamp(26px, 5vw, 54px); text-align: center; }
.tl-result-art { display: grid; width: 78px; height: 78px; margin: 0 auto 22px; place-items: center; border-radius: 26px; color: #fff; background: var(--tl-mint); box-shadow: 0 12px 26px rgba(34, 184, 167, .24); font-size: 40px; font-weight: 700; }
.tl-result-card .tl-overline { color: var(--tl-mint); }
.tl-result-card h2 { font-size: clamp(1.15rem, 4.4vw, 2.1rem); white-space: nowrap; }
.tl-result-card .tl-muted { margin: 12px auto 0; }
.tl-result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.tl-result-stats div { display: grid; gap: 2px; padding: 15px 8px; border-radius: 14px; background: var(--tl-bg); }
.tl-result-stats strong { color: var(--tl-blue); font-size: 1.5rem; }
.tl-result-stats span { color: var(--tl-muted); font-size: var(--a-fs-2xs); }
.tl-result-actions { justify-content: center; }

@media (max-width: 860px) { .tl-hero { grid-template-columns: minmax(0, 1fr) 260px; padding: 32px; } .tl-lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tl-practice-layout { grid-template-columns: 1fr; } .tl-keyboard-panel { order: -1; } .tl-keyboard { margin-top: 18px; } }
@media (max-width: 620px) { .tl-shell { width: min(100% - 20px, 1180px); padding-top: 12px; } .tl-hero { display: block; min-height: 0; padding: 27px 22px 18px; border-radius: 22px; } .tl-hero-art { width: min(74vw, 300px); margin: 20px auto -16px; } .tl-hero h1 { font-size: 2.55rem; } .tl-welcome-panel { grid-template-columns: 1fr; align-items: stretch; gap: 22px; padding: 22px; } .tl-section-heading { align-items: flex-start; flex-direction: column; } .tl-section-heading .tl-button { align-self: stretch; } .tl-lesson-grid { grid-template-columns: 1fr; } .tl-lesson { min-height: 190px; } .tl-practice-panel, .tl-keyboard-panel { padding: 18px; border-radius: 17px; } .tl-practice-heading { flex-direction: row; align-items: center; } .tl-practice-heading .tl-button { align-self: auto; } .tl-practice-actions .tl-button { display: none; } .tl-target-wrap { min-height: 155px; } .tl-phrase { margin-top: 15px; font-size: 1.4rem; } .tl-stat-row { grid-template-columns: repeat(2, 1fr); } .tl-stat-row .tl-button { grid-column: 1 / -1; } .tl-result-stats { gap: 6px; } }
@media (max-width: 620px) { .tl-practice-actions .tl-button { display: inline-block; min-height: 36px; padding: 0 10px; font-size: var(--a-fs-xs); } }
@media (max-width: 380px) { .tl-key { max-width: 27px; height: 31px; font-size: var(--a-fs-2xs); } .tl-key-row { gap: 3px; } .tl-key.is-space { max-width: 115px; } .tl-choice-row { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { .tl-screen { animation: none; } .tl-button, .tl-progress span, .tl-key { transition: none; } #motionCanvas { animation: none !important; } }

.tl-lesson-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.tl-world { padding: 20px; border: 1px solid var(--tl-line); border-radius: 22px; background: var(--tl-surface); box-shadow: 0 10px 30px rgba(25, 48, 82, .05); }
.tl-world-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tl-world-head h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.tl-world-head p { margin: 2px 0 0; color: var(--tl-muted); font-size: var(--a-fs-sm); }
.tl-world-head strong { margin-left: auto; color: var(--tl-mint); font-size: var(--a-fs-sm); white-space: nowrap; }
.tl-world-index { display: grid; flex: none; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #fff; background: var(--tl-blue); font-size: 18px; font-weight: 800; }
.tl-world-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tl-lesson { display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 0; padding: 12px 14px; border-radius: 16px; color: var(--tl-ink); text-align: left; font: inherit; cursor: pointer; box-shadow: none; transition: transform .14s ease, border-color .14s ease; }
.tl-lesson:not(:disabled):hover { transform: translateY(-2px); border-color: var(--tl-blue); }
.tl-lesson:focus-visible { outline: 3px solid var(--tl-blue); outline-offset: 2px; }
.tl-lesson.is-locked { cursor: not-allowed; }
.tl-lesson.is-done { background: color-mix(in srgb, var(--tl-mint) 9%, var(--tl-surface)); }
.tl-lesson-number { flex: none; width: 36px; height: 36px; font-size: 14px; font-weight: 800; }
.tl-lesson.is-locked .tl-lesson-number { background: var(--tl-line); }
.tl-lesson-body { display: grid; flex: 1; min-width: 0; }
.tl-lesson-body strong { font-size: var(--a-fs-md); }
.tl-lesson-body small { overflow: hidden; color: var(--tl-muted); font-size: var(--a-fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.tl-lesson-stars { flex: none; color: #f5a400; font-size: var(--a-fs-sm); font-weight: 700; letter-spacing: 1px; }
.tl-lesson.is-current .tl-lesson-stars { color: var(--tl-blue); letter-spacing: 0; }

.tl-lesson-intro { margin: 0 0 4px; color: var(--tl-ink); font-size: var(--a-fs-md); font-weight: 600; }
.tl-phrase .tl-word { display: inline-block; min-width: 0; border-bottom: 0; white-space: nowrap; }
.tl-phrase .tl-word span { min-width: 0; }
.tl-phrase span.tl-space { min-width: .55em; color: var(--tl-line); text-align: center; }
.tl-phrase span.tl-space.is-typed { color: var(--tl-mint); }
.tl-phrase span.is-partial { color: var(--tl-orange); border-bottom-color: var(--tl-orange); }
.tl-telex { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 10px 0 0; color: var(--tl-muted); font-size: var(--a-fs-sm); font-weight: 600; }
.tl-telex[hidden] { display: none; }
.tl-telex span { margin-right: 4px; }
.tl-telex kbd { display: inline-grid; min-width: 26px; height: 28px; place-items: center; padding: 0 6px; border: 1px solid var(--tl-line); border-bottom-width: 3px; border-radius: 7px; color: var(--tl-ink); background: var(--tl-bg); font: 700 14px var(--tl-font); }
.tl-result-stars { margin: 6px 0 0; color: #f5a400; font-size: 2.4rem; letter-spacing: 6px; line-height: 1.1; }
@media (max-width: 620px) { .tl-world { padding: 14px; } .tl-world-head p { display: none; } .tl-world-lessons { grid-template-columns: 1fr; } .tl-lesson { min-height: 0; } }

.tl-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-lesson.is-game { border-style: dashed; border-color: var(--tl-orange); }
.tl-lesson.is-game .tl-lesson-number { background: color-mix(in srgb, var(--tl-orange) 22%, var(--tl-surface)); }
.tl-game-panel { margin-bottom: 16px; padding: 16px; }
.tl-game-panel canvas { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 16px; background: #d4f1ff; }
.typingland-page .is-game .tl-keyboard-panel .tl-keyboard-tip { display: none; }
.tl-board { padding: 18px; }
.tl-board-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tl-board-tabs button { min-height: 38px; padding: 0 14px; border: 1px solid var(--tl-line); border-radius: 11px; color: var(--tl-muted); background: var(--tl-bg); font: 700 var(--a-fs-sm) var(--tl-font); cursor: pointer; }
.tl-board-tabs button[aria-selected="true"] { border-color: var(--tl-blue); color: var(--tl-blue); background: var(--tl-blue-soft); }
.tl-board-scroll { overflow-x: auto; }
.tl-board-table { width: 100%; border-collapse: collapse; font-size: var(--a-fs-md); }
.tl-board-table th { padding: 9px 10px; border-bottom: 2px solid var(--tl-line); color: var(--tl-muted); font-size: var(--a-fs-xs); text-align: left; white-space: nowrap; }
.tl-board-table td { padding: 10px; border-bottom: 1px solid var(--tl-line); white-space: nowrap; }
.tl-board-table tr.is-me td { background: var(--tl-blue-soft); font-weight: 700; }
.tl-board-table td:nth-child(3) { color: #e09400; font-weight: 700; }
@media (max-width: 620px) { .tl-game-panel { padding: 10px; } .tl-heading-actions { width: 100%; } .tl-heading-actions .tl-button { flex: 1; } }
.tl-motion-tools { display: inline-flex; align-items: center; gap: 10px; }
.tl-motion-tools .tl-button-small { min-height: 30px; padding: 0 10px; font-size: var(--a-fs-2xs); letter-spacing: 0; }

.tl-practice-layout { grid-template-columns: 1fr; }
.tl-keyboard-panel { order: 0; }
.tl-keyboard { display: block; margin-top: 12px; }
.tl-kb { display: block; width: 100%; max-width: 980px; height: auto; margin: 0 auto; font-family: var(--tl-font); }
.tl-kb-base { fill: #2f9fdc; }
.tl-kb-key rect { fill: color-mix(in srgb, var(--finger, #ffffff) 16%, #ffffff); stroke: rgba(20, 33, 61, .08); stroke-width: 1.5; transition: fill .12s ease, transform .12s ease; }
.tl-kb-key text { fill: #9aa7b8; font-size: 26px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.tl-kb-key text.is-small { font-size: 15px; font-weight: 700; }
.tl-kb-bump { fill: #9aa7b8; }
.tl-kb-key.is-next rect { fill: var(--finger, #ffdd57); stroke: #fff; stroke-width: 4; }
.tl-kb-key.is-next text { fill: #14213d; }
.tl-kb-key.is-next .tl-kb-bump { fill: #14213d; }
.tl-key-dot { background: #fb923c; }
#motionCanvas { min-height: 220px; }
@media (max-width: 620px) { .tl-kb-key text { font-size: 22px; } }
.tl-kb { overflow: hidden; }

.tl-kb-finger { opacity: 0; transition: opacity .15s ease; transform-box: fill-box; transform-origin: center; }
.tl-kb-finger.is-next { opacity: 1; animation: tl-finger-pulse 1.1s ease-in-out infinite; }
.tl-kb-halo { fill: var(--finger); opacity: .35; }
.tl-kb-dot { fill: var(--finger); stroke: #fff; stroke-width: 4; }
.tl-kb-tick { stroke: var(--finger); stroke-width: 5; stroke-linecap: round; }
.tl-kb-label rect { fill: var(--finger); }
.tl-kb-label text { fill: #fff; font-size: 17px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
@keyframes tl-finger-pulse { 50% { transform: scale(1.08); } }
.tl-kb-finger.is-press { opacity: 1; animation: tl-finger-tap .22s ease-out; }
@keyframes tl-finger-tap { 40% { transform: scale(1.25); } }
.is-motion-off .tl-kb-finger.is-next { animation: none; }

.tl-kb-key { transform-box: fill-box; transform-origin: center; }
.tl-kb-key.is-press { animation: tl-key-press .18s ease-out; }
@keyframes tl-key-press { 40% { transform: translateY(4px) scale(.96); } }
.is-motion-off .tl-kb-key.is-press, .is-motion-off .tl-kb-finger.is-press { animation: none; }

.tl-practice-layout { margin-top: 12px; }
.tl-practice-panel { padding: 14px 18px; }
.tl-practice-panel .tl-target-wrap { min-height: 0; }
.tl-practice-panel .tl-phrase { min-height: 0; margin-top: 4px; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.tl-practice-panel .tl-typing-input { height: 48px; }
.tl-practice-panel .tl-stat-row { margin-top: 10px; padding-top: 10px; }
.tl-practice-panel #phraseHint, .tl-practice-panel .tl-input-label { display: none; }
.tl-kb-key.is-wrong rect { fill: #ff6b6b; stroke: #fff; stroke-width: 4; }
.tl-kb-key.is-wrong text { fill: #fff; }
.tl-phrase.is-shake { animation: tl-shake .3s ease; }
@keyframes tl-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.is-motion-off .tl-phrase.is-shake { animation: none; }
#inputNotice:not(:empty) { color: #ff8a80; font-weight: 700; }
.tl-practice-panel .tl-lesson-intro { margin: 2px 0 0; font-size: var(--a-fs-sm); }
.tl-practice-panel .tl-overline { margin-bottom: 0; }
@media (min-width: 1001px) {
  .tl-practice-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
  .tl-practice-panel .tl-target-wrap { grid-column: 1 / -1; }
  .tl-practice-panel .tl-stat-row { grid-template-columns: repeat(2, auto) auto; gap: 16px; margin: 0; padding: 0; border: 0; }
}

.tl-shell:fullscreen { display: flex; flex-direction: column; width: 100vw; height: 100vh; max-width: none; margin: 0; padding: 12px 18px; overflow: hidden; box-sizing: border-box; }
.tl-shell:fullscreen .tl-skip-row { display: none; }
.tl-shell:fullscreen #tl-content { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 0; }
.tl-shell:fullscreen [data-screen="practice"]:not([hidden]) { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tl-shell:fullscreen .tl-practice-layout { margin-top: 10px; }
.tl-scene-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--tl-muted); font-size: var(--a-fs-2xs); font-weight: 700; letter-spacing: 0; }
.tl-scene-pick select { min-height: 30px; padding: 0 8px; border: 1px solid var(--tl-line); border-radius: 10px; color: var(--tl-ink); background: var(--tl-bg); font: 700 var(--a-fs-xs) var(--tl-font); }

.tl-map { display: grid; gap: 26px; }
.tl-region { overflow: hidden; border: 1px solid var(--tl-line); border-radius: 26px; background: var(--tl-surface); box-shadow: 0 14px 34px rgba(25, 48, 82, .08); }
.tl-region-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.tl-region-head h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; }
.tl-region-head p { margin: 2px 0 0; color: var(--tl-muted); font-size: var(--a-fs-sm); }
.tl-region-badge { display: grid; flex: none; width: 46px; height: 46px; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #60a5fa, #2563eb); font-size: 20px; font-weight: 800; box-shadow: 0 6px 14px rgba(37, 99, 235, .3); }
.tl-region-score { display: grid; margin-left: auto; justify-items: end; line-height: 1.1; }
.tl-region-score strong { color: #f5a400; font-size: 1.5rem; }
.tl-region-score span { color: #f5a400; font-size: var(--a-fs-xs); font-weight: 700; }
.tl-region-score small { color: var(--tl-muted); font-size: var(--a-fs-2xs); }
.tl-region-map { position: relative; aspect-ratio: 1000 / 360; min-height: 260px; }
.tl-region-bg, .tl-region-road { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl-road-base { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 26px; stroke-linecap: round; }
.tl-road-dash { fill: none; stroke: rgba(22, 48, 74, .22); stroke-width: 4px; stroke-dasharray: 2 14; stroke-linecap: round; }
.tl-road-done { fill: none; stroke: #ffd166; stroke-width: 10px; stroke-linecap: round; opacity: .9; }
.tl-region[data-theme="dig"] .tl-road-base, .tl-region[data-theme="puzzle"] .tl-road-base { stroke: rgba(255, 255, 255, .35); }
.tl-region-nodes { position: absolute; inset: 0; }
.tl-node { position: absolute; display: grid; justify-items: center; gap: 2px; transform: translate(-50%, -50%); }
.tl-node-button { display: grid; width: 62px; height: 62px; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #14213d; background: #ffffff; font: 800 20px var(--tl-font); cursor: pointer; box-shadow: 0 6px 0 rgba(20, 33, 61, .18), 0 10px 18px rgba(20, 33, 61, .18); transition: transform .15s ease; }
.tl-node-button:not(:disabled):hover { transform: translateY(-3px) scale(1.06); }
.tl-node-button:focus-visible { outline: 4px solid #2563eb; outline-offset: 3px; }
.tl-node.is-done .tl-node-button { color: #fff; background: linear-gradient(135deg, #34d399, #10b981); }
.tl-node.is-current .tl-node-button { background: linear-gradient(135deg, #ffe08a, #ffc23d); box-shadow: 0 0 0 6px rgba(255, 209, 102, .45), 0 6px 0 rgba(20, 33, 61, .18); }
.tl-node.is-open .tl-node-button { background: #fff7d6; }
.tl-node.is-locked .tl-node-button { color: #64748b; background: #e2e8f0; cursor: not-allowed; font-size: 18px; box-shadow: 0 4px 0 rgba(20, 33, 61, .12); }
.tl-node.is-game .tl-node-button { width: 80px; height: 80px; border-radius: 26px; font-size: 34px; background: linear-gradient(135deg, #c4b5fd, #8b5cf6); }
.tl-node.is-game.is-done .tl-node-button { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.tl-node.is-game.is-locked .tl-node-button { background: #e2e8f0; filter: grayscale(.6); }
.tl-node-stars { display: flex; padding: 1px 6px; border-radius: 999px; background: rgba(20, 33, 61, .55); font-size: var(--a-fs-sm); line-height: 1.2; }
.tl-node-stars i { color: rgba(255, 255, 255, .35); font-style: normal; }
.tl-node-stars i.on { color: #ffd166; }
.tl-node-label { max-width: 130px; overflow: hidden; padding: 2px 8px; border-radius: 8px; color: #14213d; background: rgba(255, 255, 255, .88); font-size: var(--a-fs-2xs); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.tl-node:hover .tl-node-label, .tl-node.is-current .tl-node-label, .tl-node-button:focus-visible ~ .tl-node-label { opacity: 1; }
.tl-node-gau { position: absolute; bottom: calc(100% - 10px); left: 50%; width: 64px; height: auto; transform: translateX(-50%); filter: var(--gau-filter, brightness(1)) drop-shadow(0 6px 6px rgba(20, 33, 61, .3)); pointer-events: none; animation: tl-gau-hop 1.1s ease-in-out infinite; }
.tl-node.is-current .tl-node-button { animation: tl-node-glow 1.6s ease-in-out infinite; }
@keyframes tl-gau-hop { 0%, 100% { transform: translate(-50%, 0) scale(1, 1); } 15% { transform: translate(-50%, 0) scale(1.08, .9); } 45% { transform: translate(-50%, -18px) scale(.95, 1.06); } 70% { transform: translate(-50%, 0) scale(1.06, .94); } }
@keyframes tl-node-glow { 50% { box-shadow: 0 0 0 14px rgba(255, 209, 102, .15), 0 6px 0 rgba(20, 33, 61, .18); } }
.tl-a-drift { animation: tl-drift var(--d, 16s) linear infinite alternate; }
.tl-a-drift-slow { animation: tl-drift calc(var(--d, 16s) * 1.6) linear infinite alternate; }
.tl-a-bob { animation: tl-bob var(--d, 3s) ease-in-out infinite; }
.tl-a-sway { animation: tl-sway var(--d, 3s) ease-in-out infinite; }
.tl-a-twinkle { animation: tl-twinkle var(--d, 2.4s) ease-in-out infinite; }
.tl-a-pulse { animation: tl-twinkle 4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.tl-a-swim { animation: tl-swim var(--d, 9s) ease-in-out infinite alternate; }
.tl-a-wave { animation: tl-wave var(--d, 3s) ease-in-out infinite alternate; }
.tl-a-flutter { animation: tl-flutter var(--d, 7s) ease-in-out infinite alternate; }
.tl-a-wing { animation: tl-wing .35s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.tl-a-chug { animation: tl-chug 14s linear infinite; }
.tl-a-smoke { animation: tl-smoke 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.tl-a-boat { animation: tl-bob 2.6s ease-in-out infinite; }
@keyframes tl-drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(12px, 0); } }
@keyframes tl-bob { 50% { transform: translateY(-10px); } }
@keyframes tl-sway { 50% { transform: rotate(6deg); } }
@keyframes tl-twinkle { 50% { opacity: .35; transform: scale(.7); } }
@keyframes tl-swim { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes tl-wave { from { transform: translateX(-12px); } to { transform: translateX(12px); } }
@keyframes tl-flutter { 0% { transform: translate(0, 0); } 50% { transform: translate(60px, -20px); } 100% { transform: translate(120px, 10px); } }
@keyframes tl-wing { to { transform: scaleX(.3); } }
@keyframes tl-chug { from { transform: translateX(-140px); } to { transform: translateX(1000px); } }
@keyframes tl-smoke { from { opacity: .8; transform: translateY(0) scale(.6); } to { opacity: 0; transform: translateY(-30px) scale(1.6); } }
.is-motion-off .tl-region *, .is-motion-off .tl-node-gau, .is-motion-off .tl-node-button, .is-motion-off .tl-podium * { animation: none !important; transition: none !important; }
@media (max-width: 760px) {
  .tl-region-map { aspect-ratio: auto; height: 340px; }
  .tl-node-button { width: 48px; height: 48px; font-size: 16px; border-width: 3px; }
  .tl-node.is-game .tl-node-button { width: 60px; height: 60px; font-size: 26px; }
  .tl-node-gau { width: 46px; }
  .tl-region-head p { display: none; }
}

.tl-podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 10px 0 22px; }
.tl-podium-col { display: grid; justify-items: center; gap: 6px; width: min(180px, 30%); animation: tl-rise .6s ease-out both; }
.tl-podium-col.is-1 { animation-delay: .1s; }
.tl-podium-col.is-3 { animation-delay: .2s; }
.tl-podium-medal { font-size: 34px; animation: tl-bob 2.4s ease-in-out infinite; }
.tl-podium-name { max-width: 100%; overflow: hidden; font-size: var(--a-fs-md); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.tl-podium-stars { color: #f5a400; font-size: var(--a-fs-lg); font-weight: 800; }
.tl-podium-block { display: grid; width: 100%; place-items: center; border-radius: 16px 16px 6px 6px; color: #fff; font-size: 34px; font-weight: 800; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .12); }
.tl-podium-col.is-1 .tl-podium-block { height: 130px; background: linear-gradient(#fcd34d, #f59e0b); }
.tl-podium-col.is-2 .tl-podium-block { height: 96px; background: linear-gradient(#e2e8f0, #94a3b8); }
.tl-podium-col.is-3 .tl-podium-block { height: 72px; background: linear-gradient(#fdba74, #c2410c); }
.tl-podium-col .tl-avatar { width: 64px; height: 64px; font-size: 26px; }
.tl-podium-col.is-1 .tl-avatar { width: 78px; height: 78px; box-shadow: 0 0 0 4px #fcd34d; }
.tl-podium-col.is-me .tl-podium-name { color: var(--tl-blue); }
@keyframes tl-rise { from { opacity: 0; transform: translateY(30px); } }
.tl-avatar { position: relative; display: grid; flex: none; width: 38px; height: 38px; overflow: hidden; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #60a5fa, #8b5cf6); font-weight: 800; }
.tl-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tl-rank-list { display: grid; gap: 8px; }
.tl-rank-row { display: grid; grid-template-columns: 34px 38px minmax(90px, 1.2fr) minmax(80px, 2fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--tl-line); border-radius: 14px; background: var(--tl-bg); }
.tl-rank-row.is-class { grid-template-columns: 38px minmax(90px, 1.2fr) minmax(80px, 2fr) auto auto; }
.tl-rank-row.is-me { border-color: var(--tl-blue); background: var(--tl-blue-soft); }
.tl-rank-pos { color: var(--tl-muted); font-weight: 800; text-align: center; }
.tl-rank-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tl-rank-bar { height: 14px; overflow: hidden; border-radius: 999px; background: var(--tl-line); }
.tl-rank-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd166, #f59e0b); transition: width .6s ease; }
.tl-rank-value { color: #e09400; font-weight: 800; white-space: nowrap; }
.tl-rank-meta { color: var(--tl-muted); font-size: var(--a-fs-xs); white-space: nowrap; }
@media (max-width: 620px) {
  .tl-rank-row { grid-template-columns: 28px 34px 1fr auto; }
  .tl-rank-row.is-class { grid-template-columns: 34px 1fr auto; }
  .tl-rank-bar, .tl-rank-meta { display: none; }
}
.tl-ime-badge { display: inline-flex; margin: 8px 0 0; padding: 4px 10px; border-radius: 999px; color: var(--tl-muted); background: var(--tl-bg); font-size: var(--a-fs-xs); font-weight: 700; }
.tl-ime-badge.is-warn { color: #b45309; background: #fef3c7; }
@media (min-width: 1001px) { .tl-practice-panel .tl-ime-badge { grid-column: 1 / -1; justify-self: start; } }

.tl-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
.tl-bigmap { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--tl-line); border-radius: 28px; box-shadow: 0 16px 40px rgba(25, 48, 82, .12); }
.tl-bigmap-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl-bigmap-nodes { position: absolute; inset: 0; }
.tl-bigmap .tl-road-base { stroke-width: 30px; vector-effect: none; }
.tl-bigmap .tl-road-dash { stroke-width: 4px; vector-effect: none; }
.tl-bigmap .tl-road-done { stroke-width: 12px; vector-effect: none; }
.tl-bigmap .tl-node-button { width: clamp(40px, 5.4vw, 64px); height: clamp(40px, 5.4vw, 64px); font-size: clamp(14px, 1.7vw, 20px); }
.tl-bigmap .tl-node.is-game .tl-node-button { width: clamp(52px, 7vw, 84px); height: clamp(52px, 7vw, 84px); font-size: clamp(22px, 3vw, 36px); }
.tl-bigmap .tl-node-gau { width: clamp(42px, 5.6vw, 66px); }
.tl-band-sign { position: absolute; display: flex; align-items: center; gap: 10px; max-width: 46%; padding: 8px 14px 8px 8px; border: 3px solid #fff; border-radius: 18px; background: rgba(255, 255, 255, .92); box-shadow: 0 8px 18px rgba(20, 33, 61, .18); transform: translate(-50%, -50%); scroll-margin-top: 90px; }
.tl-band-sign strong { display: block; overflow: hidden; color: #14213d; font-size: clamp(12px, 1.4vw, 16px); text-overflow: ellipsis; white-space: nowrap; }
.tl-band-sign small { color: #b7791f; font-size: var(--a-fs-xs); font-weight: 800; }
.tl-band-num { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #60a5fa, #2563eb); font-weight: 800; }
.tl-minimap { position: sticky; top: 84px; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--tl-line); border-radius: 20px; background: var(--tl-surface); box-shadow: 0 10px 26px rgba(25, 48, 82, .08); }
.tl-minimap-title { margin: 0 4px 4px; color: var(--tl-muted); font-size: var(--a-fs-2xs); font-weight: 800; letter-spacing: .12em; }
.tl-minimap-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 12px; color: var(--tl-ink); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.tl-minimap-item:hover, .tl-minimap-item:focus-visible { border-color: var(--tl-line); background: var(--tl-bg); outline: none; }
.tl-minimap-item.is-current { border-color: #ffc23d; background: color-mix(in srgb, #ffd166 18%, var(--tl-surface)); }
.tl-minimap-swatch { display: grid; flex: none; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: #fff; background: var(--zone, #60a5fa); font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.tl-minimap-item.is-done .tl-minimap-swatch::after { content: '✓'; position: absolute; }
.tl-minimap-text { display: grid; min-width: 0; }
.tl-minimap-text strong { overflow: hidden; font-size: var(--a-fs-xs); text-overflow: ellipsis; white-space: nowrap; }
.tl-minimap-text small { color: #e09400; font-size: var(--a-fs-2xs); font-weight: 800; }
.tl-minimap-item img { margin-left: auto; animation: tl-bob 1.4s ease-in-out infinite; }
.is-motion-off .tl-bigmap *, .is-motion-off .tl-minimap * { animation: none !important; transition: none !important; }
@media (max-width: 900px) {
  .tl-map-layout { grid-template-columns: 1fr; }
  .tl-minimap { position: static; order: -1; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .tl-minimap-title { display: none; }
  .tl-band-sign { padding: 4px 8px 4px 4px; gap: 6px; }
  .tl-band-num { width: 26px; height: 26px; font-size: var(--a-fs-sm); }
  .tl-band-sign small { display: none; }
}
.tl-layout-pick { display: inline-flex; gap: 4px; }
.tl-layout-pick .tl-choice { flex: none; min-height: 26px; padding: 0 10px; font-size: var(--a-fs-2xs); }
.tl-dialog { width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 820px); padding: 18px 20px 22px; border: 0; border-radius: 26px; color: var(--tl-ink); background: var(--tl-surface); box-shadow: 0 30px 80px rgba(10, 20, 40, .45); overflow-y: auto; }
.tl-dialog::backdrop { background: rgba(10, 18, 34, .55); backdrop-filter: blur(3px); }
.tl-dialog[open] { animation: tl-pop .22s ease-out; }
@keyframes tl-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.tl-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tl-dialog-head h2 { margin: 0; font-size: 1.35rem; }
.tl-dialog .tl-podium { margin: 6px 0 16px; }
.tl-dialog .tl-podium-col.is-1 .tl-podium-block { height: 96px; }
.tl-dialog .tl-podium-col.is-2 .tl-podium-block { height: 70px; }
.tl-dialog .tl-podium-col.is-3 .tl-podium-block { height: 52px; }
.tl-dialog .tl-rank-row { grid-template-columns: 30px 34px minmax(80px, 1fr) minmax(70px, 1.3fr) auto; }
.tl-dialog .tl-rank-meta { display: none; }
.is-motion-off .tl-dialog[open] { animation: none; }

.tl-world { position: relative; width: 100%; max-height: calc(100vh - 170px); aspect-ratio: 1600 / 900; margin: 0 auto; overflow: hidden; border: 1px solid var(--tl-line); border-radius: 28px; box-shadow: 0 16px 40px rgba(25, 48, 82, .14); }
.tl-world-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl-world .tl-road-base { stroke-width: 30px; }
.tl-world .tl-road-dash { stroke-width: 4px; }
.tl-world .tl-road-done { stroke-width: 12px; }
.tl-landmark.is-locked { filter: grayscale(.85) opacity(.65); }
.tl-world-layer { position: absolute; inset: 0; }
.tl-zone-card { position: absolute; display: flex; align-items: center; gap: 8px; max-width: 21%; padding: 5px 12px 5px 5px; border: 3px solid #fff; border-radius: 16px; color: #14213d; background: rgba(255, 255, 255, .94); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 6px 0 rgba(20, 33, 61, .16), 0 10px 20px rgba(20, 33, 61, .18); transform: translate(-50%, -50%); transition: transform .15s ease; }
.tl-zone-card:not(:disabled):hover, .tl-zone-card:focus-visible { transform: translate(-50%, -54%) scale(1.06); outline: none; box-shadow: 0 0 0 4px #2563eb, 0 10px 20px rgba(20, 33, 61, .2); }
.tl-zone-card.is-current { border-color: #ffc23d; animation: tl-node-glow 1.6s ease-in-out infinite; }
.tl-zone-card.is-done .tl-zone-num { background: linear-gradient(135deg, #34d399, #10b981); }
.tl-zone-card.is-locked { color: #64748b; background: rgba(226, 232, 240, .92); cursor: not-allowed; }
.tl-zone-num { display: grid; flex: none; width: clamp(24px, 2.6vw, 34px); height: clamp(24px, 2.6vw, 34px); place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #60a5fa, #2563eb); font-size: clamp(11px, 1.2vw, 15px); font-weight: 800; }
.tl-zone-card.is-locked .tl-zone-num { background: #cbd5e1; }
.tl-zone-text { display: grid; min-width: 0; }
.tl-zone-text strong { overflow: hidden; font-size: clamp(10px, 1.05vw, 14px); text-overflow: ellipsis; white-space: nowrap; }
.tl-zone-text small { color: #b7791f; font-size: clamp(9px, .9vw, 12px); font-weight: 800; }
.tl-world-gau { position: absolute; width: clamp(40px, 4.6vw, 72px); height: auto; transform: translate(-50%, -100%); filter: var(--gau-filter, brightness(1)) drop-shadow(0 6px 6px rgba(20, 33, 61, .35)); pointer-events: none; animation: tl-world-hop 1.2s ease-in-out infinite; }
@keyframes tl-world-hop { 0%, 100% { transform: translate(-50%, -100%) scale(1, 1); } 45% { transform: translate(-50%, -125%) scale(.95, 1.06); } 70% { transform: translate(-50%, -100%) scale(1.06, .94); } }
.tl-region-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.tl-region-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tl-region-title h3 { margin: 0; font-size: 1.2rem; }
.tl-region-title p { margin: 2px 0 0; color: var(--tl-muted); font-size: var(--a-fs-sm); }
.tl-region-nav .tl-region-score { margin-left: auto; }
.tl-map > .tl-region .tl-region-map { aspect-ratio: 1000 / 400; max-height: calc(100vh - 230px); }
.is-motion-off .tl-world *, .is-motion-off .tl-world-gau, .is-motion-off .tl-zone-card { animation: none !important; transition: none !important; }
@media (max-width: 760px) {
  .tl-world { aspect-ratio: auto; height: 70vh; max-height: none; }
  .tl-world-svg { width: auto; min-width: 100%; }
  .tl-zone-card { max-width: 34%; padding: 3px 8px 3px 3px; }
  .tl-zone-text small { display: none; }
  .tl-zone-text strong { display: -webkit-box; overflow: hidden; line-height: 1.2; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .tl-region-nav { grid-template-columns: 1fr auto auto; }
  .tl-region-title { grid-column: 1 / -1; order: -1; }
  .tl-region-title p { display: none; }
}
.tl-map-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tl-world .tl-map-fx { z-index: 1; } .tl-world-layer { z-index: 2; }
.tl-region-map .tl-map-fx { z-index: 1; } .tl-region-nodes { z-index: 2; }

.tl-practice-panel { position: relative; }
.tl-practice-panel .tl-typing-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; font-size: 16px; pointer-events: none; }
.tl-practice-layout { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.tl-shell.is-practicing { width: min(1680px, calc(100% - 32px)); padding-top: 12px; padding-bottom: 12px; }
.tl-stage { display: grid; grid-template-columns: minmax(0, 1fr) 224px; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "scene side" "kb side"; gap: 12px; height: max(560px, calc(100vh - 110px)); }
.tl-shell.is-fit .tl-stage { height: var(--tl-stage-h); }
.tl-stage > .tl-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 0; padding: 8px; border-radius: 18px; }
.tl-stage .tl-game-panel, .tl-stage .tl-motion-panel { grid-area: scene; }
.tl-stage #motionCanvas, .tl-stage #gameCanvas { flex: 1 1 0; width: 100%; height: 0; min-height: 0; max-height: none; margin: 0; aspect-ratio: auto; }
.tl-stage #motionCanvas { object-fit: fill; }
.tl-stage #gameCanvas { object-fit: contain; }
.tl-stage .tl-keyboard-panel { grid-area: kb; padding: 6px 8px 4px; }
.tl-stage .tl-keyboard { position: relative; height: clamp(180px, 33vh, 360px); margin: 0; }
.tl-stage .tl-kb { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.tl-stage #fingerHint { min-height: 1.5em; margin: 2px 0 0; color: var(--tl-ink); font-size: var(--a-fs-xs); font-weight: 700; text-align: center; }

.tl-side { grid-area: side; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow-y: auto; padding: 14px; border: 1px solid var(--tl-line); border-radius: 18px; background: var(--tl-surface); }
.tl-side .tl-overline { margin: 0 0 3px; letter-spacing: .08em; }
.tl-side h2 { margin: 0; color: var(--tl-ink); font-size: 1.12rem; line-height: 1.25; letter-spacing: -.02em; }
.tl-side-scene { margin: 4px 0 0; color: var(--tl-muted); font-size: var(--a-fs-2xs); font-weight: 700; }
.tl-shell.is-game #motionTitle, .tl-shell:not(.is-game) #gameTitle { display: none; }
.tl-side-progress { display: grid; gap: 5px; color: var(--tl-muted); font-size: var(--a-fs-xs); font-weight: 700; }
.tl-side-progress .tl-progress { height: 7px; }
.tl-side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tl-side-stats div { display: grid; padding: 8px 10px; border-radius: 12px; background: var(--tl-bg); line-height: 1.15; }
.tl-side-stats strong { color: var(--tl-ink); font-size: 1.3rem; }
.tl-side-stats span { color: var(--tl-muted); font-size: var(--a-fs-2xs); font-weight: 700; }
.tl-side-actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.tl-side-actions .tl-button { min-height: 36px; padding: 0 10px; font-size: var(--a-fs-xs); }
.tl-side-actions .tl-icon-button { width: 36px; height: 36px; font-size: 17px; }
.tl-side-actions [data-action="lessons"] { grid-column: 1 / -1; }
.tl-side-actions:has(.tl-ime:not([hidden])) { grid-template-columns: 1fr auto auto; }
.tl-ime, .tl-side-actions .tl-ime { font-size: 15px; font-weight: 800; line-height: 1; color: #fff; background: #2563eb; border-color: #2563eb; }
.tl-ime.is-vi, .tl-side-actions .tl-ime.is-vi { background: #dc2626; border-color: #dc2626; }
.tl-ime-notice { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: var(--a-fs-xs); font-weight: 600; }
.tl-ime-notice[hidden] { display: none; }
:root[data-theme="dark"] .tl-ime-notice { background: #3b2a0a; color: #fcd34d; }
.tl-ime.is-ime-alert { animation: tl-ime-alert 1s ease-in-out infinite; }
@keyframes tl-ime-alert { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.9); } 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); } }
@media (prefers-reduced-motion: reduce) { .tl-ime.is-ime-alert { animation: none; outline: 3px solid #f59e0b; outline-offset: 2px; } }
.tl-side-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--tl-line); }
.tl-side-settings .tl-button-small { min-height: 28px; padding: 0 10px; font-size: var(--a-fs-2xs); }
.tl-side #motionStatus { margin: 0; font-size: var(--a-fs-2xs); }
.tl-side #motionStatus:empty { display: none; }

.tl-shell:fullscreen .tl-stage { flex: 1; height: auto; min-height: 0; }

@media (max-width: 1000px) {
  .tl-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "side" "scene" "kb"; height: auto; }
  .tl-shell:fullscreen { overflow-y: auto; }
  .tl-shell:fullscreen .tl-stage { height: auto; }
  .tl-stage #motionCanvas { flex: none; height: auto; aspect-ratio: 1024 / 820; }
  .tl-stage #gameCanvas { flex: none; height: clamp(300px, 55vh, 520px); }
  .tl-stage .tl-keyboard { height: auto; }
  .tl-stage .tl-kb { position: static; height: auto; }
  .tl-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; overflow: visible; }
  .tl-side-title { flex: 1 1 180px; min-width: 0; }
  .tl-side-progress { flex: 1 1 140px; }
  .tl-side-stats div { padding: 4px 8px; }
  .tl-side-stats strong { font-size: 1.05rem; }
  .tl-side-actions { display: flex; }
  .tl-side-settings { margin: 0; padding: 0; border: 0; }
  .tl-side #motionStatus { flex-basis: 100%; }
  .tl-side .tl-ime-notice { flex-basis: 100%; }
}
@media (max-width: 620px) {
  .tl-side-scene, .tl-side-settings .tl-button-small { display: none; }
  .tl-side-stats { flex: 1 1 auto; }
}
