:root {
    --page: #f4f8ff;
    --page-glow: #dfeeff;
    --ink: #26354d;
    --heading: #23314a;
    --muted: #6e7d95;
    --surface: #ffffff;
    --surface-soft: #f7faff;
    --surface-strong: #eef5ff;
    --line: #dce8f6;
    --blue: #579ff3;
    --blue-deep: #347fda;
    --blue-soft: #dbeeff;
    --pink: #f6b3c7;
    --pink-deep: #e78cab;
    --yellow: #ffd85b;
    --cream: #fff6d5;
    --green: #4fc889;
    --green-dark: #25895a;
    --red: #f06d72;
    --red-dark: #b74349;
    --violet: #785fd2;
    --shadow: 0 20px 55px rgba(52, 100, 160, .15);
    --shadow-soft: 0 12px 30px rgba(48, 80, 120, .10);
    --radius-xl: 34px;
    --radius-lg: 27px;
    --radius-md: 19px;
    --radius-sm: 13px;
}

html[data-theme="dark"] {
    --page: #0d1830;
    --page-glow: #13284d;
    --ink: #e9f0fb;
    --heading: #f8fbff;
    --muted: #afbdd1;
    --surface: #172640;
    --surface-soft: #1c2d4b;
    --surface-strong: #223759;
    --line: #314b70;
    --blue: #3f7fc7;
    --blue-deep: #2e65a6;
    --blue-soft: #1f3e62;
    --pink: #d98da7;
    --pink-deep: #c77494;
    --yellow: #e9c556;
    --cream: #423f32;
    --green: #43b67b;
    --green-dark: #86e0ae;
    --red: #d85d67;
    --red-dark: #ff9aa0;
    --violet: #9f8beb;
    --shadow: 0 24px 60px rgba(0, 0, 0, .28);
    --shadow-soft: 0 14px 34px rgba(0, 0, 0, .20);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 5%, var(--page-glow), transparent 27rem),
        radial-gradient(circle at 93% 16%, rgba(246, 179, 199, .18), transparent 24rem),
        var(--page);
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background .25s ease, color .25s ease;
}

button, input, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
.ui-icon { width: 19px; height: 19px; display: block; flex: 0 0 auto; }

.page-shell { min-height: 100vh; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px clamp(16px, 4vw, 54px);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark, .login-logo {
    display: grid;
    place-items: center;
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    background: linear-gradient(145deg, var(--blue), #6c8ce8 60%, var(--pink-deep));
    box-shadow: 0 9px 20px rgba(52, 127, 218, .28);
}
.brand-mark { width: 46px; height: 46px; border-radius: 15px; font-size: 27px; }
.brand strong { display: block; color: var(--heading); font: 800 24px/1 'Baloo 2', cursive; letter-spacing: .03em; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.teacher-chip {
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: color-mix(in srgb, var(--blue-deep) 75%, var(--heading));
    font-size: 13px;
    font-weight: 900;
}

.icon-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    font-weight: 900;
    transition: transform .16s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.icon-button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 50%, var(--line)); }
.icon-button.is-active { color: var(--blue-deep); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.logout-button { color: var(--muted); }
.control-label { font-size: 12px; }
.music-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.volume-control {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}
.volume-caption { line-height: 1; }
.volume-output { min-width: 30px; color: var(--ink); font-size: 10px; text-align: right; }
.volume-slider {
    --volume-progress: 65%;
    width: 88px;
    height: 5px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(
        to right,
        var(--blue-deep) 0 var(--volume-progress),
        color-mix(in srgb, var(--line) 82%, var(--surface)) var(--volume-progress) 100%
    );
}
.volume-slider::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--blue-deep);
    box-shadow: 0 2px 7px rgba(35, 76, 122, .24);
}
.volume-slider::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--blue-deep);
    box-shadow: 0 2px 7px rgba(35, 76, 122, .24);
}
.volume-slider:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 26%, transparent);
}

.content-wrap { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 62px; }

