/* ===== The fun layer: header buttons, toasts, album, games, character tricks ===== */

/* ---------- Header buttons ---------- */
.hud { display: flex; gap: 8px; align-items: center; }
.hud-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 50px; padding: 0 16px;
  border: 3px solid var(--line); border-radius: 999px;
  background: var(--paper);
  font: 900 16px var(--text);
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  white-space: nowrap;
}
.hud-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.hud-btn.play { background: var(--yellow); }
.hud-btn.play span { font-size: 20px; }
.hud-btn.icon { width: 50px; padding: 0; justify-content: center; font-size: 20px; }
.hud-btn.icon .off, .hud-btn.icon.off .on { display: none; }
.hud-btn.icon.off .off { display: inline; }
.hud-btn.album .ring {
  width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(var(--super) var(--p, 0%), #dfe7e2 0);
  position: relative;
}
.hud-btn.album .ring::after { content: "★"; position: absolute; inset: 4px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 12px; color: var(--yellow); line-height: 1; }
.hud-btn.album b { color: var(--green-3); }
.hud-btn.bump { animation: bump .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 40% { transform: scale(1.18) rotate(-4deg); } }

/* ---------- Toasts & confetti ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1000; }
.toasts { position: fixed; z-index: 999; top: 14px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 8px;
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--line); border-radius: 999px;
  box-shadow: 0 5px 0 var(--line);
  animation: toastin .45s cubic-bezier(.3, 1.6, .5, 1) both;
}
.toast.gold { background: var(--yellow); }
.toast.out { animation: toastout .4s ease-in both; }
.toast img { width: 46px; height: 46px; object-fit: contain; background: var(--yellow-2); border-radius: 50%; border: 2px solid var(--line); }
.toast b { display: block; font-size: 16px; }
.toast small { color: var(--muted); font-weight: 500; }
.toast.gold small { color: var(--green-2); }
.badge-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--line); flex: none; }
@keyframes toastin { from { transform: translateY(-120%) scale(.8); opacity: 0; } }
@keyframes toastout { to { transform: translateY(-120%); opacity: 0; } }

/* ---------- Big sheets (album, games) ---------- */
dialog.sheet {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 0 var(--line);
  background: var(--cream);
  color: var(--ink);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
dialog.sheet[open] { display: flex; animation: popin2 .35s cubic-bezier(.3, 1.5, .5, 1); }
dialog.sheet.wide { width: min(980px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--green); color: #fff; flex: none; }
.sheet-head h2 { margin: 0; font-family: var(--title); font-weight: 700; font-size: 36px; line-height: 1; color: var(--yellow); }
.pill { padding: 4px 12px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 900; }
.sheet-close { margin-left: auto; width: 44px; height: 44px; border-radius: 14px; border: 2px solid #fff; background: transparent; color: #fff; font-size: 26px; cursor: pointer; flex: none; }
.sheet-body { padding: 16px 18px 20px; overflow: auto; }
.mini-h { margin: 18px 0 10px; font: 900 15px var(--text); text-transform: uppercase; letter-spacing: .08em; color: var(--green-3); }
.mini-h small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-left: 6px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-weight: 500; }
.reset-row { text-align: center; margin: 18px 0 0; }

/* ---------- Album ---------- */
.meter { height: 18px; border: 3px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.meter i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--yellow-2) 12px 24px); border-right: 3px solid var(--line); transition: width .6s; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.badges li { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; padding: 8px 10px; border: 2px dashed #b9c7bf; border-radius: 16px; opacity: .55; filter: grayscale(1); }
.badges li .badge-ico { grid-row: span 2; }
.badges li.on { opacity: 1; filter: none; border: 3px solid var(--line); background: var(--yellow-2); }
.badges b { font-size: 15px; }
.badges small { font-size: 12.5px; color: var(--muted); }
.stickers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.stickers button {
  width: 100%; display: grid; justify-items: center; gap: 1px;
  padding: 8px 6px 10px; border-radius: 16px; cursor: pointer;
  border: 3px solid var(--line); background: #fff; box-shadow: 0 3px 0 var(--line);
}
.stickers button.got { background: var(--yellow-2); transform: rotate(-1.5deg); }
.stickers li:nth-child(even) button.got { transform: rotate(1.5deg); }
.stickers button.missing { border-style: dashed; box-shadow: none; background: #f2f5f3; }
.stickers img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.stickers .missing img { filter: brightness(0) opacity(.18); }
.stickers b { font-family: var(--title); font-weight: 700; font-size: 20px; color: var(--green); line-height: 1.05; }
.stickers .missing b { font-family: var(--text); font-weight: 900; color: #9aaaa1; font-size: 16px; }
.stickers small { font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; line-height: 1.15; }

/* gallery cards you've collected get a star sticker */
.grid button { position: relative; }
.grid button.got::after {
  content: "★"; position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px; display: grid; place-items: center;
  background: var(--yellow); color: var(--green); border: 2px solid var(--line); border-radius: 50%;
  font-size: 15px; transform: rotate(12deg);
}

/* ---------- Game hub ---------- */
.game-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.game-cards button {
  width: 100%; height: 100%; display: grid; align-content: start; gap: 6px; text-align: left;
  padding: 12px 12px 16px; border: 3px solid var(--line); border-radius: 20px; background: #fff;
  cursor: pointer; box-shadow: 0 5px 0 var(--line); transition: transform .15s;
}
.game-cards button:hover { transform: translateY(-4px) rotate(-.5deg); }
.game-cards b { font-family: var(--title); font-weight: 700; font-size: 30px; color: var(--green); line-height: 1; margin-top: 4px; }
.game-cards small { font-size: 15px; color: var(--muted); }
.game-cards em { font-style: normal; font-weight: 900; color: #b06d00; }
.gc-art { position: relative; height: 120px; border-radius: 14px; border: 3px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.gc-art img { height: 175%; margin-top: 78px; }
.gc-map { background: var(--sea) radial-gradient(circle at 30% 40%, #fdb71a 0 18%, transparent 19%), var(--sea); }
.gc-map::after { content: "?"; position: absolute; right: 12px; top: 6px; font: 900 44px var(--text); color: #fff; text-shadow: 0 3px 0 var(--line); }
.gc-shadow { background: radial-gradient(circle, #fff6c9, var(--yellow) 70%); }
.gc-shadow img { filter: brightness(0); }
.gc-memory { background: var(--green); grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px 14px; place-items: center stretch; }
.gc-memory i { height: 92px; border-radius: 10px; background: var(--yellow) url(../assets/icon-my.png) center / 60% no-repeat; border: 2px solid var(--line); }
.gc-memory i:nth-child(2) { transform: rotateY(180deg); background: #fff url(../assets/maskotti/sliema.webp) center / 90% no-repeat; }
.gc-memory i:nth-child(odd) { transform: rotate(-4deg); }

/* ---------- "Where do I live?" on the map ---------- */
body.gaming .map-wrap .pin-face image, body.gaming #shop-dots, body.gaming .shops-toggle { display: none; }
body.gaming .map-panel { box-shadow: 0 5px 0 var(--line), 0 0 0 4px var(--yellow); }
.map-wrap g.area.wrong { animation: shake .55s; filter: hue-rotate(-40deg) saturate(2.2) brightness(.95); }
.map-wrap g.area.right { filter: hue-rotate(70deg) saturate(1.6) brightness(1.2) drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #fff); transform: scale(1.14); }
.map-wrap g.area.reveal { animation: reveal .8s ease-in-out infinite alternate; }
.map-wrap g.area.flash { filter: brightness(1.45) saturate(1.4) drop-shadow(0 0 2px #fff) drop-shadow(0 0 9px #fff6c9); transform: scale(1.12); }
@keyframes shake { 20%, 60% { transform: translateX(-2px); } 40%, 80% { transform: translateX(2px); } }
@keyframes reveal { to { filter: brightness(1.5) drop-shadow(0 0 3px #fff) drop-shadow(0 0 12px #fff); transform: scale(1.15); } }
.spot.lost img { animation: popin .45s cubic-bezier(.3, 1.5, .5, 1) both, worried 1.4s ease-in-out .45s infinite; }
@keyframes worried { 25% { transform: translateX(-52%) rotate(-3deg); } 75% { transform: translateX(-48%) rotate(3deg); } }
.who .clue { font-style: italic; background: #fff; border: 2px dashed #c9d4cd; border-radius: 12px; padding: 8px 10px; }
.game-help { align-items: center; }
.game-help .hint { font-weight: 900; color: #b06d00; font-size: 15px; }
.game-help button[data-guess-area] { padding: 6px 12px; }
.game-help button[data-guess-area]:disabled { opacity: .4; text-decoration: line-through; }
.flip .quit { font-size: 22px; }
.scoreboard { padding: 10px 12px; overflow: auto; }
.rounds { list-style: none; margin: 0; padding: 4px 0 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.rounds li { aspect-ratio: 1; border: 2px dashed #c9d4cd; border-radius: 12px; display: grid; place-items: center; position: relative; font: 900 20px var(--text); color: #aab8b0; }
.rounds li.now { border: 3px solid var(--line); background: var(--yellow-2); color: var(--ink); animation: bump 1.2s infinite; }
.rounds li.done { border: 3px solid var(--line); background: #fff; }
.rounds li img { width: 80%; height: 80%; object-fit: contain; }
.rounds .stars { position: absolute; bottom: -4px; font-size: 12px; background: #fff; border-radius: 999px; padding: 0 4px; border: 2px solid var(--line); }
.stars { color: #f5a300; letter-spacing: 1px; }
.stars i { font-style: normal; color: #d6ddd9; }
.result { display: grid; place-items: center; text-align: center; padding: 14px 16px; gap: 6px; }
.result h2 { margin: 0; font-family: var(--title); font-weight: 700; font-size: 44px; color: var(--green); }
.result p { margin: 0; max-width: 40ch; }
.big-stars { font: 900 72px/1 var(--text); color: var(--green); text-shadow: 0 4px 0 var(--yellow); }
.big-stars span { color: var(--yellow); text-shadow: 0 3px 0 var(--line); font-size: 54px; }
.char-foot.center { justify-content: center; }

/* ---------- Character tricks ---------- */
.spot { cursor: pointer; }
.spot:focus-visible { outline: 4px solid var(--green); outline-offset: 2px; }
.spot .bubble {
  position: absolute; z-index: 3; left: 8px; right: 8px; top: 8px;
  padding: 8px 12px;
  background: #fff; border: 3px solid var(--line); border-radius: 16px;
  font: 700 15px/1.3 var(--text); color: var(--ink);
  box-shadow: 0 3px 0 var(--line);
}
.spot .bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 18px; height: 18px; background: #fff; border: 3px solid var(--line); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); }
.spot .bubble.show { animation: bubblein .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bubblein { from { transform: scale(.4) translateY(30px); opacity: 0; } }
.tap-me {
  position: absolute; z-index: 3; right: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 999px; border: 2px solid var(--line);
  background: #fff; font-weight: 900; font-size: 13px;
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translateY(-4px) rotate(-3deg); } }
.spot img.boing, .spot video.boing { animation: boing .6s cubic-bezier(.3, 1.6, .5, 1), bob 3.2s ease-in-out .6s infinite; }
.spot img.spinny, .spot video.spinny { animation: spinny .9s cubic-bezier(.3, 1.3, .5, 1), bob 3.2s ease-in-out .9s infinite; }
@keyframes boing {
  0% { transform: translateX(-50%) scale(1, 1); }
  20% { transform: translateX(-50%) scale(1.12, .86); }
  45% { transform: translateX(-50%) translateY(-14%) scale(.92, 1.1); }
  70% { transform: translateX(-50%) scale(1.05, .95); }
  100% { transform: translateX(-50%) scale(1, 1); }
}
@keyframes spinny { 0% { transform: translateX(-50%) rotate(0); } 50% { transform: translateX(-50%) translateY(-18%) rotate(200deg) scale(1.1); } 100% { transform: translateX(-50%) rotate(360deg); } }

/* ---------- Who's that Maskotto? ---------- */
.shadow-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.shadow-spot { height: min(52vh, 420px); cursor: default; }
.shadow-spot img { animation: popin .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.shadow-spot img.shadow { filter: brightness(0) drop-shadow(0 0 0 #fff); transition: filter .6s ease; }
.shadow-spot img.shadow.lit { filter: none; animation: spinny .9s cubic-bezier(.3, 1.3, .5, 1); }
.choices { display: grid; gap: 10px; }
.choices button {
  display: grid; text-align: left; padding: 12px 16px;
  border: 3px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: 0 4px 0 var(--line); cursor: pointer;
}
.choices button:not(:disabled):hover { background: var(--yellow-2); transform: translateY(-2px); }
.choices b { font-family: var(--title); font-weight: 700; font-size: 28px; color: var(--green); line-height: 1.05; }
.choices small { font-weight: 700; color: var(--muted); }
.choices button.right { background: #c9f0d6; border-color: var(--super); }
.choices button.wrong { background: #ffd6d2; border-color: var(--closed); animation: shake .5s; }
.choices button:disabled { cursor: default; }
.reveal-line { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 20px; min-height: 1.4em; }
.shadow-body .char-foot { grid-column: 1 / -1; }

/* ---------- Memory match ---------- */
.mem-size { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.mem-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); max-width: min(640px, calc((100dvh - 260px) * .68)); }
.mem-grid.size-6 { max-width: min(640px, calc((100dvh - 260px) * .94)); }
.mem-grid.size-10 { grid-template-columns: repeat(5, 1fr); max-width: min(760px, calc((100dvh - 260px) * .86)); }
.mem-grid li { aspect-ratio: 3 / 4; perspective: 700px; }
.card { position: relative; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.card.up, .card.matched { transform: rotateY(180deg); }
.card .back, .card .front { position: absolute; inset: 0; border: 3px solid var(--line); border-radius: 14px; backface-visibility: hidden; display: grid; place-items: center; box-shadow: 0 4px 0 var(--line); }
.card .back { background: var(--yellow) repeating-linear-gradient(45deg, transparent 0 10px, rgba(255, 255, 255, .25) 10px 20px); }
.card .back img { width: 54%; }
.card .front { transform: rotateY(180deg); background: #fff; grid-template-rows: 1fr auto; padding: 6px 4px; }
.card .front img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.card .front b { font-family: var(--title); font-weight: 700; font-size: clamp(14px, 2vw, 20px); color: var(--green); line-height: 1; }
.card.matched .front { background: var(--yellow-2); animation: matched .6s; }
@keyframes matched { 50% { transform: rotateY(180deg) scale(1.08); } }
.mem-win { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 0 0 14px; padding: 12px; background: var(--yellow-2); border: 3px solid var(--line); border-radius: 18px; font-size: 18px; }
.mem-win span { font-weight: 900; color: #b06d00; }

/* ---------- Small screens ---------- */
@media (max-width: 1180px) {
  .hud-btn { height: 46px; padding: 0 14px; font-size: 15px; }
  .hud-btn.icon { width: 46px; }
}
@media (max-width: 760px) {
  .hud { justify-content: center; flex-wrap: nowrap; }
  .hud-btn { height: 44px; padding: 0 12px; }
  .hud-btn.icon { width: 44px; }
  dialog.sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  .sheet-head h2 { font-size: 28px; }
  .shadow-body { grid-template-columns: 1fr; }
  .shadow-spot { height: 34vh; }
  .choices b { font-size: 22px; }
  .mem-grid, .mem-grid.size-6, .mem-grid.size-10 { grid-template-columns: repeat(4, 1fr); gap: 7px; max-width: none; }
  .rounds { grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .rounds li { font-size: 14px; border-radius: 10px; }
  .rounds .stars { display: none; }
  .badges { grid-template-columns: 1fr 1fr; }
  .badges small { display: none; }
}

/* ---------- Living map ---------- */
.map-wrap .wave { fill: none; stroke: #fff; stroke-width: .8px; stroke-linecap: round; opacity: 0; animation: wave 4s ease-in-out infinite; }
@keyframes wave { 0%, 100% { opacity: 0; transform: translateX(-2px); } 50% { opacity: .75; transform: translateX(2px); } }
.map-wrap .boat { cursor: pointer; }
.map-wrap .boat .boat-art { transform-box: fill-box; transform-origin: center bottom; }
.map-wrap .boat.hop .boat-art { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1); }
.map-wrap .boat:hover .boat-art { filter: drop-shadow(0 0 2px #fff); }
@keyframes hop { 40% { transform: translateY(-5px) rotate(-8deg); } }
.map-wrap .cloud { pointer-events: none; }
body.gaming .map-wrap .cloud { opacity: .2; }

/* ---------- Postcard maker ---------- */
.tabs .pc-btn { margin-left: auto; padding: 5px 14px; background: var(--yellow); box-shadow: 0 2px 0 var(--line); }
.pc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 18px; align-items: start; }
.pc-preview { display: grid; place-items: center; }
.pc-preview canvas { width: 100%; max-width: calc((100dvh - 150px) * .8); height: auto; border-radius: 12px; box-shadow: 0 6px 0 var(--line); }
.pc-form { display: grid; gap: 14px; }
.pc-form label, .pc-form legend { display: grid; gap: 6px; font-weight: 900; font-size: 15px; }
.pc-form fieldset { border: 0; padding: 0; margin: 0; }
.pc-form fieldset .chips { flex-wrap: wrap; }
.pc-form select, .pc-form input { font: 500 16px var(--text); padding: 10px 12px; border: 3px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); }
.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .pc-body { grid-template-columns: 1fr; }
  .pc-preview canvas { max-width: 78vw; }
  .tabs .pc-btn { margin-left: 0; }
}

/* ---------- Map game mission card (floats on the map) ---------- */
body.gaming .map-hint { display: none; }
.mission {
  position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; max-width: calc(100% - 28px);
  background: var(--paper); border: 3px solid var(--line); border-radius: 999px;
  box-shadow: 0 4px 0 var(--line);
  animation: toastin .4s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.mission img { width: 46px; height: 46px; object-fit: contain; background: var(--yellow-2); border-radius: 50%; border: 2px solid var(--line); flex: none; }
.mission b { display: block; font-size: 16px; }
.mission small { display: block; font-weight: 700; color: var(--muted); font-size: 13.5px; }
.mission.oops { background: #fff1ef; animation: shake .45s; }
.mission.oops small { color: var(--closed); }
.mission.yay { background: #e5f7eb; }
.mission.yay small { color: var(--super); }
@media (max-width: 760px) { .mission { bottom: 8px; padding-right: 12px; } .mission img { width: 38px; height: 38px; } .mission b { font-size: 14.5px; } .mission small { font-size: 12.5px; } }

.mission[hidden] { display: none; }

/* ---------- Daily mystery Maskotto (welcome screen) ---------- */
.daily {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; width: 100%; text-align: left;
  padding: 8px 12px 8px 8px; border: 3px dashed var(--green-3); border-radius: 18px; background: #fff;
  font: inherit; color: inherit;
}
.daily img { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 14px; background: var(--yellow-2); }
.daily img.mystery { filter: brightness(0); background: none; animation: wiggle 2.4s ease-in-out infinite; }
.daily b { display: block; font-size: 15px; color: var(--green); }
.daily small { display: block; font-size: 13.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.daily.done { border-style: solid; border-color: var(--line); background: var(--yellow-2); cursor: pointer; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-8deg); } 20% { transform: rotate(8deg); } 30% { transform: rotate(0); } }

/* ---------- Maskotto popping up out of its town ---------- */
.map-wrap #peek { pointer-events: none; }
.map-wrap #peek .peek-shadow { fill: rgba(0, 35, 24, .35); }
.map-wrap #peek image { filter: drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff); }
.map-wrap #peek .peek-in { transform-box: view-box; transform-origin: 0 0; }
.map-wrap #peek .peek-in.pop image { animation: peekup .5s cubic-bezier(.3, 1.7, .5, 1) both, peekbob 2.4s ease-in-out .5s infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes peekup { from { transform: translateY(40%) scale(.2); opacity: 0; } }
@keyframes peekbob { 50% { transform: translateY(-6%); } }
.scoreboard .how { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.scoreboard .how .stars { font-size: 13px; }

/* ---------- Seasons ---------- */
.map-wrap .flake { fill: #fff; opacity: .9; }
body[data-season="xmas"] .map-panel { box-shadow: 0 5px 0 var(--line), inset 0 0 0 3px #fff; }
.map-wrap .burst line { stroke-width: 2.2px; stroke-linecap: round; }
.map-wrap .burst { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)); }
.map-wrap .burst .burst-in { transform-box: fill-box; transform-origin: center; animation: burst 1.5s cubic-bezier(.1, .8, .3, 1) forwards; }
@keyframes burst { 0% { transform: scale(.05); opacity: 1; } 60% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.season-hi { background: #fff; border: 3px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 15px !important; }
.season-hi b { color: var(--green); }

/* ---------- Sliding puzzle ---------- */
.pz-body { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 20px; align-items: center; }
.pz-side { display: grid; gap: 12px; }
.pz-side p { margin: 0; font-size: 16px; }
.pz-peek { height: 220px; cursor: default; }
.pz-peek::after { display: none; }
.pz-board {
  --size: min(520px, calc(100dvh - 200px), 92vw);
  width: var(--size); height: var(--size); justify-self: center;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; padding: 4px;
  background: var(--green); border: 3px solid var(--line); border-radius: 18px; box-shadow: 0 5px 0 var(--line);
}
.pz-tile, .gc-puzzle i {
  border: 2px solid var(--line); border-radius: 10px; padding: 0; cursor: pointer;
  --sun: radial-gradient(circle at 50% 60%, #fff6c9, #ffd45c 45%, #fdb71a 80%);
  background-size: calc(var(--n, 3) * 100%) calc(var(--n, 3) * 100%), cover;
  background-repeat: no-repeat;
  transition: transform .12s;
}
.pz-tile:hover { transform: scale(.97); }
.pz-gap { border-radius: 10px; background: rgba(255, 255, 255, .08); }
.pz-board.solved { gap: 0; padding: 0; overflow: hidden; animation: bump .6s; }
.pz-board.solved .pz-tile { border: 0; border-radius: 0; cursor: default; }
.gc-puzzle { background: var(--green); grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 8px calc(50% - 52px); place-items: stretch; }
.gc-puzzle i { --n: 3; cursor: inherit; border-radius: 6px; }
.gc-puzzle i.gap { background: rgba(255, 255, 255, .1); border-color: transparent; }
@media (max-width: 760px) {
  .pz-body { grid-template-columns: 1fr; }
  .pz-peek { display: none; }
  .pz-board { --size: min(92vw, 60dvh); }
}
