/* HALLOWEEN OVERLAY. Base layout and project styles remain in css/style.css. */
body[data-season="halloween"] { --season-orange:#ffac59; --season-purple:#bc9aff; }
[data-season="halloween"] .primary {background:var(--season-orange);border-color:var(--season-orange);box-shadow:0 4px 0 #94512f;color:#221728}
.season-badge {color:#ffd9aa;background:#31233e;border-color:#bb91ef;border-bottom-color:#ffac59;box-shadow:4px 4px 0 #754531}
[data-season="halloween"] .intro h1 i,[data-season="halloween"] .level span {color:var(--season-orange)}
[data-season="halloween"] #crystal-count {border-color:#a76540;background:#352637}
[data-season="halloween"] .crystal {filter:drop-shadow(0 0 7px #ee8d3d55)}
.intro {isolation:isolate}
.season-ghosts {position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:-1}
.season-ghosts img {position:absolute;width:28px;opacity:.78;animation:ghost-drift 8s ease-in-out infinite}
.season-ghosts img:nth-child(1) {left:44%;top:9%;animation-delay:-2s}
.season-ghosts img:nth-child(2) {right:2%;top:23%;width:35px;animation-delay:-5s}
.season-ghosts img:nth-child(3) {left:52%;bottom:15%;width:22px;animation-duration:11s}
@keyframes ghost-drift {50% {transform:translate(12px,-16px) rotate(5deg)}}
.halloween-avatar {position:relative;flex-shrink:0;aspect-ratio:1;height:auto;max-width:100%}
.halloween-avatar .avatar-body {width:100%;height:100%;object-fit:contain;clip-path:polygon(0 33.2%,100% 33.2%,100% 100%,0 100%)}
.halloween-avatar .avatar-head {position:absolute;width:35%;height:35%;object-fit:fill;left:30.2%;top:0;image-rendering:pixelated}
.season-note {position:absolute;right:0;bottom:0;border-left:2px solid #d58b52;background:#211e32;padding:12px 17px;font:12px/1.6 'Courier New',monospace;transform:rotate(-3deg)}
.season-note span {display:block;color:var(--muted);font-size:10px;letter-spacing:2px}
.season-note strong {color:#ffd7ad}
.season-cover {height:260px;display:flex;align-items:center;justify-content:center;gap:25px;background:radial-gradient(ellipse at 40% 60%,#513244,#191a31 72%);overflow:hidden}
.season-cover img:first-child {width:120px;transform:rotate(-8deg)}
.season-cover img:last-child {width:30px;align-self:flex-start;margin-top:45px}
.season-cover span {font:900 25px/1.2 'Courier New',monospace;color:#ffe1b7}
.mod-placeholder {height:175px;display:grid;place-items:center;background:linear-gradient(135deg,#263b3b,#171b2e);font:bold 26px 'Courier New',monospace;color:#a7d5b5}
#mod-pending {opacity:.65;width:100%}
#mod-link {padding:12px;gap:8px;font-size:12px}
#mod-link-note {font-size:12px;margin-top:12px;margin-bottom:0}
.mod-shot {width:100%;height:175px;object-fit:cover}
.season-level-choice {display:flex;flex-wrap:wrap;align-items:center;gap:20px;margin-top:25px;font:14px 'Courier New',monospace}
.season-dialog {width:min(900px,96vw);max-width:96vw;max-height:94svh;padding:32px 24px 24px;overscroll-behavior:contain}
.season-dialog h2 {font-size:clamp(23px,4vw,35px);margin:14px 38px 15px 0;letter-spacing:-1px}
.season-dialog h3 {font-family:'Courier New',monospace;font-size:20px}
.season-dialog p {color:#c4c5d8;line-height:1.5}
.season-close {position:absolute;top:8px;right:8px;padding:8px 14px;min-width:44px}
.season-dialog>[data-close-season]:last-child {margin-top:18px;font-size:12px}
body:has(.season-dialog[open]) {overflow:hidden}
.season-instructions {font-size:13px}
.platform-hud {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;font:bold 14px 'Courier New',monospace}
#platform-pause {padding:8px 12px}
#halloween-canvas {width:100%;height:auto;display:block;background:#11152b;image-rendering:pixelated;border:1px solid #5c4979;touch-action:none}
.platform-controls {display:flex;gap:12px;margin:14px 0}
.platform-controls button {min-width:64px;min-height:56px;font-size:20px;touch-action:none;user-select:none;-webkit-user-select:none}
.platform-controls button:last-child {margin-left:auto;color:#ffcd99}
.platform-controls button.active {background:#654778}
#platform-result {padding:15px;border:1px solid #604779;background:#242037}
#platform-result h3 {margin:0 0 10px}
#platform-result p {margin-bottom:14px}
.carve-intro-pumpkin {width:140px;margin:22px auto;max-height:none}
.carve-boards {display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:35px;margin:35px auto 20px;max-width:740px}
.carve-boards h3 {text-align:center;font-size:14px;letter-spacing:2px}
.pumpkin-grid {display:grid;grid-template-columns:repeat(5,1fr);gap:4px;background:#ba581d;border:8px solid #e5832c;border-radius:24% 24% 30% 30%;padding:18px 12px;position:relative;box-shadow:inset 7px 0 #f7a346,inset -7px 0 #994520}
.pumpkin-grid:before {content:'';position:absolute;width:18px;height:22px;background:#8fb75e;left:calc(50% - 9px);top:-26px;box-shadow:6px -5px #6e8d46}
.pumpkin-grid button,.pumpkin-grid .cell {min-width:0;min-height:44px;aspect-ratio:1;padding:0;background:#f39b3c;border:1px solid #ad5723;border-radius:2px;color:#432a22;font:11px 'Courier New',monospace}
.pumpkin-grid [aria-pressed="true"],.pumpkin-grid .cut {background:#2b2139;border-color:#402139;box-shadow:inset 0 -4px #ffd783;color:#ffe2a0}
.pumpkin-grid button:focus-visible {outline-offset:1px;outline-color:white;position:relative;z-index:1}
.reference {max-width:270px;margin:auto}
.reference .cell {min-height:0;display:grid;place-items:center}
.season-actions {display:flex;flex-wrap:wrap;gap:12px}
#carve-status {min-height:48px}
.pumpkin-grid.complete {box-shadow:0 0 26px #ffa34e55}
@media(max-width:650px) {
 .halloween-avatar {height:auto;width:260px}
 .season-note {padding:8px 10px;font-size:10px}
 .season-cover {height:215px;gap:18px}
 .season-cover img:first-child {width:90px}
 .season-cover span {font-size:22px}
 .season-cover img:last-child {width:22px}
 .mod-placeholder {height:125px;font-size:20px}
 .season-dialog {padding:28px 12px 18px}
 .season-dialog h2 {font-size:24px}
 .carve-boards {grid-template-columns:1fr;gap:35px;margin-top:28px}
 .reference {max-width:160px;border-width:5px;padding:9px;gap:2px}
 #carve-board {width:min(100%,330px);margin:auto;padding:14px 8px}
 .season-ghosts img:nth-child(1) {left:auto;right:1%;top:9%;width:20px}
 .season-ghosts img:nth-child(2) {top:56%}
 .platform-controls {gap:8px}
 .platform-controls button {min-width:60px;padding:12px;font-size:18px}
}
@media(prefers-reduced-motion:reduce) {.season-ghosts img {animation:none}}
@media(max-width:350px) {#carve-board {padding-left:4px;padding-right:4px}}
