:root{font-family:'DM Sans',Arial,sans-serif;color:#17333a;background:#f6f8f4}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select{font:inherit}button{cursor:pointer}.material-symbols-outlined{font-size:21px;line-height:1;vertical-align:middle}.topbar{min-height:62px;padding:9px clamp(16px,3vw,38px);display:flex;align-items:center;justify-content:space-between;gap:15px;background:#17383d;color:#fff}.brand,.back{display:inline-flex;align-items:center;gap:9px;color:inherit;text-decoration:none}.brand{font-weight:800}.brand-mark{display:grid;place-items:center;width:33px;height:33px;border-radius:7px;background:#9ee5d3;color:#153d39;font-size:20px}.brand-divider{color:#88b1aa}.back{font-size:13px;color:#d8e8e4}.back:hover{color:#a7f1dc}main{max-width:1450px;margin:auto;padding:clamp(16px,2.4vw,34px)}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:22px}.eyebrow{color:#087d73;font-size:11px;font-weight:800;letter-spacing:1px}.page-heading h1{margin:5px 0;font-size:clamp(28px,3vw,38px);line-height:1.12}.page-heading p{margin:0;color:#63777a;font-size:14px}.phase-badge{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;padding:8px 11px;border:1px solid #aad7ca;border-radius:6px;background:#e7f7f1;color:#146e63;font-size:12px;font-weight:800}.layout{display:grid;grid-template-columns:minmax(0,1fr) 306px;align-items:start;gap:22px}.play-area{min-width:0}.game-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:13px}.level-info{display:flex;align-items:center;gap:12px;min-width:0;color:#527074;font-size:12px;font-weight:700}.level-label{white-space:nowrap;color:#175c5a;font-size:14px;font-weight:800}.progress-track{width:110px;height:8px;overflow:hidden;border-radius:9px;background:#d9e6e1}.progress-track span{display:block;height:100%;width:0;border-radius:9px;background:#12a983;transition:width .25s}.toolbar-actions{display:flex;gap:6px}.icon-button{width:38px;height:38px;display:grid;place-items:center;border:1px solid #b9d0cc;border-radius:6px;background:white;color:#24545a}.icon-button:hover,.icon-button:focus-visible{border-color:#0d9580;background:#e4f6ef}.board{padding:clamp(14px,2vw,24px);border:1px solid #c8d8d2;border-radius:8px;background:#fff;box-shadow:0 8px 26px #17383d0c}.board-head,.tray-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.board-head{margin-bottom:16px}.board-title{display:inline-flex;align-items:center;gap:8px;color:#17383d;font-weight:800;font-size:17px}.board-title .material-symbols-outlined{color:#e08943}.board-hint,.tray-heading span:last-child{color:#6c7d80;font-size:12px}.picture-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.picture-card{min-width:0;display:flex;align-items:center;flex-direction:column;padding:9px;border:2px solid var(--accent);border-radius:7px;background:var(--surface);box-shadow:0 3px 0 color-mix(in srgb,var(--accent) 50%,#fff);transition:transform .18s,border-color .18s}.picture-card.matched{border-color:#21ad82;background:#edfaf3}.picture-visual{width:100%;height:clamp(76px,9vw,110px);display:grid;place-items:center;overflow:hidden;border-radius:5px;background:#fff;font-size:clamp(52px,6vw,82px);line-height:1}.picture-visual img{width:85%;height:85%;object-fit:contain}.picture-name{min-height:20px;margin-top:4px;color:#3d595d;font-size:12px;font-weight:700;text-align:center}.picture-name[hidden]{visibility:hidden;display:block}.picture-slot{width:100%;height:58px;margin-top:5px;display:grid;place-items:center;border:2px dashed #b5c6c3;border-radius:5px;background:#f5f8f7;color:#92a6a4;font-size:12px;font-weight:700;transition:background .15s,border-color .15s}.picture-slot .shadow-art{font-size:38px}.picture-card.target .picture-slot{border-color:#00a78a;background:#e0f8ed}.picture-card.wrong .picture-slot{border-color:#dc695e;background:#fff0eb;animation:wobble .3s}.picture-card.matched .picture-slot{border-style:solid;border-color:#31b489;background:#e1f8ea}.tray-heading{margin:20px 0 9px;font-size:14px;font-weight:800}.shadow-tray{min-height:96px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;padding:12px;border:1px solid #d6e1df;border-radius:7px;background:#f2f6f5}.shadow-token{width:74px;height:70px;display:grid;place-items:center;border:2px solid #a5c8c5;border-radius:7px;background:white;box-shadow:0 3px 0 #c3d8d5;font-size:44px;line-height:1;touch-action:none;user-select:none;transition:transform .14s,border-color .14s,box-shadow .14s}.shadow-token:hover,.shadow-token:focus-visible,.shadow-token.selected{transform:translateY(-3px);border-color:#008f83;box-shadow:0 4px 0 #86cfc5;outline:none}.shadow-token.dragging{opacity:.48}.shadow-art{display:inline-grid;place-items:center;filter:brightness(0);opacity:.85;pointer-events:none}.shadow-art img{width:54px;height:54px;object-fit:contain}.shadow-token .shadow-art{font-size:47px}.feedback{min-height:22px;margin:11px 0 0;text-align:center;color:#087b64;font-size:14px;font-weight:800}.feedback.error{color:#b95a4e}.complete-panel{padding:28px;text-align:center;border:1px solid #b8d9ca;border-radius:7px;background:#e9f8ee}.complete-panel[hidden]{display:none}.complete-symbol{width:70px;height:70px;display:grid;place-items:center;margin:auto;border-radius:50%;background:#d4f2df;color:#158368}.complete-symbol .material-symbols-outlined{font-size:39px}.complete-panel h2{margin:12px 0 5px;font-size:25px}.complete-panel p{margin:0 0 16px;color:#5d7575}.complete-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:9px}.teacher{border:1px solid #cadbd7;border-radius:7px;background:#fff;overflow:hidden}.teacher-header{display:flex;align-items:center;gap:8px;padding:16px 17px;border-bottom:1px solid #e1eae7}.teacher-header .material-symbols-outlined{color:#087d73}.teacher-header h2{margin:0;font-size:17px}.teacher-body{padding:17px}.field{display:block;margin-bottom:12px;color:#315057;font-size:12px;font-weight:800}.field span{display:block;margin-bottom:6px}.field input,.field select{width:100%;min-height:42px;padding:8px 10px;border:1px solid #bfd1d0;border-radius:5px;background:#fff;color:#213d41}.field input:focus,.field select:focus{outline:2px solid #86d6c4}.switch-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;color:#304f54;font-size:13px}.switch-row strong,.switch-row small{display:block}.switch-row small{margin-top:2px;color:#71878a;font-size:11px}.switch-row input{width:20px;height:20px;accent-color:#078b78}.primary,.secondary,.small-button,.upload-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:41px;padding:8px 12px;border-radius:5px;font-weight:800;font-size:13px}.primary{border:1px solid #087e70;background:#0a887a;color:white}.primary:hover{background:#0b716b}.secondary{border:1px solid #80bdb1;background:#f0faf6;color:#0a6e64}.secondary:hover{background:#def3ea}.start-button,.add-button{width:100%;margin-top:5px}.teacher-divider{height:1px;margin:20px 0;background:#e1eae7}.custom-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.custom-heading h3{margin:0;font-size:14px}.custom-heading span{color:#6a8285;font-size:11px}.teacher-note{margin:8px 0 12px;color:#6f8587;font-size:11px;line-height:1.45}.upload-button{justify-content:flex-start;width:100%;margin-bottom:8px;border:1px dashed #9cbbb4;background:#f6faf8;color:#37615e;cursor:pointer;font-size:12px}.upload-button input,.small-button input{position:absolute;width:1px;height:1px;opacity:0}.settings-status{min-height:17px;margin:8px 0;color:#0d7d69;font-size:11px;font-weight:700}.settings-status.error{color:#ba5346}.custom-list{max-height:125px;overflow:auto;margin:0;padding:0;list-style:none}.custom-list li{display:flex;align-items:center;gap:7px;padding:5px 0;border-bottom:1px solid #edf1ef;font-size:12px}.custom-list .preview{width:26px;text-align:center;font-size:20px}.custom-list .preview img{width:26px;height:26px;object-fit:contain}.custom-list .name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.custom-list button{border:0;background:none;color:#b44e43}.import-actions{display:flex;gap:7px;margin-top:12px}.small-button{flex:1;min-width:0;min-height:36px;border:1px solid #b9d1c9;background:#f7faf9;color:#315d5b;cursor:pointer;font-size:11px}.small-button .material-symbols-outlined{font-size:17px}.play-area:fullscreen{overflow:auto;padding:clamp(14px,2vw,30px);background:#f6f8f4}.play-area:fullscreen .board,.play-area:fullscreen .complete-panel{max-width:1200px;margin:auto}.play-area:fullscreen .game-toolbar{max-width:1200px;margin:0 auto 15px}@keyframes wobble{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}@media(max-width:930px){.layout{grid-template-columns:1fr}.teacher{max-width:650px;width:100%;margin:auto}.picture-visual{height:110px}}@media(max-width:600px){.topbar{padding:8px 13px}.brand{font-size:13px}.back span:last-child,.brand-divider{display:none}main{padding:14px}.page-heading{margin-bottom:15px}.page-heading h1{font-size:27px}.page-heading p{font-size:12px}.phase-badge{display:none}.game-toolbar{align-items:flex-start}.level-info{display:block}.progress-track{margin:5px 0}.toolbar-actions{flex-wrap:wrap;justify-content:end;max-width:170px}.picture-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.picture-visual{height:76px;font-size:53px}.picture-slot{height:50px}.picture-slot .shadow-art{font-size:32px}.shadow-token{width:60px;height:59px}.shadow-token .shadow-art{font-size:39px}.board{padding:10px}.board-hint{max-width:125px;text-align:right}.board-title{font-size:14px}.shadow-tray{gap:7px;padding:8px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.complete-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(12,43,47,.7);backdrop-filter:blur(5px)}
.complete-overlay[hidden]{display:none}
.complete-overlay .complete-panel{position:relative;z-index:2;width:min(100%,470px);max-height:min(90vh,600px);overflow:auto;margin:0;padding:clamp(26px,5vw,44px);border:2px solid #f6d279;border-radius:8px;background:#fffdf5;box-shadow:0 24px 80px rgba(8,35,40,.3);animation:celebration-pop .38s cubic-bezier(.18,1.4,.35,1) both}
.complete-overlay .complete-symbol{width:84px;height:84px;background:#fff0bb;color:#d88421;box-shadow:0 0 0 9px #fff8df}
.complete-overlay .complete-symbol .material-symbols-outlined{font-size:48px}
.complete-overlay h2{margin-top:20px;font-size:clamp(25px,5vw,34px)}
.complete-overlay p{font-size:15px}
.complete-overlay .complete-actions{gap:10px}
.complete-overlay .complete-actions button{min-height:46px}
.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.confetti i{position:absolute;top:-8vh;left:var(--x);width:9px;height:18px;border-radius:2px;opacity:0;animation:confetti-fall var(--duration) ease-in var(--delay) forwards}
.confetti i:nth-child(3n){width:13px;height:13px;border-radius:50%}
.confetti .sparkle{position:absolute;top:50%;left:50%;width:10px;height:10px;border-radius:2px;opacity:0;transform:translate(-50%,-50%) rotate(45deg);animation:sparkle-burst 1.25s ease-out var(--delay) forwards}
@keyframes confetti-fall{0%{transform:translate3d(0,-4vh,0) rotate(0);opacity:1}85%{opacity:1}100%{transform:translate3d(var(--drift),108vh,0) rotate(var(--turn));opacity:0}}
@keyframes sparkle-burst{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(45deg)}18%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--sx)),calc(-50% + var(--sy))) scale(.35) rotate(220deg)}}
@keyframes celebration-pop{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}
@media(max-width:600px){.complete-overlay{padding:15px}.complete-overlay .complete-actions{flex-direction:column}.complete-overlay .complete-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){.complete-overlay .complete-panel,.confetti i{animation:none!important}.confetti{display:none}}