h1, h2, h3 { font-family: 'Baloo 2', cursive; margin-top: 0; color: var(--heading); }
h1 { font-size: clamp(2rem, 3.8vw, 3.25rem); line-height: 1.06; margin-bottom: 10px; }
h2 { font-size: clamp(1.55rem, 2.5vw, 2.2rem); line-height: 1.15; margin-bottom: 6px; }
h3 { font-size: 1.36rem; margin-bottom: 6px; }
p { color: var(--muted); line-height: 1.65; }
.eyebrow { margin: 0 0 8px; color: var(--blue-deep); font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.muted { color: var(--muted); font-weight: 700; opacity: .72; }

.btn {
    border: 0;
    border-radius: 14px;
    min-height: 44px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue-deep), #6c75de); box-shadow: 0 10px 22px rgba(52, 127, 218, .25); }
.btn-primary:hover { box-shadow: 0 14px 27px rgba(52, 127, 218, .32); }
.btn-secondary { color: color-mix(in srgb, var(--blue-deep) 74%, var(--heading)); background: var(--blue-soft); }
.btn-ghost { color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.btn-danger-soft { color: var(--red-dark); background: color-mix(in srgb, var(--red) 13%, var(--surface)); }
.btn-small { min-height: 38px; padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }

.flash { border-radius: 15px; padding: 13px 16px; margin-bottom: 20px; font-weight: 800; }
.flash-success { color: var(--green-dark); background: color-mix(in srgb, var(--green) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 40%, var(--line)); }

/* Dashboard: inspired by the playful blue/pink reference */
.welcome-board {
    min-height: 420px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: .88fr 1.12fr;
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
    padding: clamp(34px, 6vw, 68px);
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(circle at 83% 22%, rgba(255,255,255,.10), transparent 12rem),
        linear-gradient(135deg, #58a3f6, #4d94ec 54%, #4687df);
    box-shadow: 0 26px 58px rgba(50, 112, 187, .25);
}
html[data-theme="dark"] .welcome-board { background: linear-gradient(135deg, #1f568f, #244d83 55%, #293f70); }
.welcome-board::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    right: -100px;
    bottom: -105px;
    border: 30px solid rgba(255,255,255,.09);
    border-radius: 50%;
}
.welcome-copy { position: relative; z-index: 2; }
.welcome-mini { display: block; margin-bottom: 14px; color: rgba(255,255,255,.86); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.welcome-copy h1 {
    margin: 0;
    color: #fff8e7;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: .88;
    letter-spacing: .015em;
    text-shadow: 0 4px 0 rgba(44, 94, 152, .25);
}
.welcome-subtitle { margin: 22px 0 0; color: rgba(255,255,255,.93); font-size: 16px; font-weight: 900; letter-spacing: .05em; }
.squiggle { width: 76px; height: 16px; margin: 15px 0 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath d='M2 10c10-15 20 15 30 0s20 15 30 0 20 15 36 0' fill='none' stroke='%234ecb79' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.welcome-teacher { max-width: 390px; margin: 0; color: rgba(255,255,255,.82); font-weight: 700; }

.welcome-menu { min-height: 300px; position: relative; z-index: 2; display: grid; gap: 22px; padding: 14px 10px 14px 60px; align-content: center; }
.ribbon-action {
    min-height: 66px;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 13px 38px;
    border: 3px solid rgba(44, 50, 60, .86);
    border-radius: 48% 42% 45% 50% / 55% 52% 48% 45%;
    color: #29313d;
    background: #f7b9cc;
    text-decoration: none;
    text-transform: uppercase;
    font: 800 15px/1.05 'Baloo 2', cursive;
    box-shadow: 5px 7px 0 rgba(45, 77, 111, .18);
    transform: rotate(-1.2deg);
    transition: transform .18s ease, box-shadow .18s ease;
}
.ribbon-action:nth-of-type(2) { margin-left: 42px; transform: rotate(1deg); }
.ribbon-action:nth-of-type(3) { margin-right: 22px; transform: rotate(-.4deg); }
.ribbon-action:hover { transform: translateY(-3px) rotate(0); box-shadow: 7px 10px 0 rgba(45, 77, 111, .18); }
.ribbon-action .ui-icon { width: 22px; height: 22px; }
.welcome-mascot { position: absolute; z-index: 4; object-fit: contain; pointer-events: none; filter: drop-shadow(0 7px 5px rgba(40,68,96,.13)); animation: mascotFloat 4.2s ease-in-out infinite; }
.mascot-sun { width: 82px; left: 4px; top: -9px; transform: rotate(-8deg); }
.mascot-cloud { width: 112px; right: -8px; top: 54px; animation-delay: -.8s; }
.mascot-pencil { width: 88px; right: 0; bottom: 7px; transform: rotate(5deg); animation-delay: -1.4s; }
.mascot-book { width: 88px; left: 0; bottom: 34px; transform: rotate(-8deg); animation-delay: -2.2s; }
@keyframes mascotFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -7px; } }

.section-block { margin-top: 46px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 20px; }
.section-heading p { margin-bottom: 0; }
.section-lead { max-width: 700px; }
.count-pill { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--muted); font-weight: 900; white-space: nowrap; }

.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
.set-card { overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: var(--surface); box-shadow: var(--shadow-soft); transition: transform .18s ease, box-shadow .18s ease; }
.set-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.set-preview { min-height: 250px; display: grid; gap: 7px; padding: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 22%, var(--surface)), color-mix(in srgb, var(--pink) 24%, var(--surface))); }
.preview-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.preview-item { min-width: 0; display: grid; place-items: center; padding: 7px; border-radius: 13px; background: color-mix(in srgb, var(--surface) 87%, transparent); border: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.preview-item img { width: min(70px, 80%); height: 58px; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(33,49,70,.10)); }
.set-card-body { padding: 20px; }
.set-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.set-card-body p { margin: 0; }
.set-badge { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: var(--blue-deep); background: var(--blue-soft); font-size: 12px; font-weight: 900; }
.set-object-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.set-object-list span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 900; }
.card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.empty-state { border: 2px dashed color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: 25px; padding: 42px; background: color-mix(in srgb, var(--surface) 82%, transparent); }
.character-empty { display: flex; align-items: center; gap: 25px; }
.character-empty > img { width: 150px; flex: 0 0 auto; }
.character-empty p { max-width: 560px; }

