@import url("https://fonts.googleapis.com/css2?family=Finger+Paint&display=swap");
:root { color-scheme: dark; --gold: #ffe0a0; --ink: #fff8e9; --muted: #d1c7e6; --heading: "Finger Paint", "Trebuchet MS", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: #12102d; }
body { margin: 0; color: var(--ink); font: 16px/1.5 "Trebuchet MS", Arial, sans-serif; min-height: 100vh; background: radial-gradient(ellipse at 10% 25%, #29377b70, transparent 47%), radial-gradient(ellipse at 94% 35%, #74206c48, transparent 50%), #12102d; }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-underline-offset: .25em; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.skip { position: absolute; top: -100px; z-index: 10; left: 15px; padding: 12px 20px; background: #342355; border-radius: 15px; }.skip:focus { top: 15px; }
.stardust { position: fixed; inset: 0; pointer-events: none; background-image: radial-gradient(circle, #ffe7ba9c 1px, transparent 1.8px), radial-gradient(circle, #b7d2ff70 1px, transparent 1.8px); background-size: 247px 269px, 193px 237px; background-position: 18px 32px, 80px 100px; opacity: .4; }
.topbar { position: relative; max-width: 1180px; margin: auto; padding: 23px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { color: var(--gold); font: 24px/1.2 var(--heading); text-decoration: none; }.back-link { color: var(--muted); font-size: 14px; text-decoration: none; padding: 10px 0; }
main { position: relative; max-width: 1160px; padding: 0 24px 20px; margin: auto; }
.intro { text-align: center; padding: 5px 0 23px; }.eyebrow { color: #d2b6ef; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin: 5px 0 12px; }
h1 { font: clamp(28px, 4.3vw, 46px)/1.35 var(--heading); margin: 0 0 12px; }h1 span { color: var(--gold); }.intro > p:last-child { color: var(--muted); margin: 0; }
.puzzle-settings { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 22px; padding: 18px; border: 1px solid #b49bce4d; border-radius: 22px; background: #30244a70; }
.picture-choice { display: flex; gap: 18px; align-items: center; text-align: left; padding: 10px; color: var(--ink); border: 1px solid #e5c58a70; border-radius: 17px; background: #65417538; min-width: 0; width: 100%; }
.picture-choice:hover { background: #78518b50; border-color: var(--gold); }
.picture-choice > img { flex: 0 0 auto; width: 180px; height: auto; aspect-ratio: 3 / 2; object-fit: contain; border: 1px solid #d5b78a99; border-radius: 10px; background: #15122d; }
.picture-choice-copy { display: grid; gap: 3px; min-width: 0; }.picture-choice small { font-size: 12px; color: var(--muted); }.picture-choice strong { font-size: 16px; }.choice-action { color: var(--gold); font-size: 19px; line-height: 1.35; font-weight: 800; margin-top: 7px; }.choice-hint { font-size: 13px; color: #e9d8f7; }
.puzzle-options { display: flex; align-items: flex-end; gap: 12px; }.puzzle-options > button { flex-shrink: 0; height: 46px; }
.setting { display: grid; gap: 7px; font-size: 13px; color: var(--muted); min-width: 0; }.setting select { width: 100%; min-width: 0; height: 46px; padding: 8px 25px 8px 10px; border: 1px solid #b7a3dd70; border-radius: 12px; background: #2a224a; color: var(--ink); font-size: 14px; }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; border: 1px solid #b7a3dd70; border-radius: 14px; color: #f2e9ff; background: #2a224a; font-size: 14px; }.quiet-button:hover { background: #3b2a61; }
.gold-button { min-height: 46px; padding: 11px 22px; border: 1px solid #fff0bc; border-radius: 17px; background: linear-gradient(120deg,#ffe5aa,#eec57c); color: #30213e; font-weight: bold; }
.shuffle-button { box-shadow: 0 4px 20px #eec57c30; }.shuffle-button:hover:not(:disabled) { background: linear-gradient(120deg,#fff0c6,#ffdb91); box-shadow: 0 5px 24px #eec57c50; }
.game-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 20px; }.game-toolbar > span { color: #f4dcac; font-size: 14px; }
.play-tip { font-size: 13px; color: var(--muted); margin: 13px 0 19px; }
.puzzle-workspace { --image-ratio: 1; --columns: 3; --rows: 2; --piece-ratio: 1; --tray-columns: 3; --compact-tray-columns: 3; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(270px,1fr); gap: 30px; align-items: start; }
.board-panel, .tray-panel { min-width: 0; }.puzzle-workspace h2 { margin: 0 0 14px; font: 16px/1.5 var(--heading); color: var(--gold); text-align: center; }.board-panel h2 span { color: #efc7ff; }
.puzzle-board { position: relative; aspect-ratio: var(--image-ratio); width: min(100%, calc(550px * var(--image-ratio))); margin: auto; background: radial-gradient(ellipse,#4e35605e,#1a2140b8); border: 2px solid #bca47699; border-radius: 14px; box-shadow: 0 10px 40px #06071755,0 0 0 5px #c2a8e509; overflow: clip; isolation: isolate; }
.puzzle-slot { position: absolute; width: calc(100% / var(--columns)); height: calc(100% / var(--rows)); border: 0; padding: 0; background: transparent; cursor: pointer; z-index: 1; }
.puzzle-slot > svg { position: absolute; left: -24%; top: -24%; width: 148%; height: 148%; overflow: visible; pointer-events: none; }
.puzzle-slot .piece-outline { stroke: #dcc59c80; stroke-width: .8; fill: #c6acd50a; }.puzzle-slot.is-hovered .piece-outline, .puzzle-slot:focus-visible .piece-outline { stroke: #fff0b9; stroke-width: 2; fill: #d2b8ef35; }
.puzzle-slot.is-placed { z-index: 2; cursor: default; }.puzzle-slot.is-placed .piece-outline { fill: none; stroke: #f2e4be70; stroke-width: .5; }
.puzzle-slot.is-hovered { z-index: 3; }
.puzzle-slot.is-hovered .piece-outline { stroke: #caff8f; stroke-width: 2.5; fill: #beff842b; }
.puzzle-slot.is-placed > svg { animation: piece-snap .3s ease-out; }
.puzzle-slot:focus-visible { outline-offset: -4px; z-index: 4; }
.completed-art { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; animation: reveal-picture .6s ease-out; }
.tray-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.piece-tray { display: grid; grid-template-columns: repeat(var(--tray-columns), minmax(0,1fr)); gap: 8px; width: min(100%,calc(510px * var(--image-ratio))); margin: auto; }
.puzzle-piece { border: 1px solid #c6a5e13b; border-radius: 11px; padding: 0; background: #1d193b70; aspect-ratio: var(--piece-ratio); min-height: 44px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: relative; }
.puzzle-piece > svg { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(1px 3px 2px #07081c88); }
.puzzle-piece:hover { border-color: #e6ca926e; }.puzzle-piece.is-selected { border: 2px solid #ffdf95; background: #654878; box-shadow: 0 0 18px #f7d8a230; }
.puzzle-piece.is-dragging { opacity: .25; }.puzzle-piece.is-used { visibility: hidden; pointer-events: none; }
.drag-ghost { position: fixed; z-index: 40; pointer-events: none; filter: drop-shadow(0 10px 10px #0008); }.drag-ghost svg { width: 100%; height: 100%; }
.drag-ghost.is-snapping { filter: drop-shadow(0 0 9px #caff8faa); }
.drag-ghost.is-snapping .piece-outline { stroke: #dfffad; stroke-width: 1.8; }
.board-tip { text-align: center; font-size: 12px; color: #ded5ed; margin: 12px 0 0; }
.tray-finished { color: var(--gold); text-align: center; padding: 30px 12px; font-family: var(--heading); }
.game-feedback { text-align: center; padding: 20px 8px; min-height: 70px; }.game-feedback p { margin: 0 0 12px; color: #e0d1ed; }.finish-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.puzzle-game.is-complete .game-feedback { margin-top: 22px; padding: 24px 15px; border: 1px solid #e7bf7959; border-radius: 22px; background: radial-gradient(ellipse at top,#7d438b44,#2c285536); }.puzzle-game.is-complete #message { font: 19px/1.6 var(--heading); color: var(--gold); }
.below-game { display: flex; justify-content: space-between; align-items: start; gap: 20px; border-top: 1px solid #c9b2e126; padding-top: 15px; color: var(--muted); font-size: 13px; }.below-game details { max-width: 650px; }.below-game summary { padding: 10px 0; cursor: pointer; }.below-game > a { padding: 10px 0; color: var(--gold); white-space: nowrap; }
footer { position: relative; display: flex; justify-content: center; align-items: center; gap: 17px; padding: 12px 20px 25px; color: #b4a1c5; font-size: 12px; }footer a { padding: 10px 0; }footer span { color: var(--gold); }
dialog { color: var(--ink); background: #19162f; border: 1px solid #d9b88670; border-radius: 23px; padding: 22px; width: min(880px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 20px 80px #0009; }dialog::backdrop { background: #070b20dc; backdrop-filter: blur(7px); }.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }.dialog-top h2 { font: 21px/1.5 var(--heading); color: var(--gold); margin: 0; }.dialog-top .eyebrow { font-size: 9px; }
.close-button { flex-shrink: 0; border: 1px solid #b598ce66; border-radius: 50%; width: 44px; height: 44px; font-size: 28px; background: #35274f; color: var(--ink); }
.picture-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }.picture-option { padding: 8px; border: 1px solid #c6a5e155; border-radius: 14px; background: #2c2144; color: var(--ink); }.picture-option[aria-pressed="true"] { border: 2px solid #ffe5aa; background: #4e3765; }.picture-option img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 7px; background: #131128; }.picture-option span { display: block; padding: 8px 0 2px; font-size: 12px; }
#preview { width: min(740px,calc(100vw - 24px)); text-align: center; }#preview figure { margin: 0 0 16px; }#preview-image { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 220px); margin: auto; border-radius: 10px; }#preview figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
@keyframes reveal-picture { from { opacity: 0; } to { opacity: 1; } }
@keyframes piece-snap { from { filter: drop-shadow(0 0 7px #caff8f); } to { filter: none; } }
@media(max-width: 1050px) { .puzzle-settings { grid-template-columns: 1fr; }.picture-choice > img { width: 210px; }.puzzle-options { justify-content: center; }.setting { flex: 1; } }
@media(max-width: 760px) { .topbar { padding: 18px; }.wordmark { font-size: 20px; }.back-link { font-size: 12px; }main { padding-inline: 16px; }.puzzle-settings { gap: 16px; padding: 13px; }.picture-choice { gap: 14px; }.picture-choice > img { width: clamp(100px,28vw,180px); }.choice-action { font-size: 18px; }.puzzle-workspace { grid-template-columns: 1fr; gap: 24px; }.puzzle-board { width: min(100%,calc(480px * var(--image-ratio))); }.piece-tray { grid-template-columns: repeat(var(--compact-tray-columns), minmax(0,1fr)); width: min(100%,calc(480px * var(--image-ratio))); }.puzzle-piece { min-width: 44px; }.below-game { flex-wrap: wrap; gap: 0; }.picture-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }.picture-option { padding: 5px; }.picture-option img { height: auto; }.picture-option span { font-size: 11px; }.dialog-top h2 { font-size: 18px; }dialog { padding: 15px; } }
@media(max-width: 480px) { .picture-choice { flex-direction: column; text-align: center; padding: 14px; }.picture-choice > img { width: min(100%,240px); }.picture-choice-copy { justify-items: center; }.choice-action { max-width: 260px; }.puzzle-options { gap: 8px; }.puzzle-options > button { padding-inline: 10px; font-size: 13px; }.setting select { padding-inline: 8px; font-size: 13px; } }
@media(max-width: 380px) { .picture-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.piece-tray { gap: 4px; }.puzzle-workspace h2 { font-size: 14px; }.quiet-button { padding-inline: 10px; font-size: 12px; } }
@media(max-width:760px) and (min-height:480px) {
 .board-panel { position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 10; padding: 10px 0; border-radius: 16px; background: #17152f; box-shadow: 0 10px 22px #09071e99; }
 .board-panel h2 { margin-bottom: 10px; }
 .puzzle-board { max-width: calc((48svh - 80px) * var(--image-ratio)); }
 .board-tip { font-size: 11px; }
}
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; }.completed-art,.puzzle-slot.is-placed > svg { animation: none; } }

.picture-group-title { grid-column: 1 / -1; margin: 18px 0 2px; font: 18px/1.5 var(--heading); color: var(--gold); }

.symbol-note{padding:16px 20px;border:1px solid #c4e5d366;border-radius:18px;color:#dacfe9;background:linear-gradient(120deg,#66477833,#40847322);font-size:13px;line-height:1.7}.symbol-note strong{color:#d6efbc;font:16px/1.7 var(--heading)}.symbol-board{clip-path:polygon(8.333333% 0,91.666667% 0,91.666667% 12.5%,100% 12.5%,100% 87.5%,91.666667% 87.5%,91.666667% 100%,8.333333% 100%,8.333333% 87.5%,0 87.5%,0 12.5%,8.333333% 12.5%);border-radius:0}