.import-panel{margin-top:13px;padding:13px;border:1px solid #b8d7cc;border-radius:6px;background:#f4fbf7}
.import-panel[hidden]{display:none}
.import-panel h3{margin:0 0 5px;font-size:14px}
.import-panel p{margin:0 0 11px;color:#5f7776;font-size:11px;line-height:1.45}
.template-link{display:inline-flex;align-items:center;gap:6px;margin-bottom:12px;color:#08796e;font-size:12px;font-weight:800;text-decoration:none}
.template-link:hover{text-decoration:underline}
.template-link .material-symbols-outlined{font-size:19px}
.drop-zone{min-height:115px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px;border:2px dashed #86bdb2;border-radius:6px;background:white;color:#2c615c;text-align:center;cursor:pointer;transition:background .15s,border-color .15s}
.drop-zone:hover,.drop-zone:focus-visible,.drop-zone.drag-over{border-color:#068e7f;background:#e9f9f2;outline:none}
.drop-zone .material-symbols-outlined{font-size:29px;color:#0a927f}
.drop-zone strong{font-size:12px}
.drop-zone small{font-size:11px;color:#738a86}
.sr-only-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.import-panel .import-status{min-height:16px;margin:8px 0 0;color:#08796e;font-weight:700}
.import-panel .import-status.error{color:#b34941}
.save-settings-button{width:100%;margin-top:14px}
.save-settings-button[hidden]{display:none}
.save-settings-status{min-height:16px;margin:8px 0 0;color:#08796e;font-size:11px;font-weight:700;line-height:1.4}
.save-settings-status.error{color:#b34941}
