:root {
    --navy: #15245b;
    --navy-2: #223779;
    --indigo: #5266d9;
    --indigo-soft: #edf0ff;
    --orange: #ff762d;
    --orange-soft: #fff0e6;
    --green: #16a36a;
    --green-soft: #e4f8ef;
    --red: #df3845;
    --red-soft: #fdecef;
    --ink: #18213f;
    --muted: #74809b;
    --line: #dfe5f1;
    --surface: #ffffff;
    --canvas: #eef2f8;
    --shadow: 0 10px 30px rgba(31, 48, 99, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1080px; background: #f5f7fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }

.app-splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; overflow: hidden; color: white; background: linear-gradient(145deg, #17285f, #4357ca 55%, #7049a8); text-align: center; opacity: 1; transition: opacity .42s ease, visibility .42s; }
.app-splash.leaving { visibility: hidden; opacity: 0; }
.app-splash img { position: relative; z-index: 1; width: 116px; height: 116px; border-radius: 29px; box-shadow: 0 22px 55px rgba(8,17,51,.32); animation: splash-logo 1.7s ease-in-out infinite; }
.app-splash > p { position: relative; z-index: 1; margin: 22px 0 6px; color: #dfe5ff; font-size: 10px; font-weight: 900; letter-spacing: 2px; }
.app-splash h1 { position: relative; z-index: 1; margin: 0; font-size: 38px; line-height: 1.03; letter-spacing: -1px; }
.app-splash h1 strong { color: #ffd86a; font-weight: 900; }
.app-splash > span { position: relative; z-index: 1; margin-top: 10px; color: #dbe1ff; font-size: 10px; font-weight: 700; }
.splash-glow { position: absolute; width: 520px; height: 520px; background: radial-gradient(circle, rgba(255,216,106,.22), transparent 64%); border-radius: 50%; animation: splash-glow 2.3s ease-in-out infinite; }
.splash-progress { position: relative; z-index: 1; width: 210px; height: 6px; overflow: hidden; margin-top: 23px; background: rgba(255,255,255,.18); border-radius: 99px; }
.splash-progress i { display: block; width: 46%; height: 100%; background: linear-gradient(90deg, #ffd86a, #ff8a42); border-radius: inherit; animation: splash-progress 1.05s ease-in-out infinite; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: white; background: linear-gradient(180deg, #1f3275, #101d4c); box-shadow: 8px 0 30px rgba(24, 36, 84, .12); z-index: 10; }
.brand { height: 76px; display: flex; align-items: flex-start; justify-content: center; flex-direction: column; padding: 0 24px; font-size: 15px; line-height: 1.12; font-weight: 800; letter-spacing: .6px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand strong { color: #ff833e; margin-top: 2px; }
.nav-list { padding: 18px 10px; display: grid; gap: 6px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 14px; color: #cbd4f5; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: 14px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(104, 126, 238, .48); }
.nav-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 18px; }

.workspace { padding: 0 20px 28px; min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar h1 { margin: 3px 0 0; font-size: 24px; letter-spacing: -.45px; }
.eyebrow { margin: 0; color: #8a96af; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.player-heading { display: none; }
.player-brand { display: flex; align-items: center; gap: 10px; }
.player-brand > img { width: 43px; height: 43px; flex: 0 0 43px; border-radius: 12px; box-shadow: 0 7px 18px rgba(36,56,121,.16); }
.admin-link { padding: 9px 13px; color: var(--navy-2); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 800; text-decoration: none; }
.search-field { width: 235px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); background: white; border-radius: 9px; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.primary-button, .secondary-button, .danger-button { min-height: 38px; padding: 0 15px; border-radius: 8px; border: 1px solid transparent; font-size: 13px; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { color: white; background: linear-gradient(135deg, #ff843f, #ff6826); box-shadow: 0 6px 16px rgba(255, 108, 41, .22); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255,108,41,.29); }
.secondary-button { color: var(--navy-2); background: white; border-color: #bdc8e2; }
.secondary-button:hover { color: var(--indigo); border-color: var(--indigo); background: var(--indigo-soft); }
.danger-button { color: white; background: var(--red); box-shadow: 0 6px 16px rgba(223,56,69,.2); }
.danger-button:hover { background: #c92c39; transform: translateY(-1px); }
.link-button { color: var(--indigo); background: transparent; border: 0; font-size: 12px; font-weight: 800; }
.player-actions { display: flex; align-items: center; gap: 9px; }
.profile-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px 0 7px; color: var(--navy-2); background: white; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; }
.profile-button span { width: 27px; height: 27px; display: grid; place-items: center; background: #fff1e7; border-radius: 50%; font-size: 17px; }
.profile-button b { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button:hover { border-color: var(--orange); box-shadow: 0 5px 15px rgba(255,118,45,.12); }
.help-button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; color: #7d4db3; background: #f6edff; border: 1px solid #dfc9f4; border-radius: 8px; font-size: 11px; font-weight: 800; }
.help-button span { width: 20px; height: 20px; display: grid; place-items: center; color: white; background: #8a57c2; border-radius: 50%; font-size: 12px; }
.help-button:hover { color: white; background: #8a57c2; border-color: #8a57c2; }
.library-button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--indigo); background: var(--indigo-soft); border: 1px solid #ccd3fa; border-radius: 8px; font-size: 12px; font-weight: 800; }
.library-button:hover { color: white; background: var(--indigo); border-color: var(--indigo); }
.library-button span { font-size: 16px; }
.mobile-test-button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: #ad571e; background: #fff3e8; border: 1px solid #ffd3b5; border-radius: 8px; font-size: 12px; font-weight: 800; }
.mobile-test-button:hover { color: white; background: var(--orange); border-color: var(--orange); }
.mobile-test-button span { font-size: 16px; transform: rotate(90deg); }
.install-app-button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: #176c51; background: #e7f8f1; border: 1px solid #bce9d7; border-radius: 8px; font-size: 12px; font-weight: 800; }
.install-app-button:hover { color: white; background: var(--green); border-color: var(--green); }
.install-app-button span { font-size: 16px; }
.sound-button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: #176c51; background: #e7f8f1; border: 1px solid #bce9d7; border-radius: 8px; font-size: 12px; font-weight: 800; }
.sound-button span { font-size: 17px; }
.sound-button.muted { color: #65718a; background: white; border-color: var(--line); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi-card { min-height: 92px; display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.kpi-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-size: 23px; font-weight: 900; }
.kpi-icon.blue { color: var(--indigo); background: var(--indigo-soft); }
.kpi-icon.orange { color: var(--orange); background: var(--orange-soft); }
.kpi-icon.green { color: var(--green); background: var(--green-soft); }
.kpi-icon.red { color: var(--red); background: var(--red-soft); }
.kpi-card div { display: grid; gap: 3px; }
.kpi-card strong { font-size: 26px; letter-spacing: -.6px; }
.kpi-card span:last-child { color: var(--muted); font-size: 12px; }

.panel { background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.panel-header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 3px 0 0; letter-spacing: -.25px; }
.panel-header h2 { font-size: 21px; }
.panel-header h3 { font-size: 16px; }

.editor-grid { display: grid; grid-template-columns: minmax(650px, 1fr) 340px; gap: 14px; align-items: start; }
.editor-header { padding-left: 18px; }
.toolbar { display: flex; align-items: center; gap: 6px; }
.tool-button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: #66718a; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-weight: 700; }
.tool-button:hover, .tool-button.active { color: var(--indigo); background: var(--indigo-soft); border-color: #aebaf1; }
#numbersButton { display: none !important; }
.creator-workflow-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 11px 14px; background: #f8f9fc; border-bottom: 1px solid var(--line); }
.creator-workflow-tabs button { min-width: 0; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 11px; color: #69758e; background: white; border: 1px solid #dce2ee; border-radius: 9px; text-align: left; }
.creator-workflow-tabs button > span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; color: white; background: #9aa5bc; border-radius: 50%; font-size: 10px; font-weight: 900; }
.creator-workflow-tabs button b { overflow: hidden; color: var(--navy-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.creator-workflow-tabs button small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.creator-workflow-tabs button:hover { border-color: #aebaf1; background: var(--indigo-soft); }
.creator-workflow-tabs button.active { border-color: var(--indigo); background: var(--indigo-soft); box-shadow: 0 4px 14px rgba(82,102,217,.12); }
.creator-workflow-tabs button.active > span { background: var(--indigo); }
.book-difficulty-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 14px; background: white; border-bottom: 1px solid var(--line); }
.book-difficulty-bar > div:first-child { display: grid; gap: 2px; }
.book-difficulty-bar p { margin: 0; color: #8a96af; font-size: 8px; font-weight: 850; letter-spacing: 1px; }
.book-difficulty-bar strong { color: #4e5a74; font-size: 9px; font-weight: 650; }
.book-difficulty-picker { display: grid; grid-template-columns: repeat(3, 72px); padding: 3px; background: #edf0f6; border-radius: 8px; }
.book-difficulty-picker button { min-height: 29px; padding: 0 8px; color: #66718a; background: transparent; border: 0; border-radius: 6px; font-size: 9px; font-weight: 850; }
.book-difficulty-picker button.active { color: white; background: var(--indigo); box-shadow: 0 3px 9px rgba(82,102,217,.24); }
.canvas-wrap { position: relative; aspect-ratio: 16 / 9; max-height: 610px; overflow: auto; display: grid; place-items: center; background: linear-gradient(135deg, #dce4f5, #c5d0e9); }
.canvas-wrap.drawing { cursor: crosshair; }
.canvas-wrap img, .canvas-wrap svg { position: absolute; width: var(--canvas-zoom, 100%); height: var(--canvas-zoom, 100%); object-fit: contain; transform-origin: center; }
.canvas-wrap img { user-select: none; pointer-events: none; }
.canvas-wrap #artworkImage { transition: opacity .28s ease; }
.canvas-wrap #artworkImage.artwork-loading { opacity: .28; }
.canvas-wrap svg { overflow: visible; }
.secret-item { position: absolute; z-index: 8; width: 64px; height: 64px; display: grid; place-items: center; padding: 0; color: white; background: radial-gradient(circle at 35% 28%, #fff9b3, #ff8f30 42%, #8547d9 74%); border: 3px solid rgba(255,255,255,.92); border-radius: 50%; box-shadow: 0 0 0 7px rgba(255,222,101,.25), 0 10px 25px rgba(35,32,94,.38); animation: secret-float 2.2s ease-in-out infinite; }
.secret-item span { font-size: 27px; filter: drop-shadow(0 2px 2px rgba(42,27,74,.3)); }
.secret-item small { position: absolute; left: 50%; top: calc(100% + 6px); translate: -50% 0; padding: 3px 7px; color: white; background: rgba(24,33,63,.86); border-radius: 99px; font-size: 8px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.secret-item:hover { scale: 1.12; }
.secret-item.collected { animation: secret-collect .55s ease forwards; pointer-events: none; }
.canvas-placeholder { display: none; place-items: center; gap: 8px; color: #66718a; text-align: center; }
.canvas-placeholder.visible { display: grid; }
.canvas-placeholder strong { color: var(--ink); font-size: 19px; }
.creator-sticker-preview { display: none; }
.region-shape { fill: rgba(247,196,95,.18); fill-opacity: .08; stroke: rgba(75,84,111,.58); stroke-width: 2.5; vector-effect: non-scaling-stroke; transition: fill .15s, fill-opacity .15s, stroke .15s, opacity .15s; }
.preview-mode .region-shape { fill-opacity: .7; }
.region-shape.covered, .preview-mode .region-shape.covered { fill-opacity: .98; }
.region-shape:hover { fill-opacity: .22; stroke: var(--orange); }
.region-shape.covered:hover { fill-opacity: 1; }
.region-shape.selected { fill-opacity: .58; stroke: var(--orange); stroke-width: 5; filter: drop-shadow(0 0 5px rgba(255,118,45,.55)); }
.region-shape.placed { fill-opacity: 1; stroke: rgba(255,255,255,.9); stroke-width: 3; filter: drop-shadow(0 4px 4px rgba(24,33,63,.18)); }
.region-shape.just-placed { animation: sticker-snap .62s cubic-bezier(.2,.9,.3,1); transform-box: fill-box; transform-origin: center; }
.region-shape.drop-target { fill-opacity: .7; stroke: var(--green); stroke-width: 7; filter: drop-shadow(0 0 8px rgba(22,163,106,.7)); }
.region-shape.wrong-target { fill-opacity: .28; stroke: var(--red); stroke-width: 6; filter: drop-shadow(0 0 7px rgba(218,52,69,.55)); }
.region-shape.wrong-drop { animation: wrong-drop .34s ease-in-out; stroke: var(--red); }
.region-shape.mission-target { stroke: rgba(99,114,205,.72); stroke-dasharray: 8 7; }
.region-shape.hint-pulse { animation: hint-pulse .7s ease-in-out 2; stroke: #ffd54f; stroke-width: 8; filter: drop-shadow(0 0 9px rgba(255,213,79,.9)); }
.region-shape.hint-reveal { animation: hint-reveal .75s ease-in-out infinite alternate; stroke: #ff762d; stroke-width: 9; filter: drop-shadow(0 0 12px rgba(255,118,45,.95)); }
.region-label { pointer-events: none; font-size: 23px; font-weight: 800; text-anchor: middle; dominant-baseline: central; fill: #30384c; paint-order: stroke; stroke: rgba(255,255,255,.88); stroke-width: 4; }
.region-label-patch { pointer-events: none; stroke: rgba(83,94,128,.12); stroke-width: 1; }
.region-label.placed { opacity: 0; }
.region-label.hidden-label, .preview-mode .region-label { opacity: 0; }
.drawing-line { fill: rgba(255,118,45,.18); stroke: var(--orange); stroke-width: 4; stroke-dasharray: 9 7; vector-effect: non-scaling-stroke; }
.drawing-node { fill: white; stroke: var(--orange); stroke-width: 4; vector-effect: non-scaling-stroke; }
.canvas-hint { min-width: 0; max-width: 520px; justify-self: center; overflow: hidden; padding: 7px 12px; color: #34416c; background: #eef1ff; border: 1px solid #d8def8; border-radius: 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.canvas-footer { min-height: 46px; display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 12px; padding: 6px 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--green); border-radius: 50%; }
.zoom-controls { display: flex; align-items: center; gap: 7px; }
.zoom-controls button { width: 26px; height: 26px; color: var(--navy-2); background: white; border: 1px solid var(--line); border-radius: 6px; }
.zoom-controls span { width: 40px; text-align: center; }

.right-column { display: grid; gap: 14px; }
.play-count { padding: 5px 9px; color: var(--indigo); background: var(--indigo-soft); border-radius: 99px; font-size: 10px; font-weight: 850; }
.play-instructions { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 14px 4px; padding: 10px; color: #5c6880; background: #f7f8fc; border: 1px dashed #cbd3e5; border-radius: 8px; font-size: 11px; }
.play-instructions span { width: 20px; height: 20px; display: grid; place-items: center; color: white; background: var(--indigo); border-radius: 50%; font-size: 10px; font-weight: 900; }
.play-instructions b { color: var(--orange); font-size: 15px; }
.mission-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 14px 2px; padding: 11px 12px; background: linear-gradient(135deg, #fff8ed, #f3f1ff); border: 1px solid #eadfcf; border-radius: 10px; transition: transform .25s, box-shadow .25s; }
.mission-card > div:first-child { display: grid; gap: 3px; }
.mission-card small { color: #9b6b36; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.mission-card strong { color: #343e65; font-size: 10px; line-height: 1.3; }
.mission-card.mission-complete { transform: scale(1.025); box-shadow: 0 0 0 4px rgba(255,191,61,.2), 0 9px 24px rgba(72,57,130,.15); }
.mission-stars { max-width: 92px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; color: #c9cedd; font-size: 16px; line-height: 1; }
.mission-stars span { transition: color .2s, transform .2s; }
.mission-stars span.earned { color: #ffb229; transform: scale(1.1); text-shadow: 0 2px 4px rgba(210,129,0,.25); }
.difficulty-block { display: grid; gap: 5px; padding: 7px 14px 0; }
.difficulty-picker { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; background: #eef1f8; border-radius: 9px; }
.difficulty-picker button { min-height: 30px; padding: 5px 7px; color: #69748c; background: transparent; border: 0; border-radius: 7px; font-size: 10px; font-weight: 850; }
.difficulty-picker button.active { color: white; background: var(--indigo); box-shadow: 0 3px 8px rgba(31,48,99,.2); }
.difficulty-block p { min-height: 14px; margin: 0; color: var(--muted); text-align: center; font-size: 9px; line-height: 1.35; }
.play-progress { padding: 10px 14px 8px; }
.play-progress > div:first-child { display: flex; justify-content: space-between; color: #5f6a82; font-size: 11px; }
.sticker-tray { max-height: 184px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow-y: auto; padding: 7px 14px 10px; }
.sticker-card { position: relative; min-height: 72px; display: grid; place-items: center; padding: 7px; color: var(--ink); background: #f8f9fd; border: 1px solid #d9e0ee; border-radius: 9px; cursor: grab; user-select: none; touch-action: none; transition: transform .15s, box-shadow .15s, opacity .15s; }
.sticker-card:hover, .sticker-card.selected-sticker { transform: translateY(-2px); border-color: var(--orange); box-shadow: 0 7px 16px rgba(31,48,99,.12); }
.sticker-card:active { cursor: grabbing; }
.sticker-card.placed { opacity: .34; cursor: default; filter: grayscale(.5); }
.sticker-card svg { width: 58px; height: 39px; overflow: visible; filter: drop-shadow(0 2px 2px rgba(24,33,63,.18)); }
.play-mode .sticker-card:not(.placed) svg { transform: rotate(var(--piece-tilt, 0deg)); transition: transform .2s; }
.play-mode .sticker-card:hover svg, .play-mode .sticker-card.selected-sticker svg { transform: rotate(0deg) scale(1.04); }
.sticker-card svg > polygon { stroke: rgba(144,36,34,.7); stroke-width: 2; }
.sticker-card .sticker-piece-outline { fill: none; stroke: rgba(255,255,255,.95); stroke-width: 3; vector-effect: non-scaling-stroke; }
.sticker-number { position: absolute; left: 6px; top: 5px; width: 20px; height: 20px; display: grid; place-items: center; color: white; background: var(--navy-2); border-radius: 50%; font-size: 9px; font-weight: 900; }
.sticker-tray[data-difficulty="hard"] .sticker-card:not(.selected-sticker) .sticker-number { font-size: 0; }
.sticker-tray[data-difficulty="hard"] .sticker-card:not(.selected-sticker) .sticker-number::after { content: '?'; font-size: 10px; }
.sticker-card.placed::after { content: '✓'; position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 10px; font-weight: 900; }
.sticker-drag-image { position: fixed; left: -1000px; top: -1000px; width: 110px; height: 77px; display: grid; place-items: center; pointer-events: none; background: transparent; }
.sticker-drag-image svg { width: 110px; height: 77px; overflow: visible; filter: drop-shadow(0 5px 5px rgba(24,33,63,.28)); }
.sticker-drag-image svg > polygon { stroke: rgba(255,255,255,.95); stroke-width: 3; vector-effect: non-scaling-stroke; }
.sticker-drag-image .sticker-piece-outline { fill: none; }
.sticker-drag-image.touch-drag-image { z-index: 1000; opacity: .96; transform: scale(1.08); }
.drag-sticker-number { position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; color: white; background: var(--navy-2); border: 2px solid white; border-radius: 50%; font-size: 10px; font-weight: 900; box-shadow: 0 3px 7px rgba(24,33,63,.25); }
body.touch-dragging { overflow: hidden; overscroll-behavior: none; }
.tray-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; color: var(--muted); font-size: 10px; }
.tray-footer span { max-width: 190px; line-height: 1.35; }
.tray-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tray-actions .link-button:disabled { opacity: .38; cursor: not-allowed; }
.validation-list { display: grid; gap: 8px; padding: 13px 16px 6px; }
.validation-item { display: flex; align-items: flex-start; gap: 9px; color: #4f5b75; font-size: 12px; line-height: 1.4; }
.validation-symbol { flex: 0 0 22px; height: 22px; display: grid; place-items: center; color: white; border-radius: 50%; font-size: 11px; font-weight: 900; }
.validation-symbol.success { background: var(--green); }
.validation-symbol.warning { background: #f2a329; }
.validation-symbol.error { background: var(--red); }
.progress-block { padding: 8px 16px 16px; }
.progress-block > div:first-child { display: flex; justify-content: space-between; font-size: 11px; }
.progress-track { height: 8px; margin-top: 7px; overflow: hidden; background: #e9edf6; border-radius: 99px; }
.progress-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #18a86e, #2ac889); border-radius: inherit; transition: width .3s; }
.state-pill { padding: 5px 8px; color: var(--green); background: var(--green-soft); border-radius: 99px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px; }
.form-grid label, dialog label { display: grid; gap: 6px; color: #68738a; font-size: 11px; font-weight: 750; }
.form-grid input, .form-grid select, dialog input { width: 100%; height: 37px; padding: 0 10px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 7px; outline: 0; }
.form-grid input:focus, .form-grid select:focus, dialog input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(82,102,217,.1); }
.color-field { height: 37px; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; }
.color-field input { width: 26px; height: 26px; padding: 0; border: 0; }
.color-field span { color: var(--ink); font-family: ui-monospace, monospace; font-size: 11px; }
.inspector-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 15px; }

.bottom-grid { display: grid; grid-template-columns: minmax(680px, 1fr) 340px; gap: 14px; margin-top: 14px; align-items: stretch; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 10px 14px; color: #7f8aa2; background: #f8f9fc; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .6px; }
td { padding: 11px 14px; border-top: 1px solid #edf0f6; color: #4d5871; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fafbff; }
.project-cell { color: var(--navy-2); font-weight: 800; }
.project-actions { width: 82px; white-space: nowrap; text-align: right; }
.project-actions > span { display: inline-block; margin-right: 8px; color: #9aa4b8; }
.project-delete-button { width: 27px; height: 27px; padding: 0; color: #c93341; background: #fff5f6; border: 1px solid #f2c6cb; border-radius: 7px; font-size: 18px; line-height: 1; vertical-align: middle; }
.project-delete-button:hover { color: white; background: var(--red); border-color: var(--red); }
.project-delete-button:disabled { color: #aeb5c2; background: #f3f5f8; border-color: #e3e6ec; cursor: not-allowed; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-badge.editing { color: #c46a1b; background: #fff3e5; }
.status-badge.editing::before { background: #ee912e; }
.status-badge.draft { color: #596783; background: #eef1f6; }
.status-badge.draft::before { background: #8c97ad; }
.status-badge.ready { color: var(--green); background: var(--green-soft); }
.status-badge.ready::before { background: var(--green); }

dialog { width: 420px; padding: 25px; border: 0; border-radius: 14px; box-shadow: 0 24px 80px rgba(18,31,77,.3); }
dialog::backdrop { background: rgba(17,28,67,.56); backdrop-filter: blur(2px); }
dialog h2 { margin: 8px 0; }
dialog p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
dialog form { display: grid; gap: 14px; }
.dialog-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--orange); background: var(--orange-soft); border-radius: 12px; font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.panel-header-actions { display: flex; align-items: center; gap: 7px; }
.panel-header-actions button { white-space: nowrap; }
.creator-dialog { position: relative; width: min(94vw, 820px); max-width: none; max-height: 92vh; overflow-y: auto; padding: 28px; }
.creator-dialog-close { position: absolute; right: 18px; top: 18px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; color: #68738b; background: #f4f6fa; border: 1px solid var(--line); border-radius: 50%; font-size: 25px; line-height: 1; }
.creator-dialog-close:hover { color: var(--navy-2); background: white; border-color: #c8d1e2; }
.creator-dialog-close:disabled { opacity: .42; cursor: not-allowed; }
.creator-heading { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.creator-heading h2 { margin: 2px 0 3px; font-size: 25px; }
.creator-heading p { margin: 0; }
.creator-steps { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; color: #68738b; background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; font-weight: 800; }
.creator-steps span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.creator-steps b { width: 20px; height: 20px; display: grid; place-items: center; color: white; background: var(--indigo); border-radius: 50%; font-size: 9px; }
.creator-steps i { flex: 1; height: 1px; background: #ccd4e5; }
.creator-details-grid { display: grid; grid-template-columns: 1fr 190px; gap: 12px; }
.creator-upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.creator-main-upload { display: grid; }
.creator-primary-upload { min-height: 172px; border-style: solid; border-color: #bac7f4; background: linear-gradient(135deg, #fafbff, #f1f4ff); }
.creator-primary-upload strong { font-size: 14px; }
.creator-advanced { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fafbfe; }
.creator-advanced summary { padding: 12px 14px; color: var(--navy-2); font-size: 11px; font-weight: 800; cursor: pointer; }
.creator-advanced summary small { margin-left: 5px; color: var(--muted); font-weight: 600; }
.creator-advanced[open] summary { border-bottom: 1px solid var(--line); }
.creator-advanced .creator-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
.creator-advanced .creator-board-options { grid-template-columns: 1fr; }
.creator-upload-card { position: relative; min-height: 146px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; overflow: hidden; padding: 15px; color: #66718a; background: #fafbfe; border: 1px dashed #bbc6da; border-radius: 11px; text-align: center; cursor: pointer; }
.creator-upload-card:hover { color: var(--indigo); background: var(--indigo-soft); border-color: #8e9fe8; }
.creator-upload-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.creator-upload-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s; }
.creator-upload-card.has-file img { opacity: .2; }
.creator-upload-card > span, .creator-upload-card > strong, .creator-upload-card > small { position: relative; z-index: 1; }
.creator-upload-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--indigo); background: white; border: 1px solid #dce2f0; border-radius: 10px; font-size: 20px; box-shadow: 0 4px 12px rgba(30,45,91,.08); }
.creator-upload-card strong { color: var(--navy-2); font-size: 12px; }
.creator-upload-card small { max-width: 190px; overflow: hidden; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.creator-layout-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.creator-layout-picker legend { margin-bottom: 7px; color: #66718a; font-size: 11px; font-weight: 800; }
.creator-layout-picker label { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 12px; background: #fafbfe; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.creator-layout-picker label:has(input:checked) { background: var(--indigo-soft); border-color: #aebaf1; }
.creator-layout-picker input { margin-top: 2px; accent-color: var(--indigo); }
.creator-layout-picker span, .creator-publish-option span { display: grid; gap: 3px; }
.creator-layout-picker b, .creator-publish-option b { color: var(--navy-2); font-size: 11px; }
.creator-layout-picker small, .creator-publish-option small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.creator-publish-option { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 11px 12px; background: #f0faf6; border: 1px solid #ccecdf; border-radius: 9px; }
.creator-publish-option input { margin-top: 2px; accent-color: var(--green); }
.creator-progress { display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: #3f4e70; background: #f1f4fb; border: 1px solid #dce3f2; border-radius: 9px; }
.creator-progress > div { display: grid; gap: 2px; }
.creator-progress strong { color: var(--navy-2); font-size: 11px; }
.creator-progress small { font-size: 9px; }
.creator-spinner { width: 22px; height: 22px; border: 3px solid #d6dcf1; border-top-color: var(--indigo); border-radius: 50%; animation: creator-spin .75s linear infinite; }
@keyframes creator-spin { to { transform: rotate(360deg); } }
.export-dialog { position: relative; width: min(92vw, 700px); max-width: none; padding: 30px; }
.export-heading { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding-right: 36px; }
.export-heading h2 { margin: 2px 0 3px; font-size: 26px; }
.export-heading p { margin: 0; }
.export-summary { display: grid; gap: 4px; margin: 22px 0 16px; padding: 14px 16px; color: var(--muted); background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; }
.export-summary span { font-size: 9px; font-weight: 850; letter-spacing: 1px; text-transform: uppercase; }
.export-summary strong { color: var(--navy-2); font-size: 17px; }
.export-summary small { font-size: 10px; }
.export-size-label { display: grid; gap: 6px; color: #66718a; font-size: 11px; font-weight: 800; }
.export-size-label select { min-height: 42px; padding: 0 11px; color: var(--ink); background: white; border: 1px solid #cbd3e3; border-radius: 8px; }
.export-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 17px 0 0; padding: 0; border: 0; }
.export-pages legend { margin-bottom: 8px; color: #66718a; font-size: 11px; font-weight: 800; }
.export-pages label { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 12px; background: #fafbfe; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.export-pages label:has(input:checked) { background: #f0faf6; border-color: #bde5d4; }
.export-pages input { margin-top: 3px; accent-color: var(--green); }
.export-pages span { display: grid; gap: 3px; }
.export-pages b { color: var(--navy-2); font-size: 11px; }
.export-pages small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.export-dialog .export-note { margin: 14px 0 17px; padding: 10px 12px; color: #805226; background: #fff7ed; border: 1px solid #ffdfbf; border-radius: 8px; font-size: 10px; }
.print-book { display: none; }
.confirm-dialog { text-align: left; }
.confirm-dialog .warning-icon { color: var(--red); background: var(--red-soft); }
.confirm-dialog .dialog-actions { margin-top: 22px; }
.delete-project-dialog strong { color: var(--navy-2); }
.delete-project-dialog .delete-warning { margin-top: -9px; padding: 10px 12px; color: #9d2e39; background: var(--red-soft); border: 1px solid #f5cdd1; border-radius: 8px; font-size: 11px; }
.completion-dialog { width: min(92vw, 480px); overflow: hidden; padding: 34px 32px 30px; text-align: center; background: linear-gradient(160deg, #ffffff 50%, #fff5ed); }
.completion-badge { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 16px; color: white; background: linear-gradient(135deg, #ff9c46, #ff6826); border: 7px solid #fff0e5; border-radius: 50%; box-shadow: 0 12px 30px rgba(255,108,41,.28); font-size: 34px; animation: badge-pop .62s cubic-bezier(.2,.9,.3,1); }
.completion-kicker { margin: 0; color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: 1.7px; }
.completion-dialog h2 { margin: 7px 0 8px; color: var(--navy-2); font-size: 30px; }
.completion-dialog > p:not(.completion-kicker) { max-width: 340px; margin: 0 auto 24px; }
.completion-rewards { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: -10px 0 22px; }
.completion-rewards span { padding: 6px 9px; color: #52607c; background: rgba(255,255,255,.78); border: 1px solid #e1e6f0; border-radius: 99px; font-size: 9px; font-weight: 850; }
.completion-actions { display: flex; justify-content: center; gap: 9px; }
.completion-dialog.theme-ocean { background: linear-gradient(155deg, #fff 42%, #dff8ff); }
.completion-dialog.theme-clockwork { background: linear-gradient(155deg, #fff 42%, #fff0c9); }
.completion-dialog.theme-moon, .completion-dialog.theme-space { background: linear-gradient(155deg, #fff 40%, #e6e5ff); }
.completion-dialog.theme-cloud { background: linear-gradient(155deg, #fff 42%, #ffe8f3); }
.completion-dialog.theme-pond, .completion-dialog.theme-music { background: linear-gradient(155deg, #fff 42%, #e4f8e9); }
.completion-dialog.theme-dino, .completion-dialog.theme-phoenix { background: linear-gradient(155deg, #fff 42%, #fff0d5); }
.completion-dialog.theme-cat, .completion-dialog.theme-yeti { background: linear-gradient(155deg, #fff 42%, #e9edff); }
.reward-dialog { width: min(90vw, 410px); overflow: hidden; padding: 34px 30px 30px; text-align: center; background: linear-gradient(155deg, #fff 48%, #fff4d8); }
.reward-dialog h2 { margin: 7px 0 8px; color: var(--navy-2); font-size: 25px; }
.reward-dialog > p:not(.eyebrow) { max-width: 310px; margin: 0 auto 22px; color: var(--muted); line-height: 1.55; }
.reward-icon { position: relative; z-index: 1; width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 17px; background: linear-gradient(135deg, #fff9c7, #ffc04f); border: 7px solid #fff4c7; border-radius: 50%; box-shadow: 0 12px 32px rgba(220,148,24,.26); font-size: 39px; animation: badge-pop .62s cubic-bezier(.2,.9,.3,1); }
.reward-rays { position: absolute; width: 220px; height: 220px; left: 50%; top: -42px; translate: -50% 0; opacity: .24; background: repeating-conic-gradient(from 0deg, #ffbd38 0 8deg, transparent 8deg 20deg); border-radius: 50%; animation: reward-spin 18s linear infinite; }
.profile-dialog { width: min(92vw, 520px); padding: 30px; }
.profile-dialog-close { position: absolute; right: 18px; top: 18px; }
.profile-dialog h2 { margin: 5px 0 6px; color: var(--navy-2); font-size: 27px; }
.profile-dialog > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.profile-dialog form { display: grid; gap: 18px; }
.profile-name-field { display: grid; gap: 6px; color: #66718a; font-size: 10px; font-weight: 850; letter-spacing: .5px; text-transform: uppercase; }
.profile-name-field input { min-height: 46px; padding: 0 13px; color: var(--ink); background: #fafbfe; border: 1px solid #cfd7e7; border-radius: 9px; font-size: 15px; font-weight: 700; text-transform: none; }
.avatar-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; padding: 0; border: 0; }
.avatar-picker legend { margin-bottom: 8px; color: #66718a; font-size: 10px; font-weight: 850; letter-spacing: .5px; text-transform: uppercase; }
.avatar-picker input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-picker span { aspect-ratio: 1; display: grid; place-items: center; background: #f5f7fb; border: 2px solid transparent; border-radius: 12px; font-size: 25px; transition: .15s; }
.avatar-picker label:hover span, .avatar-picker input:checked + span { background: #fff3e8; border-color: var(--orange); transform: translateY(-2px); }
.onboarding-dialog { width: min(94vw, 760px); max-width: none; overflow: hidden; padding: 0; background: linear-gradient(160deg, #fff 48%, #f3f0ff); }
.onboarding-hero { position: relative; min-height: 174px; display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: center; overflow: hidden; padding: 26px 34px; background: linear-gradient(125deg, #fff5e9, #f1edff 58%, #e8f7ff); border-bottom: 1px solid #e5e3f0; }
.onboarding-hero::after { content: ''; position: absolute; right: -45px; top: -65px; width: 190px; height: 190px; background: radial-gradient(circle, rgba(255,190,76,.34), transparent 67%); border-radius: 50%; }
.onboarding-mascot { position: relative; z-index: 1; width: 106px; height: 106px; display: grid; place-items: center; background: white; border: 7px solid rgba(255,255,255,.75); border-radius: 33px; box-shadow: 0 14px 35px rgba(65,52,116,.16); font-size: 59px; rotate: -4deg; animation: mascot-wave 2.6s ease-in-out infinite; }
.onboarding-hero h2 { margin: 5px 0 7px; color: var(--navy-2); font-size: 30px; letter-spacing: -.6px; }
.onboarding-hero p:last-child { max-width: 480px; margin: 0; color: #65718d; font-size: 13px; }
.onboarding-spark { position: absolute; z-index: 2; color: var(--orange); font-size: 20px; animation: secret-float 2s ease-in-out infinite; }
.spark-one { left: 24px; top: 18px; }
.spark-two { left: 135px; bottom: 20px; color: var(--indigo); animation-delay: -.8s; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 24px 28px 16px; }
.onboarding-steps article { position: relative; min-width: 0; display: grid; justify-items: center; gap: 5px; padding: 18px 12px 14px; background: white; border: 1px solid #e1e5ef; border-radius: 14px; text-align: center; box-shadow: 0 8px 22px rgba(31,48,99,.06); }
.onboarding-steps article > span { position: absolute; left: 9px; top: 9px; width: 23px; height: 23px; display: grid; place-items: center; color: white; background: var(--indigo); border-radius: 50%; font-size: 10px; font-weight: 900; }
.onboarding-demo { width: 66px; height: 58px; display: grid; place-items: center; margin-bottom: 3px; color: var(--navy-2); background: #f4f6fc; border-radius: 13px; font-size: 33px; }
.place-demo { grid-template-columns: 18px 15px 18px; gap: 3px; }
.place-demo i, .place-demo em { width: 18px; height: 24px; display: block; background: #ffad62; border-radius: 5px 10px 7px 4px; rotate: -7deg; }
.place-demo em { background: transparent; border: 2px dashed var(--indigo); rotate: 5deg; }
.place-demo b { color: var(--orange); font-size: 14px; }
.onboarding-steps h3 { margin: 2px 0 0; color: var(--navy-2); font-size: 13px; }
.onboarding-steps p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.onboarding-tip { display: flex; align-items: center; gap: 10px; margin: 0 28px; padding: 10px 13px; color: #75522f; background: #fff8e8; border: 1px solid #f5dfad; border-radius: 10px; }
.onboarding-tip span { font-size: 21px; }
.onboarding-tip p { margin: 0; color: #75522f; font-size: 10px; }
.about-game { margin: 12px 28px 0; color: #65718d; background: rgba(255,255,255,.72); border: 1px solid #e0e4ef; border-radius: 10px; }
.about-game summary { padding: 10px 13px; color: var(--navy-2); font-size: 10px; font-weight: 850; cursor: pointer; }
.about-game p { margin: 0; padding: 0 13px 5px; font-size: 10px; }
.about-game small { display: block; padding: 0 13px 11px; color: #929bb0; font-size: 8px; }
.onboarding-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 28px 24px; }
.onboarding-actions .primary-button { min-width: 130px; }
.puzzle-library-dialog { width: min(92vw, 960px); max-width: none; padding: 0; overflow: hidden; background: #f7f8fc; }
.mobile-test-dialog { width: min(92vw, 690px); max-width: none; overflow: hidden; padding: 28px; }
.mobile-test-dialog h2 { margin: 5px 0 7px; font-size: 27px; }
.mobile-test-dialog > p:not(.eyebrow) { max-width: 560px; margin-bottom: 22px; }
.mobile-dialog-close { position: absolute; right: 18px; top: 18px; }
.mobile-connect-grid { display: grid; grid-template-columns: 244px 1fr; gap: 24px; align-items: center; }
.mobile-qr { width: 244px; height: 244px; display: grid; place-items: center; overflow: hidden; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 0 0 5px #f5f7fb; }
.mobile-qr svg { width: 232px; height: 232px; }
.mobile-qr-unavailable { width: 100%; height: 100%; display: grid; place-content: center; gap: 6px; padding: 18px; color: var(--muted); background: #f7f8fc; text-align: center; }
.mobile-qr-unavailable span { width: 36px; height: 36px; display: grid; place-items: center; margin: 0 auto; color: #ad571e; background: var(--orange-soft); border-radius: 50%; font-weight: 900; }
.mobile-qr-unavailable strong { color: var(--ink); font-size: 13px; }
.mobile-qr-unavailable small { font-size: 10px; line-height: 1.4; }
.mobile-connect-copy { min-width: 0; display: grid; gap: 10px; }
.mobile-connect-copy > span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .7px; text-transform: uppercase; }
.mobile-connect-copy code { overflow-wrap: anywhere; padding: 12px; color: var(--navy-2); background: #f3f5fa; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.45; }
.mobile-connect-copy .primary-button { width: fit-content; }
.mobile-connect-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.mobile-help { display: grid; gap: 4px; margin-top: 20px; padding: 13px 15px; color: #745234; background: #fff7ef; border: 1px solid #ffe0c7; border-radius: 9px; font-size: 11px; line-height: 1.45; }
.mobile-help strong { color: #9c4c18; }
.pwa-status { display: grid; gap: 4px; margin-top: 10px; padding: 12px 14px; color: #405073; background: #f1f4fb; border: 1px solid #dce3f2; border-radius: 9px; font-size: 10px; line-height: 1.45; }
.pwa-status strong { color: var(--navy-2); font-size: 11px; }
.pwa-status.ready { color: #176c51; background: #e9f8f2; border-color: #c5eadb; }
.pwa-status.ready strong { color: #116045; }
.pwa-status.warning { color: #745234; background: #fff7ef; border-color: #ffe0c7; }
.pwa-status.warning strong { color: #9c4c18; }
.library-heading { min-height: 118px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 25px 28px 21px; background: white; border-bottom: 1px solid var(--line); }
.library-heading h2 { margin: 5px 0 5px; font-size: 27px; }
.library-heading p:last-child { margin: 0; }
.library-close { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; color: #68738b; background: #f4f6fa; border: 1px solid var(--line); border-radius: 50%; font-size: 25px; line-height: 1; }
.library-close:hover { color: var(--navy-2); background: white; }
.library-player-bar { min-height: 70px; display: flex; align-items: center; gap: 13px; padding: 11px 28px; background: #f0f3fb; border-bottom: 1px solid var(--line); }
.library-player { min-width: 210px; display: flex; align-items: center; gap: 10px; margin-right: auto; }
.library-player > span { width: 43px; height: 43px; display: grid; place-items: center; background: white; border: 1px solid #d9e0ee; border-radius: 50%; font-size: 25px; }
.library-player div, .library-stat div { display: grid; gap: 1px; }
.library-player small, .library-stat small { color: #8994aa; font-size: 8px; font-weight: 900; letter-spacing: .7px; }
.library-player strong { color: var(--navy-2); font-size: 14px; }
.library-stat { min-width: 84px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; background: white; border: 1px solid #dde3ee; border-radius: 10px; }
.library-stat > span { font-size: 18px; }
.library-stat strong { color: var(--navy-2); font-size: 14px; }
.puzzle-library-grid { max-height: 68vh; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; overflow-y: auto; padding: 22px 28px 28px; }
.puzzle-card { overflow: hidden; display: grid; grid-template-columns: 46% 54%; min-height: 255px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 28px rgba(31,48,99,.08); }
.puzzle-card.complete { border-color: #a9e4cd; box-shadow: 0 10px 28px rgba(22,163,106,.1); }
.puzzle-card.unavailable { filter: saturate(.55); }
.puzzle-cover { position: relative; min-height: 255px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #dce5f5, #bcc9e3); }
.puzzle-cover img { width: 100%; height: 100%; object-fit: cover; }
.puzzle-status { position: absolute; left: 12px; top: 12px; padding: 6px 9px; color: white; background: rgba(23,37,83,.82); border-radius: 99px; font-size: 9px; font-weight: 850; letter-spacing: .3px; }
.puzzle-card.complete .puzzle-status { background: rgba(17,126,84,.9); }
.puzzle-card.locked { filter: saturate(.35); }
.puzzle-card.locked .puzzle-cover::after { content: '🔒'; position: absolute; inset: 0; display: grid; place-items: center; color: white; background: rgba(17,29,68,.38); font-size: 44px; text-shadow: 0 5px 15px rgba(0,0,0,.35); }
.puzzle-card.locked .puzzle-status { z-index: 1; }
.puzzle-placeholder { display: grid; place-items: center; gap: 7px; color: #6e7b98; }
.puzzle-placeholder span { font-size: 38px; }
.puzzle-placeholder b { font-size: 12px; }
.puzzle-card-body { min-width: 0; display: flex; flex-direction: column; gap: 15px; padding: 20px; }
.puzzle-card-body h3 { margin: 0 0 4px; color: var(--navy-2); font-size: 20px; }
.puzzle-card-body p { margin: 0; color: var(--muted); font-size: 11px; }
.library-rewards { display: flex; gap: 6px; }
.library-rewards span { padding: 5px 8px; color: #596783; background: #f3f5fa; border-radius: 99px; font-size: 9px; font-weight: 850; }
.library-progress { display: flex; justify-content: space-between; gap: 10px; color: #66718a; font-size: 10px; }
.library-progress strong { color: var(--navy-2); }
.library-progress.unavailable-copy { min-height: 34px; display: grid; justify-content: start; gap: 4px; }
.library-play-button { width: 100%; margin-top: auto; }
.library-play-button:disabled { color: #8b94a8; background: #eef1f5; border-color: #dfe3eb; cursor: not-allowed; box-shadow: none; }
.library-empty { grid-column: 1 / -1; padding: 50px; color: var(--muted); text-align: center; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -22px; width: 9px; height: 16px; background: var(--orange); border-radius: 2px; animation: confetti-fall 2.5s ease-in infinite; }
.confetti i:nth-child(3n+1) { background: var(--indigo); }
.confetti i:nth-child(3n+2) { background: #24b979; }
.confetti i:nth-child(1) { left: 7%; animation-delay: -.1s; transform: rotate(13deg); }
.confetti i:nth-child(2) { left: 15%; animation-delay: -.9s; }
.confetti i:nth-child(3) { left: 24%; animation-delay: -1.6s; }
.confetti i:nth-child(4) { left: 34%; animation-delay: -.45s; }
.confetti i:nth-child(5) { left: 43%; animation-delay: -1.2s; }
.confetti i:nth-child(6) { left: 51%; animation-delay: -2s; }
.confetti i:nth-child(7) { left: 59%; animation-delay: -.7s; }
.confetti i:nth-child(8) { left: 67%; animation-delay: -1.5s; }
.confetti i:nth-child(9) { left: 75%; animation-delay: -.2s; }
.confetti i:nth-child(10) { left: 83%; animation-delay: -1.1s; }
.confetti i:nth-child(11) { left: 90%; animation-delay: -1.8s; }
.confetti i:nth-child(12) { left: 96%; animation-delay: -.55s; }
.image-dialog { width: min(90vw, 1050px); max-width: none; padding: 12px; background: #141c3e; }
.image-dialog img { display: block; width: 100%; max-height: 84vh; object-fit: contain; }
.dialog-close { position: absolute; right: 18px; top: 18px; width: 36px; height: 36px; color: white; background: rgba(0,0,0,.6); border: 0; border-radius: 50%; font-size: 23px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 250px; max-width: 360px; padding: 12px 14px; color: white; background: #172553; border-radius: 9px; box-shadow: 0 12px 35px rgba(18,31,77,.28); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { background: #b92939; }
.toast.success { background: #117e54; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes wrong-drop { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes sticker-snap { 0% { transform: scale(.78) rotate(-2deg); opacity: .5; } 55% { transform: scale(1.06) rotate(1deg); } 100% { transform: scale(1); opacity: 1; } }
@keyframes hint-pulse { 0%,100% { stroke-opacity: .35; } 50% { stroke-opacity: 1; } }
@keyframes hint-reveal { from { stroke-opacity: .55; fill-opacity: .98; } to { stroke-opacity: 1; fill-opacity: .72; } }
@keyframes badge-pop { 0% { transform: scale(.4) rotate(-18deg); opacity: 0; } 70% { transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes secret-float { 0%,100% { translate: 0 0; rotate: -4deg; } 50% { translate: 0 -9px; rotate: 5deg; } }
@keyframes secret-collect { 0% { scale: 1; opacity: 1; } 55% { scale: 1.45; opacity: 1; } 100% { scale: .25; opacity: 0; } }
@keyframes reward-spin { to { rotate: 360deg; } }
@keyframes mascot-wave { 0%,100% { rotate: -4deg; translate: 0 0; } 50% { rotate: 4deg; translate: 0 -4px; } }
@keyframes splash-logo { 0%,100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -7px; rotate: 2deg; } }
@keyframes splash-glow { 0%,100% { scale: .9; opacity: .65; } 50% { scale: 1.08; opacity: 1; } }
@keyframes splash-progress { 0% { translate: -110% 0; } 100% { translate: 245% 0; } }
@keyframes confetti-fall { 0% { translate: 0 -20px; rotate: 0deg; opacity: 0; } 12% { opacity: 1; } 100% { translate: 18px 520px; rotate: 540deg; opacity: .15; } }
.canvas-wrap.puzzle-complete { animation: board-celebrate 1s ease; }
@keyframes board-celebrate { 0%,100% { box-shadow: inset 0 0 0 0 rgba(255,157,70,0); } 45% { box-shadow: inset 0 0 0 10px rgba(255,157,70,.75), inset 0 0 55px rgba(255,215,130,.35); } }

.admin-mode .play-panel { display: none; }
.admin-mode.creator-test-view .play-panel { display: block; }
.admin-mode.creator-test-view .validation-panel { display: none; }
.admin-mode.creator-test-view .canvas-wrap { min-height: 610px; max-height: 720px; aspect-ratio: auto; }
.admin-mode.creator-test-view .play-panel { position: sticky; top: 14px; }
.admin-mode .bottom-grid { grid-template-columns: minmax(0, 1fr); }
.admin-mode .advanced-toolbar,
.admin-mode .inspector-panel { display: none; }
.admin-mode.creator-edit-view .advanced-toolbar { display: flex; }
.admin-mode.creator-edit-view .inspector-panel { display: block; }
.admin-mode:not(.creator-edit-view) .zoom-controls { display: none; }
.admin-mode .creator-view-board #artworkImage { opacity: 0; }
.admin-mode .creator-view-board .region-shape { fill: #fbfaf5 !important; fill-opacity: 1; stroke: #555f78; stroke-width: 2.2; filter: none; }
.admin-mode .creator-view-board .region-shape:hover,
.admin-mode .creator-view-board .region-shape.selected { fill: #fbfaf5 !important; fill-opacity: 1; stroke: #555f78; stroke-width: 2.2; filter: none; }
.admin-mode .creator-view-board .region-label-patch { fill: white !important; }
.admin-mode .creator-view-answer #regionLayer,
.admin-mode .creator-view-stickers #artworkImage,
.admin-mode .creator-view-stickers #regionLayer { display: none; }
.admin-mode .creator-view-answer #artworkImage { opacity: 1; }
.admin-mode .creator-view-answer { background: linear-gradient(135deg, #edf2fb, #dce5f4); }
.admin-mode .creator-view-stickers { min-height: 720px; max-height: 760px; aspect-ratio: auto; place-items: start center; background: #e7ebf3; }
.admin-mode .creator-view-stickers .canvas-hint,
.admin-mode .creator-view-answer .canvas-hint { display: none; }
.admin-mode .creator-view-stickers .creator-sticker-preview { width: 100%; min-height: 100%; display: block; padding: 18px; }
.creator-sheet-paper { width: min(100%, 820px); min-height: 680px; display: grid; grid-template-rows: auto 1fr auto; gap: 13px; margin: 0 auto; padding: 20px; background: white; border: 1px solid #d7dce6; border-radius: 8px; box-shadow: 0 10px 26px rgba(24,33,63,.12); }
.creator-sheet-paper > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid #dfe3eb; }
.creator-sheet-paper > header p { margin: 0 0 3px; color: var(--orange); font-size: 8px; font-weight: 900; letter-spacing: 1.3px; }
.creator-sheet-paper > header h3 { margin: 0; color: var(--navy-2); font-size: 17px; }
.creator-sheet-paper > header > strong { padding: 6px 9px; color: #176c51; background: #e7f8f1; border-radius: 99px; font-size: 9px; white-space: nowrap; }
.creator-sheet-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 8px; }
.creator-sticker-card { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; place-items: center; overflow: hidden; padding: 7px; border: 1px dashed #abb5c8; border-radius: 7px; background: #fff; }
.creator-sticker-card svg { width: 100%; height: 76px; min-width: 0; min-height: 0; overflow: visible; }
.creator-sticker-card > b { position: absolute; left: 5px; top: 5px; width: 22px; height: 22px; display: grid; place-items: center; color: white; background: var(--navy-2); border-radius: 50%; font-size: 8px; }
.creator-sticker-card > small { color: #8a94a8; font-size: 7px; }
.creator-sticker-card .sticker-piece-outline { fill: none; stroke: #626b7c; stroke-width: 2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.creator-sheet-paper > footer { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid #e1e5ed; }
.creator-sheet-paper > footer span { color: #69758e; text-align: center; font-size: 9px; font-weight: 750; }
.creator-sheet-paper > footer button { min-height: 30px; color: var(--indigo); background: var(--indigo-soft); border: 1px solid #cdd4f7; border-radius: 7px; font-size: 9px; font-weight: 800; }
.creator-sheet-paper > footer button:disabled { color: #a3aaba; background: #f4f5f7; border-color: #e2e5ea; cursor: not-allowed; }

@media (max-width: 1280px) {
    .app-shell { grid-template-columns: 190px 1fr; }
    .brand { padding: 0 17px; font-size: 15px; }
    .nav-item { padding-inline: 10px; }
    .editor-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr) 310px; }
    .tool-button span { display: none; }
}

/* Player-first surface: users see only the puzzle and its 74-sticker tray. */
.play-mode { min-width: 980px; background: #eef2f8; }
.play-mode .app-shell { grid-template-columns: 1fr; }
.play-mode .sidebar,
.play-mode .admin-heading,
.play-mode .kpi-grid,
.play-mode .bottom-grid,
.play-mode .creator-workflow-tabs,
.play-mode .book-difficulty-bar,
.play-mode .validation-panel,
.play-mode .inspector-panel { display: none; }
.play-mode .mobile-test-button,
.play-mode .install-app-button,
.play-mode .admin-link { display: none !important; }
.play-mode .player-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.play-mode .workspace { width: 100%; max-width: 1580px; min-width: 0; margin: 0 auto; padding: 0 22px 24px; }
.play-mode .topbar { height: 82px; }
.play-mode .topbar h1 { font-size: 26px; }
.play-mode .editor-grid { grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; }
.play-mode .editor-header .eyebrow,
.play-mode #selectTool,
.play-mode #drawTool,
.play-mode #finishDraw,
.play-mode #numbersButton,
.play-mode #previewButton,
.play-mode #fitButton { display: none !important; }
.play-mode .canvas-panel { border-radius: 16px; }
.play-mode .canvas-wrap { max-height: none; min-height: 690px; aspect-ratio: auto; }
.play-mode .canvas-wrap img,
.play-mode .canvas-wrap svg { height: 100%; width: 100%; }
.play-mode .region-shape.selected { fill-opacity: .08; stroke: rgba(75,84,111,.58); stroke-width: 2.5; filter: none; }
.play-mode .right-column { display: block; }
.play-mode .play-panel { position: sticky; top: 16px; border-radius: 16px; }
.play-mode .play-panel .panel-header { min-height: 72px; }
.play-mode .play-panel .panel-header h3 { font-size: 19px; }
.play-mode .sticker-tray { max-height: 560px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 16px 14px; }
.play-mode .sticker-card { min-height: 82px; }
.play-mode .sticker-card svg { width: 70px; height: 48px; }
.play-mode .play-instructions { margin-top: 14px; padding: 12px; }
.play-mode .play-progress { padding: 12px 16px 9px; }
.play-mode .tray-footer { padding: 10px 16px 15px; }

@media (max-width: 1120px) {
    .play-mode .editor-grid { grid-template-columns: minmax(0, 1fr) 330px; }
    .play-mode .canvas-wrap { min-height: 600px; }
}

@media (max-width: 900px) {
    body,
    .play-mode { min-width: 0; }
    .play-mode .workspace { padding: 0 10px 18px; }
    .play-mode .topbar { height: auto; min-height: 74px; padding: 9px 0; }
    .play-mode .player-heading { align-items: flex-start; gap: 10px; }
    .play-mode .topbar h1 { font-size: 20px; line-height: 1.15; }
    .play-mode .player-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
    .play-mode .library-button,
    .play-mode .profile-button,
    .play-mode .help-button,
    .play-mode .mobile-test-button,
    .play-mode .install-app-button,
    .play-mode .sound-button { min-height: 42px; padding-inline: 10px; }
    .play-mode .admin-link { display: none; }
    .play-mode .editor-grid { display: flex; flex-direction: column; gap: 10px; }
    .play-mode .right-column { order: 1; width: 100%; }
    .play-mode .canvas-panel { order: 2; width: 100%; scroll-margin-top: 8px; }
    .play-mode .play-panel { position: static; }
    .play-mode .play-panel .panel-header { min-height: 58px; }
    .play-mode .play-instructions { margin-top: 9px; padding: 9px 7px; font-size: 10px; }
    .play-mode .mission-card { margin-top: 7px; }
    .play-mode .sticker-tray { max-height: 38vh; grid-template-columns: repeat(3, minmax(0, 1fr)); overscroll-behavior: contain; }
    .play-mode .sticker-card { min-height: 88px; }
    .play-mode .tray-footer { flex-wrap: wrap; }
    .play-mode .tray-footer > span { max-width: none; flex: 1 1 180px; }
    .play-mode .canvas-wrap { min-height: 0; max-height: none; aspect-ratio: 1 / 1; }
    .play-mode .canvas-hint { max-width: none; font-size: 9px; }
    .play-mode .editor-header { min-height: 52px; padding: 8px 12px; }
    .play-mode .editor-header h2 { font-size: 18px; }
    .play-mode .canvas-footer { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 9px; }
    .play-mode .canvas-footer > span:first-child { display: none; }
    dialog { max-width: calc(100vw - 20px); }
    .puzzle-library-dialog { width: calc(100vw - 16px); }
    .library-heading { min-height: 96px; padding: 18px; }
    .library-heading h2 { font-size: 22px; }
    .library-player-bar { flex-wrap: wrap; padding: 10px 14px; }
    .library-player { min-width: 180px; }
    .library-stat { min-width: 70px; }
    .puzzle-library-grid { grid-template-columns: 1fr; padding: 14px; }
    .avatar-picker { grid-template-columns: repeat(4, 1fr); }
    .secret-item { width: 52px; height: 52px; }
    .secret-item span { font-size: 22px; }
    .puzzle-card { grid-template-columns: 40% 60%; min-height: 220px; }
    .puzzle-cover { min-height: 220px; }
    .toast-region { left: 10px; right: 10px; bottom: 10px; }
    .toast { min-width: 0; max-width: none; }
    .mobile-test-dialog { padding: 23px 18px 18px; }
    .mobile-connect-grid { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
    .mobile-connect-copy { width: 100%; }
    .creator-dialog { padding: 54px 16px 20px; }
    .creator-upload-grid { grid-template-columns: 1fr; }
    .creator-advanced .creator-upload-grid { grid-template-columns: 1fr; }
    .creator-upload-card { min-height: 112px; }
    .onboarding-dialog { max-height: calc(100vh - 16px); overflow-y: auto; }
}

@media (max-width: 560px) {
    .play-mode .player-heading { display: grid; grid-template-columns: 1fr auto; }
    .play-mode .player-heading .eyebrow { display: none; }
    .play-mode .topbar h1 { font-size: 17px; }
    .play-mode .player-brand { gap: 7px; }
    .play-mode .player-brand > img { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
    .play-mode .player-actions { flex-wrap: nowrap; }
    .play-mode .library-button,
    .play-mode .profile-button,
    .play-mode .help-button,
    .play-mode .mobile-test-button,
    .play-mode .install-app-button,
    .play-mode .sound-button { width: 42px; padding: 0; justify-content: center; font-size: 0; }
    .play-mode .profile-button b,
    .play-mode .help-button b { display: none; }
    .play-mode .profile-button span { width: 28px; height: 28px; }
    .play-mode .library-button span,
    .play-mode .help-button span,
    .play-mode .mobile-test-button span,
    .play-mode .install-app-button span,
    .play-mode .sound-button span { font-size: 18px; }
    .play-mode .sticker-tray { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .play-mode .sticker-card svg { width: 64px; height: 44px; }
    .puzzle-card { grid-template-columns: 1fr; }
    .puzzle-cover { min-height: 190px; }
    .puzzle-card-body { min-height: 200px; }
    .library-player-bar { gap: 7px; }
    .library-player { width: 100%; min-width: 0; }
    .library-stat { flex: 1 1 30%; min-width: 0; }
    #libraryProfileButton { width: 100%; }
    .onboarding-hero { min-height: 0; grid-template-columns: 70px 1fr; gap: 12px; padding: 20px 18px; }
    .onboarding-mascot { width: 70px; height: 70px; border-width: 4px; border-radius: 22px; font-size: 39px; }
    .onboarding-hero h2 { font-size: 21px; }
    .onboarding-hero p:last-child { font-size: 11px; }
    .onboarding-steps { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px 10px; }
    .onboarding-steps article { min-height: 76px; grid-template-columns: 58px 1fr; grid-template-rows: auto auto; justify-items: start; align-items: center; column-gap: 9px; padding: 10px 12px 10px 40px; text-align: left; }
    .onboarding-steps article > span { left: 9px; top: 50%; translate: 0 -50%; }
    .onboarding-demo { grid-row: 1 / 3; width: 54px; height: 52px; margin: 0; font-size: 28px; }
    .onboarding-steps h3 { align-self: end; }
    .onboarding-steps p { align-self: start; }
    .onboarding-tip { margin-inline: 16px; }
    .about-game { margin: 10px 16px 0; }
    .onboarding-actions { padding: 14px 16px 18px; }
    .app-splash img { width: 96px; height: 96px; border-radius: 25px; }
    .app-splash h1 { font-size: 32px; }
    .creator-details-grid, .creator-layout-picker { grid-template-columns: 1fr; }
    .creator-steps { justify-content: space-between; }
    .creator-steps i { display: none; }
}

@media (max-height: 600px) and (orientation: landscape) and (max-width: 1000px) {
    .play-mode .workspace { padding-inline: 8px; }
    .play-mode .topbar { min-height: 58px; padding-block: 5px; }
    .play-mode .editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 8px; }
    .play-mode .canvas-panel { order: 1; }
    .play-mode .right-column { order: 2; }
    .play-mode .canvas-wrap { height: calc(100vh - 116px); min-height: 250px; aspect-ratio: auto; }
    .play-mode .sticker-tray { max-height: calc(100vh - 294px); }
    .play-mode .play-instructions { display: none; }
    .play-mode .mission-card { margin-top: 7px; }
    .play-mode .tray-footer { padding-block: 7px; }
    .onboarding-dialog { width: min(94vw, 760px); max-height: calc(100vh - 10px); overflow-y: auto; }
    .onboarding-hero { min-height: 116px; grid-template-columns: 78px 1fr; padding: 14px 24px; }
    .onboarding-mascot { width: 74px; height: 74px; font-size: 42px; }
    .onboarding-hero h2 { font-size: 23px; }
    .onboarding-steps { padding-block: 12px 8px; }
    .onboarding-steps article { padding-block: 11px; }
    .onboarding-demo { height: 45px; font-size: 27px; }
    .onboarding-actions { padding-block: 11px 14px; }
}

@media print {
    * { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
    body { min-width: 0 !important; margin: 0 !important; background: white !important; }
    body > :not(.print-book) { display: none !important; }
    .print-book { display: block !important; width: auto; margin: 0; padding: 0; color: #17213c; background: white; }
    .print-page { position: relative; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; margin: 0; padding: .42in .45in .32in; background: white; break-after: page; page-break-after: always; }
    .print-letter .print-page { width: 8.5in; height: 11in; }
    .print-a4 .print-page { width: 210mm; height: 297mm; padding: 11mm 12mm 8mm; }
    .print-page:last-child { break-after: auto; page-break-after: auto; }
    .print-page header { padding-bottom: .16in; border-bottom: 1.5px solid #dce1ec; text-align: center; }
    .print-page header p { margin: 0 0 .04in; color: #ff6f2c; font-size: 8pt; font-weight: 900; letter-spacing: 2px; }
    .print-page header h1 { margin: 0; color: #17295d; font-size: 20pt; line-height: 1.15; }
    .print-page header span { display: block; margin-top: .05in; color: #69748b; font-size: 9pt; }
    .print-page-content { min-height: 0; display: grid; place-items: center; padding: .2in 0 .12in; }
    .print-page footer { align-self: end; padding-top: .09in; color: #8d96a9; border-top: 1px solid #e5e8ef; text-align: center; font-size: 7pt; letter-spacing: .5px; }
    .print-cover-art, .print-answer-art { width: 100%; height: 8.25in; display: grid; place-items: center; overflow: hidden; border-radius: .16in; background: #eef2f8; }
    .print-a4 .print-cover-art, .print-a4 .print-answer-art { height: 218mm; }
    .print-cover-art img, .print-answer-art img { width: 100%; height: 100%; object-fit: contain; }
    .print-cover-badge { position: absolute; left: 50%; bottom: .62in; transform: translateX(-50%); padding: .1in .22in; color: white; background: #ff702d; border: 3px solid white; border-radius: 999px; box-shadow: 0 5px 18px rgba(22,35,73,.18); font-size: 10pt; font-weight: 850; white-space: nowrap; }
    .print-board-svg { width: 100%; max-height: 8.65in; }
    .print-a4 .print-board-svg { max-height: 228mm; }
    .print-page-stickers .print-page-content { height: 8.65in; min-height: 0; overflow: hidden; }
    .print-a4 .print-page-stickers .print-page-content { height: 226mm; }
    .print-sticker-grid { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: .08in; }
    .print-sticker-card { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto auto; place-items: center; padding: .07in; overflow: hidden; border: 1px dashed #aab2c0; border-radius: .07in; }
    .print-sticker-card svg { width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: visible; }
    .print-sticker-card b { position: absolute; left: .05in; top: .05in; width: .23in; height: .23in; display: grid; place-items: center; color: white; background: #243b82; border-radius: 50%; font-size: 7.5pt; }
    .print-sticker-card span { color: #969dac; font-size: 5.5pt; line-height: 1; }
    .print-sticker-card .sticker-piece-outline { fill: none; stroke: #5e6470; stroke-width: 2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
}