.how-to-panel {
    position: relative;
    overflow: hidden;
    margin-top: 42px;
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid color-mix(in srgb, var(--pink) 50%, var(--line));
    border-radius: 28px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--pink) 30%, var(--surface)), color-mix(in srgb, var(--yellow) 21%, var(--surface)));
}
.how-to-copy { max-width: 680px; }
.how-to-copy p { margin-bottom: 0; }
.how-to-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-top: 23px; padding-right: 90px; }
.how-to-steps div { min-height: 94px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 13px; border-radius: 17px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.how-to-steps b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue-deep); }
.how-to-steps span { color: var(--ink); font-size: 12px; font-weight: 900; }
.how-to-character { position: absolute; width: 126px; right: -12px; bottom: -18px; transform: rotate(7deg); }

/* Forms */
.page-heading-row { margin-bottom: 24px; }
.page-heading-row p { max-width: 720px; }
.decorated-heading { min-height: 160px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 32px; border-radius: 25px; background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 17%, var(--surface)), color-mix(in srgb, var(--pink) 17%, var(--surface))); border: 1px solid var(--line); }
.decorated-heading > img { width: 135px; max-height: 130px; object-fit: contain; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 17px; color: var(--blue-deep); font-weight: 900; text-decoration: none; }
.back-link .ui-icon { width: 17px; height: 17px; }
.editor-card { padding: clamp(20px, 4vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: 27px; box-shadow: var(--shadow); }
.editor-section { padding-bottom: 26px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.field-grid { display: grid; gap: 18px; }
.field-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group label { font-weight: 900; color: var(--ink); }
.field-group input, .field-group textarea, .cell-answer-state textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--surface);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .2s ease;
}
.field-group input::placeholder, .field-group textarea::placeholder, .cell-answer-state textarea::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.field-group input:focus, .field-group textarea:focus, .cell-answer-state textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent); }
.field-error { color: var(--red-dark); font-size: 13px; font-weight: 800; }
.object-editor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.object-editor-card { position: relative; border: 1px solid var(--line); border-radius: 21px; padding: 18px; background: var(--surface-soft); }
.row-badge { position: absolute; top: 13px; left: 13px; z-index: 2; border-radius: 999px; padding: 6px 10px; background: var(--blue-deep); color: #fff; font-size: 12px; font-weight: 900; }
.image-picker { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 17px; }
.image-preview { width: 100%; aspect-ratio: 1.35; display: grid; place-items: center; border: 2px dashed color-mix(in srgb, var(--blue) 38%, var(--line)); border-radius: 17px; background: var(--surface); color: var(--blue-deep); overflow: hidden; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.upload-placeholder { width: 45px; height: 45px; opacity: .7; }
.image-picker small { color: var(--muted); text-align: center; }
.repeat-note { margin: 14px 0 0; padding: 10px 11px; border-radius: 12px; background: color-mix(in srgb, var(--yellow) 21%, var(--surface)); color: var(--ink); font-size: 12px; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }

/* Login */
.guest-body { overflow-x: hidden; }
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px 18px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(255,255,255,.18), transparent 13rem),
        linear-gradient(135deg, #58a4f7, #4e94ec 60%, #4784dc);
}
html[data-theme="dark"] .login-page { background: linear-gradient(135deg, #153b69, #1d477a 60%, #253b69); }
.guest-controls { position: fixed; z-index: 30; right: 18px; top: 18px; display: flex; gap: 8px; }
.glass-control { color: #fff; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.28); backdrop-filter: blur(10px); }
.glass-control:hover, .glass-control.is-active { color: #fff; background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.38); }
.music-control-glass .volume-control {
    color: rgba(255,255,255,.84);
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.28);
    backdrop-filter: blur(10px);
}
.music-control-glass .volume-output { color: #fff; }
.music-control-glass .volume-slider {
    background: linear-gradient(
        to right,
        #fff 0 var(--volume-progress),
        rgba(255,255,255,.28) var(--volume-progress) 100%
    );
}
.music-control-glass .volume-slider::-webkit-slider-thumb { background: #fff; border-color: rgba(87,159,243,.9); }
.music-control-glass .volume-slider::-moz-range-thumb { background: #fff; border-color: rgba(87,159,243,.9); }
.login-card { position: relative; z-index: 6; width: min(480px, 100%); border-radius: 31px; padding: 31px; background: color-mix(in srgb, var(--surface) 95%, transparent); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 30px 85px rgba(25, 66, 111, .28); backdrop-filter: blur(12px); }
.login-kicker { margin-bottom: 15px; color: var(--blue-deep); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.login-brand-row { display: flex; align-items: center; gap: 15px; }
.login-logo { width: 67px; height: 67px; flex: 0 0 auto; border-radius: 22px; font-size: 42px; }
.login-card h1 { margin: 0 0 -4px; font-size: 3.55rem; }
.login-subtitle { margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.login-welcome { display: flex; flex-direction: column; gap: 3px; margin: 23px 0 20px; padding: 13px 15px; border-radius: 15px; background: var(--blue-soft); }
.login-welcome strong { color: var(--heading); }
.login-welcome span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-stack { display: grid; gap: 16px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 112px; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 9px; padding: 6px 9px; display: inline-flex; align-items: center; gap: 5px; background: var(--surface-strong); color: var(--blue-deep); cursor: pointer; font-size: 11px; font-weight: 900; }
.password-toggle .ui-icon { width: 16px; height: 16px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--blue-deep); }
.login-submit { margin-top: 2px; }
.media-credit { margin: 20px 0 0; padding-top: 17px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 900; }
.audio-note { margin: 7px auto 0; max-width: 340px; text-align: center; color: var(--muted); font-size: 10px; line-height: 1.45; }
.login-character { position: absolute; z-index: 3; object-fit: contain; pointer-events: none; filter: drop-shadow(0 10px 8px rgba(28,58,90,.16)); animation: loginFloat 4.8s ease-in-out infinite; }
.login-sun { width: 145px; left: max(3vw, 15px); top: 8vh; transform: rotate(-8deg); }
.login-cloud { width: 200px; right: 1vw; top: 16vh; animation-delay: -1.2s; }
.login-pencil { width: 155px; right: 4vw; bottom: 2vh; transform: rotate(5deg); animation-delay: -2s; }
.login-book { width: 170px; left: 2vw; bottom: 5vh; transform: rotate(-7deg); animation-delay: -3s; }
@keyframes loginFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -11px; } }

/* Game */
.game-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 24px; }
.game-toolbar p { margin-bottom: 0; }
.game-toolbar-actions { flex: 0 0 auto; display: flex; gap: 9px; flex-wrap: wrap; }
.game-stage {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 31px;
    padding: clamp(18px, 3vw, 32px);
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.17), transparent 12rem),
        linear-gradient(145deg, #59a5f6, #4e94eb);
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: 0 24px 55px rgba(48, 112, 187, .25);
}
html[data-theme="dark"] .game-stage { background: linear-gradient(145deg, #20598f, #263f78); }
.game-stage::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.13) 1.5px, transparent 1.5px); background-size: 26px 26px; mask-image: linear-gradient(to bottom, black, transparent 70%); }
.game-instructions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding-right: 68px; }
.game-instructions span { padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.88); color: #5d6a7c; font-size: 12px; font-weight: 900; box-shadow: 0 5px 12px rgba(45,79,113,.10); }
.game-instructions strong { width: 21px; height: 21px; display: inline-grid; place-items: center; margin-right: 4px; border-radius: 50%; color: #fff; background: var(--blue-deep); font-size: 10px; }
.stage-character { position: absolute; z-index: 2; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 6px rgba(33,66,98,.14)); animation: mascotFloat 4.4s ease-in-out infinite; }
.stage-sun { width: 86px; right: 16px; top: 5px; }
.stage-pencil { width: 100px; right: -18px; bottom: 6px; transform: rotate(4deg); animation-delay: -1.3s; }
.stage-book { width: 95px; left: -14px; bottom: 2px; transform: rotate(-7deg); animation-delay: -2.2s; }
.bingo-board { width: min(940px, 100%); position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(9px, 1.5vw, 15px); margin: 0 auto; }
.bingo-cell { min-width: 0; aspect-ratio: 1.22; position: relative; overflow: hidden; border: 3px solid rgba(255,255,255,.82); border-radius: clamp(17px, 2vw, 24px); background: rgba(255,255,255,.96); box-shadow: 0 10px 22px rgba(38,78,117,.16); cursor: pointer; transition: transform .16s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.bingo-cell:hover { transform: translateY(-2px); }
.cell-image-state, .cell-answer-state { width: 100%; height: 100%; }
.cell-image-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 12px; background: rgba(255,255,255,.86); }
.cell-image-state img { width: min(54%, 135px); height: min(54%, 135px); object-fit: contain; filter: drop-shadow(0 8px 10px rgba(50,62,75,.11)); }
.cell-image-state span { color: #29384c; font-family: 'Baloo 2', cursive; font-size: clamp(15px, 1.7vw, 21px); line-height: 1; font-weight: 800; }
.cell-image-state small { color: #7f8998; font-size: clamp(10px, 1vw, 12px); font-weight: 800; }
.cell-answer-state { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: clamp(10px, 1.7vw, 18px); }
.cell-answer-state[hidden] { display: none; }
.cell-answer-state textarea { flex: 1; min-height: 0; resize: none; border: 0; padding: 12px; color: #26354d; background: rgba(255,255,255,.90); font-size: clamp(14px, 1.6vw, 19px); font-weight: 900; line-height: 1.4; text-align: center; }
.cell-answer-state textarea[readonly] { cursor: default; background: rgba(255,255,255,.62); }
.answer-hint { min-height: 18px; color: #687588; font-size: clamp(9px, .9vw, 12px); font-weight: 900; text-align: center; }
.status-mark { position: absolute; right: 9px; top: 7px; z-index: 3; width: 32px; height: 32px; display: grid; place-items: center; color: #fff; font: 900 23px/1 'Nunito', sans-serif; }
.state-editing { border-color: #afc9f3; box-shadow: 0 0 0 4px rgba(255,255,255,.22), 0 9px 21px rgba(34,76,117,.16); }
.state-submitted { border-color: #f3cb57; background: #fff8d9; }
.state-correct { border-color: #39b979; background: linear-gradient(145deg, #ddf8e8, #b6edce); box-shadow: 0 12px 27px rgba(39, 137, 87, .24); }
.state-correct .status-mark { border-radius: 50%; background: #2ca566; }
.state-wrong { border-color: #e95761; background: linear-gradient(145deg, #ffe2e4, #ffc1c5); box-shadow: 0 12px 27px rgba(177, 53, 62, .20); }
.state-wrong .status-mark { border-radius: 50%; background: #d84d57; }
.game-footer-note { position: relative; z-index: 3; margin-top: 17px; text-align: center; color: rgba(255,255,255,.88); font-size: 13px; font-weight: 900; }
.shake { animation: shake .34s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.bingo-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(14, 28, 49, .52); backdrop-filter: blur(5px); opacity: 0; transition: opacity .2s ease; }
.bingo-overlay[hidden] { display: none; }
.bingo-overlay.is-visible { opacity: 1; }
.bingo-overlay canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bingo-pop { position: relative; z-index: 2; width: min(650px, calc(100% - 36px)); padding: 45px 30px; border: 5px solid rgba(255,255,255,.75); border-radius: 39px; text-align: center; background: linear-gradient(135deg, #fff2a8, #f8bdd0 50%, #cde8ff); box-shadow: 0 30px 90px rgba(19,38,62,.38); animation: bingoPop .5s cubic-bezier(.2,.9,.2,1.15); }
.bingo-kicker { display: inline-block; margin-bottom: 4px; padding: 6px 15px; border-radius: 999px; color: #42495b; background: rgba(255,255,255,.58); font: 900 14px/1 'Baloo 2', cursive; letter-spacing: .09em; }
.bingo-pop strong { display: block; color: #405db5; font: 900 clamp(4.5rem, 12vw, 9rem)/.88 'Baloo 2', cursive; text-shadow: 0 5px 0 rgba(255,255,255,.8); }
.bingo-pop p { margin: 11px 0 0; color: #5c6170; font-size: clamp(16px, 2vw, 22px); font-weight: 900; }
.bingo-character { position: absolute; width: 130px; object-fit: contain; animation: bingoCharacter .65s ease-in-out infinite alternate; }
.bingo-character-left { left: -52px; bottom: -28px; transform: rotate(-10deg); }
.bingo-character-right { right: -48px; top: -34px; transform: rotate(11deg); animation-delay: -.2s; }
@keyframes bingoPop { from { transform: scale(.66) rotate(-3deg); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bingoCharacter { from { translate: 0 5px; } to { translate: 0 -8px; } }

/* Fullscreen presentation */
html:fullscreen .topbar { display: none; }
html:fullscreen .content-wrap { width: 100%; min-height: 100vh; padding: 12px 18px; }
html:fullscreen .game-toolbar { margin-bottom: 10px; }
html:fullscreen .game-toolbar > div:first-child { display: none; }
html:fullscreen .game-toolbar-actions { width: 100%; justify-content: flex-end; }
html:fullscreen .game-stage { min-height: calc(100vh - 76px); display: flex; flex-direction: column; justify-content: center; border-radius: 24px; }
html:fullscreen .bingo-board { width: min(1050px, 88vw); }
html:fullscreen .bingo-cell { aspect-ratio: 1.35; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 980px) {
    .welcome-board { grid-template-columns: .9fr 1.1fr; padding: 42px 34px; }
    .set-grid { grid-template-columns: 1fr; }
    .object-editor-grid { grid-template-columns: 1fr; }
    .object-editor-card { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; }
    .image-picker { grid-row: span 2; margin-bottom: 0; }
    .repeat-note { grid-column: 2; margin-top: 0; }
    .how-to-steps { grid-template-columns: repeat(2, 1fr); }
    .game-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
    .topbar { padding-inline: 13px; }
    .teacher-chip, .topbar .control-label { display: none; }
    .topbar .icon-button { width: 40px; padding-inline: 8px; }
    .topbar .volume-control { padding-inline: 7px; }
    .topbar .volume-caption, .topbar .volume-output { display: none; }
    .topbar .volume-slider { width: 72px; }
    .content-wrap { width: min(100% - 22px, 1180px); padding-top: 22px; }
    .welcome-board { min-height: auto; grid-template-columns: 1fr; gap: 32px; padding: 34px 24px; }
    .welcome-copy h1 { font-size: clamp(3rem, 14vw, 4.4rem); }
    .welcome-menu { padding-left: 35px; padding-right: 22px; }
    .mascot-cloud { right: -16px; }
    .section-heading { align-items: flex-start; }
    .field-grid.two-col { grid-template-columns: 1fr; }
    .object-editor-card { display: block; }
    .image-picker { margin-bottom: 17px; }
    .repeat-note { margin-top: 14px; }
    .decorated-heading { padding: 22px; }
    .decorated-heading > img { width: 100px; }
    .character-empty { flex-direction: column; text-align: center; }
    .character-empty > img { width: 120px; }
    .how-to-steps { padding-right: 0; }
    .how-to-character { display: none; }
    .bingo-board { gap: 7px; }
    .bingo-cell { aspect-ratio: .98; border-width: 2px; border-radius: 14px; }
    .cell-image-state { padding: 7px; gap: 4px; }
    .cell-image-state img { width: 58%; height: 58%; }
    .cell-answer-state { padding: 6px; gap: 3px; }
    .cell-answer-state textarea { padding: 6px; border-radius: 9px; }
    .answer-hint { font-size: 8px; }
    .status-mark { right: 4px; top: 4px; width: 24px; height: 24px; font-size: 17px; }
    .game-instructions { display: grid; grid-template-columns: repeat(2, 1fr); padding-right: 0; }
    .game-instructions span { border-radius: 11px; }
    .game-toolbar-actions { width: 100%; }
    .game-toolbar-actions .btn { flex: 1; }
    .stage-character { opacity: .75; }
    .stage-sun { width: 66px; }
    .stage-pencil, .stage-book { width: 70px; }
    .login-character { opacity: .85; }
    .login-sun { width: 105px; left: -28px; top: 3vh; }
    .login-cloud { width: 135px; right: -42px; top: 11vh; }
    .login-pencil { width: 110px; right: -35px; bottom: -20px; }
    .login-book { width: 110px; left: -28px; bottom: -16px; }
}

@media (max-width: 470px) {
    .brand small { display: none; }
    .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
    .brand strong { font-size: 20px; }
    .welcome-menu { padding: 5px 5px 5px 25px; gap: 18px; }
    .ribbon-action { padding-inline: 28px; font-size: 13px; }
    .ribbon-action:nth-of-type(2) { margin-left: 18px; }
    .mascot-sun { width: 62px; left: -10px; }
    .mascot-cloud { width: 83px; }
    .mascot-book { width: 65px; left: -10px; }
    .mascot-pencil { width: 68px; right: -10px; }
    .set-preview { min-height: 205px; padding: 11px; gap: 5px; }
    .preview-row { gap: 5px; }
    .preview-item { padding: 4px; }
    .preview-item img { height: 46px; }
    .card-actions .btn, .card-actions form { flex: 1 1 auto; }
    .card-actions form .btn { width: 100%; }
    .how-to-steps { grid-template-columns: 1fr; }
    .decorated-heading > img { display: none; }
    .login-card { padding: 26px 20px; }
    .login-brand-row { align-items: flex-start; }
    .login-logo { width: 58px; height: 58px; border-radius: 18px; font-size: 36px; }
    .login-card h1 { font-size: 3rem; }
    .guest-controls .control-label { display: none; }
    .guest-controls .icon-button { width: 42px; }
    .guest-controls .volume-caption, .guest-controls .volume-output { display: none; }
    .guest-controls .volume-slider { width: 64px; }
    .guest-controls .volume-control { padding-inline: 7px; }
    .bingo-cell { aspect-ratio: .8; }
    .cell-image-state span { font-size: 12px; }
    .cell-image-state small { display: none; }
    .cell-answer-state textarea { font-size: 11px; line-height: 1.25; }
    .answer-hint { font-size: 7px; line-height: 1.05; }
    .bingo-character { width: 92px; }
    .bingo-character-left { left: -34px; }
    .bingo-character-right { right: -33px; }
}

[hidden] { display: none !important; }
.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;
}

.set-mode-label {
    display: inline-flex;
    margin-bottom: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--blue) 16%, var(--surface));
    color: var(--blue-deep);
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .08em;
}
.set-mode-label.is-classic {
    background: color-mix(in srgb, var(--pink) 27%, var(--surface));
    color: color-mix(in srgb, var(--red-dark) 72%, var(--heading));
}
.set-preview-classic { display: block; }
.classic-preview-grid {
    height: 100%;
    min-height: 214px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.classic-preview-item {
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 7px 7px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    overflow: hidden;
}
.classic-preview-item > span {
    position: absolute;
    top: 5px;
    left: 6px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-deep);
    color: #fff;
    font-size: 8px;
    font-weight: 1000;
}
.classic-preview-item p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    color: var(--ink);
    font-size: 9px;
    line-height: 1.3;
    font-weight: 900;
    text-align: center;
}

.mode-editor { padding-bottom: 27px; margin-bottom: 27px; border-bottom: 1px solid var(--line); }
.mode-editor-heading,
.mode-panel-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 17px;
}
.mode-editor-heading h2,
.mode-panel-intro h2 { margin-bottom: 4px; }
.mode-editor-heading p,
.mode-panel-intro p { margin-bottom: 0; }
.mode-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mode-choice {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border: 2px solid var(--line);
    border-radius: 19px;
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.mode-choice:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue) 55%, var(--line)); }
.mode-choice.is-selected {
    border-color: var(--blue);
    background: color-mix(in srgb, var(--blue) 10%, var(--surface));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 10%, transparent);
}
.mode-choice input { position: absolute; opacity: 0; pointer-events: none; }
.mode-choice-icon {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: linear-gradient(145deg, var(--blue), var(--blue-deep));
    color: #fff;
    font: 1000 20px/1 'Baloo 2', cursive;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--blue) 25%, transparent);
}
.mode-choice-icon-classic { background: linear-gradient(145deg, #f5a9c2, #e87399); }
.mode-choice-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mode-choice-copy strong { color: var(--heading); font-size: 16px; }
.mode-choice-copy small { color: var(--muted); line-height: 1.45; }
.mode-panel + .mode-panel { margin-top: 8px; }
.mode-panel-intro { align-items: center; }
.classic-pattern-note {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pink) 24%, var(--surface));
    color: var(--ink);
    font-size: 11px;
    font-weight: 900;
}
.question-editor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.question-editor-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}
.question-number {
    width: fit-content;
    margin-bottom: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--blue-deep);
    color: #fff;
    font-size: 11px;
    font-weight: 1000;
}
.question-editor-card textarea { min-height: 112px; resize: vertical; }
.question-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }

/* Classic board */
.cell-question-state {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: clamp(10px, 1.5vw, 17px);
    background: rgba(255,255,255,.9);
    text-align: center;
}
.question-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf5ff;
    color: #3e6fa6;
    font-size: clamp(8px, .72vw, 10px);
    font-weight: 1000;
    letter-spacing: .07em;
}
.cell-question-state p {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    color: #29384c;
    font-size: clamp(11px, 1.15vw, 16px);
    line-height: 1.3;
    font-weight: 900;
}
.cell-question-state small { color: #7f8998; font-size: clamp(9px, .8vw, 11px); font-weight: 800; }
.mode-classic .bingo-cell { aspect-ratio: 1.12; }
.classic-answer-state { justify-content: stretch; }
.classic-question-mini {
    flex: 0 0 auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(255,255,255,.48);
    color: #526176;
    font-size: clamp(8px, .8vw, 11px);
    line-height: 1.25;
    font-weight: 900;
    text-align: center;
}
.mode-classic .cell-answer-state textarea { font-size: clamp(12px, 1.25vw, 16px); }

html:fullscreen .mode-classic.bingo-board { width: min(1120px, 92vw); }
html:fullscreen .mode-classic .bingo-cell { aspect-ratio: 1.3; }

@media (max-width: 980px) {
    .question-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .mode-choice-grid { grid-template-columns: 1fr; }
    .mode-editor-heading,
    .mode-panel-intro { align-items: flex-start; flex-direction: column; }
    .question-editor-grid { grid-template-columns: 1fr; }
    .question-editor-card textarea { min-height: 95px; }
    .mode-classic .bingo-cell { aspect-ratio: .92; }
    .cell-question-state { padding: 6px; gap: 4px; }
    .cell-question-state p { -webkit-line-clamp: 4; font-size: 10px; line-height: 1.18; }
    .question-chip { padding: 3px 6px; font-size: 7px; }
    .cell-question-state small { display: none; }
    .classic-question-mini { padding: 4px; font-size: 7px; }
}

@media (max-width: 470px) {
    .mode-choice { padding: 13px; }
    .mode-choice-icon { width: 46px; height: 46px; border-radius: 14px; }
    .mode-choice-copy strong { font-size: 14px; }
    .mode-choice-copy small { font-size: 10px; }
    .classic-preview-grid { min-height: 182px; gap: 4px; }
    .classic-preview-item { padding: 13px 4px 4px; }
    .classic-preview-item p { font-size: 7px; -webkit-line-clamp: 3; }
    .mode-classic .bingo-cell { aspect-ratio: .78; }
    .cell-question-state p { font-size: 8px; -webkit-line-clamp: 5; }
}

.classic-preview-item.has-image {
    padding: 0;
    background: color-mix(in srgb, var(--surface) 95%, transparent);
}
.classic-preview-item.has-image > span { z-index: 2; }
.classic-preview-item.has-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.classic-content-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}
.classic-content-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border: 2px solid var(--line);
    border-radius: 17px;
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.classic-content-choice:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--pink) 55%, var(--line));
}
.classic-content-choice.is-selected {
    border-color: #df7fa1;
    background: color-mix(in srgb, var(--pink) 14%, var(--surface));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 12%, transparent);
}
.classic-content-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.classic-content-choice strong {
    color: var(--heading);
    font-size: 15px;
}
.classic-content-choice small {
    color: var(--muted);
    line-height: 1.4;
}

.classic-image-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}
.classic-image-editor-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}
.classic-image-editor-card .image-picker { margin-bottom: 0; }
.classic-image-preview { aspect-ratio: 1.1; }
.classic-image-preview img { object-fit: contain; }

.classic-image-state {
    position: relative;
    padding: clamp(8px, 1vw, 13px);
}
.classic-image-state .question-chip {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}
.classic-image-state img {
    width: min(78%, 190px);
    height: min(72%, 180px);
    object-fit: contain;
    padding: 0;
}
.classic-image-state small { margin-top: 2px; }

@media (max-width: 980px) {
    .classic-image-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .classic-content-switch,
    .classic-image-editor-grid { grid-template-columns: 1fr; }
    .classic-image-state img { width: 76%; height: 68%; }
}

@media (max-width: 470px) {
    .classic-preview-item.has-image img { padding: 3px; }
    .classic-image-state .question-chip { top: 4px; left: 4px; }
}

