.hidden {
    display: none !important;
}
html, body, button, [onclick], canvas {
    -webkit-tap-highlight-color: transparent;
}
button, [onclick], .grid-item, .word-chip, .choice-chip-button, .listen-chip-button {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.page-number {
    position: fixed;
    bottom: 16px;
    right: 20px;
    background: rgba(0,0,0,0.12);
    color: #999;
    font-size: 11px;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 20px;
    z-index: 9999;
    pointer-events: none;
    letter-spacing: 0.05em;
}
.page-number-hidden { display: none; }

/* 로그인 후 모든 화면에서 유지되는 에이두 스타일 하단 HUD */
.aiedue-rpg-hud {
    position: fixed;
    left: max(24px, calc((100vw - 1100px) / 2 + 22px));
    bottom: 14px;
    z-index: 1050;
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: #2c3e50;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* 상단의 중복 회원 정보 배너는 하단 HUD로 통합한다. */
.view-section > .absolute.top-0.left-0.w-full > [onclick="toggleInfoDrawer()"] {
    display: none !important;
}

.activity-profile-banner,
.drawing-header-banner {
    display: none !important;
}

.rpg-profile-banner {
    position: relative;
    min-width: 420px;
    height: 84px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px 18px 76px;
    border: 2px solid rgba(255,255,255,.98);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 14px 36px rgba(50, 91, 69, .18), 0 0 0 2px rgba(183, 228, 161, .5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.rpg-profile-portrait {
    position: absolute;
    left: 7px;
    bottom: 13px;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff4a8, #ffd45f);
    box-shadow: 0 6px 16px rgba(120, 148, 89, .22), 0 0 0 2px #b7e4a1;
}
.rpg-profile-portrait .sync-user-icon { font-size: 1.9rem; line-height: 1; }
.rpg-level-badge {
    position: absolute;
    right: -5px;
    bottom: -4px;
    min-width: 40px;
    padding: 3px 6px;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #fff;
    background: #63b95a;
    font: 900 10px/1.1 Outfit, sans-serif;
    box-shadow: 0 3px 8px rgba(68, 137, 64, .25);
}

.rpg-profile-copy {
    min-width: 112px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    text-align: left;
}
.rpg-profile-copy strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2c3e50; font-size: 1rem; }
.rpg-role-label { color: #62a958; font-size: .68rem; font-weight: 900; }
.rpg-wallet-line { display: flex; gap: 9px; margin-top: 2px; color: #72806f; font-size: .7rem; font-weight: 900; }
.rpg-profile-tools { margin-left: auto; display: flex; gap: 6px; transform: translateY(-4px); }
.rpg-tool-button {
    min-width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border: 1px solid #e1e9df;
    border-radius: 15px;
    background: #fff;
    color: #667366;
    font-size: .64rem;
    font-weight: 900;
    box-shadow: 0 5px 12px rgba(70, 95, 77, .08);
}
.rpg-tool-button > span:first-child { font-size: 1rem; }
.rpg-logout-button { color: #c46b6b; background: #fff8f7; border-color: #f4dddd; }
.rpg-student-shop-button { color: #3d8d64; background: #f3fbf4; border-color: #d5ead8; }
.rpg-expand-button { color: #4e9a61; border-color: #d5ead8; background: #f3fbf4; }
.rpg-expand-button > span:first-child { transition: transform .25s ease; }
.aiedue-rpg-hud.actions-open .rpg-expand-button > span:first-child { transform: rotate(180deg); }

.rpg-action-tray {
    width: 0;
    height: 68px;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 7px 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    border: 0 solid rgba(255,255,255,.98);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: none;
    transform: translateX(-18px);
    transition: width .3s cubic-bezier(.2,.8,.25,1), padding .3s ease, opacity .2s ease, transform .3s ease, border-width .3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.aiedue-rpg-hud.actions-open .rpg-action-tray {
    width: 760px;
    padding-inline: 7px;
    opacity: 1;
    pointer-events: auto;
    border-width: 2px;
    box-shadow: 0 14px 36px rgba(50, 91, 69, .18);
    transform: translateX(0);
}
.rpg-action-button {
    min-width: 124px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
    border-radius: 19px;
    font-weight: 900;
    letter-spacing: -.02em;
    box-shadow: 0 7px 16px rgba(65, 108, 80, .1);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.rpg-action-button:hover, .rpg-tool-button:hover { filter: brightness(1.015); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(65, 108, 80, .14); }
.rpg-action-button:active, .rpg-tool-button:active { transform: translateY(0); }
.rpg-action-icon { font-size: 1.35rem; }
.rpg-cloud-button { color: #397da4; border-color: #cfeaf5; background: linear-gradient(135deg, #f3fbff, #e7f7fd); }
.rpg-shop-button { color: #3d8d64; border-color: #ccebd7; background: linear-gradient(135deg, #f3fcf5, #e4f7e9); }
.rpg-settings-button { color: #6b7280; border-color: #e2e8f0; background: linear-gradient(135deg, #fff, #f7f8fa); }
.rpg-bank-button { color: #b45309; border-color: #fde3b3; background: linear-gradient(135deg, #fffaf0, #fff2cf); }
.rpg-math-button { color: #137ac0; border-color: #bde3fb; background: linear-gradient(135deg, #f4fbff, #e2f4ff); }

.rpg-experience-track {
    position: absolute;
    left: 76px;
    right: 10px;
    bottom: 6px;
    height: 7px;
    overflow: hidden;
    border: 1px solid #cce8c3;
    border-radius: 999px;
    background: #eaf5e6;
}
.rpg-experience-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #81cf70, #a9e28b); box-shadow: 0 0 8px rgba(111, 201, 93, .45); transition: width .35s ease; }
.rpg-experience-label { position: absolute; right: 14px; bottom: 16px; color: #68a95f; font: 900 9px/1 Outfit, sans-serif; }

.aiedue-rpg-hud.experience-received .rpg-experience-track { animation: experienceTrackReceive .65s ease; }
@keyframes experienceTrackReceive { 45% { box-shadow: 0 0 0 6px rgba(129, 207, 112, .18), 0 0 18px rgba(129, 207, 112, .45); } }

body.rpg-hud-active .page-number { bottom: 112px; }

.lesson-photo-button {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 340px;
    padding: 12px 18px;
    border: 2px solid rgba(70, 179, 165, .3);
    border-radius: 22px;
    background: rgba(255, 255, 255, .95);
    color: #28756a;
    text-align: left;
    box-shadow: 0 12px 30px rgba(44, 62, 80, .13);
    backdrop-filter: blur(12px);
    transition: transform .2s ease, box-shadow .2s ease;
}
.lesson-photo-button:hover { transform: translateY(-3px); box-shadow: 0 17px 34px rgba(44, 62, 80, .18); }
.lesson-photo-button > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.lesson-photo-button strong { font-size: 1rem; font-weight: 1000; }
.lesson-photo-button small { color: #dd7a39; font-size: .72rem; font-weight: 900; }
.lesson-photo-icon { font-size: 1.8rem; }

@media (max-width: 860px) {
    .aiedue-rpg-hud { left: 18px; bottom: 18px; }
    .rpg-profile-banner { min-width: 390px; padding-left: 72px; }
    .rpg-profile-copy { min-width: 92px; }
    .rpg-profile-copy strong { max-width: 105px; }
    .aiedue-rpg-hud.actions-open .rpg-action-tray { width: 560px; }
    .rpg-action-button { min-width: 104px; }
    .rpg-action-button > span:last-child { font-size: .76rem; }
    .lesson-photo-button { max-width: 270px; padding: 10px 13px; }
    .lesson-photo-button strong { font-size: .88rem; }
}

@media (max-width: 640px) {
    .aiedue-rpg-hud { right: 9px; }
    .rpg-profile-banner { width: 100%; min-width: 0; height: 82px; padding: 6px 5px 17px 62px; gap: 4px; }
    .rpg-profile-portrait { left: 5px; bottom: 13px; width: 56px; height: 56px; }
    .rpg-profile-portrait .sync-user-icon { font-size: 1.65rem; }
    .rpg-profile-copy { min-width: 65px; }
    .rpg-profile-copy strong { max-width: 92px; font-size: .8rem; }
    .rpg-role-label { font-size: .58rem; }
    .rpg-wallet-line { flex-direction: column; gap: 0; font-size: .58rem; }
    .rpg-profile-tools { gap: 3px; }
    .rpg-tool-button { min-width: 35px; width: 35px; height: 44px; border-radius: 12px; padding: 0; font-size: .54rem; }
    .rpg-action-tray { position: absolute; left: 0; bottom: calc(100% + 8px); height: 0; flex-wrap: wrap; }
    .aiedue-rpg-hud.actions-open .rpg-action-tray { width: min(340px, 100%); height: 124px; }
    .rpg-action-button { min-width: 0; flex: 0 0 calc(50% - 4px); height: 50px; gap: 5px; padding: 3px 6px; border-radius: 14px; }
    .rpg-action-button > span:last-child { font-size: .68rem; }
    .rpg-action-icon { font-size: 1rem; }
    .rpg-experience-track { left: 62px; right: 5px; }
    .rpg-experience-label { right: 9px; }
    body.rpg-hud-active .page-number { bottom: 110px; }
    .lesson-photo-button { position: absolute; top: 94px; right: 14px; max-width: 235px; padding: 8px 11px; }
    .lesson-photo-icon { font-size: 1.35rem; }
    .lesson-photo-button strong { font-size: .76rem; }
    .lesson-photo-button small { font-size: .6rem; }
}

@media (max-width: 520px) {
    .rpg-profile-copy { min-width: 54px; }
    .rpg-profile-copy strong { max-width: 72px; }
    .rpg-wallet-line { gap: 4px; }
    .rpg-tool-button { min-width: 32px; width: 32px; }
    .rpg-tool-button > span:last-child { display: none; }
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 12px 18px;
    border-radius: 14px;
    background: #17324d;
    color: #ffffff;
    font-weight: 900;
    transform: translateY(-160%);
    transition: transform 0.18s ease;
}
.skip-link:focus {
    transform: translateY(0);
}

:where(button, a, input, textarea, select, [role="button"]):focus-visible {
    outline: 4px solid #fbbf24 !important;
    outline-offset: 4px !important;
}

.activity-loading-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 252, 247, 0.82);
    backdrop-filter: blur(10px);
    z-index: 5000;
    padding: 24px;
}
.activity-loading-overlay.show {
    display: flex;
}
.activity-loading-card {
    min-width: min(320px, 86vw);
    border-radius: 28px;
    border: 2px solid rgba(70, 179, 165, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 60px rgba(44, 62, 80, 0.18);
    padding: 34px 30px;
    text-align: center;
}
.activity-loading-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 18px;
    border-radius: 999px;
    border: 5px solid rgba(70, 179, 165, 0.18);
    border-top-color: #46b3a5;
    animation: activityLoadingSpin 0.85s linear infinite;
}
.activity-loading-text {
    font-size: 1.45rem;
    font-weight: 900;
    color: #2c3e50;
    letter-spacing: -0.02em;
}
.literacy-inline-loading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #28756a;
}
.literacy-inline-loading-spinner {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 4px solid rgba(70, 179, 165, 0.2);
    border-top-color: #46b3a5;
    animation: activityLoadingSpin 0.85s linear infinite;
}
@keyframes activityLoadingSpin {
    to { transform: rotate(360deg); }
}
.button-loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: activityLoadingSpin 0.85s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
.korean-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Aiedue Craft: the fixed shop card and the native Craft shop dialog. */
.aiedu-craft-shop-card {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    border: 2px solid #f6c453;
    background: linear-gradient(135deg, #fff9dc 0%, #f4fff0 56%, #e9f8ff 100%);
}

.aiedu-craft-shop-card::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    right: -65px;
    top: -80px;
    border-radius: 40px;
    transform: rotate(22deg);
    background: linear-gradient(135deg, rgba(70, 166, 92, .18), rgba(64, 139, 202, .12));
    pointer-events: none;
}

.aiedu-craft-card-hero {
    min-height: 112px;
    border-radius: 22px;
    padding: 18px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(26, 67, 44, .92), rgba(38, 112, 77, .88)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 12px, transparent 12px 24px);
    display: flex;
    align-items: center;
    gap: 16px;
}

.aiedu-craft-card-icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    background: rgba(255,255,255,.16);
    border: 2px solid rgba(255,255,255,.32);
    display: grid;
    place-items: center;
    font-size: 2.3rem;
    flex: 0 0 auto;
}

.aiedu-craft-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.aiedu-craft-shop-link {
    border: 2px solid #2f855a;
    color: #26734b;
    background: #fff;
}

.aiedu-craft-modal-content {
    width: min(98vw, 1480px);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    border-radius: 30px;
    padding: clamp(20px, 3vw, 38px);
    background: #fafff8;
    border: 4px solid #b7e4a1;
    box-shadow: 0 28px 80px rgba(24, 61, 36, .28);
}

.aiedu-craft-close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: #78907e;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.aiedu-craft-close-btn:hover { color: #2c3e50; }

.aiedu-craft-status {
    border: 1px solid #d9e6da;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 16px;
    color: #56645a;
    background: #f5faf5;
    font-size: .9rem;
    font-weight: 700;
}

.aiedu-craft-status[data-tone='ok'] { color: #177245; background: #eafaf0; border-color: #a9dfbd; }
.aiedu-craft-status[data-tone='warn'] { color: #9a6200; background: #fff8df; border-color: #f2d985; }
.aiedu-craft-status[data-tone='error'] { color: #b83232; background: #fff0f0; border-color: #efb2b2; }

.aiedu-craft-shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 16px;
}

.aiedu-craft-panel {
    min-width: 0;
    border: 2px solid #dcebd6;
    border-radius: 22px;
    padding: 16px;
    background: rgba(255,255,255,.94);
}

.aiedu-craft-product,
.aiedu-craft-command,
.aiedu-craft-row {
    border: 1px solid #e2eadf;
    border-radius: 16px;
    padding: 12px;
    background: #f8fbf7;
}

.aiedu-craft-product.stone { background: #f7f7f5; }
.aiedu-craft-product.iron { background: #f3f7fa; }
.aiedu-craft-product.gold { background: #fff9e9; }
.aiedu-craft-product.diamond { background: #edf9ff; }
.aiedu-craft-command.home { background: #effbf2; }
.aiedu-craft-command.house { background: #fff6eb; }
.aiedu-craft-command.teleport { background: #f2f2ff; display: grid; gap: 8px; }

.aiedu-craft-buy-row,
.aiedu-craft-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 9px;
}

.aiedu-craft-buy-count,
.aiedu-craft-number-input {
    width: 72px;
    border: 1px solid #cfdacf;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    text-align: right;
}

@media (max-width: 1180px) {
    .aiedu-craft-shop-layout { grid-template-columns: 1fr 1fr; }
    .aiedu-craft-shop-layout > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .aiedu-craft-shop-layout { grid-template-columns: 1fr; }
    .aiedu-craft-shop-layout > :last-child { grid-column: auto; }
    .aiedu-craft-card-actions { grid-template-columns: 1fr; }
    .aiedu-craft-card-hero { align-items: flex-start; }
}
@media (max-width: 900px) { .korean-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .korean-shop-grid { grid-template-columns: 1fr; } }
.aiedue-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 6000;
    background: rgba(255,255,255,.96);
    border: 4px solid #fde68a;
    border-radius: 32px;
    padding: 26px 36px;
    box-shadow: 0 25px 80px rgba(44,62,80,.22);
    text-align: center;
    pointer-events: none;
    animation: aiedueToastPop 1.25s ease forwards;
}
.aiedue-toast-title { font-size: 2.35rem; font-weight: 900; color: #2c3e50; }
.aiedue-toast-sub { margin-top: 6px; font-size: 1rem; font-weight: 900; color: #8b5cf6; }
@keyframes aiedueToastPop {
    0% { opacity: 0; transform: translate(-50%, -45%) scale(.9); }
    15%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -56%) scale(.96); }
}
.flying-aiedue-star {
    position: fixed;
    z-index: 6500;
    font-size: 2.5rem;
    pointer-events: none;
    transition: transform .82s cubic-bezier(.2,.85,.2,1), opacity .82s ease;
    filter: drop-shadow(0 10px 18px rgba(251,191,36,.45));
}
.canvas-action-btn {
    position: absolute;
    z-index: 8;
    min-width: 96px;
}
#drawing-clear-btn { top: 14px; right: 14px; }
#drawing-complete-mission-btn { right: 14px; bottom: 14px; }

/* Component-specific overrides or small tweaks */
#password-display {
    font-size: 3.5rem;
    letter-spacing: 0.5rem;
    font-family: 'Outfit', sans-serif;
}
.learning-pane {
    background: var(--mint-light);
    border: 2px solid var(--mint-pale);
    border-radius: 25px;
}
.learning-activity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 18px;
    align-items: stretch;
}
#learning-detail-content {
    position: relative;
    z-index: 1;
}
#learning-detail-nav {
    position: relative;
    z-index: 30;
    background: #ffffff;
    padding-top: 12px;
}
.learning-main-card,
.learning-practice-card {
    border: 2px solid rgba(70, 179, 165, 0.22);
    border-radius: 22px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(44, 62, 80, 0.08);
}
.learning-practice-card {
    background: linear-gradient(180deg, #fff8ed 0%, #ffffff 100%);
    border-color: rgba(255, 157, 118, 0.38);
}
.learning-write-card {
    border: 2px solid rgba(255, 157, 118, 0.38);
    border-radius: 22px;
    background: linear-gradient(180deg, #fff8ed 0%, #ffffff 100%);
    padding: 18px;
    box-shadow: 0 10px 24px rgba(44, 62, 80, 0.08);
    margin-top: 14px;
}
.learning-card-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 900;
    color: #46b3a5;
    background: rgba(70, 179, 165, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.vowel-origin-scene {
    display: grid;
    grid-template-columns: repeat(var(--origin-card-count, 3), minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px;
    border: 2px solid rgba(70, 179, 165, 0.2);
    border-radius: 20px;
    background: #f0fdfa;
}
.vowel-origin-card {
    position: relative;
    min-width: 0;
    min-height: 270px;
    border: 2px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(44, 62, 80, 0.06);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.vowel-origin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(44, 62, 80, 0.13);
}
.vowel-origin-card:focus-visible {
    outline: 4px solid rgba(70, 179, 165, 0.28);
    outline-offset: 3px;
}
.vowel-origin-card.is-origin-active {
    border-color: #46b3a5;
    background: #f8fffd;
    box-shadow: 0 14px 30px rgba(70, 179, 165, 0.18);
    transform: translateY(-3px) scale(1.01);
}
.origin-card-visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.origin-sky-band {
    position: absolute;
    inset: 0 0 32%;
    background: #def5ff;
    transition: opacity 0.5s ease;
}
.origin-ground-band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50px;
    height: 64px;
    background: #a9df82;
    border-top: 7px solid #74bd5a;
    transition: opacity 0.5s ease;
}
.origin-soil-band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 54px;
    background: #a96f47;
    border-top: 6px solid #7e5139;
    transition: opacity 0.5s ease;
}
.origin-cloud {
    position: absolute;
    width: 42px;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}
.origin-cloud::before,
.origin-cloud::after {
    content: "";
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
}
.origin-cloud::before { left: 8px; width: 19px; height: 19px; }
.origin-cloud::after { right: 6px; width: 15px; height: 15px; }
.origin-card-visual .cloud-one { top: 34px; left: 13%; }
.origin-card-visual .cloud-two { top: 61px; right: 12%; transform: scale(.75); opacity: .75; }
.origin-grass-blade {
    position: absolute;
    bottom: 45px;
    width: 4px;
    height: 20px;
    border-radius: 999px 999px 0 0;
    background: #3b9146;
    transform-origin: bottom;
}
.origin-ground-card .grass-one { left: 19%; transform: rotate(-18deg); }
.origin-ground-card .grass-two { right: 22%; transform: rotate(18deg); }
.origin-flower {
    position: absolute;
    right: 16%;
    bottom: 34px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffef7a;
    box-shadow: 7px 0 #fff3a1, -7px 0 #fff3a1, 0 7px #fff3a1, 0 -7px #fff3a1;
}
.origin-focus-line {
    position: absolute;
    left: 13%;
    right: 13%;
    bottom: 104px;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #7e5139;
    box-shadow: 0 0 0 0 rgba(255, 236, 139, 0);
    transform-origin: left center;
    z-index: 3;
}
.origin-light-sweep {
    position: absolute;
    top: -5px;
    bottom: -5px;
    width: 44px;
    opacity: 0;
    background: rgba(255, 249, 196, 0.95);
    filter: blur(3px);
}
.origin-result-glyph {
    position: absolute;
    inset: 28px 0 52px;
    z-index: 5;
    display: grid;
    place-items: center;
    color: #7e5139;
    font-size: clamp(5rem, 9vw, 7.5rem);
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    transform: scale(.8);
}
.origin-person-ground {
    position: absolute;
    left: 17%;
    right: 17%;
    bottom: 49px;
    height: 7px;
    border-radius: 999px;
    background: #74bd5a;
}
.origin-person-character {
    position: absolute;
    left: 50%;
    bottom: 55px;
    width: 78px;
    height: 156px;
    transform: translateX(-50%);
    z-index: 2;
}
.origin-person-head {
    position: absolute;
    top: 0;
    left: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffe0c8;
    border: 4px solid #376b90;
    transform: translateX(-50%);
    z-index: 3;
}
.origin-person-hair {
    position: absolute;
    inset: -1px 4px 27px;
    border-radius: 28px 28px 8px 8px;
    background: #65463d;
}
.origin-person-eyes::before,
.origin-person-eyes::after {
    content: "";
    position: absolute;
    top: 27px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2c3e50;
}
.origin-person-eyes::before { left: 15px; }
.origin-person-eyes::after { right: 15px; }
.origin-person-smile {
    position: absolute;
    left: 50%;
    bottom: 9px;
    width: 14px;
    height: 7px;
    border-bottom: 3px solid #b65f59;
    border-radius: 0 0 12px 12px;
    transform: translateX(-50%);
}
.origin-person-body {
    position: absolute;
    top: 48px;
    left: 50%;
    width: 36px;
    height: 70px;
    border: 4px solid #285f8d;
    border-radius: 15px 15px 8px 8px;
    background: #67b9ee;
    transform: translateX(-50%);
    z-index: 2;
}
.origin-person-arm,
.origin-person-leg {
    position: absolute;
    width: 13px;
    border: 3px solid #285f8d;
    border-radius: 999px;
    background: #8ecdf2;
    transform-origin: top center;
}
.origin-person-arm { top: 57px; height: 60px; }
.origin-person-arm.arm-left { left: 13px; transform: rotate(4deg); }
.origin-person-arm.arm-right { right: 13px; transform: rotate(-4deg); }
.origin-person-leg { top: 111px; height: 44px; background: #376b90; }
.origin-person-leg.leg-left { left: 25px; transform: rotate(2deg); }
.origin-person-leg.leg-right { right: 25px; transform: rotate(-2deg); }
.origin-vertical-light {
    position: absolute;
    top: 24px;
    bottom: 46px;
    left: calc(50% - 4px);
    z-index: 4;
    width: 8px;
    border-radius: 999px;
    opacity: 0;
    background: #fff6a6;
    box-shadow: 0 0 14px 5px rgba(255, 246, 166, .78);
    transform-origin: top center;
}
.origin-person-card .origin-result-glyph { color: #2563eb; }
.origin-sun-figure {
    position: absolute;
    top: 57px;
    left: 50%;
    width: 112px;
    height: 112px;
    transform: translateX(-50%);
    z-index: 2;
}
.origin-sun-core {
    position: absolute;
    inset: 23px;
    border: 5px solid #f39a38;
    border-radius: 50%;
    background: #ffd84d;
    box-shadow: 0 0 22px rgba(255, 216, 77, .48);
}
.origin-sun-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 5px;
    border-radius: 999px;
    background: #ffb347;
    transform-origin: -28px center;
}
.origin-sun-figure .ray-1 { transform: translate(28px, -50%) rotate(0deg); }
.origin-sun-figure .ray-2 { transform: translate(28px, -50%) rotate(45deg); }
.origin-sun-figure .ray-3 { transform: translate(28px, -50%) rotate(90deg); }
.origin-sun-figure .ray-4 { transform: translate(28px, -50%) rotate(135deg); }
.origin-sun-figure .ray-5 { transform: translate(28px, -50%) rotate(180deg); }
.origin-sun-figure .ray-6 { transform: translate(28px, -50%) rotate(225deg); }
.origin-sun-figure .ray-7 { transform: translate(28px, -50%) rotate(270deg); }
.origin-sun-figure .ray-8 { transform: translate(28px, -50%) rotate(315deg); }
.origin-sun-card .origin-result-glyph { color: #f39a38; }
.origin-card-label {
    position: relative;
    z-index: 8;
    margin-top: auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #2c3e50;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(44, 62, 80, .08);
}
.origin-explanation-list {
    display: grid;
    gap: 10px;
}
.origin-explanation {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 92px;
    padding: 14px 18px;
    border: 2px solid #dbe8e6;
    border-radius: 16px;
    background: #ffffff;
    opacity: .64;
    transform: scale(.99);
    transition: opacity .3s ease, transform .3s ease, border-color .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.origin-explanation.is-origin-active {
    opacity: 1;
    transform: scale(1);
    border-color: #69ceb2;
    background: #f0fdf4;
    box-shadow: 0 8px 20px rgba(70, 179, 165, .12);
}
.origin-explanation-glyph {
    display: grid;
    place-items: center;
    min-height: 62px;
    border-right: 2px solid currentColor;
    color: #7e5139;
    font-size: 3.35rem;
    font-weight: 900;
    line-height: 1;
}
.origin-person-explanation .origin-explanation-glyph { color: #2563eb; }
.origin-sun-explanation .origin-explanation-glyph { color: #f39a38; }
.origin-explanation strong,
.origin-explanation span {
    display: block;
}
.origin-explanation strong {
    margin-bottom: 3px;
    color: #24384a;
    font-size: 1.02rem;
}
.origin-explanation span {
    color: #526575;
    font-size: .94rem;
    line-height: 1.5;
}
.origin-learning-chip {
    position: relative;
    border-width: 3px;
    font-size: 3.5rem;
}
.origin-ground-chip { color: #7e5139; border-color: #b8835d; }
.origin-person-chip { color: #2563eb; border-color: #7db9ee; }
.origin-sun-chip { color: #f39a38; border-color: #f8c76e; }

.origin-ground-card.is-origin-playing .origin-sky-band,
.origin-ground-card.is-origin-playing .origin-ground-band,
.origin-ground-card.is-origin-playing .origin-soil-band,
.origin-ground-card.is-origin-playing .origin-cloud,
.origin-ground-card.is-origin-playing .origin-grass-blade,
.origin-ground-card.is-origin-playing .origin-flower {
    animation: originLandscapeFade 6s ease both;
}
.origin-ground-card.is-origin-playing .origin-focus-line {
    animation: originGroundFocus 6s ease both;
}
.origin-ground-card.is-origin-playing .origin-light-sweep {
    animation: originHorizontalSweep 6s ease both;
}
.origin-ground-card.is-origin-playing .origin-result-glyph {
    animation: originGroundGlyph 6s ease both;
}
.origin-person-card.is-origin-playing .origin-person-character {
    animation: originPersonRise 5.8s ease both;
}
.origin-person-card.is-origin-playing .origin-person-arm,
.origin-person-card.is-origin-playing .origin-person-leg,
.origin-person-card.is-origin-playing .origin-person-head {
    animation: originPersonDetailsFade 5.8s ease both;
}
.origin-person-card.is-origin-playing .origin-vertical-light {
    animation: originVerticalSweep 5.8s ease both;
}
.origin-person-card.is-origin-playing .origin-result-glyph {
    animation: originPersonGlyph 5.8s ease both;
}
.origin-sun-card.is-origin-playing .origin-sun-figure {
    animation: originSunGrow 5.4s ease both;
}
.origin-sun-card.is-origin-playing .origin-sun-ray {
    animation: originSunRays 5.4s ease both;
}
.origin-sun-card.is-origin-playing .origin-result-glyph {
    animation: originSunGlyph 5.4s ease both;
}
.origin-ground-card.is-origin-complete .origin-sky-band,
.origin-ground-card.is-origin-complete .origin-ground-band,
.origin-ground-card.is-origin-complete .origin-soil-band,
.origin-ground-card.is-origin-complete .origin-cloud,
.origin-ground-card.is-origin-complete .origin-grass-blade,
.origin-ground-card.is-origin-complete .origin-flower,
.origin-person-card.is-origin-complete .origin-person-character,
.origin-person-card.is-origin-complete .origin-person-ground,
.origin-sun-card.is-origin-complete .origin-sun-figure {
    opacity: .18;
}
.vowel-origin-card.is-origin-complete .origin-result-glyph {
    opacity: 1;
    transform: scale(1);
}

@keyframes originLandscapeFade {
    0%, 43% { opacity: 1; filter: saturate(1); }
    68%, 100% { opacity: .18; filter: saturate(.5); }
}
@keyframes originGroundFocus {
    0%, 15% { box-shadow: 0 0 0 0 rgba(255, 236, 139, 0); transform: scaleX(1); }
    28%, 54% { box-shadow: 0 0 18px 8px rgba(255, 236, 139, .88); transform: scaleX(1.08); }
    72%, 100% { opacity: 0; transform: scaleX(.92); }
}
@keyframes originHorizontalSweep {
    0%, 27% { left: -25%; opacity: 0; }
    31% { opacity: 1; }
    50% { left: 110%; opacity: 1; }
    54%, 100% { left: 110%; opacity: 0; }
}
@keyframes originGroundGlyph {
    0%, 60% { opacity: 0; transform: scaleX(.55) scaleY(.82); }
    76% { opacity: 1; transform: scale(1.08); }
    88%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes originPersonRise {
    0% { opacity: 0; transform: translate(-50%, 28px); }
    18%, 55% { opacity: 1; transform: translate(-50%, 0); }
    72%, 100% { opacity: .16; transform: translate(-50%, 0); }
}
@keyframes originPersonDetailsFade {
    0%, 54% { opacity: 1; }
    72%, 100% { opacity: 0; }
}
@keyframes originVerticalSweep {
    0%, 26% { opacity: 0; transform: scaleY(0); }
    32% { opacity: 1; transform: scaleY(0); }
    54% { opacity: 1; transform: scaleY(1); }
    65%, 100% { opacity: 0; transform: scaleY(1); }
}
@keyframes originPersonGlyph {
    0%, 61% { opacity: 0; transform: scaleY(.6); }
    78% { opacity: 1; transform: scale(1.09); }
    90%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes originSunGrow {
    0% { opacity: 0; transform: translateX(-50%) scale(.42); filter: brightness(.8); }
    24%, 53% { opacity: 1; transform: translateX(-50%) scale(1); filter: brightness(1.12); }
    68%, 100% { opacity: .16; transform: translateX(-50%) scale(.9); filter: brightness(1); }
}
@keyframes originSunRays {
    0%, 18% { opacity: 0; }
    32%, 50% { opacity: 1; }
    65%, 100% { opacity: 0; }
}
@keyframes originSunGlyph {
    0%, 60% { opacity: 0; transform: scale(.62); }
    77% { opacity: 1; transform: scale(1.1); }
    90%, 100% { opacity: 1; transform: scale(1); }
}
.practice-label {
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
}
.word-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}
.word-chip {
    background: #fff7ed;
    color: #9a3412;
    border: 2px solid #fed7aa;
    border-radius: 999px;
    padding: 16px 28px;
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.word-chip:hover {
    background: #ffedd5;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.word-chip:active {
    transform: translateY(1px);
    box-shadow: none;
}
.review-word-chip-wrap {
    gap: 18px;
    margin-top: 18px;
}
.review-word-chip {
    min-width: 126px;
    padding: 18px 30px;
    border-radius: 34px;
    font-size: 4.4rem;
}
.small-dot-char {
    display: inline-block;
    font-size: 0.58em;
    line-height: 1;
    vertical-align: middle;
}
.writing-line {
    min-height: 58px;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    background: repeating-linear-gradient(0deg, #ffffff, #ffffff 26px, #f8fafc 27px, #f8fafc 29px);
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 1.5rem;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.08em;
}
.practice-step-box {
    border: 2px solid #fed7aa;
    border-radius: 22px;
    background: #fff;
    padding: 16px;
}
.practice-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #9a3412;
    margin-bottom: 10px;
}
.practice-step-number {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #fb923c;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.listen-button {
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #46b3a5, #22c55e);
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(70, 179, 165, 0.22);
}
.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.choice-grid-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.choice-grid-wide {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}
.choice-chip-button {
    border: 2px solid #bae6fd;
    border-radius: 20px;
    background: #f0f9ff;
    color: #075985;
    padding: 18px 12px;
    font-size: 2.4rem;
    font-weight: 900;
    width: 100%;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.choice-chip-button:hover,
.choice-chip-button:focus {
    transform: translateY(-2px);
    background: #e0f2fe;
}
.choice-chip-button.selected {
    background: #0ea5e9;
    border-color: #0284c7;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}
.choice-chip-button.correct {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border-color: #15803d !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4) !important;
}
.choice-chip-button.wrong {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
    transform: scale(0.95) !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3) !important;
}
.listen-quiz-play-btn {
    background: linear-gradient(135deg, #46b3a5, #22c55e);
    color: white;
    font-size: 1.6rem;
    font-weight: 900;
    padding: 14px 48px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.34);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.listen-quiz-play-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.46);
}
.listen-quiz-play-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.28);
}
.listen-chip-button {
    border: 2px solid #bbf7d0;
    border-radius: 20px;
    background: #f0fdf4;
    color: #166534;
    padding: 18px 12px;
    font-size: 2.4rem;
    font-weight: 900;
    width: 100%;
    transition: transform .15s ease, background .15s ease;
    cursor: pointer;
}
.listen-chip-button:hover {
    transform: translateY(-2px);
    background: #dcfce7;
}
.trace-canvas-wrap {
    border: 4px solid #fb923c;
    border-radius: 24px;
    background: #fff7ed;
    padding: 12px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(251, 146, 60, 0.18);
}
.trace-canvas-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #c2410c;
    font-size: 1rem;
    font-weight: 1000;
    margin-bottom: 10px;
}
.trace-writing-canvas {
    width: 100%;
    height: 260px;
    display: block;
    border: 3px solid #fdba74;
    border-radius: 18px;
    background: #ffffff;
    touch-action: none;
    -ms-touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: crosshair;
}
.trace-writing-canvas.double-row {
    height: 440px;
}
.trace-writing-canvas.word-grid {
    height: 440px;
}
.trace-writing-canvas.make-letter-grid {
    height: 640px;
}
.make-letter-board {
    display: grid;
    gap: 14px;
}
.make-letter-guide-grid {
    display: grid;
    grid-template-columns: 64px repeat(5, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
}
.make-letter-cell {
    min-height: 56px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #2c3e50;
    font-size: 1.7rem;
    font-weight: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.make-letter-cell.header {
    background: #dbeafe;
    color: #1e3a8a;
}
.make-letter-cell.row-head {
    background: #bfdbfe;
    color: #1e3a8a;
}
.make-letter-cell.result {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    cursor: pointer;
}
.make-letter-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.make-letter-group {
    overflow: hidden;
    border: 2px solid #bfdbfe;
    border-radius: 14px;
    background: #ffffff;
}
.make-letter-group-title {
    width: 100%;
    min-height: 60px;
    border: 0;
    border-bottom: 2px solid #bfdbfe;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 2rem;
    font-weight: 1000;
}
.make-letter-pair {
    display: grid;
    grid-template-columns: 72px 1fr;
    width: 100%;
    min-height: 58px;
    border: 0;
    border-bottom: 1px solid #dbeafe;
    background: #ffffff;
    color: #2c3e50;
    font-size: 1.55rem;
    font-weight: 1000;
}
.make-letter-pair:last-child {
    border-bottom: 0;
}
.make-letter-pair .consonant {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1e3a8a;
}
.make-letter-pair .result {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #047857;
}
.lesson13-reading-shell {
    display: grid;
    gap: 18px;
}
.lesson13-instruction {
    border: 3px solid #bfdbfe;
    border-radius: 16px;
    padding: 16px 18px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 1.25rem;
    font-weight: 1000;
    text-align: center;
}
.lesson13-picture-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.lesson13-picture-card {
    --card-index: 0;
    min-height: 180px;
    border: 3px solid #99d8d0;
    border-radius: 16px;
    background: #ffffff;
    color: #20364b;
    display: grid;
    grid-template-columns: minmax(100px, 0.9fr) 1.4fr;
    align-items: center;
    gap: 10px;
    padding: 18px;
    box-shadow: 0 6px 0 rgba(70, 179, 165, 0.14);
    animation: lesson13-card-enter 0.38s ease-out both;
    animation-delay: calc(var(--card-index) * 70ms);
    touch-action: manipulation;
}
.lesson13-picture-card .picture {
    font-size: 4.5rem;
    line-height: 1;
}
.lesson13-picture-card .word {
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 1000;
    letter-spacing: 0;
}
.lesson13-picture-card .listen-label {
    display: block;
    margin-top: 8px;
    color: #0f766e;
    font-size: 1rem;
    font-weight: 900;
}
.lesson13-picture-card.is-speaking {
    animation: lesson13-card-speak 0.65s ease;
    border-color: #fb923c;
    background: #fff7ed;
}
.lesson13-word-line-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.lesson13-word-chip {
    min-height: 64px;
    border: 3px solid #c7e8c4;
    border-radius: 14px;
    background: #ffffff;
    color: #1f4f3d;
    font-size: 1.55rem;
    font-weight: 1000;
    touch-action: manipulation;
}
.lesson13-read-check {
    border: 3px solid #fdba74;
    border-radius: 18px;
    padding: 18px;
    background: #fff7ed;
}
.lesson13-read-check-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.lesson13-read-check-button {
    min-height: 72px;
    border: 3px solid #fb923c;
    border-radius: 14px;
    background: #ffffff;
    color: #c2410c;
    font-size: 1.2rem;
    font-weight: 1000;
}
.lesson13-read-check-button.active {
    background: #22c55e;
    border-color: #16a34a;
    color: #ffffff;
}
.lesson13-match-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.lesson13-match-card {
    border: 3px solid #99e8df;
    border-radius: 18px;
    padding: 18px;
    background: #ffffff;
    text-align: center;
}
.lesson13-match-picture {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    line-height: 1;
}
.lesson13-match-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.lesson13-match-choice {
    min-height: 58px;
    border: 3px solid #43b83f;
    border-radius: 999px;
    background: #ffffff;
    color: #31922e;
    font-size: 1.2rem;
    font-weight: 1000;
}
.lesson13-match-choice.active {
    background: #22c55e;
    color: #ffffff;
}
.lesson13-match-choice.wrong {
    border-color: #fb923c;
    background: #fff7ed;
    color: #c2410c;
}
.lesson20-reading-page,
.lesson20-completion-page {
    display: grid;
    gap: 22px;
}
.lesson20-nonsense-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.lesson20-nonsense-word {
    min-height: 106px;
    border: 3px solid #c7e8c4;
    border-radius: 16px;
    background: #ffffff;
    color: #20364b;
    font-size: 2.15rem;
    font-weight: 1000;
    box-shadow: 0 5px 0 rgba(70, 179, 165, 0.12);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.lesson20-nonsense-word:hover,
.lesson20-nonsense-word.is-speaking {
    border-color: #fb923c;
    background: #fff7ed;
    transform: translateY(-2px);
}
.complex-word-syllable.is-complex {
    color: #dc2626;
    background: #fee2e2;
    border-radius: 8px;
    padding: 0 3px;
}
.lesson20-nonsense-listen {
    display: block;
    margin-top: 4px;
    color: #0f766e;
    font-size: .78rem;
    font-weight: 900;
}
.lesson20-color-guide {
    border: 2px dashed #86efac;
    border-radius: 14px;
    padding: 10px;
    color: #166534;
    text-align: center;
    font-weight: 900;
}
.lesson20-read-find-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.lesson20-read-find-card {
    border: 3px solid #99e8df;
    border-radius: 18px;
    padding: 14px;
    background: #ffffff;
    text-align: center;
}
.lesson20-read-find-picture {
    width: 100%;
    min-height: 112px;
    border: 2px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #20364b;
    display: grid;
    place-items: center;
    gap: 4px;
    font-size: 4.4rem;
    line-height: 1;
}
.lesson20-read-find-picture small {
    color: #1d4ed8;
    font-size: .82rem;
    font-weight: 900;
}
.lesson20-read-find-picture.is-speaking {
    border-color: #fb923c;
    background: #fff7ed;
    animation: lesson13-card-speak .65s ease;
}
.lesson20-read-find-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.lesson20-read-find-choice {
    min-height: 58px;
    border: 3px solid #43b83f;
    border-radius: 999px;
    background: #ffffff;
    color: #31922e;
    font-size: 1.45rem;
    font-weight: 1000;
}
.lesson20-read-find-choice.is-correct {
    background: #22c55e;
    border-color: #16a34a;
    color: #ffffff;
}
.lesson20-read-find-choice.is-wrong {
    background: #fff7ed;
    border-color: #fb923c;
    color: #c2410c;
}
.lesson20-read-find-feedback {
    min-height: 1.5rem;
    margin-top: 10px;
    color: #0f766e;
    font-weight: 1000;
}
.lesson20-read-find-feedback.is-correct { color: #16a34a; }
.lesson20-read-find-feedback.is-wrong { color: #ea580c; }
.lesson21-page {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.lesson21-instruction {
    border: 3px solid #bfdbfe;
    border-radius: 16px;
    padding: 14px 16px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 1.12rem;
    font-weight: 900;
    text-align: center;
    word-break: keep-all;
}
.lesson21-instruction strong {
    color: #c2410c;
}
.lesson21-example-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.lesson21-example-card {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 126px;
    border: 3px solid #fed7aa;
    border-radius: 18px;
    background: #fffaf2;
    color: #20364b;
    font-size: 2rem;
    font-weight: 1000;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.lesson21-example-card:hover,
.lesson21-example-card:focus-visible {
    border-color: #fb923c;
    background: #fff7ed;
    transform: translateY(-2px);
}
.lesson21-example-part,
.lesson21-example-listen {
    grid-column: 1 / -1;
}
.lesson21-example-part {
    color: #64748b;
    font-size: 1.05rem;
}
.lesson21-example-arrow {
    color: #f97316;
}
.lesson21-example-listen {
    color: #0f766e;
    font-size: .85rem;
}
.lesson21-family-table {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 3px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
}
.lesson21-family-row {
    display: grid;
    grid-template-columns: 56px repeat(5, minmax(0, 1fr));
    gap: 4px;
}
.lesson21-family-batchim,
.lesson21-family-cell {
    min-height: 70px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #eff6ff;
    color: #20364b;
    font-size: 1.55rem;
    font-weight: 1000;
}
.lesson21-family-batchim {
    display: grid;
    place-items: center;
    background: #bfdbfe;
    color: #1e3a8a;
}
.lesson21-family-cell {
    display: grid;
    place-items: center;
    gap: 1px;
    padding: 5px;
}
.lesson21-family-cell span {
    color: #475569;
    font-size: .82rem;
}
.lesson21-family-cell b {
    color: #111827;
}
.lesson21-tip,
.lesson21-practice-note,
.lesson21-challenge-tip {
    padding: 11px 14px;
    border: 2px dashed #86efac;
    border-radius: 14px;
    background: #f0fdf4;
    color: #166534;
    font-size: .98rem;
    font-weight: 900;
    text-align: center;
    word-break: keep-all;
}
.lesson21-follow-table {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 3px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
}
.lesson21-follow-row {
    display: grid;
    grid-template-columns: 64px repeat(5, minmax(0, 1fr));
    gap: 4px;
}
.lesson21-follow-label,
.lesson21-follow-result {
    min-height: 64px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 1.55rem;
    font-weight: 1000;
}
.lesson21-follow-label {
    background: #bfdbfe;
    color: #1e3a8a;
}
.lesson21-follow-result {
    background: #f8fafc;
    color: #20364b;
}
.lesson21-follow-result:hover,
.lesson21-follow-result:focus-visible {
    border-color: #fb923c;
    background: #fff7ed;
}
.lesson21-write-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.lesson21-write-cell {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 10px;
    border: 3px solid #bae6fd;
    border-radius: 16px;
    background: #eff6ff;
    text-align: center;
}
.lesson21-write-cell.is-practice {
    border-color: #c7e8c4;
    background: #f0fdf4;
}
.lesson21-shadow-word {
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
    min-height: 50px;
    border: 0;
    background: transparent;
    color: #20364b;
    font-size: 2rem;
    font-weight: 1000;
}
.lesson21-shadow-batchim {
    color: #94a3b8;
    text-shadow: 1px 1px 0 #cbd5e1;
}
.trace-writing-canvas.lesson21-mini-canvas {
    width: 100%;
    height: 104px;
    border: 2px solid #93c5fd;
    border-radius: 12px;
    background: #ffffff;
}
.lesson21-write-done,
.lesson21-challenge-done {
    min-height: 38px;
    border: 2px solid #43b83f;
    border-radius: 999px;
    background: #ffffff;
    color: #31922e;
    font-size: .9rem;
    font-weight: 1000;
}
.lesson21-write-done:hover,
.lesson21-challenge-done:hover,
.lesson21-word-choice:hover {
    background: #dcfce7;
}
.lesson21-write-done.is-complete,
.lesson21-challenge-done.is-complete {
    border-color: #16a34a;
    background: #22c55e;
    color: #ffffff;
}
.lesson21-practice-rows {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 3px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
}
.lesson21-practice-row {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 3px;
}
.lesson21-practice-syllable {
    min-width: 0;
    min-height: 55px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-size: 1.45rem;
    font-weight: 1000;
}
.lesson21-practice-syllable.is-shaded {
    background: #cbd5e1;
    box-shadow: inset 0 -8px 0 rgba(148, 163, 184, .22);
}
.lesson21-practice-syllable:hover,
.lesson21-practice-syllable:focus-visible {
    border-color: #f97316;
}
.lesson21-reference-table {
    gap: 14px;
    padding: 14px;
    border-color: #b6c1d1;
    border-radius: 8px;
    background: #ffffff;
}
.lesson21-follow-block {
    display: grid;
    gap: 0;
}
.lesson21-reference-base-row,
.lesson21-reference-write-row {
    grid-template-columns: 56px repeat(5, minmax(0, 1fr));
    gap: 0;
}
.lesson21-reference-base-row {
    border-bottom: 1px solid #b6c1d1;
}
.lesson21-reference-corner,
.lesson21-reference-base,
.lesson21-reference-write-cell {
    min-height: 64px;
    border: 1px solid #b6c1d1;
    border-radius: 0;
}
.lesson21-reference-corner {
    background: #e7eef8;
}
.lesson21-reference-base {
    display: grid;
    place-items: center;
    background: #f8fafc;
    color: #111827;
    font-size: 1.8rem;
    font-weight: 1000;
}
.lesson21-reference-write-cell {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3px;
    padding: 4px;
    background: #eff6ff;
}
.lesson21-reference-write-cell .lesson21-inline-writing-canvas {
    width: 100%;
}
.lesson21-inline-writing-canvas {
    width: 100%;
    height: 52px;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    background: #ffffff;
}
.lesson21-reference-sound {
    min-width: 28px;
    min-height: 28px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #0f766e;
    font-size: .8rem;
}
.lesson21-m-intro-page {
    overflow-x: hidden;
}
.lesson21-m-feedback {
    margin: 10px 0 14px;
    padding: 14px 18px;
    border: 2px solid #9ddfc6;
    border-radius: 10px;
    background: #eefbf4;
    color: #174a43;
    font-size: 1.12rem;
    font-weight: 900;
    text-align: center;
}
.lesson21-m-table {
    display: grid;
    gap: 16px;
    min-width: 0;
}
.lesson21-m-block {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 2px solid #aab8c9;
    border-radius: 10px;
    background: #ffffff;
}
.lesson21-m-side-column {
    display: grid;
    grid-template-rows: 82px 150px;
    min-width: 0;
    background: #eaf2fb;
}
.lesson21-m-base-heading {
    display: grid;
    place-items: center;
    padding: 6px;
    border-bottom: 1px solid #aab8c9;
    color: #334e70;
    font-size: .92rem;
    font-weight: 900;
    text-align: center;
}
.lesson21-m-batchim-label {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: #dceafb;
    color: #173b67;
    cursor: pointer;
}
.lesson21-m-batchim-label span {
    font-size: .78rem;
    font-weight: 800;
}
.lesson21-m-batchim-label strong {
    font-size: 2.25rem;
    line-height: 1;
}
.lesson21-m-pair-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-width: 0;
}
.lesson21-m-pair {
    display: grid;
    grid-template-rows: 82px 150px;
    min-width: 0;
    border-left: 1px solid #aab8c9;
    background: #ffffff;
    transition: background-color .2s ease, box-shadow .2s ease;
}
.lesson21-m-base-button {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 5px;
    border: 0;
    border-bottom: 0;
    background: #fbfdff;
    color: #162d4a;
    cursor: pointer;
    transition: background-color .25s ease, transform .25s ease, color .25s ease;
}
.lesson21-m-display-letter {
    font-size: 3.15rem;
    font-weight: 1000;
    line-height: 1;
}
.lesson21-m-listen-label {
    position: absolute;
    right: 4px;
    bottom: 3px;
    opacity: 0;
    color: #0f766e;
    font-size: .68rem;
    font-weight: 800;
}
.lesson21-m-writing-cell {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 24px;
    min-width: 0;
    padding: 8px 8px 5px;
    background: #fbfdff;
    transition: background-color .25s ease, box-shadow .25s ease;
}
.lesson21-m-trace-canvas {
    display: block;
    width: 100%;
    height: 112px;
    min-width: 0;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    cursor: crosshair;
    touch-action: none;
}
.lesson21-m-cell-hint {
    align-self: center;
    overflow: hidden;
    opacity: 0;
    color: #19766d;
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity .2s ease;
}
.lesson21-m-pair.is-active .lesson21-m-writing-cell {
    background: #eafaf6;
    box-shadow: inset 0 0 0 3px #65cdb5;
}
.lesson21-m-pair.is-active .lesson21-m-trace-canvas {
    box-shadow: inset 0 0 0 2px #43bca4;
}
.lesson21-m-pair.is-active .lesson21-m-cell-hint {
    opacity: 1;
}
.lesson21-m-pair.needs-guidance .lesson21-m-writing-cell {
    animation: lesson21MGuide 800ms ease-out 1;
}
.lesson21-m-moving-batchim {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 48%;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    color: #159f91;
    font-size: 2.25rem;
    font-weight: 1000;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, 0);
}
.lesson21-m-moving-batchim small {
    color: #f97316;
    font-size: 1.3rem;
}
.lesson21-m-pair.is-merging .lesson21-m-moving-batchim {
    animation: lesson21MBatchimRise 900ms ease-in-out forwards;
}
.lesson21-m-pair.is-first-merge.is-merging .lesson21-m-moving-batchim {
    animation-duration: 1100ms;
}
.lesson21-m-base-button.is-merging .lesson21-m-display-letter {
    color: #49627e;
}
.lesson21-m-pair.is-complete {
    background: #effbf3;
}
.lesson21-m-pair.is-complete .lesson21-m-writing-cell {
    background: #f2fbf6;
}
.lesson21-m-pair.is-complete .lesson21-m-base-button {
    background: #dff6e6;
    color: #145c4f;
}
.lesson21-m-base-button.is-complete .lesson21-m-listen-label {
    opacity: 1;
}
.lesson21-m-base-button.is-complete-pulse {
    animation: lesson21MResultPulse 620ms ease-out 1;
}
.lesson21-m-tip {
    margin-top: 14px;
    font-size: 1rem;
}
@keyframes lesson21MBatchimRise {
    0% { opacity: 0; transform: translate(-50%, 12px) scale(.82); }
    20% { opacity: 1; }
    72% { opacity: 1; transform: translate(-50%, -94px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -108px) scale(.92); }
}
@keyframes lesson21MResultPulse {
    0% { transform: scale(.92); }
    55% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes lesson21MGuide {
    0% { box-shadow: inset 0 0 0 2px rgba(249, 115, 22, 0); }
    50% { box-shadow: inset 0 0 0 4px rgba(249, 115, 22, .35); }
    100% { box-shadow: inset 0 0 0 2px rgba(249, 115, 22, 0); }
}
@media (max-width: 900px) {
    .lesson21-m-block {
        grid-template-columns: 76px minmax(0, 1fr);
    }
    .lesson21-m-side-column,
    .lesson21-m-pair {
        grid-template-rows: 72px 132px;
    }
    .lesson21-m-trace-canvas {
        height: 94px;
    }
    .lesson21-m-writing-cell {
        padding: 7px 5px 4px;
    }
    .lesson21-m-batchim-label span,
    .lesson21-m-cell-hint {
        font-size: .65rem;
    }
}
@media (max-width: 640px) {
    .lesson21-m-block {
        display: block;
        overflow: visible;
        border-radius: 8px;
    }
    .lesson21-m-side-column {
        display: block;
    }
    .lesson21-m-base-heading {
        display: none;
    }
    .lesson21-m-batchim-label {
        display: flex;
        justify-content: center;
        gap: 10px;
        min-height: 58px;
        border-bottom: 1px solid #aab8c9;
    }
    .lesson21-m-batchim-label span {
        font-size: .85rem;
    }
    .lesson21-m-batchim-label strong {
        font-size: 1.8rem;
    }
    .lesson21-m-pair-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
    }
    .lesson21-m-pair {
        grid-template-rows: 72px 154px;
        overflow: hidden;
        border: 1px solid #aab8c9;
        border-radius: 8px;
    }
    .lesson21-m-trace-canvas {
        height: 112px;
    }
    .lesson21-m-feedback {
        font-size: 1rem;
    }
}
@media (max-width: 400px) {
    .lesson21-m-pair-grid {
        grid-template-columns: 1fr;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lesson21-m-pair,
    .lesson21-m-base-button,
    .lesson21-m-writing-cell,
    .lesson21-m-cell-hint {
        transition: none;
    }
    .lesson21-m-pair.is-merging .lesson21-m-moving-batchim,
    .lesson21-m-base-button.is-complete-pulse,
    .lesson21-m-pair.needs-guidance .lesson21-m-writing-cell {
        animation-duration: 1ms;
    }
}
.lesson21-shaded-rows .lesson21-practice-row {
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 2px;
}
.lesson21-shaded-rows .lesson21-practice-syllable {
    display: grid;
    grid-template-rows: 1fr 26px;
    align-items: center;
    justify-items: center;
    min-height: 80px;
    padding: 2px;
}
.lesson21-practice-letter {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.32rem;
    font-weight: 1000;
}
.lesson21-shaded-writing-canvas {
    width: min(100%, 34px);
    height: 24px;
    border: 1px solid #5da9e9;
    border-radius: 2px;
    background: #ffffff;
}
.lesson21-small-slot {
    width: 22px;
    height: 16px;
    border: 1px solid #60a5fa;
    background: #ffffff;
}
.lesson21-m-practice-page {
    overflow-x: hidden;
}
.lesson21-m-practice-instruction {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding: 14px 18px;
    border: 2px solid #b8d7fb;
    border-radius: 10px;
    background: #eef6ff;
    color: #173b67;
    text-align: center;
}
.lesson21-m-practice-instruction strong {
    font-size: 1.22rem;
    font-weight: 1000;
}
.lesson21-m-practice-instruction span {
    font-size: .95rem;
    font-weight: 800;
}
.lesson21-m-focus-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(280px, 1.1fr);
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px;
    border: 3px solid #61cbb1;
    border-radius: 12px;
    background: #f2fcf8;
    box-shadow: 0 8px 20px rgba(26, 113, 98, .1);
}
.lesson21-m-focus-panel.hidden {
    display: none;
}
.lesson21-m-focus-summary {
    display: grid;
    align-content: center;
    gap: 18px;
    min-width: 0;
}
.lesson21-m-focus-equation {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    color: #6b7d91;
    font-size: 2rem;
    font-weight: 1000;
    text-align: center;
}
.lesson21-m-focus-base,
.lesson21-m-focus-batchim,
.lesson21-m-focus-result {
    display: grid;
    place-items: center;
    min-width: 70px;
    min-height: 76px;
    border-radius: 8px;
    background: #ffffff;
    color: #173b67;
    font-size: 3rem;
}
.lesson21-m-focus-batchim {
    border: 2px dashed #fdba74;
    color: #159f91;
}
.lesson21-m-focus-result {
    border: 2px solid #cbd5e1;
    color: #8a9aab;
}
.lesson21-m-focus-panel.is-complete .lesson21-m-focus-result {
    border-color: #5bc698;
    background: #dff7e8;
    color: #12624f;
    animation: lesson21MPracticeResult 620ms ease-out 1;
}
.lesson21-m-focus-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lesson21-m-listen-button,
.lesson21-m-reset-button {
    min-height: 46px;
    padding: 8px 14px;
    border: 2px solid #54bca6;
    border-radius: 8px;
    background: #ffffff;
    color: #17685b;
    font-size: .95rem;
    font-weight: 900;
}
.lesson21-m-listen-button.is-result {
    border-color: #55bd79;
    background: #eaf9ef;
    color: #176b3c;
}
.lesson21-m-reset-button {
    border-color: #f2b574;
    color: #9a4a13;
}
.lesson21-m-focus-writing {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
}
.lesson21-m-practice-canvas {
    width: min(100%, 380px);
    height: 220px;
    border: 2px solid #9ed7ce;
    border-radius: 10px;
    background: #ffffff;
    touch-action: none;
}
.lesson21-m-practice-moving-batchim {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 54%;
    opacity: 0;
    color: #159f91;
    font-size: 3.2rem;
    font-weight: 1000;
    pointer-events: none;
    transform: translate(-50%, 0);
}
.lesson21-m-focus-panel.is-merging .lesson21-m-practice-moving-batchim {
    animation: lesson21MPracticeRise 1s ease-in-out forwards;
}
.lesson21-m-practice-feedback {
    grid-column: 1 / -1;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid #b9e4d3;
    border-radius: 8px;
    background: #ffffff;
    color: #245a51;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}
.lesson21-m-focus-panel.needs-guidance .lesson21-m-practice-canvas {
    animation: lesson21MGuide 800ms ease-out 1;
}
.lesson21-m-syllable-board {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 2px solid #b8c7d8;
    border-radius: 10px;
    background: #f8fafc;
}
.lesson21-m-syllable-row {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 4px;
}
.lesson21-m-syllable-cell {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-width: 44px;
    min-height: 72px;
    padding: 5px 2px;
    border: 1px solid #b9c8d9;
    border-radius: 7px;
    background: #ffffff;
    color: #152e4d;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.lesson21-m-syllable-cell:hover,
.lesson21-m-syllable-cell:focus-visible {
    z-index: 2;
    transform: translateY(-2px);
    border-color: #4eb6a2;
}
.lesson21-m-cell-letter {
    font-size: 1.62rem;
    font-weight: 1000;
    line-height: 1;
}
.lesson21-m-syllable-cell.is-target {
    min-height: 82px;
    border: 2px solid #79bdd7;
    background: #e9f6fb;
}
.lesson21-m-cell-action {
    color: #32758b;
    font-size: .66rem;
    font-weight: 900;
    white-space: nowrap;
}
.lesson21-m-syllable-cell.is-selected {
    z-index: 3;
    border: 3px solid #25ae91;
    background: #d9f7ed;
    box-shadow: 0 5px 12px rgba(30, 138, 116, .18);
    transform: scale(1.03);
}
.lesson21-m-practice-page.has-selection .lesson21-m-syllable-cell:not(.is-target) {
    opacity: .72;
}
.lesson21-m-practice-page.has-selection .lesson21-m-syllable-cell.is-target:not(.is-selected):not(.is-complete) {
    opacity: .86;
}
.lesson21-m-syllable-cell.is-complete {
    border-color: #81c99a;
    background: #edf9f1;
}
.lesson21-m-syllable-cell.is-complete .lesson21-m-cell-action {
    color: #257448;
}
.lesson21-m-syllable-cell.is-complete.is-selected {
    border: 3px solid #25ae91;
    background: #d9f7ed;
    box-shadow: 0 5px 12px rgba(30, 138, 116, .18);
}
.lesson21-m-syllable-cell.is-next {
    animation: lesson21MNextTarget 760ms ease-in-out 2;
}
.lesson21-m-first-hint {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: calc(100% + 7px);
    padding: 5px 7px;
    border-radius: 6px;
    background: #17685b;
    color: #ffffff;
    font-size: .65rem;
    font-weight: 900;
    white-space: nowrap;
    transform: translateX(-50%);
}
.lesson21-m-first-hint::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top-color: #17685b;
    content: '';
    transform: translateX(-50%);
}
.lesson21-m-syllable-cell.is-first-target {
    animation: lesson21MFirstTarget 720ms ease-in-out 2;
}
.lesson21-m-progress-panel {
    display: grid;
    gap: 9px;
    margin-top: 14px;
    padding: 14px 18px;
    border: 2px dashed #67d99c;
    border-radius: 10px;
    background: #effcf3;
    color: #175b3d;
}
.lesson21-m-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: .96rem;
    font-weight: 850;
}
.lesson21-m-progress-copy strong {
    white-space: nowrap;
}
.lesson21-m-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #d8e8df;
}
.lesson21-m-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #43b983;
    transition: width .35s ease;
}
@keyframes lesson21MPracticeRise {
    0% { opacity: 0; transform: translate(-50%, 18px) scale(.8); }
    18%, 70% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -112px) scale(1); }
}
@keyframes lesson21MPracticeResult {
    0% { transform: scale(.88); }
    56% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes lesson21MFirstTarget {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 174, 145, 0); }
    50% { box-shadow: 0 0 0 5px rgba(37, 174, 145, .22); }
}
@keyframes lesson21MNextTarget {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 174, 145, 0); }
    50% { box-shadow: 0 0 0 5px rgba(37, 174, 145, .22); }
}
@media (max-width: 820px) {
    .lesson21-m-focus-panel {
        grid-template-columns: 1fr;
    }
    .lesson21-m-syllable-row {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 6px;
    }
    .lesson21-m-syllable-cell,
    .lesson21-m-syllable-cell.is-target {
        min-height: 76px;
    }
}
@media (max-width: 560px) {
    .lesson21-m-focus-panel {
        padding: 12px;
    }
    .lesson21-m-focus-equation {
        gap: 5px;
        font-size: 1.35rem;
    }
    .lesson21-m-focus-base,
    .lesson21-m-focus-batchim,
    .lesson21-m-focus-result {
        min-width: 48px;
        min-height: 60px;
        font-size: 2.25rem;
    }
    .lesson21-m-practice-canvas {
        height: 190px;
    }
    .lesson21-m-syllable-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .lesson21-m-progress-copy {
        display: grid;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lesson21-m-syllable-cell,
    .lesson21-m-progress-track span {
        transition: none;
    }
    .lesson21-m-syllable-cell.is-first-target,
    .lesson21-m-syllable-cell.is-next,
    .lesson21-m-focus-panel.is-merging .lesson21-m-practice-moving-batchim,
    .lesson21-m-focus-panel.is-complete .lesson21-m-focus-result,
    .lesson21-m-focus-panel.needs-guidance .lesson21-m-practice-canvas {
        animation-duration: 1ms;
        animation-iteration-count: 1;
    }
}

/* Lesson 21: mixed ㅁ/ㅂ inline handwriting board */
#main-container:has(.lesson21-m-practice-page) {
    width: min(calc(100% - 32px), 1400px);
    max-width: 1400px;
}
.lesson21-m-practice-page {
    width: min(100%, 1400px);
    margin-inline: auto;
    overflow: visible;
}
.lesson21-m-practice-instruction {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    text-align: left;
}
.lesson21-m-practice-instruction > span {
    display: grid;
    gap: 4px;
}
.lesson21-m-practice-instruction small {
    color: #496a8d;
    font-size: .9rem;
    font-weight: 750;
}
.lesson21-m-shuffle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 112px;
    min-height: 44px;
    padding: 8px 12px;
    border: 2px solid #77b7dd;
    border-radius: 8px;
    background: #ffffff;
    color: #17547c;
    font-size: .92rem;
    font-weight: 900;
}
.lesson21-m-board-scroller {
    max-width: 100%;
    padding-bottom: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: #8db7cb #e8f1f5;
}
.lesson21-m-syllable-board {
    width: 100%;
    min-width: 1240px;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
}
.lesson21-m-syllable-row {
    grid-template-columns: repeat(14, minmax(76px, 1fr));
    gap: 5px;
}
.lesson21-m-syllable-cell,
.lesson21-m-syllable-cell.is-target {
    min-width: 76px;
    min-height: 112px;
    padding: 7px 5px;
    border-radius: 7px;
}
.lesson21-m-syllable-cell.is-reading {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 4px;
    border: 1px solid #c8d4e0;
    background: #ffffff;
}
.lesson21-m-syllable-cell.is-reading .lesson21-m-cell-letter {
    align-self: end;
    font-size: 2.15rem;
}
.lesson21-m-read-label {
    color: #718096;
    font-size: .68rem;
    font-weight: 800;
}
.lesson21-m-syllable-cell.is-target {
    grid-template-rows: 36px 52px 16px;
    align-content: center;
    border: 2px solid #8abbd2;
    background: #eef7fb;
}
.lesson21-m-cell-sound {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 36px;
    padding: 0 22px 0 2px;
    border: 0;
    background: transparent;
    color: #152e4d;
}
.lesson21-m-cell-sound .lesson21-m-cell-letter {
    font-size: 2rem;
}
.lesson21-m-sound-mark {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    font-size: .76rem;
}
.lesson21-m-inline-canvas {
    display: block;
    width: 58px;
    height: 50px;
    margin: 0 auto;
    border: 1px solid #9bc6d9;
    border-radius: 6px;
    background: #ffffff;
    touch-action: none;
}
.lesson21-m-syllable-cell.is-target .lesson21-m-cell-action {
    color: #315f75;
    font-size: .68rem;
    line-height: 1;
}
.lesson21-m-syllable-cell.is-selected {
    border: 3px solid #f28a3c;
    background: #fff7ed;
    box-shadow: 0 4px 10px rgba(194, 92, 23, .16);
}
.lesson21-m-syllable-cell.is-complete {
    border: 2px solid #55b77a;
    background: #eaf8ef;
}
.lesson21-m-syllable-cell.is-complete.is-selected {
    border: 3px solid #f28a3c;
    background: #eef9f2;
}
.lesson21-m-syllable-cell.is-complete .lesson21-m-cell-letter {
    color: #126348;
}
.lesson21-m-syllable-cell.is-next {
    animation: lesson21MNextTarget 760ms ease-in-out 2;
}
.lesson21-m-first-hint {
    bottom: calc(100% + 5px);
}
@media (max-width: 820px) {
    .lesson21-m-syllable-row {
        grid-template-columns: repeat(14, minmax(76px, 1fr));
    }
    .lesson21-m-syllable-cell,
    .lesson21-m-syllable-cell.is-target {
        min-height: 112px;
    }
}
@media (max-width: 560px) {
    .lesson21-m-practice-instruction {
        grid-template-columns: 1fr;
    }
    .lesson21-m-shuffle-button {
        justify-self: start;
    }
    .lesson21-m-progress-copy {
        display: grid;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lesson21-m-syllable-cell.is-next {
        animation-duration: 1ms;
        animation-iteration-count: 1;
    }
}
.lesson21-word-find-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

/* Lesson 21: Chanchan Hangul ㅂ batchim word writing */
.lesson21-b-word-writing-page {
    display: grid;
    gap: 16px;
}
.lesson21-b-word-tip {
    padding: 10px 14px;
    border-left: 5px solid #72a94b;
    background: #f5faef;
    color: #456b2d;
    font-size: .95rem;
    font-weight: 800;
}
.lesson21-b-word-rows {
    display: grid;
    gap: 22px;
    padding: 18px;
    border: 2px solid #c6d3e0;
    border-radius: 8px;
    background: #ffffff;
}
.lesson21-b-word-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: center;
    gap: 18px;
}
.lesson21-b-word-group {
    position: relative;
    display: grid;
    gap: 6px;
    padding-top: 36px;
}
.lesson21-b-word-listen {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 68px;
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid #8eb8d0;
    border-radius: 7px;
    background: #ffffff;
    color: #285e7c;
    font-size: .8rem;
    font-weight: 900;
}
.lesson21-b-word-strip {
    display: flex;
    align-items: stretch;
}
.lesson21-b-word-syllable {
    display: grid;
    grid-template-rows: 58px 56px 18px;
    width: 92px;
    min-height: 132px;
    overflow: hidden;
    border: 1px solid #b9c5d0;
    background: #ffffff;
}
.lesson21-b-word-syllable + .lesson21-b-word-syllable {
    border-left: 0;
}
.lesson21-b-word-syllable:first-child {
    border-radius: 8px 0 0 8px;
}
.lesson21-b-word-syllable:last-child {
    border-radius: 0 8px 8px 0;
}
.lesson21-b-word-syllable:only-child {
    border-radius: 8px;
}
.lesson21-b-word-base {
    display: grid;
    place-items: center;
    background: #dbe8f5;
    color: #152e4d;
    font-size: 2.35rem;
    font-weight: 1000;
    line-height: 1;
}
.lesson21-b-word-canvas {
    align-self: center;
    width: 78px;
    height: 50px;
    margin: 3px auto;
    border: 2px solid #f2aa68;
    border-radius: 6px;
    background: #fffdf9;
    touch-action: none;
}
.lesson21-b-word-empty {
    display: block;
    width: 100%;
    height: 56px;
    background: #ffffff;
}
.lesson21-b-word-status {
    display: grid;
    place-items: center;
    color: #9a4c18;
    font-size: .72rem;
    font-weight: 900;
}
.lesson21-b-word-syllable.is-reading {
    grid-template-rows: 58px 56px 18px;
}
.lesson21-b-word-syllable.is-complete {
    border-color: #55b77a;
    background: #ebf8ef;
}
.lesson21-b-word-syllable.is-complete .lesson21-b-word-status {
    color: #197247;
}
.lesson21-b-word-group.is-complete .lesson21-b-word-listen {
    border-color: #55b77a;
    background: #ebf8ef;
    color: #176b43;
}
.lesson21-b-word-progress {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border: 2px dashed #69cf98;
    border-radius: 8px;
    background: #effbf3;
    color: #185d3d;
    font-size: .95rem;
    font-weight: 850;
}
.lesson21-b-word-progress strong {
    white-space: nowrap;
}

/* Lesson 21: Chanchan Hangul ㅁ batchim picture word writing */
.lesson21-m-picture-writing-page {
    display: grid;
    gap: 16px;
}
.lesson21-m-picture-tip {
    padding: 10px 14px;
    border-left: 5px solid #72a94b;
    background: #f5faef;
    color: #456b2d;
    font-weight: 850;
}
.lesson21-m-picture-bank {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    overflow: hidden;
    border: 2px solid #d6dec8;
    border-radius: 8px;
    background: #fff;
}
.lesson21-m-picture-bank-label {
    display: grid;
    place-items: center;
    background: #6f934a;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 950;
}
.lesson21-m-picture-bank-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 12px;
}
.lesson21-m-picture-bank-items button {
    min-width: 68px;
    min-height: 58px;
    border: 2px solid #b7cadc;
    border-radius: 7px;
    background: #dbe8f5;
    color: #152e4d;
    font-size: 2rem;
    font-weight: 1000;
}
.lesson21-m-picture-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
    padding: 20px;
    border: 2px solid #c6d3e0;
    border-radius: 8px;
    background: #fff;
}
.lesson21-m-picture-item {
    display: grid;
    grid-template-columns: minmax(110px, .75fr) minmax(210px, 1.25fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.lesson21-m-picture-image {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 156px;
    border: 0;
    border-radius: 8px;
    background: #f7fbff;
    color: #285e7c;
    font-weight: 900;
}
.lesson21-m-picture-image > span {
    font-size: 4.4rem;
    line-height: 1;
}
.lesson21-m-picture-image small {
    font-size: .78rem;
}
.lesson21-m-picture-word {
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.lesson21-m-picture-printed,
.lesson21-m-picture-write-cell {
    width: min(126px, 50%);
    min-height: 156px;
    border: 2px solid #b7c4d0;
}
.lesson21-m-picture-printed {
    display: grid;
    place-items: center;
    background: #fff;
    color: #172d49;
    font-size: 3.2rem;
    font-weight: 1000;
}
.lesson21-m-picture-write-cell {
    display: grid;
    grid-template-rows: 58px minmax(72px, 1fr) 25px;
    padding: 6px;
    background: #dbe8f5;
}
.lesson21-m-picture-write-cell.is-whole-syllable {
    min-height: 170px;
    grid-template-rows: minmax(132px, 1fr) 25px;
}
.lesson21-m-picture-write-cell.is-whole-syllable .lesson21-m-picture-canvas {
    height: 132px;
}
.lesson21-m-picture-write-base {
    display: grid;
    place-items: center;
    color: #172d49;
    font-size: 3rem;
    font-weight: 1000;
    line-height: 1;
}
.lesson21-m-picture-word > :first-child {
    border-radius: 8px 0 0 8px;
}
.lesson21-m-picture-word > :last-child {
    margin-left: -2px;
    border-radius: 0 8px 8px 0;
}
.lesson21-m-picture-canvas {
    width: 100%;
    height: 82px;
    border: 2px dashed #75a7cf;
    border-radius: 6px;
    background: rgba(255, 255, 255, .78);
    touch-action: none;
}
.lesson21-m-picture-write-status {
    display: grid;
    place-items: center;
    color: #285e7c;
    font-size: .76rem;
    font-weight: 900;
}
.lesson21-m-picture-write-cell.is-complete {
    border-color: #4fb47a;
    background: #e1f6e8;
}
.lesson21-m-picture-write-cell.is-complete .lesson21-m-picture-write-status {
    color: #176b43;
}
.lesson21-m-picture-item.is-complete .lesson21-m-picture-image {
    box-shadow: inset 0 0 0 2px #86d3a2;
    background: #f1fbf4;
}
.lesson21-m-picture-progress {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border: 2px dashed #69cf98;
    border-radius: 8px;
    background: #effbf3;
    color: #185d3d;
    font-weight: 850;
}
.lesson21-m-picture-progress strong {
    white-space: nowrap;
}
@media (max-width: 900px) {
    .lesson21-m-picture-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
}
@media (max-width: 700px) {
    .lesson21-b-word-rows {
        padding: 12px;
    }
    .lesson21-b-word-row {
        justify-content: flex-start;
    }
    .lesson21-b-word-syllable {
        width: 84px;
    }
    .lesson21-b-word-progress {
        display: grid;
    }
    .lesson21-m-picture-grid {
        padding: 12px;
    }
    .lesson21-m-picture-progress {
        display: grid;
    }
}
@media (max-width: 480px) {
    .lesson21-m-picture-bank {
        grid-template-columns: 1fr;
    }
    .lesson21-m-picture-bank-label {
        min-height: 42px;
    }
    .lesson21-m-picture-item {
        grid-template-columns: 94px minmax(0, 1fr);
    }
    .lesson21-m-picture-image {
        min-height: 142px;
    }
    .lesson21-m-picture-image > span {
        font-size: 3.4rem;
    }
    .lesson21-m-picture-printed,
    .lesson21-m-picture-write-cell {
        min-height: 142px;
    }
    .lesson21-m-picture-canvas {
        height: 76px;
    }
    .lesson21-m-picture-write-cell.is-whole-syllable {
        min-height: 150px;
        grid-template-rows: minmax(112px, 1fr) 25px;
    }
    .lesson21-m-picture-write-cell.is-whole-syllable .lesson21-m-picture-canvas {
        height: 112px;
    }
    .lesson21-m-picture-write-base {
        font-size: 2.55rem;
    }
}
.lesson21-word-find-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 3px solid #99e8df;
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
    transition: border-color .2s ease, background .2s ease;
}
.lesson21-word-find-card.is-speaking {
    border-color: #fb923c;
    background: #fff7ed;
}
.lesson21-word-picture {
    min-height: 112px;
    border: 2px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    font-size: 4.2rem;
    line-height: 1;
}
.lesson21-word-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.lesson21-word-choice {
    min-height: 58px;
    border: 3px solid #43b83f;
    border-radius: 999px;
    background: #ffffff;
    color: #31922e;
    font-size: 1.25rem;
    font-weight: 1000;
}
.lesson21-word-choice.is-selected {
    border-color: #16a34a;
    background: #22c55e;
    color: #ffffff;
}
.lesson21-word-choice.is-wrong {
    border-color: #fb923c;
    background: #fff7ed;
    color: #c2410c;
}
.lesson21-word-feedback {
    min-height: 1.5rem;
    color: #64748b;
    font-size: .95rem;
    font-weight: 1000;
}
.lesson21-word-feedback.is-correct { color: #16a34a; }
.lesson21-word-feedback.is-wrong { color: #ea580c; }
.lesson21-challenge-list {
    display: grid;
    gap: 12px;
}
.lesson21-challenge-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 3px solid #bae6fd;
    border-radius: 16px;
    background: #eff6ff;
}
.lesson21-challenge-level {
    color: #1e3a8a;
    font-size: 1rem;
    font-weight: 1000;
    text-align: center;
}
.lesson21-challenge-words {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.lesson21-challenge-word {
    min-height: 48px;
    padding: 5px 12px;
    border: 2px solid #93c5fd;
    border-radius: 9px;
    background: #ffffff;
    color: #20364b;
    font-size: 1.35rem;
    font-weight: 1000;
}
.lesson21-challenge-word:hover,
.lesson21-challenge-word:focus-visible {
    border-color: #f97316;
    background: #fff7ed;
}
.lesson-line-match-shell { overflow: visible; }
.lesson-line-match-status {
    min-height: 1.5rem;
    color: #0f766e;
    font-size: 1.1rem;
    font-weight: 1000;
    text-align: center;
}
.lesson-line-match-board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(42px, 12vw, 160px);
    min-height: 360px;
    padding: 12px 22px;
    border: 3px solid #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
}
.lesson-line-match-svg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.lesson-line-match-line {
    stroke: #f97316;
    stroke-width: 5;
    stroke-linecap: round;
    visibility: hidden;
    opacity: .82;
}
.lesson-line-match-column {
    position: relative;
    z-index: 1;
    display: grid;
    grid-auto-rows: minmax(58px, 1fr);
    gap: 10px;
    align-content: stretch;
}
.lesson-line-match-column.pictures { direction: rtl; }
.lesson-line-match-heading {
    display: grid;
    place-items: center;
    color: #1e3a8a;
    font-size: 1.05rem;
    font-weight: 1000;
}
.lesson-line-match-word,
.lesson-line-match-picture {
    position: relative;
    min-width: 0;
    min-height: 58px;
    border: 3px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #20364b;
    font-size: 1.55rem;
    font-weight: 1000;
}
.lesson-line-match-word::after,
.lesson-line-match-picture::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 3px solid #fb923c;
    border-radius: 50%;
    background: #ffffff;
    transform: translateY(-50%);
}
.lesson-line-match-word::after { right: 3px; }
.lesson-line-match-picture::before { left: 3px; }
.lesson-line-match-word.is-matched::after,
.lesson-line-match-picture.is-matched::before {
    border-color: #22c55e;
    background: #dcfce7;
}
.lesson-line-match-picture { font-size: 2rem; }
.lesson-line-match-word.is-selected,
.lesson-line-match-picture.is-target {
    border-color: #fb923c;
    background: #fff7ed;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, .18);
}
.lesson-line-match-word.is-matched,
.lesson-line-match-picture.is-matched {
    border-color: #22c55e;
    background: #dcfce7;
    color: #166534;
}
.lesson-line-match-picture.is-wrong {
    border-color: #ef4444;
    background: #fee2e2;
    animation: lesson-line-match-shake .35s ease;
}
.lesson-line-match-help {
    color: #64748b;
    font-size: .95rem;
    font-weight: 800;
    text-align: center;
}
@keyframes lesson-line-match-shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-5px); }
    70% { transform: translateX(5px); }
}
.lesson-final-stack {
    display: grid;
    gap: 16px;
}
.lesson-complete-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.lesson-complete-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    border: 2px solid #bae6fd;
    border-radius: 20px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.12);
}
.lesson-complete-picture {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
}
.lesson-complete-word {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}
.lesson-complete-word.three-syllable {
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
}
.lesson-complete-tile {
    position: relative;
    width: 104px;
    height: 116px;
    flex: 0 0 104px;
    border: 3px solid #bfdbfe;
    border-radius: 16px;
    background: #dbeafe;
    color: #111827;
    display: grid;
    overflow: hidden;
    line-height: 1;
}
.lesson-complete-tile.vertical {
    grid-template-columns: 48% 52%;
}
.lesson-complete-tile.horizontal {
    grid-template-rows: 48% 52%;
}
.lesson-complete-word.three-syllable .lesson-complete-tile {
    width: 88px;
    height: 102px;
    flex-basis: 88px;
}
.lesson-complete-word.three-syllable .lesson-syllable-part {
    font-size: 2.1rem;
}
.lesson-syllable-part {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    font-size: 2.35rem;
    font-weight: 1000;
}
.lesson-syllable-part.given {
    background: #fecaca;
}
.lesson-syllable-part.write {
    background: #cfe8fb;
}
.lesson-syllable-part.write::before,
.lesson-syllable-part.write::after {
    content: "";
    position: absolute;
    background: rgba(59, 130, 246, 0.22);
    pointer-events: none;
}
.lesson-syllable-part.write::before {
    left: 10%;
    right: 10%;
    top: 50%;
    height: 1px;
}
.lesson-syllable-part.write::after {
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
}
.lesson-complete-writing-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    cursor: crosshair;
    z-index: 2;
}
.lesson-syllable-write-placeholder {
    color: rgba(3, 105, 161, 0.35);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    pointer-events: none;
    z-index: 1;
}
.lesson-complete-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.lesson-complete-actions .trace-clear-button {
    width: auto;
    min-width: 120px;
    flex: 1 1 120px;
}
.lesson-complete-actions .btn-outline {
    flex: 1 1 96px;
}
.lesson-complete-feedback {
    min-height: 1.5rem;
    margin-top: 8px;
    color: #16a34a;
    font-weight: 900;
}
.lesson13-board-path {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}
.lesson13-game-panel {
    display: grid;
    gap: 14px;
}
.lesson13-game-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.lesson13-player-card {
    border: 2px solid #bfdbfe;
    border-radius: 18px;
    background: #eff6ff;
    padding: 12px;
    text-align: center;
}
.lesson13-player-card.player-two {
    border-color: #fed7aa;
    background: #fff7ed;
}
.lesson13-player-name {
    font-size: 1rem;
    font-weight: 1000;
    color: #1e3a8a;
}
.lesson13-player-card.player-two .lesson13-player-name {
    color: #9a3412;
}
.lesson13-player-position {
    min-height: 1.4rem;
    margin-top: 4px;
    font-size: 0.9rem;
    font-weight: 900;
    color: #475569;
}
.lesson13-move-button {
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    padding: 10px 12px;
    font-weight: 1000;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.lesson13-player-card.player-two .lesson13-move-button {
    background: #f97316;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.24);
}
.lesson13-game-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.lesson13-game-word-bubble {
    border: 3px solid #43b83f;
    border-radius: 999px;
    background: #ffffff;
    color: #31922e;
    padding: 10px 18px;
    font-size: 1.15rem;
    font-weight: 1000;
    min-width: min(260px, 100%);
    text-align: center;
}
.lesson13-board-cell {
    position: relative;
    min-height: 72px;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    overflow: visible;
}
.lesson13-board-cell:nth-child(2n) {
    background: #f7fee7;
    border-color: #d9f99d;
}
.lesson13-board-cell:nth-child(3n) {
    background: #dbeafe;
    border-color: #bfdbfe;
}
.lesson13-board-cell.start,
.lesson13-board-cell.finish {
    background: #2f766d;
    border-color: #2f766d;
    color: #ffffff;
    font-size: 1.25rem;
}
.lesson13-board-cell.read {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.lesson13-board-cell.read:hover,
.lesson13-board-cell.read:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}
.lesson13-board-cell.read.active {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}
.lesson13-board-cell.current-one {
    outline: 4px solid rgba(37, 99, 235, 0.26);
}
.lesson13-board-cell.current-two {
    outline: 4px solid rgba(249, 115, 22, 0.28);
}
.lesson13-board-token-layer {
    position: absolute;
    left: 50%;
    bottom: -18px;
    display: flex;
    gap: 3px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 4;
}
.lesson13-board-token {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 1000;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
    animation: lesson13-token-hop 0.34s ease;
}
.lesson13-board-token.player-one {
    background: #2563eb;
}
.lesson13-board-token.player-two {
    background: #f97316;
}
.lesson13-board-cell.finish .lesson13-board-token {
    animation: lesson13-token-win 0.7s ease infinite alternate;
}
@keyframes lesson13-token-hop {
    0% { transform: translateY(10px) scale(0.86); opacity: 0.45; }
    60% { transform: translateY(-8px) scale(1.08); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes lesson13-token-win {
    from { transform: translateY(0) rotate(-3deg); }
    to { transform: translateY(-7px) rotate(3deg); }
}
.lesson12-confirm-grid {
    display: grid;
    gap: 14px;
}
.lesson12-confirm-row {
    border: 2px solid #bae6fd;
    border-radius: 20px;
    background: #ffffff;
    padding: 14px;
}
.lesson12-confirm-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.lesson12-confirm-choice {
    border: 2px solid #bfdbfe;
    border-radius: 18px;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 14px 10px;
    font-size: 2.1rem;
    font-weight: 1000;
}
.lesson12-confirm-choice.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}
.lesson12-confirm-choice.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}
@keyframes lesson13-card-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes lesson13-card-speak {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.025); }
}
@media (prefers-reduced-motion: reduce) {
    .lesson13-picture-card,
    .lesson13-picture-card.is-speaking {
        animation: none;
    }
}
.trace-writing-canvas.fill-trace-canvas {
    width: 100%;
    height: 168px;
    border-width: 2px;
    border-radius: 16px;
    background: #fffaf2;
}
.letter-practice-selector-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 28px;
}
.letter-practice-selector-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 86px;
}
.letter-practice-selector-title {
    color: #2c3e50;
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0;
}
#letter-practice-panel .trace-canvas-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#letter-writing-canvas.trace-writing-canvas {
    width: min(100%, 620px);
    height: clamp(420px, 58vw, 620px);
    max-height: 620px;
}
.embedded-practice-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.practice-level-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.practice-example-grid {
    display: grid;
    gap: 12px;
}
.practice-example-grid.word {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.practice-example-grid.sentence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.embedded-practice-output {
    text-align: center;
    color: #2c3e50;
    font-weight: 1000;
    margin: 20px 0 14px;
    word-break: keep-all;
}
.embedded-practice-output.word {
    font-size: clamp(2.6rem, 7vw, 4.4rem);
}
.embedded-practice-output.sentence {
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    line-height: 1.25;
}
.embedded-writing-canvas.trace-writing-canvas {
    height: 360px;
}
.embedded-writing-canvas.sentence-writing-canvas {
    height: 460px;
}
.writing-compact-toolbar {
    width: min(100%, 1100px);
    margin: 0 auto 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.writing-mode-quick-card {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 2px solid #dbeed5;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px rgba(85, 179, 70, 0.1);
}
.writing-mode-title {
    font-size: 1.1rem;
    font-weight: 1000;
    color: #2c3e50;
    line-height: 1;
}
.writing-mode-subtitle {
    font-size: 0.82rem;
    font-weight: 800;
    color: #64748b;
}
.writing-mode-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.writing-mode-buttons .nav-tab {
    padding: 8px 16px;
    font-size: 0.95rem;
    border-radius: 14px;
}
#letter-writing-section .learning-pane {
    padding-top: 18px !important;
}
#word-write-display.sentence-mode #word-write-current {
    max-width: 760px;
    font-size: clamp(2.1rem, 4.4vw, 3.8rem) !important;
    line-height: 1.25;
    word-break: keep-all;
    text-align: center;
}
.fill-writing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.fill-writing-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}
.fill-writing-prompt {
    font-size: 2.2rem;
    font-weight: 1000;
    color: #2c3e50;
    white-space: nowrap;
}
.trace-canvas-help {
    font-size: 0.85rem;
    font-weight: 800;
    color: #9a3412;
    margin-top: 8px;
    text-align: center;
}
@media (max-width: 640px) {
    .letter-practice-selector-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    #letter-writing-canvas.trace-writing-canvas {
        width: 100%;
        height: calc(100vw - 76px);
        min-height: 300px;
    }
    .practice-example-grid.word,
    .practice-example-grid.sentence {
        grid-template-columns: 1fr;
    }
    .embedded-writing-canvas.trace-writing-canvas,
    .embedded-writing-canvas.sentence-writing-canvas {
        height: 340px;
    }
    .trace-writing-canvas.make-letter-grid {
        height: 760px;
    }
    .make-letter-guide-grid {
        grid-template-columns: 46px repeat(5, minmax(0, 1fr));
        gap: 4px;
    }
    .make-letter-cell {
        min-height: 48px;
        font-size: 1.25rem;
    }
    .make-letter-group-grid {
        grid-template-columns: 1fr;
    }
    .lesson13-picture-grid,
    .lesson13-word-line-grid,
    .lesson13-match-grid,
    .lesson20-read-find-grid,
    .lesson21-example-grid,
    .lesson21-word-find-grid {
        grid-template-columns: 1fr;
    }
    .lesson21-family-row,
    .lesson21-follow-row {
        grid-template-columns: 42px repeat(5, minmax(0, 1fr));
        gap: 3px;
    }
    .lesson21-family-batchim,
    .lesson21-family-cell,
    .lesson21-follow-label,
    .lesson21-follow-result {
        min-height: 54px;
        font-size: 1.05rem;
    }
    .lesson21-write-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lesson21-practice-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .lesson21-shaded-rows .lesson21-practice-row {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    .lesson21-reference-base-row,
    .lesson21-reference-write-row {
        grid-template-columns: 42px repeat(5, minmax(0, 1fr));
    }
    .lesson21-reference-base,
    .lesson21-reference-corner,
    .lesson21-reference-write-cell {
        min-height: 56px;
    }
    .lesson21-reference-write-cell {
        grid-template-columns: 1fr;
    }
    .lesson21-reference-sound {
        display: none;
    }
    .lesson21-inline-writing-canvas {
        height: 46px;
    }
    .lesson21-practice-syllable {
        min-height: 48px;
        font-size: 1.15rem;
    }
    .lesson21-challenge-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .lesson21-challenge-level {
        text-align: left;
    }
    .lesson21-challenge-done {
        width: 100%;
    }
    .lesson21-example-card {
        min-height: 112px;
        font-size: 1.7rem;
    }
    .lesson20-nonsense-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lesson20-nonsense-word {
        min-height: 92px;
        font-size: 1.7rem;
    }
    .lesson20-read-find-picture {
        min-height: 98px;
        font-size: 3.5rem;
    }
    .lesson-line-match-board {
        gap: 20px;
        min-height: 340px;
        padding: 10px 8px;
    }
    .lesson-line-match-word,
    .lesson-line-match-picture {
        font-size: 1.18rem;
    }
    .lesson-line-match-picture {
        font-size: 1.65rem;
    }
    .lesson13-picture-card {
        min-height: 150px;
        grid-template-columns: 100px minmax(0, 1fr);
    }
    .lesson13-read-check-buttons {
        grid-template-columns: 1fr;
    }
    .lesson-complete-grid {
        grid-template-columns: 1fr;
    }
    .lesson-complete-card {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        padding: 12px;
    }
    .lesson-complete-picture {
        width: 68px;
        height: 68px;
        font-size: 2.6rem;
    }
    .lesson-complete-word {
        width: 100%;
        justify-content: center;
    }
    .lesson-complete-word.three-syllable {
        gap: 4px;
    }
    .lesson-complete-tile {
        width: 96px;
        height: 108px;
        flex-basis: 96px;
    }
    .lesson-complete-word.three-syllable .lesson-complete-tile {
        width: 60px;
        height: 78px;
        flex-basis: 60px;
        border-radius: 12px;
        border-width: 2px;
    }
    .lesson-complete-word.three-syllable .lesson-syllable-part {
        font-size: 1.42rem;
    }
    .lesson-syllable-part {
        font-size: 2.05rem;
    }
    .lesson-complete-actions {
        width: 100%;
        justify-content: center;
    }
    .lesson13-board-path {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .lesson13-board-cell {
        min-height: 62px;
        font-size: 1.18rem;
        padding: 6px;
    }
    .lesson13-game-controls {
        grid-template-columns: 1fr;
    }
    .lesson13-board-token {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
        border-width: 2px;
    }
    .lesson13-board-token-layer {
        bottom: -14px;
    }
    .lesson12-confirm-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .writing-compact-toolbar {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .writing-mode-quick-card {
        width: 100%;
    }
    .writing-mode-buttons .nav-tab {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
    }
}
.trace-clear-button {
    width: 100%;
    border: 2px solid #fed7aa;
    border-radius: 16px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 900;
    padding: 10px;
}
.mouth-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}
.mouth-learning-card {
    overflow: visible;
}
.mouth-sound-card {
    position: relative;
    border: 3px solid #fed7aa;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
    padding: 14px 12px;
    text-align: center;
    overflow: visible;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mouth-sound-card::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: -27px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fff7ed;
    border: 3px solid #fdba74;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 1000;
    transform: translateY(-50%);
    z-index: 2;
}
.mouth-sound-card:last-child::after {
    display: none;
}
.mouth-sound-card.is-playing,
.mouth-sound-card.is-active {
    border-color: #fb923c;
    background: linear-gradient(180deg, #ffedd5 0%, #ffffff 100%);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.2);
}
.mouth-letter {
    font-size: 3.4rem;
    font-weight: 1000;
    line-height: 1;
    color: #9a3412;
}
.mouth-visual {
    width: 132px;
    height: 110px;
    margin: 8px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mouth-face {
    position: relative;
    width: 108px;
    height: 108px;
    border: 4px solid #fca5a5;
    border-radius: 48% 48% 44% 44%;
    background: #fee2e2;
    box-shadow: inset 0 8px 18px rgba(124, 45, 18, 0.12);
    overflow: hidden;
}
.mouth-face::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 10px;
    height: 24px;
    border-bottom: 4px solid rgba(180, 83, 9, 0.24);
    border-radius: 0 0 999px 999px;
    transform: translateY(var(--jaw-drop, 0px));
    transition: transform .3s ease;
}
.mouth-nose {
    position: absolute;
    top: 47px;
    left: 50%;
    width: 8px;
    height: 12px;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.28);
    transform: translateX(-50%);
    z-index: 3;
}
.mouth-jaw {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    transform: translateY(var(--jaw-drop, 0px));
    transform-origin: 50% 0;
    z-index: 2;
}
.mouth-lips {
    position: absolute;
    left: 50%;
    top: 10px;
    width: var(--mouth-width, 62px);
    height: var(--mouth-height, 14px);
    border: 4px solid #b91c1c;
    border-radius: 999px;
    background: #451a03;
    overflow: hidden;
    transform: translateX(-50%);
    box-shadow: 0 3px 0 rgba(127, 29, 29, 0.18);
}
.mouth-teeth {
    position: absolute;
    top: 0;
    left: 16%;
    width: 68%;
    height: var(--teeth-height, 5px);
    border-radius: 0 0 10px 10px;
    background: #fffaf0;
    border-bottom: 1px solid rgba(120, 53, 15, 0.18);
}
.mouth-tongue {
    position: absolute;
    left: 20%;
    bottom: -2px;
    width: 60%;
    height: var(--tongue-height, 7px);
    border-radius: 999px 999px 0 0;
    background: #fb7185;
}
.mouth-growth-note {
    position: relative;
    margin-top: 12px;
    padding: 8px 14px;
    border: 2px dashed #86efac;
    border-radius: 18px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 1000;
    text-align: center;
}
.mouth-growth-note::before,
.mouth-growth-note::after {
    content: "";
    position: absolute;
    top: 50%;
    width: clamp(28px, 12vw, 90px);
    height: 3px;
    border-radius: 999px;
    background: #86efac;
    transform: translateY(-50%);
}
.mouth-growth-note::before { left: 14px; }
.mouth-growth-note::after { right: 14px; }
.mouth-growth-note span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 12px;
    background: #f0fdf4;
}
.mouth-sequence-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.mouth-sequence-button {
    border: 0;
    border-radius: 16px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #46b3a5, #22c55e);
    color: #ffffff;
    font-weight: 1000;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.24);
}
.mouth-listen-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}
.mouth-listen-button {
    border: 0;
    border-radius: 14px;
    padding: 8px 8px;
    background: linear-gradient(135deg, #46b3a5, #22c55e);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 6px 14px rgba(34, 197, 94, 0.22);
}
.mouth-listen-button.slow {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.22);
}
.lesson15-follow-box,
.lesson15-quiz-box {
    border: 3px solid #bbf7d0;
    border-radius: 22px;
    background: #f0fdf4;
    padding: 18px;
}
.lesson15-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.lesson15-choice-btn {
    border: 3px solid #fed7aa;
    border-radius: 22px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 4rem;
    font-weight: 1000;
    padding: 20px;
    line-height: 1;
    transition: transform .15s ease, background .15s ease;
}
.lesson15-choice-btn:hover {
    transform: translateY(-2px);
    background: #ffedd5;
}
.lesson15-choice-btn.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}
.lesson15-choice-btn.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}
.mouth-quiz-hint {
    margin-top: 14px;
    padding: 12px;
    border: 2px solid #fed7aa;
    border-radius: 18px;
    background: #fffaf2;
}
.mouth-quiz-hint-title {
    color: #9a3412;
    font-size: 1.05rem;
    font-weight: 1000;
    text-align: center;
}
.mouth-quiz-hint-guide {
    margin-top: 3px;
    color: #78716c;
    font-size: .88rem;
    font-weight: 800;
    text-align: center;
}
.mouth-quiz-hint-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.mouth-quiz-hint-card {
    min-width: 0;
    border: 3px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
    padding: 7px 5px 9px;
    text-align: center;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mouth-quiz-hint-card.is-playing,
.mouth-quiz-hint-card.is-active {
    border-color: #fb923c;
    background: linear-gradient(180deg, #ffedd5 0%, #ffffff 100%);
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.2);
    transform: translateY(-2px);
}
.mouth-quiz-hint-visual {
    width: 96px;
    height: 88px;
    margin: 4px auto 2px;
}
.mouth-quiz-hint-visual .mouth-face {
    transform: scale(.68);
    transform-origin: center;
}
.mouth-quiz-hint-description {
    min-height: 2.5em;
    color: #334155;
    font-size: .8rem;
    font-weight: 900;
    line-height: 1.25;
}
.mouth-sound-card.is-playing .mouth-face::before,
.mouth-quiz-hint-card.is-playing .mouth-face::before {
    animation: mouthChinDrop var(--mouth-duration, .85s) ease-in-out both;
}
.mouth-sound-card.is-playing .mouth-jaw,
.mouth-quiz-hint-card.is-playing .mouth-jaw {
    animation: mouthJawDrop var(--mouth-duration, .85s) ease-in-out both;
}
.mouth-sound-card.is-playing .mouth-lips,
.mouth-quiz-hint-card.is-playing .mouth-lips {
    animation: mouthOpen var(--mouth-duration, .85s) ease-in-out both;
}
.mouth-sound-card.is-playing .mouth-teeth,
.mouth-sound-card.is-playing .mouth-tongue,
.mouth-quiz-hint-card.is-playing .mouth-teeth,
.mouth-quiz-hint-card.is-playing .mouth-tongue {
    animation: mouthInteriorReveal var(--mouth-duration, .85s) ease-in-out both;
}
@keyframes mouthChinDrop {
    0%, 24% { transform: translateY(0); }
    70%, 100% { transform: translateY(var(--jaw-drop, 0px)); }
}
@keyframes mouthJawDrop {
    0%, 24% { transform: translateY(0); }
    70%, 100% { transform: translateY(var(--jaw-drop, 0px)); }
}
@keyframes mouthOpen {
    0%, 24% {
        width: var(--mouth-closed-width, 44px);
        height: var(--mouth-closed-height, 7px);
        border-width: 3px;
    }
    70%, 100% {
        width: var(--mouth-width, 62px);
        height: var(--mouth-height, 14px);
        border-width: 4px;
    }
}
@keyframes mouthInteriorReveal {
    0%, 24% { opacity: 0; }
    66%, 100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .mouth-sound-card,
    .mouth-quiz-hint-card,
    .mouth-face::before,
    .mouth-jaw,
    .mouth-lips {
        transition: none !important;
    }
    .mouth-sound-card.is-playing .mouth-face::before,
    .mouth-sound-card.is-playing .mouth-jaw,
    .mouth-sound-card.is-playing .mouth-lips,
    .mouth-sound-card.is-playing .mouth-teeth,
    .mouth-sound-card.is-playing .mouth-tongue,
    .mouth-quiz-hint-card.is-playing .mouth-face::before,
    .mouth-quiz-hint-card.is-playing .mouth-jaw,
    .mouth-quiz-hint-card.is-playing .mouth-lips,
    .mouth-quiz-hint-card.is-playing .mouth-teeth,
    .mouth-quiz-hint-card.is-playing .mouth-tongue {
        animation-duration: var(--mouth-duration, .72s) !important;
        animation-timing-function: ease-in-out !important;
    }
}
@media (max-width: 900px) {
    .learning-activity-layout { grid-template-columns: 1fr 1fr; gap: 12px; }
    .learning-main-card, .learning-practice-card { max-height: 400px; }
    .mouth-learning-card { max-height: none; }
    .mouth-flow-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
    .mouth-sound-card {
        padding: 10px 6px;
    }
    .mouth-sound-card::after {
        right: -18px;
        width: 24px;
        height: 24px;
        font-size: 1.1rem;
        border-width: 2px;
    }
    .mouth-letter {
        font-size: 3rem;
    }
    .mouth-visual {
        width: 112px;
        height: 100px;
    }
    .mouth-face {
        transform: scale(.84);
    }
    .mouth-sound-card .text-lg {
        font-size: 1rem;
        line-height: 1.2;
    }
    .mouth-sound-card .text-sm {
        font-size: .8rem;
        line-height: 1.18;
    }
    .mouth-quiz-hint-guide {
        font-size: .8rem;
    }
    .mouth-quiz-hint-description {
        font-size: .74rem;
    }
    .mouth-quiz-hint-visual .mouth-face {
        transform: scale(.6);
    }
    .mouth-listen-button {
        padding: 7px 6px;
    }
    .mouth-growth-note::before,
    .mouth-growth-note::after {
        display: none;
    }
}
@media (max-width: 680px) {
    .mouth-flow-grid { grid-template-columns: 1fr; }
    .mouth-sound-card::after { display: none; }
}
@media (max-width: 600px) {
    .learning-activity-layout { grid-template-columns: 1fr; }
    .fill-writing-grid { grid-template-columns: 1fr; }
    .fill-writing-row { grid-template-columns: 1fr; }
    .vowel-origin-scene {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
    }
    .vowel-origin-card {
        min-height: 230px;
        border-radius: 14px;
        padding: 8px;
    }
    .origin-result-glyph {
        font-size: 6.5rem;
    }
    .origin-card-label {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
    .origin-explanation {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }
    .origin-explanation-glyph {
        min-height: 54px;
        font-size: 2.7rem;
    }
    .origin-explanation strong { font-size: .94rem; }
    .origin-explanation span { font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
    .vowel-origin-card,
    .origin-explanation,
    .origin-learning-chip {
        transition-duration: .01ms !important;
    }
    .vowel-origin-card.is-origin-playing .origin-card-visual *,
    .vowel-origin-card.is-origin-playing .origin-result-glyph {
        animation: none !important;
    }
    .vowel-origin-card.is-origin-playing .origin-result-glyph {
        opacity: 1;
        transform: scale(1);
    }
    .vowel-origin-card.is-origin-playing .origin-sky-band,
    .vowel-origin-card.is-origin-playing .origin-ground-band,
    .vowel-origin-card.is-origin-playing .origin-soil-band,
    .vowel-origin-card.is-origin-playing .origin-person-character,
    .vowel-origin-card.is-origin-playing .origin-person-ground,
    .vowel-origin-card.is-origin-playing .origin-sun-figure {
        opacity: .18;
    }
}
/* 이해하기 2 자음/모음 선택 스타일 */
.hangul-pose-definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}
.learning-character-pose-row {
    flex-wrap: wrap;
}
.learning-start-reference-card {
    display: flex;
    justify-content: center;
    overflow: hidden;
}
.learning-start-reference-wrap {
    position: relative;
    width: 100%;
    max-width: 1000px;
}
.learning-start-reference-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.learning-start-image-hotspot {
    position: absolute;
    top: 8%;
    bottom: 6%;
    width: 40%;
    border: 0;
    border-radius: 24px;
    background: transparent;
    cursor: pointer;
}
.learning-start-image-hotspot.baby { left: 6%; }
.learning-start-image-hotspot.mom { right: 6%; }
.learning-start-image-hotspot:focus-visible {
    outline: 5px solid rgba(70, 179, 165, .7);
    outline-offset: -6px;
}
.learning-character-pose {
    min-width: 190px;
}
.learning-character-image-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.learning-pose-svg {
    display: block;
    width: 190px;
    height: 190px;
    overflow: visible;
}
.pose-guide-stroke {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    opacity: 0;
    pointer-events: none;
}
.baby-pose-guide {
    stroke: #83ead8;
    filter: drop-shadow(0 0 5px rgba(70, 179, 165, .95));
}
.mom-pose-guide {
    stroke: #ffc09f;
    filter: drop-shadow(0 0 5px rgba(255, 125, 66, .9));
}
.learning-pose-letter {
    display: inline-block;
    transform-origin: center;
}
.baby-pose-letter {
    color: #2c9e8f;
}
.mom-pose-letter {
    color: #f47d4a;
}
#understanding-1-pane.pose-sequence-playing .baby-pose-svg {
    animation: naturalBabyPoseEnter .9s ease-out 1 both;
}
#understanding-1-pane.pose-sequence-playing .baby-pose-guide {
    animation: naturalPoseGuideDraw 2.4s ease-in-out .8s 1 both;
}
#understanding-1-pane.pose-sequence-playing .baby-pose-letter {
    animation: naturalPoseLetterPulse .75s ease-in-out 3.05s 1 both;
}
#understanding-1-pane.pose-sequence-playing .mom-pose-svg {
    animation: naturalMomPoseEnter .9s ease-out 4s 1 both;
}
#understanding-1-pane.pose-sequence-playing .mom-pose-guide {
    animation: naturalPoseGuideDraw 2.4s ease-in-out 4.8s 1 both;
}
#understanding-1-pane.pose-sequence-playing .mom-pose-letter {
    animation: naturalPoseLetterPulse .75s ease-in-out 7.05s 1 both;
}
@keyframes naturalBabyPoseEnter {
    0% { opacity: 0; transform: translate(12px, 10px) scale(.94); }
    100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes naturalMomPoseEnter {
    0% { opacity: 0; transform: translateY(12px) scale(.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes naturalPoseGuideDraw {
    0% { opacity: 0; stroke-dashoffset: 360; }
    16%, 76% { opacity: .92; }
    88%, 100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes naturalPoseLetterPulse {
    0%, 100% { transform: scale(1); text-shadow: none; }
    52% { transform: scale(1.16); text-shadow: 0 0 20px currentColor; }
}
.cv-character .learning-pose-svg {
    width: 104px;
    height: 104px;
}
.cv-reference-character {
    display: block;
    width: 220px;
    height: 145px;
    max-width: 100%;
    border-radius: 12px;
    background-color: #ffffff;
    background-image: url('baby_giyeok.webp?v=20260714-mom-baby');
    background-repeat: no-repeat;
    pointer-events: none;
}
.cv-reference-baby {
    background-size: 233.2% 265.5%;
    background-position: 12.3% 40%;
}
.cv-reference-mom {
    background-size: 145% 164.8%;
    background-position: 119% 6.4%;
}
.syllable-consonant {
    color: #2563eb;
    transition: color 0.2s ease, transform 0.2s ease;
}
.syllable-vowel {
    color: #f59e0b;
    transition: color 0.2s ease, transform 0.2s ease;
}
.syllable-consonant.selected-consonant {
    color: #1d4ed8;
    text-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}
.syllable-vowel.selected-vowel {
    color: #d97706;
    text-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
}
.cv-animation-board {
    border: 2px solid rgba(70, 179, 165, 0.22);
    border-radius: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
    padding: 22px;
    margin-bottom: 22px;
    overflow: hidden;
}
.cv-demo-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 42px minmax(120px, 1fr) 42px minmax(110px, 0.8fr);
    align-items: center;
    gap: 12px;
}
.cv-character {
    position: relative;
    min-height: 188px;
    border-radius: 22px;
    background: #ffffff;
    border: 2px solid #e0f2fe;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 10px 22px rgba(44, 62, 80, 0.08);
}
.cv-character img {
    height: 104px;
    object-fit: contain;
}
.cv-baby {
    animation: cvBabyMove 5.6s ease-in-out infinite;
}
.cv-mom {
    animation: cvMomMove 5.6s ease-in-out infinite;
}
.cv-role-label {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 900;
    color: #2c3e50;
}
.cv-floating-letter {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: 2.7rem;
    font-weight: 900;
    line-height: 1;
}
.cv-floating-letter.consonant {
    color: #2563eb;
}
.cv-floating-letter.vowel {
    color: #f59e0b;
}
.cv-symbol {
    color: #94a3b8;
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    animation: cvSymbolBlink 5.6s ease-in-out infinite;
}
.cv-result-card {
    min-height: 188px;
    border-radius: 24px;
    border: 2px solid #99f6e4;
    background: #ccfbf1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.16);
    animation: cvResultPop 5.6s ease-in-out infinite;
}
.cv-result-letter {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
}
.cv-result-label {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 900;
}
.cv-merge-caption {
    margin-top: 14px;
    text-align: center;
    color: #475569;
    font-weight: 800;
}
.cv-syllable-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.cv-syllable-card {
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cv-syllable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(44, 62, 80, 0.1);
}
.cv-syllable-card .syllable-consonant,
.cv-syllable-card .syllable-vowel {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
}
@keyframes cvBabyMove {
    0%, 18%, 100% { transform: translateX(0); }
    42%, 62% { transform: translateX(26px); }
}
@keyframes cvMomMove {
    0%, 18%, 100% { transform: translateX(0); }
    42%, 62% { transform: translateX(-26px); }
}
@keyframes cvSymbolBlink {
    0%, 30% { opacity: 1; }
    44%, 70% { opacity: 0.28; }
    100% { opacity: 1; }
}
@keyframes cvResultPop {
    0%, 48% { transform: scale(0.86); opacity: 0.2; }
    62% { transform: scale(1.08); opacity: 1; }
    74%, 100% { transform: scale(1); opacity: 1; }
}
@media (max-width: 760px) {
    .learning-character-pose-row {
        gap: 24px;
    }
    .learning-character-pose {
        min-width: 130px;
    }
    .learning-character-image-wrap .learning-pose-svg {
        width: 150px;
        height: 150px;
    }
    .cv-demo-row {
        grid-template-columns: 1fr;
    }
    .cv-symbol {
        font-size: 2.1rem;
        line-height: 1;
    }
    .cv-character,
    .cv-result-card {
        min-height: 140px;
    }
    .cv-character img {
        height: 78px;
    }
    .cv-character .learning-pose-svg {
        width: 78px;
        height: 78px;
    }
    .cv-reference-character {
        width: 220px;
        height: 145px;
    }
    .cv-syllable-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (prefers-reduced-motion: reduce) {
    #understanding-1-pane.pose-sequence-playing .learning-pose-svg,
    #understanding-1-pane.pose-sequence-playing .learning-pose-letter,
    #understanding-1-pane.pose-sequence-playing .pose-guide-stroke {
        animation: none !important;
    }
    #understanding-1-pane .learning-pose-svg {
        opacity: 1;
        transform: none;
    }
    #understanding-1-pane .pose-guide-stroke {
        opacity: 0;
    }
}
/* ===== 글자 결합 애니메이션 ===== */
.combine-card {
    background: linear-gradient(135deg,#f0fdf4,#f0f9ff);
    border: 2px solid #86efac;
    border-radius: 20px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.combine-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.combine-box {
    font-size: 5rem;
    font-weight: 900;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    position: relative;
    z-index: 1;
}
.combine-left  { background:#dbeafe; color:#1e40af; border:2px solid #93c5fd; animation:combineLeft 4.7s ease-in-out 1 both; }
.combine-right { background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:combineRight 4.7s ease-in-out 1 both; }
.combine-result{ background:#ccfbf1; color:#0d9488; border:2px solid #5eead4; animation:resultPop 4.7s ease-in-out 1 both; }
.combine-op    { font-size:3.5rem; color:#94a3b8; font-weight:bold; animation:opFade 4.7s ease-in-out 1 both; }
.combine-card  { cursor:pointer; transition:box-shadow 0.2s; }
.combine-card:hover { box-shadow:0 4px 18px rgba(134,239,172,0.5); }
.combine-card.combine-reset .combine-left,
.combine-card.combine-reset .combine-right,
.combine-card.combine-reset .combine-result,
.combine-card.combine-reset .combine-op,
.combine-card.combine-reset .combine-dot-up,
.combine-card.combine-reset .combine-dot-up-double,
.combine-card.combine-reset .combine-dot-down,
.combine-card.combine-reset .combine-dot-down-double,
.combine-card.combine-reset .combine-base,
.combine-card.combine-reset .combine-vowel-base,
.combine-card.combine-reset .combine-dot-right,
.combine-card.combine-reset .combine-dot-left {
    animation: none !important;
}
.combine-replay{ font-size:1.4rem; color:#94a3b8; text-align:center; margin-top:15px; }
@keyframes combineLeft  { 0%,28%{transform:translateX(0);opacity:1} 68%,100%{transform:translateX(82px);opacity:1} }
@keyframes combineRight { 0%,28%{transform:translateX(0);opacity:1} 68%,100%{transform:translateX(-82px);opacity:1} }
@keyframes opFade       { 0%,100%{opacity:1} }
@keyframes resultPop    { 0%,56%{transform:scale(.72);opacity:0} 70%{transform:scale(1.12);opacity:1} 84%,100%{transform:scale(1);opacity:1} }
/* 점이 오른쪽에서 왼쪽으로 슬라이드하여 ㅡ 위/아래로 안착 */
.combine-base    { background:#dbeafe; color:#1e40af; border:2px solid #93c5fd; animation:baseFadeIn 4.7s ease-in-out 1 both; z-index:2; }
.combine-base-up { animation:baseToBelowForO 4.7s ease-in-out 1 both; }
.combine-base-down { animation:baseToAboveForU 4.7s ease-in-out 1 both; }
.combine-row     { overflow:visible; }
.combine-dot-up  { background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:dotToAbove 4.7s ease-in-out 1 both; z-index:5; }
.combine-dot-up-double { background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:dotToAboveDouble 4.7s ease-in-out 1 both; z-index:5; }
.combine-dot-down{ background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:dotToBelow 4.7s ease-in-out 1 both; z-index:5; }
.combine-dot-down-double { background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:dotToBelowDouble 4.7s ease-in-out 1 both; z-index:5; }
@keyframes dotToAbove { 0%,28%{transform:translate(0,0);opacity:1} 68%,100%{transform:translate(170px,-48px);opacity:1} }
@keyframes dotToAboveDouble { 0%,28%{transform:translate(0,0);opacity:1} 68%,100%{transform:translate(142px,-14px);opacity:1} }
@keyframes dotToBelow { 0%,28%{transform:translate(0,0);opacity:1} 68%,100%{transform:translate(170px,48px);opacity:1} }
@keyframes dotToBelowDouble { 0%,28%{transform:translate(0,0);opacity:1} 68%,100%{transform:translate(126px,-18px);opacity:1} }
@keyframes baseFadeIn { 0%,100%{opacity:1} }
@keyframes baseToBelowForO { 0%,28%{transform:translateY(0);opacity:1} 68%,100%{transform:translateY(36px);opacity:1} }
@keyframes baseToAboveForU { 0%,28%{transform:translateY(0);opacity:1} 68%,100%{transform:translateY(-36px);opacity:1} }
.combine-vowel-base { background:#dbeafe; color:#1e40af; border:2px solid #93c5fd; animation:verticalBaseHold 4.7s ease-in-out 1 both; z-index:2; }
.combine-dot-right { background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:dotToRightOfVertical 4.7s ease-in-out 1 both; z-index:5; }
.combine-dot-left { background:rgba(252,231,243,0.62); color:#9d174d; border:2px solid #f9a8d4; animation:dotToLeftOfVertical 4.7s ease-in-out 1 both; z-index:5; }
@keyframes verticalBaseHold { 0%,100%{opacity:1} }
@keyframes dotToRightOfVertical { 0%,28%{transform:translate(0,0);opacity:1} 68%,100%{transform:translate(-144px,0);opacity:1} }
@keyframes dotToLeftOfVertical { 0%,28%{transform:translate(0,0);opacity:1} 68%,100%{transform:translate(144px,0);opacity:1} }

/* ===== 입 벌림 진행 애니메이션 ===== */
.mouth-card {
    background: linear-gradient(135deg,#fffbeb,#fef9c3);
    border: 2px solid #fcd34d;
    border-radius: 20px;
    padding: 14px 12px;
}
.mouth-sequence {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}
.mouth-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0;
    animation: mouthStepIn 0.45s ease-out forwards;
}
.mouth-oval {
    background: #fef3c7;
    border: 3px solid #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #78350f;
}
.mouth-lbl { font-size: 1.1rem; font-weight: 900; color: #92400e; }
.mouth-arr { font-size: 1.3rem; color: #94a3b8; font-weight: bold; opacity:0; animation: mouthStepIn 0.3s ease-out forwards; }
.mouth-text { font-size: 0.95rem; color: #78350f; line-height: 1.4; margin-top: 4px; }
@keyframes mouthStepIn { from{opacity:0;transform:scale(0.5) translateY(8px)} to{opacity:1;transform:scale(1) translateY(0)} }

/* --- Dashboard Stage Grid Board --- */
.dashboard-stage-board {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
    box-sizing: border-box;
    z-index: 10;
}

.dashboard-stage-card.level-card {
    appearance: none;
    font: inherit;
    flex: 1;
    min-width: 220px;
    max-width: 260px;
    height: 350px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 4px solid #ffffff;
    border-radius: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px 20px;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    box-shadow: 0 15px 35px rgba(85, 179, 70, 0.12),
                0 5px 15px rgba(0, 0, 0, 0.05),
                inset 0 0 20px rgba(255, 255, 255, 0.5);
}


.dashboard-stage-card.level-card:hover {
    transform: translateY(-20px) scale(1.04);
    background: rgba(255, 255, 255, 0.95);
    border-color: #ffffff;
    box-shadow: 0 30px 50px rgba(85, 179, 70, 0.25),
                0 10px 25px rgba(0, 0, 0, 0.08),
                0 0 30px rgba(255, 255, 255, 0.8);
}


.dashboard-stage-card.level-card:active {
    transform: translateY(-10px) scale(0.98);
    box-shadow: 0 15px 25px rgba(85, 179, 70, 0.2);
    transition: all 0.1s ease;
}

.dashboard-stage-card .stage-badge {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(70, 179, 165, 0.14);
    color: #159b8f;
    font-size: 0.92rem;
    font-weight: 900;
    border: 2px solid rgba(70, 179, 165, 0.22);
}

.dashboard-stage-card .stage-emoji {
    font-size: 4.8rem;
    line-height: 1;
    margin: 34px 0 22px;
    filter: drop-shadow(0 12px 18px rgba(44, 62, 80, 0.14));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dashboard-stage-card .stage-emoji.hangul-icon {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: linear-gradient(145deg, #38bdf8 0%, #2563eb 58%, #1e40af 100%) !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.08em;
    box-shadow: inset 0 6px 10px rgba(255, 255, 255, 0.22),
                0 14px 24px rgba(37, 99, 235, 0.28);
    transform: rotate(5deg);
}

.dashboard-stage-card.level-card:hover .stage-emoji {
    transform: scale(1.18) rotate(6deg) translateY(-8px);
}

.dashboard-stage-card.level-card .level-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #1a5b4a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: color 0.3s ease;
}

.dashboard-stage-card.level-card .level-desc {
    font-size: 1.15rem;
    font-weight: 800;
    color: #2c3e50;
    opacity: 0.9;
}

.dashboard-stage-card .stage-note {
    margin-top: 14px;
    min-height: 42px;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.45;
}

@media (max-width: 1200px) {
    .dashboard-stage-board {
        gap: 20px;
        padding: 20px;
        max-width: 950px;
    }
    .dashboard-stage-card.level-card {
        height: 330px;
        padding: 30px 15px;
    }
}

@media (max-width: 992px) {
    .dashboard-stage-board {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 24px;
        padding-top: 140px;
        padding-bottom: 100px;
        overflow-y: auto;
        max-width: 600px;
    }
    .dashboard-stage-card.level-card {
        width: 100%;
        max-width: 250px;
        height: 290px;
        padding: 25px 15px;
    }
    .dashboard-stage-card .stage-emoji { font-size: 4rem; margin: 30px 0 18px; }
    .dashboard-stage-card.level-card .level-title {
        font-size: 1.9rem;
        margin-bottom: 6px;
    }
    .dashboard-stage-card.level-card .level-desc {
        font-size: 1.05rem;
    }
}

@media (max-width: 576px) {
    .dashboard-stage-board {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 290px;
        padding-top: 150px;
    }
    .dashboard-stage-card.level-card {
        width: 100%;
        max-width: 260px;
        height: 250px;
        padding: 20px;
    }
    .dashboard-stage-card .stage-emoji { font-size: 3.4rem; margin: 28px 0 14px; }
    .dashboard-stage-card.level-card .level-title {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }
    .dashboard-stage-card.level-card .level-desc {
        font-size: 0.95rem;
    }
}


/* Hermes drawing UX refinements */
.dashboard-stage-card.level-card::before,
.dashboard-stage-card.level-card::after { content: none !important; display: none !important; }
.dashboard-stage-card.level-card { background: rgba(255,255,255,0.94); overflow: hidden; }
.dashboard-stage-card .stage-emoji { position: relative; z-index: 2; }
.dashboard-stage-card .stage-emoji:not(.hangul-icon) { background: transparent !important; }
.drawing-card-art { position:absolute; left:18px; top:16px; pointer-events:none; filter: drop-shadow(0 10px 14px rgba(124,58,237,.18)); }
.drawing-art-shape { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:999px; margin-right:-10px; border:4px solid #fff; box-shadow:0 8px 18px rgba(0,0,0,.12); font-size:24px; }
.drawing-art-sample { width:112px; height:82px; border-radius:24px; background:#fff; border:4px solid #f5d0fe; display:grid; place-items:center; font-size:46px; }
.drawing-action-card { position: relative; overflow: hidden; min-height: 235px; border-width: 4px !important; }
.drawing-action-card h3, .drawing-action-card p, .drawing-action-card .aiedu-badge { position: relative; z-index: 2; }
.drawing-header-banner { pointer-events:auto; }
.sync-coins.point-pop, #dashboard-coins-header.point-pop { animation: pointPulse .52s ease; display:inline-block; }
@keyframes pointPulse { 0%{transform:scale(1)} 38%{transform:scale(1.45); color:#f59e0b} 100%{transform:scale(1)} }
.drawing-workspace-top { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.drawing-title-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.drawing-mission-logo { font-size:1.15rem; padding:10px 18px; border-radius:999px; }
.drawing-progress-chip { font-weight:900; color:#6d28d9; background:#f3e8ff; border:3px solid #e9d5ff; padding:9px 16px; border-radius:999px; }
.drawing-template-picked { font-weight:900; color:#6d28d9; background:#faf5ff; border:3px dashed #d8b4fe; border-radius:18px; padding:10px; text-align:center; }
.drawing-template-modal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:65vh; overflow-y:auto; padding-right:4px; }
@media (min-width:768px){ .drawing-template-modal-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:768px){ .drawing-workspace-top{ flex-direction:column; align-items:stretch; } .drawing-header-banner{ justify-content:flex-end; } }

/* --- 2026 visual polish: calm depth, clearer hierarchy, purposeful motion --- */
:root {
    --ui-ink: #20364b;
    --ui-muted: #64748b;
    --ui-line: rgba(148, 163, 184, 0.22);
    --ui-glass: rgba(255, 255, 255, 0.88);
}

body {
    background:
        radial-gradient(circle at 12% 12%, rgba(167, 243, 208, 0.42), transparent 32%),
        radial-gradient(circle at 88% 84%, rgba(186, 230, 253, 0.38), transparent 34%),
        linear-gradient(145deg, #f8fff8 0%, #f5fbff 100%);
    background-attachment: fixed;
}

.premium-card {
    border-width: 10px;
    border-color: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 32px 90px rgba(31, 65, 51, 0.18),
        0 8px 24px rgba(44, 62, 80, 0.08),
        inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.view-section:not(.hidden) {
    animation: uiSectionReveal 0.42s cubic-bezier(.22, .8, .25, 1) backwards;
}

@keyframes uiSectionReveal {
    from { opacity: 0; transform: translateY(10px) scale(.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#start-screen,
#login-section {
    isolation: isolate;
    overflow: hidden;
}

#start-screen::before,
#login-section::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    right: -110px;
    top: -130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.48);
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.28);
    pointer-events: none;
    z-index: 0;
    animation: ambientOrb 8s ease-in-out infinite alternate;
}

#start-screen::after,
#login-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(240, 253, 244, 0.18)),
        radial-gradient(circle at 50% 45%, transparent 22%, rgba(255, 255, 255, 0.16) 100%);
    pointer-events: none;
    z-index: 0;
}

#start-screen > *,
#login-section > * {
    z-index: 1;
}

@keyframes ambientOrb {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-34px, 28px, 0) scale(1.08); }
}

.logo-wrapper {
    animation: heroLogoReveal .72s cubic-bezier(.22, .85, .26, 1) backwards;
}

@keyframes heroLogoReveal {
    from { opacity: 0; transform: translateY(18px) scale(.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.floating {
    animation: float 5.2s ease-in-out infinite;
}

.btn-start {
    overflow: hidden;
    border-width: 5px;
    background: linear-gradient(135deg, #fff26a 0%, #ffd84d 100%);
    color: #3f4a3e;
    letter-spacing: -0.03em;
    box-shadow:
        0 18px 38px rgba(245, 184, 46, 0.32),
        inset 0 2px 0 rgba(255, 255, 255, 0.74);
    animation: heroButtonReveal .55s .18s cubic-bezier(.22, .85, .26, 1) backwards;
}

.btn-start::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.btn-start:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.035);
    box-shadow:
        0 24px 46px rgba(245, 184, 46, 0.42),
        inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.btn-start:active {
    transform: translateX(-50%) translateY(-1px) scale(.985);
}

@keyframes heroButtonReveal {
    from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(.94); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.login-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 38px;
    box-shadow:
        0 30px 75px rgba(31, 65, 51, 0.18),
        0 8px 22px rgba(44, 62, 80, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: loginCardReveal .52s cubic-bezier(.22, .85, .26, 1) backwards;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 36px;
    right: 36px;
    height: 5px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, #55b346, #46b3a5, #facc15);
}

@keyframes loginCardReveal {
    from { opacity: 0; transform: translateY(18px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-tabs-container .nav-tab {
    border-color: rgba(255, 255, 255, 0.86);
    box-shadow: 8px 8px 24px rgba(44, 62, 80, 0.08);
}

.login-tabs-container .nav-tab.active {
    background: linear-gradient(180deg, #5dbb4e, #45963a);
    box-shadow: 10px 10px 26px rgba(69, 150, 58, 0.22);
}

.premium-input {
    background: rgba(248, 250, 252, 0.82);
    border-color: #dcebd7;
    box-shadow: inset 0 1px 2px rgba(44, 62, 80, 0.04);
}

.premium-input:focus {
    background: #ffffff;
    border-color: #55b346;
    box-shadow: 0 0 0 5px rgba(85, 179, 70, 0.12);
}

.btn-primary:active,
.btn-outline:active {
    transform: translateY(1px) scale(.985);
}

.btn-primary:disabled,
.btn-outline:disabled {
    cursor: not-allowed;
    filter: saturate(.55);
    box-shadow: none;
}

[onclick="toggleInfoDrawer()"].pointer-events-auto {
    border-width: 2px !important;
    border-color: rgba(134, 239, 172, 0.72) !important;
    background: var(--ui-glass) !important;
    box-shadow: 0 12px 30px rgba(31, 65, 51, 0.12) !important;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease !important;
}

[onclick="toggleInfoDrawer()"].pointer-events-auto:hover {
    transform: translateY(-3px);
    background: #ffffff !important;
    box-shadow: 0 18px 38px rgba(31, 65, 51, 0.18) !important;
}

.dashboard-stage-board {
    perspective: 1100px;
}

.dashboard-stage-card.level-card {
    --stage-color: #8b5cf6;
    --stage-soft: #f3e8ff;
    --stage-ink: #6d28d9;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        inset 0 7px 0 var(--stage-color),
        0 18px 42px rgba(44, 62, 80, 0.12),
        0 2px 8px rgba(44, 62, 80, 0.05);
    transition: transform .46s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease, background .4s ease;
    animation: stageCardReveal .82s cubic-bezier(.16, 1, .3, 1) backwards;
}

#card-level-1 { --stage-color: #8b5cf6; --stage-soft: #f3e8ff; --stage-ink: #6d28d9; animation-delay: .06s; }
#card-level-2 { --stage-color: #0ea5e9; --stage-soft: #e0f2fe; --stage-ink: #0369a1; animation-delay: .16s; }
#card-level-3 { --stage-color: #f97316; --stage-soft: #ffedd5; --stage-ink: #c2410c; animation-delay: .26s; }
#card-level-4 { --stage-color: #14b8a6; --stage-soft: #ccfbf1; --stage-ink: #0f766e; animation-delay: .36s; }

@keyframes stageCardReveal {
    from { opacity: 0; transform: translate3d(0, 34px, 0) scale(.955); filter: blur(5px); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

.dashboard-stage-card.level-card:hover {
    transform: translateY(-8px) scale(1.014);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        inset 0 7px 0 var(--stage-color),
        0 28px 55px rgba(44, 62, 80, 0.18),
        0 8px 18px rgba(44, 62, 80, 0.07);
}

.dashboard-stage-card.level-card:active {
    transform: translateY(-3px) scale(.985);
}

.dashboard-stage-card .stage-badge {
    top: 20px;
    background: var(--stage-soft);
    color: var(--stage-ink);
    border: 1px solid color-mix(in srgb, var(--stage-color) 35%, white);
    letter-spacing: .06em;
    box-shadow: 0 5px 14px color-mix(in srgb, var(--stage-color) 12%, transparent);
}

.dashboard-stage-card .stage-emoji:not(.hangul-icon) {
    width: 96px;
    height: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background: var(--stage-soft) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78), 0 12px 24px rgba(44, 62, 80, .1);
}

.dashboard-stage-card .stage-emoji {
    animation: stageIconDrift 4.8s cubic-bezier(.45, 0, .55, 1) infinite;
    transition: transform .55s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease;
}

#card-level-1 .stage-emoji { animation-delay: -.4s; }
#card-level-2 .stage-emoji { animation-delay: -1.6s; }
#card-level-3 .stage-emoji { animation-delay: -2.8s; }
#card-level-4 .stage-emoji { animation-delay: -4s; }

@keyframes stageIconDrift {
    0%, 100% { translate: 0 0; rotate: -.7deg; }
    50% { translate: 0 -7px; rotate: .9deg; }
}

.dashboard-stage-card.level-card:hover .stage-emoji {
    transform: scale(1.065) rotate(2deg);
}

.dashboard-stage-card.level-card:hover .stage-emoji:not(.hangul-icon) {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .82), 0 18px 30px rgba(44, 62, 80, .14);
}

.dashboard-stage-card.level-card .level-title {
    color: var(--stage-ink);
    font-size: 2rem;
    margin-bottom: 6px;
}

.dashboard-stage-card.level-card .level-desc {
    color: var(--ui-ink);
    opacity: 1;
}

.dashboard-stage-card .stage-note {
    width: 100%;
    min-height: 0;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--ui-line);
    color: var(--ui-muted);
}

.shop-btn {
    border: 1px solid rgba(255, 255, 255, .76);
    background: linear-gradient(135deg, #ff9d76, #fb7185);
    box-shadow: 0 14px 30px rgba(244, 114, 105, .28);
}

.shop-btn:hover {
    transform: translateY(-5px) scale(1.025);
    box-shadow: 0 20px 38px rgba(244, 114, 105, .36);
}

.dashboard-bottom-actions {
    position: absolute;
    right: 40px;
    bottom: 40px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-bottom-actions .shop-btn {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.cloud-btn {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .28);
}

.cloud-btn:hover {
    box-shadow: 0 20px 38px rgba(37, 99, 235, .36);
}

.korean-cloud-overlay {
    inset: 0;
    padding: clamp(16px, 3vw, 32px);
    align-items: flex-start;
    justify-content: center;
    background: rgba(241, 248, 239, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.korean-cloud-shell {
    min-height: 100%;
    padding: clamp(20px, 3vw, 32px);
    border: 2px solid rgba(183, 228, 161, .9);
    border-radius: 32px;
    background: rgba(248, 250, 245, .96);
    box-shadow: 0 24px 64px rgba(44, 62, 80, .18);
}

.korean-embed-card {
    border-color: rgba(203, 213, 225, 0.55);
    box-shadow: 0 12px 30px rgba(44, 62, 80, 0.07);
}

[id$="-modal"]:not(.hidden) {
    animation: uiBackdropReveal .22s ease-out backwards;
}

[id$="-modal"]:not(.hidden) > div {
    border: 1px solid rgba(255, 255, 255, .92);
    box-shadow: 0 32px 90px rgba(15, 23, 42, .28);
    animation: uiModalReveal .32s cubic-bezier(.2, .85, .25, 1.08) backwards;
}

@keyframes uiBackdropReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes uiModalReveal {
    from { opacity: 0; transform: translateY(18px) scale(.965); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.info-drawer {
    border-left: 1px solid rgba(255, 255, 255, .88);
    background: rgba(255, 255, 255, .94);
    box-shadow: -24px 0 65px rgba(15, 23, 42, .16);
    transition: right .38s cubic-bezier(.2, .82, .25, 1), box-shadow .38s ease;
}

.drawer-overlay.visible {
    animation: uiBackdropReveal .22s ease-out backwards;
}

.activity-loading-card {
    border-color: rgba(94, 234, 212, .4);
    box-shadow: 0 28px 75px rgba(15, 118, 110, .18);
    animation: uiModalReveal .28s cubic-bezier(.2, .85, .25, 1.05) backwards;
}

.page-number {
    background: rgba(255, 255, 255, .72);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, .2);
    backdrop-filter: blur(8px);
}

@media (hover: none) {
    .dashboard-stage-card.level-card:hover,
    [onclick="toggleInfoDrawer()"].pointer-events-auto:hover,
    .shop-btn:hover,
    .btn-start:hover {
        transform: none;
    }
    .btn-start:hover { transform: translateX(-50%); }
}

@media (max-width: 992px) {
    .dashboard-stage-card.level-card {
        height: 280px;
        border-radius: 30px;
    }
}

@media (max-width: 576px) {
    .premium-card {
        width: 100%;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }
    .login-card {
        width: min(78vw, 430px);
        padding: 30px 24px;
        border-radius: 30px;
    }
    .login-tabs-container {
        right: -48px;
    }
    .dashboard-stage-card.level-card {
        height: 238px;
        border-radius: 28px;
    }
    .dashboard-stage-card .stage-emoji:not(.hangul-icon),
    .dashboard-stage-card .stage-emoji.hangul-icon {
        width: 76px;
        height: 76px;
    }
    .shop-btn {
        right: 18px;
        bottom: 18px;
        padding: 12px 20px;
    }
    .dashboard-bottom-actions {
        right: 18px;
        bottom: 18px;
        gap: 8px;
    }
    .dashboard-bottom-actions .shop-btn {
        padding: 12px 14px;
        font-size: .92rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .activity-loading-spinner,
    .literacy-inline-loading-spinner {
        animation-duration: 0.85s !important;
        animation-iteration-count: infinite !important;
    }
}

/* Keep the combination path visible even when the browser shortens other animations. */
@media (prefers-reduced-motion: reduce) {
    .combine-card .combine-box,
    .combine-card .combine-op {
        animation-duration: 4.7s !important;
        animation-iteration-count: 1 !important;
        animation-timing-function: ease-in-out !important;
    }
}

@media (forced-colors: active) {
    :where(button, a, input, textarea, select, [role="button"]) {
        border: 2px solid ButtonText;
    }
}

/* 한글 해득 쓰기·게임 공통 활동 화면 */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#letter-writing-section,
#hangul-game-section {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 38px 48px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-padding-top: 112px;
    background: linear-gradient(180deg, #f3fbef 0%, #fbfdf9 48%, #f7faf5 100%) !important;
}

#letter-writing-section > *,
#hangul-game-section > * {
    width: 100%;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
}

#letter-writing-section > .activity-dashboard-header,
#hangul-game-section > .activity-dashboard-header {
    position: sticky !important;
    top: 0 !important;
    max-width: 1240px;
    min-height: 104px;
    padding: 20px 4px 14px !important;
    flex: 0 0 auto;
    z-index: 90;
    background: linear-gradient(180deg, rgba(243, 251, 239, .98) 70%, rgba(243, 251, 239, 0));
}

.activity-back-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 18px;
    border: 2px solid #cfe9c5;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    color: #28756a;
    box-shadow: 0 8px 22px rgba(44, 62, 80, .09);
    font-size: 1rem;
    font-weight: 1000;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.activity-back-chip:hover {
    transform: translateY(-2px);
    border-color: #55b346;
    box-shadow: 0 12px 25px rgba(85, 179, 70, .16);
}

.activity-profile-banner {
    transform-origin: 85% 50%;
}

.activity-profile-banner.experience-received {
    animation: experienceBannerReceive .65s cubic-bezier(.2, .86, .25, 1);
}

@keyframes experienceBannerReceive {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 24px rgba(44, 62, 80, .14); }
    38% { transform: scale(1.045); box-shadow: 0 0 0 8px rgba(45, 212, 191, .16), 0 16px 34px rgba(15, 118, 110, .25); }
}

.aiedue-exp-orb {
    position: fixed;
    z-index: 9000;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    pointer-events: none;
    border: 4px solid rgba(255, 255, 255, .95);
    border-radius: 999px;
    background: radial-gradient(circle at 32% 26%, #fff 0 7%, #8ff3dc 12%, #19b99c 58%, #087c70 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(13, 148, 136, .38), inset 0 -7px 12px rgba(6, 95, 70, .2);
    font: 1000 .88rem/1 'Outfit', 'Noto Sans KR', sans-serif;
    text-shadow: 0 1px 3px rgba(6, 78, 59, .4);
}

/* 쓰기 연습: 떠 있는 흰색 가림막 없이 콘텐츠 전체가 스크롤되도록 구성 */
#letter-writing-section .writing-compact-toolbar {
    align-items: center;
    margin-bottom: 16px;
}

#letter-writing-section .writing-mode-quick-card {
    padding: 8px;
    border-color: #cfe9c5;
    border-radius: 20px;
    background: #fff;
}

.writing-exp-guide {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    max-width: 430px;
}

.writing-exp-guide span {
    padding: 7px 11px;
    border: 1px solid #cfe9c5;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #28756a;
    font-size: .78rem;
    font-weight: 1000;
}

#letter-writing-section .writing-mode-buttons .nav-tab {
    min-width: 112px;
    min-height: 46px;
    border: 0;
    background: transparent;
    color: #64748b;
}

#letter-writing-section .writing-mode-buttons .nav-tab.active {
    background: linear-gradient(135deg, #55b346, #2f9b89);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47, 155, 137, .2);
}

#letter-writing-section .learning-pane {
    min-height: 0 !important;
    margin-bottom: 28px;
    padding: 26px !important;
    overflow: visible !important;
    border: 1px solid #e0efda;
    border-radius: 30px;
    background: #fff !important;
    box-shadow: 0 16px 38px rgba(44, 62, 80, .08);
}

#letter-writing-section::after,
#letter-writing-section .learning-pane::after {
    display: none !important;
    content: none !important;
}

.letter-practice-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.letter-practice-selector-card {
    min-height: 104px;
    padding: 18px;
    border: 1px solid #e0efda;
    border-radius: 22px;
    background: #fbfef9;
}

.letter-practice-selector-card > .flex {
    max-height: 116px;
    overflow-y: auto;
    padding: 3px;
    scrollbar-width: thin;
    scrollbar-color: #b9dcb0 transparent;
}

.letter-practice-selector-card .btn-outline {
    min-width: 42px;
    min-height: 40px;
    border-width: 2px;
    border-radius: 13px;
    background: #fff;
}

.letter-practice-selector-card .btn-outline.active {
    background: #def5d7 !important;
    color: #28756a !important;
    border-color: #55b346 !important;
    transform: translateY(-1px);
}

.letter-practice-word-card {
    grid-column: 1 / -1;
    grid-template-columns: 112px minmax(180px, 220px) minmax(0, 1fr);
    align-items: start;
}

.letter-practice-selector-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 9px;
}

.letter-word-count {
    color: #2f9b89;
    font-size: .78rem;
    font-weight: 1000;
}

.letter-word-filter {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 2px solid #d8e9d2;
    border-radius: 14px;
    background: #fff;
    color: #2c3e50;
    font: 800 .95rem/1.2 'Noto Sans KR', sans-serif;
    outline: none;
}

.letter-word-filter:focus {
    border-color: #46b3a5;
    box-shadow: 0 0 0 4px rgba(70, 179, 165, .14);
}

.letter-word-button-list {
    max-height: 146px;
    overflow-y: auto;
    padding: 2px 5px 8px 2px;
    scrollbar-width: thin;
    scrollbar-color: #b9dcb0 transparent;
}

#letter-writing-section .trace-canvas-wrap {
    border-width: 3px;
    border-color: #f5a55d;
    background: #fffaf4;
}

#letter-writing-section [id$="-grade"]:disabled,
#hangul-game-section button:disabled {
    cursor: wait;
    opacity: .72;
}

/* 한글 게임: 소리 영역과 네 선택지를 가로로 배치 */
#hangul-game-section .hangul-game-shell {
    min-height: 0;
    display: grid;
    gap: 18px;
    padding: 22px !important;
    margin-bottom: 28px;
    border: 1px solid #e4e7f7;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(67, 56, 202, .08);
}

.hangul-game-intro {
    margin: 0;
    border-color: #e6e4fb;
}

.hangul-game-mode-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.hangul-game-mode-control > span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #6d5bd0;
    font-size: .75rem;
    font-weight: 1000;
}

.hangul-game-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hangul-game-stat {
    padding: 12px 18px;
    border-radius: 18px;
}

.hangul-game-stat > div:last-child {
    font-size: 2rem;
    line-height: 1.05;
}

.hangul-game-play-grid {
    display: grid;
    grid-template-columns: minmax(250px, .7fr) minmax(0, 1.5fr);
    gap: 18px;
    align-items: stretch;
}

.hangul-game-listen-panel {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    border-color: #d9eee4;
    background: linear-gradient(145deg, #f0fdf8, #f8fffc);
}

.hangul-game-state-pills {
    display: inline-flex;
    gap: 5px;
    padding: 5px;
    border: 2px solid #d9eee4;
    border-radius: 999px;
    background: #fff;
}

.hangul-game-state-pills span {
    min-width: 66px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #94a3b8;
    font-weight: 1000;
}

.hangul-game-state-pills .active {
    background: #e4f8ef;
    color: #238574;
}

.hangul-game-state-pills .sound {
    background: #f0edff;
    color: #6d5bd0;
}

.hangul-game-sound-button {
    min-width: 190px;
    min-height: 64px;
    padding: 14px 24px;
    font-size: 1.16rem;
}

.hangul-game-feedback {
    min-height: 60px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.35;
}

.hangul-game-choices {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hangul-game-choices .btn-choice {
    min-width: 0;
    min-height: 142px;
    padding: 18px 12px;
    overflow-wrap: anywhere;
    border-color: #e7e5fa;
    box-shadow: 0 6px 0 #e7e5fa;
    font-size: clamp(1.8rem, 3.4vw, 2.7rem);
}

.hangul-game-choices .btn-choice.active {
    border-color: #46b3a5;
    background: #e8faf5;
    color: #17796c;
    box-shadow: 0 6px 0 #a8e3d7;
}

@media (max-width: 860px) {
    #letter-writing-section,
    #hangul-game-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .activity-profile-banner {
        gap: 8px !important;
        padding: 9px 12px !important;
        border-width: 3px !important;
    }
    .activity-profile-banner .sync-user-icon {
        width: 40px;
        height: 40px;
    }
    .letter-practice-selector-grid {
        grid-template-columns: 1fr;
    }
    .letter-practice-word-card {
        grid-column: auto;
        grid-template-columns: 96px minmax(0, 1fr);
    }
    .letter-practice-word-card .letter-word-button-list {
        grid-column: 1 / -1;
    }
    .hangul-game-play-grid {
        grid-template-columns: 1fr;
    }
    .hangul-game-listen-panel {
        min-height: 230px;
    }
}

@media (max-width: 600px) {
    #letter-writing-section,
    #hangul-game-section {
        padding-left: 12px;
        padding-right: 12px;
    }
    #letter-writing-section > .activity-dashboard-header,
    #hangul-game-section > .activity-dashboard-header {
        min-height: 88px;
        padding-top: 12px !important;
    }
    .activity-back-chip {
        width: 46px;
        min-height: 46px;
        justify-content: center;
        padding: 9px;
        font-size: 1.25rem;
    }
    .activity-back-chip span:last-child,
    .activity-profile-banner .sync-account-name {
        display: none;
    }
    #letter-writing-section .writing-compact-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .writing-exp-guide { justify-content: center; max-width: none; }
    #letter-writing-section .writing-mode-buttons {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #letter-writing-section .writing-mode-buttons .nav-tab {
        min-width: 0;
        padding: 8px 10px;
        font-size: .86rem;
    }
    #letter-writing-section .learning-pane,
    #hangul-game-section .hangul-game-shell {
        padding: 14px !important;
        border-radius: 22px;
    }
    .letter-practice-selector-card,
    .letter-practice-word-card {
        grid-template-columns: 1fr;
    }
    .letter-practice-word-card .letter-word-button-list {
        grid-column: auto;
    }
    .hangul-game-stats {
        gap: 7px;
    }
    .hangul-game-stat {
        padding: 10px 5px;
    }
    .hangul-game-stat > div:last-child {
        font-size: 1.5rem;
    }
    .hangul-game-choices {
        gap: 10px;
    }
    .hangul-game-choices .btn-choice {
        min-height: 105px;
        font-size: 1.65rem;
    }
}


/* 20260710 한글 해득 UI polish */
.page-number { display: none !important; }

.login-mini-logo,
.shop-btn,
[onclick="toggleInfoDrawer()"].pointer-events-auto,
.activity-profile-banner,
.drawing-header-banner {
    transition: transform .34s cubic-bezier(.16, 1, .3, 1), box-shadow .34s ease, background .34s ease !important;
    will-change: transform;
}

.login-mini-logo:hover {
    transform: scale(1.045) !important;
}

[onclick="toggleInfoDrawer()"].pointer-events-auto:hover,
.activity-profile-banner:hover,
.drawing-header-banner:hover {
    transform: translateY(-2px) scale(1.025) !important;
}

.shop-btn:hover {
    transform: translateY(-4px) scale(1.045) !important;
}

.dashboard-stage-card.level-card {
    animation: none !important;
    transition: transform .42s cubic-bezier(.16, 1, .3, 1), box-shadow .36s ease, background .36s ease !important;
}

#card-level-1,
#card-level-2,
#card-level-3,
#card-level-4 {
    animation-delay: 0s !important;
}

.dashboard-stage-card .stage-emoji {
    animation: none !important;
    transition: transform .46s cubic-bezier(.16, 1, .3, 1), box-shadow .36s ease !important;
}

.dashboard-stage-card.level-card:hover .stage-emoji {
    transform: scale(1.12) rotate(1.5deg) !important;
}

.dashboard-stage-card.level-card.locked,
.dashboard-stage-card.level-card.locked:hover {
    filter: grayscale(1) brightness(.82) !important;
    opacity: .58 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 10px 24px rgba(71, 85, 105, .12) !important;
}

.dashboard-stage-card.level-card.locked::after {
    content: '🔒 잠김' !important;
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex !important;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(71, 85, 105, .88);
    color: #fff;
    font-size: .72rem;
    font-weight: 1000;
}

.info-drawer {
    right: 0 !important;
    transform: translateX(105%);
    transition: transform .42s cubic-bezier(.16, 1, .3, 1), box-shadow .36s ease !important;
    will-change: transform;
}

.info-drawer.open {
    transform: translateX(0);
}

.drawer-overlay {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease !important;
}

.drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: none !important;
}

#my-korean-section .section-dashboard-header {
    justify-content: space-between !important;
}

#letter-word-panel .letter-practice-selector-heading .font-black,
#letter-word-panel .letter-word-count {
    color: #28756a;
}

.hangul-game-mode-control .btn-outline {
    border-width: 3px;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hangul-game-mode-control .btn-outline.active {
    background: linear-gradient(135deg, #6d5bd0, #46b3a5) !important;
    border-color: #4338ca !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(79, 70, 229, .25) !important;
    transform: translateY(-2px) scale(1.04);
}

.hangul-game-play-grid {
    grid-template-columns: minmax(220px, .62fr) minmax(0, 1.55fr);
    align-items: start;
}

.hangul-game-listen-panel {
    min-height: 220px;
    gap: 12px;
    padding: 18px;
}

.hangul-game-sound-button {
    min-height: 54px;
    padding: 11px 22px;
}

.hangul-game-feedback {
    min-height: 42px;
    font-size: 1.2rem !important;
}

.hangul-game-choice-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.hangul-game-choice-panel #hangul-game-restart {
    align-self: center;
    min-width: 180px;
}

.hangul-game-choices .btn-choice {
    min-height: 112px;
    padding: 14px 12px;
    border-width: 3px;
    border-color: #d8d3ff;
    background: #fbfaff;
    box-shadow: 0 5px 0 #d8d3ff, 0 12px 22px rgba(79, 70, 229, .08);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.hangul-game-choices .btn-choice:hover,
.hangul-game-choices .btn-choice:focus-visible {
    transform: translateY(-3px) scale(1.025);
    border-color: #8b5cf6;
    background: #f3f0ff;
    box-shadow: 0 8px 0 #c4b5fd, 0 18px 28px rgba(79, 70, 229, .16);
}

.hangul-game-choices .btn-choice.active {
    border-color: #0f766e !important;
    background: linear-gradient(135deg, #dffcf2, #c7f9e8) !important;
    color: #0f766e !important;
    box-shadow: 0 8px 0 #5eead4, 0 0 0 5px rgba(20, 184, 166, .16) !important;
    transform: translateY(-4px) scale(1.04);
}

@media (max-width: 860px) {
    .hangul-game-listen-panel { min-height: 180px; }
}

/* 에이두 국어: 읽기 연습 카드 */
.my-korean-unit-bar {position:absolute;top:92px;left:210px;right:36px;display:flex;align-items:center;gap:4px;max-width:760px;padding:5px;border:1px solid #dcebd6;border-radius:18px;background:rgba(255,255,255,.94);box-shadow:0 10px 26px rgba(44,62,80,.1);overflow-x:auto;scrollbar-width:thin;}
#my-korean-section .stitched {margin-top:10rem !important;}
.my-korean-unit-tab {flex:0 0 auto;min-width:58px;padding:9px 10px;border:1px solid transparent;border-radius:12px;background:transparent;color:#64748b;font-size:.82rem;font-weight:1000;white-space:nowrap;transition:background .2s ease,color .2s ease,transform .2s ease;}
.my-korean-unit-tab:hover {background:#f0f8ec;color:#28756a;transform:translateY(-1px);}
.my-korean-unit-tab.active {box-shadow:0 5px 12px rgba(70,179,165,.16);}

#letter-writing-section .activity-dashboard-header {align-items:center !important;}
.activity-logo-button {display:inline-flex;align-items:center;border:0;background:transparent;padding:0;}
.activity-logo-button .login-mini-logo {width:160px;filter:drop-shadow(0 5px 15px rgba(0,0,0,.1));}
#letter-writing-section .writing-mode-quick-card {margin-left:auto;padding:6px;border:1px solid #cfe9c5;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 8px 22px rgba(44,62,80,.09);}
.letter-practice-kind-tabs {display:flex;justify-content:center;gap:10px;margin-bottom:16px;}
.letter-practice-kind-tabs .nav-tab {min-width:110px;padding:10px 20px;font-size:1rem;}
#letter-writing-section .letter-practice-selector-grid {grid-template-columns:1fr;}

.reading-category-tabs {display:flex;justify-content:center;gap:12px;width:100%;margin:0 0 24px;}
.reading-category-tabs .nav-tab {min-width:130px;font-size:1.05rem;}
.reading-slow-toggle {display:inline-flex;align-items:center;gap:8px;padding:12px 18px;border-radius:999px;border:2px solid rgba(99,102,241,.22);background:rgba(255,255,255,.94);color:#334155;font-weight:900;box-shadow:0 12px 28px rgba(15,23,42,.08);transition:transform .2s ease,box-shadow .2s ease,background .2s ease;}
.reading-slow-toggle:hover {transform:translateY(-2px);box-shadow:0 16px 34px rgba(15,23,42,.12);}
.reading-slow-toggle.active {background:linear-gradient(135deg,#f59e0b,#fb7185);color:white;border-color:transparent;}
.reading-cards-grid {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;}
.reading-card {min-height:190px;border:3px solid rgba(99,102,241,.16);border-radius:30px;background:linear-gradient(180deg,#ffffff,#eef2ff);box-shadow:0 18px 38px rgba(79,70,229,.12);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:22px 14px;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;}
.reading-card:hover {transform:translateY(-6px);border-color:rgba(99,102,241,.45);box-shadow:0 24px 46px rgba(79,70,229,.2);}
.reading-card-emoji {font-size:3.4rem;line-height:1;}
.reading-card-phrase {display:flex;justify-content:center;flex-wrap:wrap;gap:1px;color:#4f46e5;font-size:1.45rem;font-weight:900;line-height:1.28;text-align:center;}
.reading-card-char {display:inline-block;transition:transform .15s ease,color .15s ease;}
.reading-card-char.active {color:#e11d48;transform:scale(1.24);}
.reading-card-bounce {animation:readingCardBounce .42s ease;}
@keyframes readingCardBounce {0%,100%{transform:scale(1);}50%{transform:scale(1.055);}}
@media (max-width:992px){.reading-cards-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:860px){.my-korean-unit-bar{left:170px;right:18px;max-width:none;}.activity-logo-button .login-mini-logo{width:125px;}#letter-writing-section .writing-mode-buttons .nav-tab{min-width:0;padding:8px 10px;font-size:.82rem;}}
@media (max-width:576px){.my-korean-unit-bar{position:absolute;top:80px;left:10px;right:10px;max-width:none;}.my-korean-unit-tab{min-width:54px;padding:8px;font-size:.76rem;}#my-korean-section .stitched{margin-top:9rem !important;}.activity-logo-button .login-mini-logo{width:94px;}#letter-writing-section .writing-mode-quick-card{padding:4px;}.letter-practice-kind-tabs{gap:6px}.letter-practice-kind-tabs .nav-tab{min-width:0;flex:1;padding:9px 8px}.reading-category-tabs{gap:7px}.reading-category-tabs .nav-tab{min-width:0;flex:1;padding:10px}.reading-cards-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.reading-card{min-height:150px;border-radius:24px;}}

/* 배움 25: 찬찬한글 듣고 알맞은 글자 고르기 */
.lesson25-listen-page {display:grid;gap:18px;}
.lesson25-listen-guide {display:flex;align-items:center;gap:14px;padding:17px 20px;border:2px solid #acd5ea;border-radius:8px;background:#edf8fd;color:#173d59;font-size:1.08rem;font-weight:800;}
.lesson25-listen-guide strong {flex:0 0 auto;padding:7px 13px;border-radius:6px;background:#5b9dbb;color:#fff;}
.lesson25-listen-progress {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border:2px dashed #77d3ad;border-radius:8px;background:#f0fcf5;color:#17644a;font-weight:800;}
.lesson25-question-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.lesson25-question-card {min-width:0;padding:14px;border:2px solid #cbd7e2;border-radius:8px;background:#fff;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease;}
.lesson25-question-card.is-current {border-color:#ff9b54;background:#fffaf5;box-shadow:0 0 0 3px rgba(255,155,84,.15);}
.lesson25-question-card.is-playing {border-color:#4eb59e;background:#f1fcf8;}
.lesson25-question-card.is-complete {border-color:#72c69c;background:#f4fcf7;}
.lesson25-question-head {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;}
.lesson25-question-number {display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#376f8d;color:#fff;font-size:1.05rem;font-weight:900;}
.lesson25-question-sound {min-height:44px;padding:9px 14px;border:2px solid #3aa98f;border-radius:7px;background:#fff;color:#176b5a;font-weight:900;}
.lesson25-question-sound:hover,.lesson25-question-sound:focus-visible {background:#eafaf5;}
.lesson25-choice-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.lesson25-choice-button {display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:108px;padding:10px;border:2px solid #9fb9ce;border-radius:7px;background:linear-gradient(to bottom,#e7f3fb 0 58%,#dff0bd 58% 100%);color:#102f4d;font-weight:900;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;}
.lesson25-choice-button span {font-size:2.25rem;line-height:1.1;}
.lesson25-choice-button small {margin-top:14px;color:#40566b;font-size:1rem;font-weight:800;}
.lesson25-choice-button:hover,.lesson25-choice-button:focus-visible {transform:translateY(-2px);border-color:#347ca3;box-shadow:0 6px 14px rgba(38,94,126,.14);}
.lesson25-choice-button.is-try-again {border-color:#f0a04b;background:linear-gradient(to bottom,#fff6e8 0 58%,#f8e4b8 58% 100%);}
.lesson25-choice-button.is-correct {border-color:#27a66f;background:linear-gradient(to bottom,#e6f9f0 0 58%,#cfeeb8 58% 100%);color:#116743;}
.lesson25-choice-button.is-correct small {color:#e65d22;font-size:1.2rem;}
.lesson25-choice-button.is-not-answer {opacity:.58;}
.lesson25-question-feedback {min-height:24px;margin:10px 0 0;text-align:center;color:#52677a;font-weight:800;}
.lesson25-question-card.is-complete .lesson25-question-feedback {color:#138358;}
@media (max-width:820px) {.lesson25-question-grid{grid-template-columns:1fr}.lesson25-listen-guide,.lesson25-listen-progress{align-items:flex-start;flex-direction:column}.lesson25-question-card{padding:12px}.lesson25-choice-button{min-height:100px}}

.lesson25-reading-page {display:grid;gap:18px;}
.lesson25-reading-guide {display:flex;align-items:center;gap:14px;padding:17px 20px;border:2px solid #acd5ea;border-radius:8px;background:#edf8fd;color:#173d59;font-size:1.08rem;font-weight:800;}
.lesson25-reading-guide strong {flex:0 0 auto;padding:7px 16px;border-radius:6px;background:#5b9dbb;color:#fff;}
.lesson25-reading-progress {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border:2px dashed #77d3ad;border-radius:8px;background:#f0fcf5;color:#17644a;font-weight:800;}
.lesson25-reading-table {overflow:hidden;border:2px solid #9fb2c2;border-radius:8px;background:#fff;}
.lesson25-reading-header,.lesson25-reading-row {display:grid;grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr) 96px;}
.lesson25-reading-header {background:#91c2d4;color:#163b56;font-size:1.02rem;font-weight:900;text-align:center;}
.lesson25-reading-header span {padding:11px 8px;border-right:1px solid rgba(255,255,255,.82);}
.lesson25-reading-header span:last-child {border-right:0;}
.lesson25-reading-row {border-top:1px solid #b9c5cf;}
.lesson25-reading-line,.lesson25-reading-check {min-height:68px;border:0;border-right:1px solid #b9c5cf;background:#fff;}
.lesson25-reading-line {display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;color:#172d45;font-weight:900;transition:background .18s ease,color .18s ease;}
.lesson25-reading-line strong {font-size:1.8rem;line-height:1.2;letter-spacing:0;word-spacing:.2em;}
.lesson25-reading-line:hover,.lesson25-reading-line:focus-visible,.lesson25-reading-line.is-playing {background:#e9f7fc;color:#176d91;}
.lesson25-reading-line.is-complete {background:#f3fbf6;color:#176847;}
.lesson25-reading-check {padding:8px;color:#496275;font-weight:900;}
.lesson25-reading-check:nth-child(4) {border-right:0;}
.lesson25-reading-check:hover,.lesson25-reading-check:focus-visible {background:#fff7ed;color:#b45309;}
.lesson25-reading-check.is-complete {background:#e7f8ec;color:#167047;}
@media (max-width:820px) {
    .lesson25-reading-guide,.lesson25-reading-progress {align-items:flex-start;flex-direction:column;}
    .lesson25-reading-header {display:none;}
    .lesson25-reading-row {grid-template-columns:minmax(0,1fr) 92px;border-top:2px solid #9fb2c2;}
    .lesson25-reading-line:nth-child(3) {border-top:1px solid #c6d1da;}
    .lesson25-reading-check:nth-child(4) {border-top:1px solid #c6d1da;}
    .lesson25-reading-line strong {font-size:1.55rem;}
}

.lesson25-path-game {display:grid;gap:18px;}
.lesson25-path-guide {display:flex;align-items:center;gap:14px;padding:15px 18px;border:2px solid #acd5ea;border-radius:8px;background:#edf8fd;color:#173d59;}
.lesson25-path-guide strong {font-size:1.08rem;}
.lesson25-path-start {flex:0 0 auto;padding:9px 16px;border:2px solid #78a657;border-radius:6px;background:#eef8d8;color:#36621c;font-weight:1000;}
.lesson25-path-reset {margin-left:auto;min-height:44px;padding:9px 14px;border:2px solid #4b9bb7;border-radius:7px;background:#fff;color:#266882;font-weight:900;}
.lesson25-path-reset:hover,.lesson25-path-reset:focus-visible {background:#e2f4fb;}
.lesson25-path-progress {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border:2px dashed #77d3ad;border-radius:8px;background:#f0fcf5;color:#17644a;font-weight:900;}
.lesson25-path-board {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 56px;padding:20px 34px;border:2px solid #c9d2d8;border-radius:8px;background:#fff;}
.lesson25-path-stage {position:relative;display:grid;grid-template-columns:96px minmax(0,1fr);grid-template-rows:auto auto;gap:8px 14px;align-items:center;min-height:144px;padding:15px;border:3px solid #b9c5cb;border-radius:8px;background:#f9fbfc;transition:opacity .2s ease,border-color .2s ease,background .2s ease,transform .2s ease;}
.lesson25-path-stage::after {content:'➜';position:absolute;right:-43px;top:50%;transform:translateY(-50%);color:#aeb9be;font-size:1.8rem;font-weight:900;}
.lesson25-path-stage:nth-child(even)::after {content:'↓';right:auto;left:-38px;top:auto;bottom:-31px;transform:none;}
.lesson25-path-stage:last-child::after {display:none;}
.lesson25-path-stage.is-locked {opacity:.46;filter:grayscale(.55);}
.lesson25-path-stage.is-current {border-color:#f49345;background:#fff9ef;box-shadow:0 0 0 4px rgba(244,147,69,.14);transform:translateY(-2px);}
.lesson25-path-stage.is-complete {border-color:#57b98a;background:#f0fbf5;}
.lesson25-path-step {position:absolute;top:8px;left:8px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#397d98;color:#fff;font-weight:1000;}
.lesson25-path-token {display:none;position:absolute;top:-14px;right:12px;color:#f59e0b;font-size:1.8rem;filter:drop-shadow(0 2px 2px rgba(107,74,0,.22));}
.lesson25-path-stage.is-current .lesson25-path-token {display:block;animation:lesson25TokenHop .7s ease both;}
.lesson25-path-picture {grid-row:1 / 3;display:grid;place-items:center;min-height:104px;border:2px solid #c5d0d6;border-radius:50%;background:#fff;font-size:3.9rem;line-height:1;}
.lesson25-path-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.lesson25-path-choices button {min-height:52px;border:2px solid #9fb9ce;border-radius:7px;background:linear-gradient(to bottom,#e7f3fb 0 58%,#dff0bd 58% 100%);color:#153753;font-size:1.45rem;font-weight:1000;}
.lesson25-path-choices button:hover:not(:disabled),.lesson25-path-choices button:focus-visible:not(:disabled) {border-color:#347ca3;transform:translateY(-1px);}
.lesson25-path-choices button.is-try-again {border-color:#f0a04b;background:#fff5e8;}
.lesson25-path-choices button.is-correct {border-color:#24a36e;background:#dff7e8;color:#087044;}
.lesson25-path-stage-feedback {grid-column:2;min-height:23px;margin:0;text-align:center;color:#52677a;font-size:.92rem;font-weight:800;}
.lesson25-path-stage.is-complete .lesson25-path-stage-feedback {color:#138358;}
.lesson25-path-finish {display:flex;align-items:center;justify-content:center;gap:10px;min-height:64px;border:3px solid #c8d1d5;border-radius:8px;background:#f6f8f9;color:#61727c;font-size:1.35rem;opacity:.55;}
.lesson25-path-game.is-finished .lesson25-path-finish {border-color:#f47b45;background:#fff2e9;color:#b84320;opacity:1;animation:lesson25FinishPulse .65s ease both;}
@keyframes lesson25TokenHop {0%{transform:translateY(8px);opacity:0}70%{transform:translateY(-4px);opacity:1}100%{transform:translateY(0);opacity:1}}
@keyframes lesson25FinishPulse {0%{transform:scale(.96)}65%{transform:scale(1.035)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce) {.lesson25-path-stage,.lesson25-path-token,.lesson25-path-finish{animation:none!important;transition:none!important}}
@media (max-width:820px) {
    .lesson25-path-guide,.lesson25-path-progress {align-items:flex-start;flex-direction:column;}
    .lesson25-path-reset {margin-left:0;}
    .lesson25-path-board {grid-template-columns:1fr;gap:38px;padding:18px;}
    .lesson25-path-stage::after,.lesson25-path-stage:nth-child(even)::after {content:'↓';right:50%;left:auto;top:auto;bottom:-33px;transform:translateX(50%);}
    .lesson25-path-stage:last-child::after {display:none;}
}
@media (max-width:520px) {
    .lesson25-path-stage {grid-template-columns:78px minmax(0,1fr);padding:12px;}
    .lesson25-path-picture {min-height:92px;font-size:3.2rem;}
    .lesson25-path-choices button {font-size:1.25rem;}
}

/* 배움 26: 대표받침 단어 읽기 */
.lesson26-page {display:grid;gap:18px;}
.lesson26-guide {display:flex;align-items:center;gap:14px;padding:16px 18px;border:2px solid #acd5ea;border-radius:8px;background:#edf8fd;color:#173d59;font-size:1.05rem;font-weight:800;}
.lesson26-guide strong {flex:0 0 auto;padding:8px 14px;border-radius:6px;background:#5b9dbb;color:#fff;}
.lesson26-picture-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:2px solid #b9c8d2;border-radius:8px;padding:12px;background:#fff;}
.lesson26-picture-card {display:grid;grid-template-columns:minmax(100px,1fr) 94px;align-items:center;min-height:108px;border:1px solid #aebdca;border-radius:6px;background:#fff;color:#152f49;overflow:hidden;transition:border-color .16s ease,background .16s ease,transform .16s ease;}
.lesson26-picture-card:hover,.lesson26-picture-card:focus-visible {border-color:#3ca88f;background:#f1fbf7;transform:translateY(-1px);}
.lesson26-picture-icon {grid-column:2;grid-row:1 / 4;display:grid;place-items:center;height:100%;background:#f3f8fb;font-size:3.4rem;}
.lesson26-picture-word {grid-column:1;grid-row:1 / 3;align-self:end;padding:12px 8px 2px;font-size:2rem;font-weight:1000;}
.lesson26-batchim-glyph {display:inline-block;width:1em;height:1em;vertical-align:-.09em;}
@media (forced-colors:active) {
    .lesson26-batchim-glyph {filter:none;}
}
.lesson26-picture-card small {grid-column:1;grid-row:3;padding:3px 8px 12px;color:#39738e;font-size:.82rem;font-weight:800;}
.lesson26-word-board {display:grid;gap:7px;padding:16px;border:2px solid #b8c5ce;border-radius:8px;background:#fff;}
.lesson26-word-board h3 {margin:0 0 3px;color:#173d59;font-size:1.15rem;font-weight:1000;}
.lesson26-word-row {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
.lesson26-word-row button {min-height:52px;border:1px solid #b5c4cf;border-radius:6px;background:#f8fbfd;color:#152f49;font-size:1.35rem;font-weight:900;}
.lesson26-word-row button:hover,.lesson26-word-row button:focus-visible {border-color:#4b9bb7;background:#eaf7fc;}
.lesson26-nonsense-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:16px;border:2px solid #b9c8d2;border-radius:8px;background:#fff;}
.lesson26-nonsense-grid button {position:relative;min-height:66px;padding:10px 38px 10px 10px;border:1px solid #b9c8d2;border-radius:6px;background:#fbfdff;color:#17324e;font-size:1.55rem;font-weight:1000;}
.lesson26-nonsense-grid button:hover,.lesson26-nonsense-grid button:focus-visible {border-color:#e28b45;background:#fff8ef;}
.lesson26-nonsense-grid small {position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:.82rem;}
.lesson26-find-progress {display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;border:2px dashed #77d3ad;border-radius:8px;background:#f0fcf5;color:#17644a;font-weight:900;}
.lesson26-find-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.lesson26-find-card {display:grid;grid-template-columns:104px minmax(0,1fr);gap:10px;padding:12px;border:2px solid #bfd0dc;border-radius:8px;background:#fff;transition:border-color .18s ease,background .18s ease;}
.lesson26-find-card.is-complete {border-color:#58bc8b;background:#f1fbf6;}
.lesson26-find-picture {grid-row:1 / 3;display:grid;place-items:center;min-height:118px;border:1px solid #c7d6df;border-radius:6px;background:#f5f9fc;font-size:3.35rem;}
.lesson26-find-picture small {display:block;color:#39738e;font-size:.76rem;font-weight:800;}
.lesson26-find-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-self:end;}
.lesson26-find-choices button {min-height:54px;border:2px solid #9fb9ce;border-radius:6px;background:linear-gradient(to bottom,#e8f4fb 0 64%,#e3f0c1 64% 100%);color:#17324e;font-size:1.35rem;font-weight:1000;}
.lesson26-find-choices button.is-try-again {border-color:#f0a04b;background:#fff5e8;}
.lesson26-find-choices button.is-correct {border-color:#24a36e;background:#dff7e8;color:#087044;}
.lesson26-find-card p {grid-column:2;min-height:23px;margin:0;text-align:center;color:#52677a;font-size:.9rem;font-weight:800;}
.lesson26-find-card.is-complete p {color:#138358;}
.lesson26-writing-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.lesson26-write-card.lesson-complete-card {display:grid;grid-template-columns:116px minmax(0,1fr);align-items:center;gap:12px;padding:14px;border:2px solid #b8c9d6;border-radius:8px;background:#fff;}
.lesson26-write-card.is-complete {border-color:#58bc8b;background:#f1fbf6;}
.lesson26-write-picture {display:grid;place-items:center;min-height:142px;border:0;border-radius:6px;background:#f4f9fc;font-size:3.6rem;}
.lesson26-write-picture small {display:block;color:#39738e;font-size:.82rem;font-weight:800;}
.lesson26-word-builder {display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;color:#142f4c;font-size:2.5rem;font-weight:1000;}
.lesson26-target-syllable {display:grid;width:132px;height:132px;overflow:hidden;border:2px solid #77afd4;border-radius:6px;background:#d9edf9;}
.lesson26-write-canvas-slot {position:relative;display:grid;place-items:center;width:100%;height:100%;background:#d9edf9;color:rgba(31,93,126,.42);font-size:.84rem;font-weight:900;}
.lesson26-write-canvas-slot::before,.lesson26-write-canvas-slot::after {content:'';position:absolute;background:rgba(31,111,155,.18);pointer-events:none;}
.lesson26-write-canvas-slot::before {left:10px;right:10px;top:50%;height:1px;}
.lesson26-write-canvas-slot::after {top:8px;bottom:8px;left:50%;width:1px;}
.lesson26-write-actions {grid-column:2;display:flex;justify-content:center;gap:8px;}
.lesson26-write-actions button {min-height:44px;margin:0;padding:8px 14px;}
.lesson26-write-feedback {grid-column:1 / -1;min-height:24px;margin:0;text-align:center;color:#147153;font-weight:900;}
@media (max-width:820px) {
    .lesson26-guide,.lesson26-find-progress {align-items:flex-start;flex-direction:column;}
    .lesson26-picture-card {grid-template-columns:minmax(0,1fr) 78px;}
    .lesson26-picture-icon {font-size:2.8rem;}
    .lesson26-picture-word {font-size:1.65rem;}
    .lesson26-find-grid,.lesson26-writing-grid {grid-template-columns:1fr;}
}
@media (max-width:560px) {
    .lesson26-picture-grid,.lesson26-nonsense-grid {grid-template-columns:1fr;}
    .lesson26-word-row {grid-template-columns:1fr;}
    .lesson26-find-card {grid-template-columns:88px minmax(0,1fr);padding:10px;}
    .lesson26-find-picture {min-height:108px;font-size:2.8rem;}
    .lesson26-write-card.lesson-complete-card {grid-template-columns:88px minmax(0,1fr);padding:10px;}
    .lesson26-write-picture {min-height:128px;font-size:2.9rem;}
    .lesson26-word-builder {font-size:2rem;}
    .lesson26-target-syllable {width:116px;height:116px;}
}

/* 배움 27: ㅂ 받침가족 */
.lesson27-family-page {max-width:900px;margin:0 auto;padding:20px;border:1px solid #d8e1d1;border-radius:8px;background:#fffdf7;color:#17324e;}
.lesson27-family-header {display:flex;align-items:center;gap:16px;padding:15px 18px;border-bottom:3px solid #77b8c8;background:#eaf7fb;}
.lesson27-family-number {flex:0 0 auto;padding:8px 12px;border-radius:6px;background:#3e94ad;color:#fff;font-size:.95rem;font-weight:900;}
.lesson27-family-header h2 {margin:0;color:#18344f;font-size:2rem;font-weight:1000;}
.lesson27-family-header p {margin:4px 0 0;color:#3d6675;font-size:1rem;font-weight:800;}
.lesson27-family-explanation {margin-top:16px;padding:16px 18px;border:2px solid #b9dfbd;border-radius:8px;background:#f0faea;line-height:1.7;}
.lesson27-family-explanation strong {display:inline-block;margin-bottom:4px;color:#26734a;font-size:1.05rem;}
.lesson27-family-explanation p {margin:0;color:#29435a;font-size:1.05rem;font-weight:700;}
.lesson27-family-explanation b {color:#b54c27;}
.lesson27-family-explanation .lesson27-family-helper {margin-top:4px;color:#536879;font-size:.96rem;font-weight:700;}
.lesson27-family-step {display:flex;align-items:center;gap:12px;margin:16px 0 10px;padding:11px 14px;border-left:5px solid #54a8bc;background:#f4fafc;}
.lesson27-family-step span {padding:6px 10px;border-radius:5px;background:#54a8bc;color:#fff;font-weight:900;}
.lesson27-family-step strong {font-size:1.05rem;}
.lesson27-family-cards {display:grid;gap:18px;}
.lesson27-family-card {position:relative;display:grid;grid-template-columns:110px 92px minmax(260px,1fr) 180px;align-items:center;gap:18px;width:100%;min-height:210px;padding:25px 22px;overflow:hidden;border:2px solid #b8c7d2;border-radius:8px;background:#fff;color:#17324e;text-align:left;transition:border-color .2s ease,background-color .2s ease,box-shadow .2s ease;}
.lesson27-family-card.is-playing {border-color:#318faa;background:#f4fbfd;box-shadow:0 0 0 4px rgba(49,143,170,.14);}
.lesson27-family-card.is-heard:not(.is-playing) {border-color:#4fb985;background:#f8fdf9;}
.lesson27-card-check {position:absolute;top:10px;right:12px;padding:4px 8px;border-radius:4px;background:#dff7e8;color:#167447;font-size:.76rem;font-weight:900;visibility:hidden;opacity:0;transform:translateY(-4px);transition:opacity .2s ease,transform .2s ease;}
.lesson27-family-card.is-heard .lesson27-card-check {visibility:visible;opacity:1;transform:translateY(0);}
.lesson27-card-check::before {content:'✓ ';}
.lesson27-family-letter {display:grid;place-items:center;min-height:150px;border-right:2px solid #dce5eb;color:#17324e;font-size:5rem;font-weight:1000;line-height:1;transition:color .2s ease,transform .2s ease;}
.lesson27-family-card.state-first-sound .lesson27-family-letter {color:#247c9b;transform:scale(1.05);}
.lesson27-name-stack {display:grid;overflow:hidden;border:2px solid #9db3c2;border-radius:7px;background:#edf5fa;text-align:center;font-size:2.15rem;font-weight:1000;}
.lesson27-name-stack > span {display:grid;place-items:center;min-height:70px;transition:background-color .2s ease,color .2s ease,box-shadow .2s ease,transform .2s ease;}
.lesson27-first-block {background:#edf5fa;}
.lesson27-ending-block {border-top:2px solid #9db3c2;background:#c9e1ee;color:#234f67;}
.lesson27-family-card.state-first-sound .lesson27-first-block {background:#4ea9c1;color:#fff;box-shadow:inset 0 0 0 3px #247c9b;transform:scale(1.04);}
.lesson27-family-card.state-hand-moving .lesson27-first-block {background:#e4edf2;color:#718390;}
.lesson27-family-card.state-hand-moving .lesson27-ending-block {background:#a8d2e4;color:#174e68;box-shadow:inset 0 0 0 2px #67abc2;}
.lesson27-family-card.state-final-sound .lesson27-ending-block {background:#267f9f;color:#fff;box-shadow:inset 0 0 0 3px #175d78,0 0 0 4px rgba(38,127,159,.14);transform:scale(1.05);}
.lesson27-family-card.state-completed .lesson27-ending-block {background:#5a9fbb;color:#fff;}
.lesson27-hand-scene {position:relative;display:grid;grid-template-rows:1fr auto;align-items:center;min-width:270px;min-height:218px;overflow:hidden;border:1px solid #d8e2e8;border-radius:7px;background:#fff;}
.lesson27-hand-track {display:grid;place-items:center;height:186px;overflow:hidden;background:#fff;}
.lesson27-hand-stage {position:relative;display:block;width:270px;height:186px;overflow:hidden;}
.lesson27-hand-lower,.lesson27-hand-upper {position:absolute;display:block;object-fit:contain;user-select:none;pointer-events:none;}
.lesson27-hand-lower {left:30px;top:102px;width:172px;height:auto;}
.lesson27-hand-upper {left:24px;top:0;width:66px;height:auto;opacity:1;transform:translate3d(0,0,0) rotate(-2deg);transform-origin:10% 96%;will-change:transform;backface-visibility:hidden;}
.lesson27-sound-anchor {position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none;}
.lesson27-family-page[data-debug-hand-anchors="true"] .lesson27-sound-anchor {width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:#e63946;opacity:.85;z-index:8;}
.lesson27-hand-motion-lines {position:absolute;height:34px;overflow:visible;opacity:0;transform:translateY(-4px);transition:opacity .16s ease,transform .5s ease;}
.lesson27-hand-motion-lines path {fill:none;stroke:#4a4a4a;stroke-width:2.4;stroke-linecap:round;}
.lesson27-hand-contact {position:absolute;width:18px;height:18px;border:2px solid #ca7a3a;border-radius:50%;opacity:0;transform:translate(-50%,-50%) scale(.45);}
.lesson27-stage-caption {min-height:30px;padding:6px 8px;border-top:1px solid #e4ebef;background:#f7fafb;color:#566e7e;text-align:center;font-size:.8rem;font-weight:900;}
.lesson27-family-card.state-hand-moving .lesson27-hand-motion-lines {opacity:1;transform:translateY(6px);}
.lesson27-family-card.state-final-sound .lesson27-hand-contact {opacity:1;animation:lesson27-contact-pulse .62s ease-out 1;}
@keyframes lesson27-contact-pulse {0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}45%{opacity:.75;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.35)}}
.lesson27-card-copy {display:grid;gap:9px;align-content:center;justify-items:stretch;}
.lesson27-card-copy strong {font-size:1.75rem;font-weight:1000;}
.lesson27-card-copy > span {color:#52697b;font-size:1.05rem;font-weight:900;}
.lesson27-card-copy b {color:#b54c27;font-size:1.18rem;}
.lesson27-play-button {display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:9px 11px;border:2px solid #3295ae;border-radius:7px;background:#fff;color:#17617a;font-size:.9rem;font-weight:1000;cursor:pointer;}
.lesson27-play-button:hover {background:#eaf8fb;}
.lesson27-play-button:focus-visible {outline:4px solid rgba(255,139,70,.34);outline-offset:2px;}
.lesson27-play-button:disabled {cursor:wait;border-color:#6aa8b9;background:#dff3f7;color:#285f70;opacity:1;}
.lesson27-sound-compare {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px;padding:14px;border:2px solid #bfd7e0;border-radius:8px;background:#f5fbfd;}
.lesson27-sound-compare span {display:flex;align-items:center;justify-content:center;gap:12px;min-height:52px;border:1px solid #c9d8df;border-radius:6px;background:#fff;font-size:1.15rem;}
.lesson27-sound-compare i {color:#6e8595;font-style:normal;}
.lesson27-sound-compare strong {color:#c25225;font-size:1.35rem;}
.lesson27-sound-compare em {grid-column:1 / -1;color:#23704d;text-align:center;font-size:1.1rem;font-style:normal;font-weight:1000;}
.lesson27-family-summary {margin-top:12px;padding:14px 18px;border:2px dashed #69b58a;border-radius:8px;background:#f3fbf5;color:#266747;text-align:center;font-size:1.05rem;font-weight:900;}
.lesson27-family-summary.is-complete {border-style:solid;background:#e2f7e9;color:#11683c;}
.lesson27-family-summary strong,.lesson27-family-summary span {display:block;}
.lesson27-family-summary span {margin-top:5px;color:#3a6b53;font-size:.95rem;}
#learning-detail-next-btn:disabled {cursor:not-allowed;filter:grayscale(.45);opacity:.5;box-shadow:none;}
@media (max-width:900px) {
    .lesson27-family-page {padding:14px;}
    .lesson27-family-header {align-items:flex-start;}
    .lesson27-family-header h2 {font-size:1.65rem;}
    .lesson27-family-step {align-items:flex-start;flex-direction:column;}
    .lesson27-family-card {grid-template-columns:100px 86px minmax(260px,1fr);gap:12px;padding:18px 14px;}
    .lesson27-family-letter {font-size:4rem;}
    .lesson27-hand-scene {min-width:270px;min-height:218px;}
    .lesson27-card-copy {grid-column:1 / -1;grid-template-columns:auto auto minmax(170px,230px);align-items:center;justify-content:center;gap:14px;}
}
@media (max-width:520px) {
    .lesson27-family-header {display:grid;gap:9px;}
    .lesson27-family-card {grid-template-columns:88px minmax(78px,1fr);}
    .lesson27-family-letter {min-height:104px;border-right:0;font-size:3.5rem;}
    .lesson27-hand-scene {grid-column:1 / -1;min-width:0;min-height:218px;}
    .lesson27-card-copy {grid-template-columns:1fr;text-align:center;}
    .lesson27-name-stack {font-size:1.8rem;}
    .lesson27-name-stack > span {min-height:52px;}
    .lesson27-sound-compare {grid-template-columns:1fr;}
    .lesson27-sound-compare em {grid-column:1;}
}
@media (prefers-reduced-motion:reduce) {
    .lesson27-hand-upper,.lesson27-hand-motion-lines,.lesson27-family-letter,.lesson27-name-stack > span,.lesson27-card-check {transition:none;}
    .lesson27-family-card.state-final-sound .lesson27-hand-contact {animation:none;opacity:.75;}
}
