/* coffin-crush.css v2.2 | Coffin Crush and the holiday editions (holiday-crush.css adds their looks) | 2026-11-21
   The look: the board is an open coffin, walnut outside, tufted satin inside, brass hardware.
   Six coffins (skins) swap the CSS variables below. Display face: Jolly Lodger. Reading face: Atkinson Hyperlegible.
   ASCII only. */
@font-face { font-family: "CCJolly"; src: url("coffin-crush-jolly.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "CCAtk"; src: url("coffin-crush-atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "CCAtk"; src: url("coffin-crush-atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #0F1C1E; --night2: #1B3032; --wood: #5A3A24; --wood-dark: #3A2416; --wood-light: #80573A;
  --satin: #7A2431; --satin-dark: #4A1219; --satin-light: #9C3E4C;
  --brass: #C9A24A; --brass-dark: #8A6A26; --brass-light: #E6C778;
  --bone: #F1E7CF; --candle: #F2A33A; --moss: #8DBF5A; --ink: #140C08;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  --display: "CCJolly", fantasy;
  --s: 40px;
}
html { color-scheme: only light; background: var(--night); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--bone);
  font: 17px/1.4 "CCAtk", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(60vmax 60vmax at 12% -8%, rgba(241, 231, 207, .10), transparent 60%),
              linear-gradient(180deg, var(--night2) 0%, var(--night) 62%);
  background-attachment: fixed; overflow-x: hidden;
}
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; margin: 0; }
.emoji, .e { font-family: var(--emoji); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--candle); outline-offset: 2px; }

/* ---------- the night sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sky .moon { position: absolute; left: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFF8E4 0%, #F1E7CF 55%, #D9CDB0 100%); opacity: .16; box-shadow: 0 0 80px 30px rgba(241, 231, 207, .08); }
.sky .fog { position: absolute; left: -20%; right: -20%; height: 140px; bottom: -40px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(241, 231, 207, .10), transparent); animation: drift 26s ease-in-out infinite alternate; }
.sky .fog.b { bottom: 30%; height: 90px; opacity: .6; animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
.sky .hill { position: absolute; left: 0; right: 0; bottom: 0; height: 16vh; background: var(--night);
  clip-path: polygon(0 60%, 12% 42%, 30% 56%, 48% 38%, 66% 52%, 84% 36%, 100% 50%, 100% 100%, 0 100%); opacity: .9; }

/* ---------- screens ---------- */
.screen { position: relative; z-index: 1; display: none; flex-direction: column; align-items: center; min-height: 100vh; min-height: 100dvh; padding: 0 10px; }
.screen.on { display: flex; }
.screen.game { height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- brass plates (every button) ---------- */
.plate {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 18px; border: 3px solid var(--ink); border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, var(--brass-light) 0%, var(--brass) 46%, var(--brass-dark) 100%);
  color: var(--ink); font-family: var(--display); font-size: 22px; line-height: 1; letter-spacing: .03em;
  box-shadow: 0 4px 0 var(--ink); text-decoration: none; touch-action: manipulation;
}
.plate::before, .plate::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--brass-dark); box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .35); }
.plate::before { left: 7px; } .plate::after { right: 7px; }
.plate:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.plate.go { background: linear-gradient(180deg, #FFD08A 0%, var(--candle) 50%, #C9711A 100%); }
.plate.red { background: linear-gradient(180deg, #F08A7A 0%, #C9473A 55%, #8E2A20 100%); color: #FFF6EE; }
.plate.ghost { background: transparent; color: var(--bone); border-color: var(--brass); box-shadow: 0 4px 0 rgba(0, 0, 0, .45); }
.plate.ghost::before, .plate.ghost::after { background: var(--brass); }
.plate.small { min-height: 42px; font-size: 18px; padding: 6px 14px; }
.plate[disabled] { opacity: .45; cursor: default; }

/* ---------- home ---------- */
.home { justify-content: center; gap: 14px; padding-top: 20px; padding-bottom: 24px; }
.home .logo { width: min(82vw, 400px); height: auto; display: block; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .25)); }
.home .tag { margin: -4px 0 2px; font-size: 16px; color: var(--bone); opacity: .85; text-align: center; max-width: 340px; }
.who-line { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .25); border: 2px solid var(--brass-dark); border-radius: 999px; padding: 4px 16px 4px 4px; cursor: pointer; }
.who-line span { text-align: left; }
.who-line b { font-family: var(--display); font-size: 20px; font-weight: 400; }
.who-line small { display: block; font-size: 13px; opacity: .8; }
.play-big { min-width: min(86vw, 330px); min-height: 76px; font-size: 36px; border-radius: 16px; flex-direction: column; gap: 4px; }
.play-big small { display: block; font-family: "CCAtk"; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(86vw, 330px); }
.home-grid .plate { min-height: 56px; font-size: 21px; padding: 6px 10px; flex-direction: column; gap: 2px; }
.home-grid .plate small { font-family: "CCAtk"; font-size: 12px; font-weight: 700; opacity: .75; }
.pieces-peek { font-family: var(--emoji); font-size: 26px; letter-spacing: 4px; text-align: center; }

.hublink { color: var(--candle); font-weight: 700; text-underline-offset: 4px; }
.brandline { display: block; margin: 6px 0 4px; opacity: .9; }
.brandline img { display: block; height: 30px; width: auto; }
.hosthead { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .25); overflow: hidden; }
.hosthead svg { width: 38px; height: 56px; }

/* ---------- Floppy (v2.2) ---------- */
.floppy-row { display: flex; align-items: center; gap: 8px; width: min(92vw, 380px); padding: 0; border: 0; background: none; color: var(--bone); cursor: pointer; text-align: left; }
.floppy-row .fimg { flex: none; width: 86px; height: 92px; display: grid; place-items: end center; transform-origin: 50% 100%; }
.floppy-row .fimg img { max-width: 86px; max-height: 92px; width: auto; height: auto; display: block; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.floppy-row .fimg.talk { animation: talk .5s ease 2; }
.floppy-row .fsay { position: relative; flex: 1; padding: 8px 12px; background: var(--bone); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px 14px 14px 3px; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.floppy-row .fsay b { display: block; font-size: 16px; line-height: 1.25; }
.floppy-row .fsay small { display: block; font-size: 12px; font-weight: 700; opacity: .65; margin-top: 2px; }
.has-crew .floppy-row .fimg { width: 70px; height: 76px; } .has-crew .floppy-row .fimg img { max-width: 70px; max-height: 76px; }
@media (max-height: 700px) { .has-crew .floppy-row { display: none; } .floppy-row .fimg { width: 64px; height: 70px; } .floppy-row .fimg img { max-width: 64px; max-height: 70px; } }
.host { cursor: pointer; }
.host img.floppy { width: 58px; height: 66px; object-fit: contain; object-position: 50% 100%; display: block; transform-origin: 50% 100%; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.host.talk img.floppy { animation: talk .5s ease 2; }
.hud .host { width: 58px; }
.hud .host .bubble { left: 62px; }
.cardhost { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0; }
.cardhost .floppy { width: auto; height: 96px; max-width: 120px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.cardhost .floppy.talk { animation: talk .5s ease 2; }
.cardsay { max-width: 190px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 12px 12px 12px 3px; background: var(--bone); color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.25; text-align: left; opacity: 0; transition: opacity .2s; }
.cardsay.on { opacity: 1; }
.card .kidcheer .cardhost { margin: 0; }
/* Floppy's bubble already shows the words of every line he says, so the gear's caption strip would say it twice */
.rui-caption { display: none !important; }

/* ---------- held sideways on a phone ---------- */
.turn { position: fixed; inset: 0; z-index: 99; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--night); }
.turn-box { text-align: center; max-width: 360px; }
.turn-box p { font-size: 20px; margin: 10px 0 16px; }
.turn-phone { width: 84px; height: 84px; color: var(--bone); animation: tilt 2.2s ease-in-out infinite; }
@keyframes tilt { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }

/* ---------- top bar ---------- */
.bar { width: 100%; max-width: 620px; display: flex; align-items: center; gap: 10px; padding: 10px 64px 4px 0; min-height: 60px; }
.bar h1 { flex: 1; font-size: 26px; line-height: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar h1 small { display: block; font-family: "CCAtk"; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.back { min-width: 48px; padding: 6px 12px; }

/* ---------- the board's header: Creaky, goals, moves ---------- */
.hud { width: 100%; max-width: 620px; display: flex; align-items: stretch; gap: 8px; padding: 4px 0 8px; }
.host { position: relative; flex: none; width: 46px; display: flex; align-items: flex-end; }
.host .creaky { width: 46px; height: 69px; display: block; transform-origin: 50% 100%; }
.host.talk .creaky { animation: talk .5s ease 2; }
@keyframes talk { 30% { transform: rotate(-6deg) scale(1.05); } 70% { transform: rotate(5deg); } }
.bubble { position: absolute; left: 52px; top: 2px; z-index: 20; width: max-content; max-width: min(240px, 62vw); padding: 7px 11px; border: 2px solid var(--ink); border-radius: 12px 12px 12px 2px;
  background: var(--bone); color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.25; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.bubble.on { opacity: 1; transform: none; }
.goals { flex: 1; display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.goal { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 4px;
  background: rgba(0, 0, 0, .3); border: 2px solid var(--brass-dark); border-radius: 12px; }
.goal .gi { font-family: var(--emoji); font-size: 24px; line-height: 1; height: 28px; display: grid; place-items: center; }
.goal .gi svg { width: 28px; height: 28px; }
.goal .gn { font-family: var(--display); font-size: 22px; line-height: 1; }
.goal.done { border-color: var(--moss); }
.goal.done .gn { color: var(--moss); }
.goal.bump { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(1.12); } }
.goal.score .gn { font-size: 20px; }
.moves { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 50%, var(--brass-dark)); border: 3px solid var(--ink); border-radius: 12px; color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.moves small { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.moves b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: .95; }
.moves.low b { color: #9E1F14; animation: bump .5s ease infinite; }
.meter { width: 100%; max-width: 620px; height: 12px; margin: 0 0 6px; position: relative; background: rgba(0, 0, 0, .35); border: 2px solid var(--ink); border-radius: 999px; overflow: visible; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--candle), #FFE27A); transition: width .3s ease; }
.meter .mk { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.meter .mk svg { width: 22px; height: 22px; display: block; }

/* ---------- the coffin board ---------- */
.stage-wrap { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
#stage { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage .frame { position: absolute; left: 0; top: 0; display: block; }
.cells, .tiles, .webl, .fx, .marks { position: absolute; inset: 0; }
.tiles { z-index: 2; }
.webl { z-index: 3; pointer-events: none; }
.marks { z-index: 4; pointer-events: none; }
.fx { z-index: 6; pointer-events: none; overflow: visible; }
.cell { position: absolute; width: var(--s); height: var(--s); border-radius: 24%;
  background: radial-gradient(ellipse 70% 62% at 50% 42%, var(--satin-light) 0%, var(--satin) 60%, var(--satin-dark) 100%);
  box-shadow: inset 0 -3px 4px rgba(0, 0, 0, .38), inset 0 2px 2px rgba(255, 255, 255, .08); }
.cell::after { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--brass-light), var(--brass-dark)); box-shadow: 0 1px 1px rgba(0, 0, 0, .5); }
.tile { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); display: grid; place-items: center;
  font-family: var(--emoji); font-size: calc(var(--s) * .64); line-height: 1; cursor: pointer;
  transition: transform var(--t, 160ms) cubic-bezier(.3, .8, .4, 1.1); will-change: transform; }
.tile > .e { display: block; filter: drop-shadow(0 0 1.5px rgba(255, 244, 220, .95)) drop-shadow(0 0 3px rgba(255, 244, 220, .45)) drop-shadow(0 2px 1px rgba(0, 0, 0, .55)); transition: transform .12s; }
.tile svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tile svg.stone, .tile svg.lantern { inset: 4%; width: 92%; height: 92%; }
.tile.sel { z-index: 5; }
.tile.sel > .e { transform: scale(1.14); }
.tile.sel::before { content: ""; position: absolute; inset: 4%; border-radius: 26%; border: 3px solid var(--candle);
  box-shadow: 0 0 12px var(--candle), inset 0 0 10px rgba(242, 163, 58, .5); animation: glow 1s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 20px var(--candle), inset 0 0 14px rgba(242, 163, 58, .7); } }
.tile.hint > .e, .tile.hint > svg { animation: wiggle .7s ease-in-out 3; }
@keyframes wiggle { 20% { transform: rotate(-12deg) scale(1.08); } 50% { transform: rotate(10deg) scale(1.08); } 80% { transform: rotate(-4deg); } }
.tile.pop { animation: pop .24s ease-in forwards; }
@keyframes pop { 35% { transform: var(--xy) scale(1.3); filter: brightness(1.6); } 100% { transform: var(--xy) scale(0); opacity: 0; } }
.tile.born > * { animation: born .36s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes born { from { transform: scale(.2) rotate(-30deg); } }
.tile.shake > * { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-14%); } 75% { transform: translateX(14%); } }
.tile.crack > svg { animation: crack .3s; }
@keyframes crack { 30% { transform: translateX(-6%) rotate(-4deg); } 60% { transform: translateX(6%) rotate(3deg); } }
.tile .sp .spin { transform-origin: 50px 52px; animation: spin 4s linear infinite; }
.tile .sp .spark { transform-origin: 90px 16px; animation: twinkle .6s ease-in-out infinite alternate; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { to { transform: scale(.7) rotate(20deg); } }
.tile .sp.bat .wl { transform-origin: 30px 46px; animation: flapL .5s ease-in-out infinite alternate; }
.tile .sp.bat .wr { animation: flapR .5s ease-in-out infinite alternate; }
@keyframes flapL { to { transform: rotate(14deg); } }
@keyframes flapR { to { transform: translate(100px, 0) scale(-1, 1) rotate(14deg); } }
.tile .lantern .glow { animation: lanternglow 1.4s ease-in-out infinite alternate; transform-origin: 50px 56px; }
@keyframes lanternglow { to { opacity: .55; transform: scale(1.08); } }
.webc { position: absolute; width: var(--s); height: var(--s); }
.webc svg { width: 100%; height: 100%; display: block; }
.webc.tear { animation: tear .3s ease forwards; }
@keyframes tear { to { transform: scale(1.4) rotate(12deg); opacity: 0; } }
.cursor { position: absolute; width: var(--s); height: var(--s); border: 3px dashed var(--bone); border-radius: 24%; }

/* effects */
.fx .streak { position: absolute; border-radius: 999px; background: linear-gradient(90deg, transparent, #FFF3C4 20%, var(--candle) 50%, #FFF3C4 80%, transparent);
  box-shadow: 0 0 18px var(--candle); }
.fx .streak.v { background: linear-gradient(180deg, transparent, #FFF3C4 20%, var(--candle) 50%, #FFF3C4 80%, transparent); }
.fx .ring { position: absolute; border-radius: 50%; border: 6px solid var(--candle); box-shadow: 0 0 24px var(--candle), inset 0 0 24px #FFE27A; }
.fx .flyer { position: absolute; font-family: var(--emoji); line-height: 1; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .6)); }
.fx .ray { position: absolute; height: 6px; transform-origin: 0 50%; border-radius: 6px; background: linear-gradient(90deg, #FFF3C4, var(--candle)); box-shadow: 0 0 12px var(--candle); }
.fx .bolt { position: absolute; height: 10px; background: #FFF6C8; box-shadow: 0 0 16px #FFE27A, 0 0 34px #8FD3FF; clip-path: polygon(0 50%, 8% 0, 18% 70%, 30% 10%, 42% 80%, 55% 5%, 66% 75%, 78% 15%, 90% 85%, 100% 50%, 90% 100%, 78% 45%, 66% 100%, 55% 40%, 42% 100%, 30% 45%, 18% 100%, 8% 40%); }
.fx .gain { position: absolute; font-family: var(--display); font-size: 24px; color: #FFF3C4; -webkit-text-stroke: 1px var(--ink); text-shadow: 0 2px 0 var(--ink); white-space: nowrap; transform: translate(-50%, -50%); }
.fx .word { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-family: var(--display); font-size: clamp(40px, 13vw, 64px); line-height: 1;
  color: var(--candle); -webkit-text-stroke: 2px var(--ink); text-shadow: 0 4px 0 var(--ink), 0 0 24px rgba(242, 163, 58, .6); white-space: nowrap; }
.fx .spade { position: absolute; }
.fx .spade svg { width: 100%; height: 100%; }

/* the lid */
.lid { position: absolute; inset: 0; z-index: 8; transform-origin: 50% 0; transition: transform .7s cubic-bezier(.5, -0.3, .4, 1), opacity .5s; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .6)); }
.lid.off { transform: translateY(-112%) rotate(-7deg); opacity: 0; pointer-events: none; }
.lid.slam { transition: transform .32s cubic-bezier(.6, 0, 1, 1), opacity .1s; }

/* ---------- tools ---------- */
.tools { width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 0 14px; }
.tool { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 3px solid var(--ink); border-radius: 14px; cursor: pointer; padding: 2px;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 50%, var(--brass-dark)); box-shadow: 0 4px 0 var(--ink); color: var(--ink); }
.tool:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tool .toolic { width: 34px; height: 34px; }
.tool b { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.tool .n { position: absolute; top: -9px; right: -7px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--bone); font-family: var(--display); font-size: 17px; line-height: 20px; text-align: center; }
.tool.none { opacity: .5; }
.tool.armed { background: linear-gradient(180deg, #FFE7B0, var(--candle) 50%, #C9711A); animation: glow 1s ease-in-out infinite; }
.toolsay { min-height: 22px; text-align: center; font-weight: 700; font-size: 15px; color: var(--candle); }

/* ---------- cards (level start, win, out of moves) ---------- */
.card-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 3, 2, .55); }
.card { width: min(94vw, 400px); max-height: 92vh; overflow: auto; text-align: center; padding: 18px 18px 20px; border: 4px solid var(--ink); border-radius: 20px;
  background: linear-gradient(180deg, var(--night2), var(--night)); box-shadow: 0 0 0 3px var(--brass), 0 20px 50px rgba(0, 0, 0, .6); }
.card h2 { font-size: 40px; line-height: 1; color: var(--candle); text-shadow: 0 3px 0 var(--ink); }
.card .sub { font-family: "CCAtk"; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
.card p { margin: 8px 0; }
.card .goals-big { display: flex; justify-content: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.card .goals-big .goal { flex: 0 0 auto; min-width: 74px; padding: 8px; }
.card .row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.card .stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.card .stars svg { width: 54px; height: 54px; }
.card .stars svg:nth-child(2) { transform: translateY(-10px); width: 62px; height: 62px; }
.card .stars svg.on { animation: starpop .45s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.card .stars svg.on:nth-child(2) { animation-delay: .25s; } .card .stars svg.on:nth-child(3) { animation-delay: .5s; }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } }
.card .big-score { font-family: var(--display); font-size: 44px; line-height: 1; }
.card .earned { display: flex; justify-content: center; gap: 10px; margin: 8px 0; }
.card .earned span { display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--brass); color: var(--ink); font-weight: 700; border: 2px solid var(--ink); }
.card .earned .toolic { width: 28px; height: 28px; }
.card .tip { font-size: 15px; opacity: .9; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 8px 10px; }
.card .kidcheer { display: flex; justify-content: center; margin: 6px 0; }
.card .kidcheer .kid { animation: hop .6s ease-in-out infinite alternate; }
@keyframes hop { to { transform: translateY(-8px) rotate(4deg); } }
.card .creaky { width: 54px; height: 81px; }

/* ---------- levels ---------- */
.nights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; max-width: 520px; margin: 4px 0 10px; }
.nights button { min-height: 52px; border: 2px solid var(--brass-dark); border-radius: 12px; background: rgba(0, 0, 0, .3); color: var(--bone); cursor: pointer; padding: 4px; line-height: 1.1; }
.nights button b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; }
.nights button small { font-size: 12px; opacity: .8; }
.nights button.on { background: var(--brass); color: var(--ink); border-color: var(--ink); }
.night-say { margin: 0 0 8px; opacity: .85; }
.lvgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 420px; }
.lv { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; cursor: pointer; background: none; color: var(--ink); }
.lv svg.lvc { position: absolute; inset: 0; width: 100%; height: 100%; }
.lv .num { position: absolute; left: 0; right: 0; top: 30%; font-family: var(--display); font-size: 36px; line-height: 1; color: var(--bone); text-shadow: 0 3px 0 var(--ink); }
.lv .nm { position: absolute; left: 6%; right: 6%; top: 58%; font-size: 12px; font-weight: 700; line-height: 1.1; color: var(--bone); opacity: .85; }
.lv .st { position: absolute; left: 0; right: 0; bottom: 4%; display: flex; justify-content: center; gap: 1px; }
.lv .st svg { width: 20px; height: 20px; }
.lv.lock { cursor: default; opacity: .45; }
.lv.next .num { color: var(--candle); }
.lv.next::after { content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 3px solid var(--candle); box-shadow: 0 0 14px var(--candle); animation: glow 1.2s ease-in-out infinite; pointer-events: none; }
.lv .kidspot { position: absolute; right: -10px; top: -12px; }
.levels-foot { margin: 14px 0 20px; text-align: center; opacity: .85; font-size: 15px; }

/* ---------- picker sheet ---------- */
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 60; overflow: auto; background: linear-gradient(180deg, var(--night2), var(--night)); padding: 0 12px 30px; }
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 64px 8px 0; background: var(--night2); }
.sheet-top h2 { font-size: 30px; }
.sheet-body { max-width: 560px; margin: 0 auto; }
.seg.two { grid-template-columns: repeat(2, 1fr); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 560px; margin: 0 auto 8px; }
.seg button { min-height: 46px; border: 2px solid var(--brass-dark); border-radius: 12px; background: rgba(0, 0, 0, .3); font-family: var(--display); font-size: 20px; cursor: pointer; }
.seg button.on { background: var(--brass); color: var(--ink); border-color: var(--ink); }
.say { margin: 6px 0 10px; opacity: .9; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.slot { aspect-ratio: 1; border: 3px solid var(--brass-dark); border-radius: 16px; cursor: pointer; font-family: var(--emoji); font-size: clamp(28px, 9vw, 40px);
  background: radial-gradient(ellipse at 50% 40%, var(--satin-light), var(--satin) 60%, var(--satin-dark)); display: grid; place-items: center; }
.slot.on { border-color: var(--candle); box-shadow: 0 0 0 3px var(--ink), 0 0 16px var(--candle); }
.slot.dup { border-color: #FF6A5A; }
.warn { color: #FFB3A8; font-weight: 700; margin: 6px 0 0; }
.sheet h3 { font-size: 22px; margin: 14px 0 6px; color: var(--candle); }
.sets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.set { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border: 2px solid var(--brass-dark); border-radius: 12px; background: rgba(0, 0, 0, .3); cursor: pointer; }
.set .e { font-size: 22px; letter-spacing: 2px; }
.set b { font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { min-height: 38px; padding: 4px 12px; border: 2px solid var(--brass-dark); border-radius: 999px; background: rgba(0, 0, 0, .3); cursor: pointer; font-weight: 700; font-size: 15px; }
.chip.on { background: var(--brass); color: var(--ink); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.em { aspect-ratio: 1; min-height: 46px; border: 2px solid transparent; border-radius: 12px; background: rgba(0, 0, 0, .25); font-family: var(--emoji); font-size: 28px; cursor: pointer; padding: 0; }
.em:active { transform: scale(.92); }
.em.used { border-color: var(--candle); background: rgba(242, 163, 58, .2); }
.own { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.own label { font-weight: 700; }
.own input { flex: 1; min-width: 160px; min-height: 46px; border-radius: 12px; border: 2px solid var(--brass); background: #FFFDF6; color: var(--ink); font-size: 22px; padding: 4px 10px; }
.coffins, .crew { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.coffin, .kidpick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border: 3px solid var(--brass-dark); border-radius: 16px; background: rgba(0, 0, 0, .3); cursor: pointer; }
.coffin b, .kidpick b { font-family: var(--display); font-weight: 400; font-size: 21px; }
.coffin small, .kidpick small { font-size: 13px; opacity: .85; text-align: center; }
.coffin.on, .kidpick.on { border-color: var(--candle); box-shadow: 0 0 14px var(--candle); }

/* ---------- paper ---------- */
.paper-top { width: 100%; max-width: 620px; }
.paper-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; margin: 6px 0 10px; }
.paper-btns .wide { grid-column: 1 / -1; min-height: 60px; font-size: 26px; }
.packno { font-family: var(--display); font-size: 22px; }
.strip { width: 100%; max-width: 980px; display: flex; gap: 14px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; }
.thumb { flex: 0 0 auto; width: calc(7.2in * .34); height: calc(9.8in * .34); overflow: hidden; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); scroll-snap-align: start; background: #fff; }
.thumb > .page { transform: scale(.34); transform-origin: 0 0; }
.thumb { padding: 0; } .thumb > .page { box-sizing: content-box; }

/* ---------- printed pages ---------- */
/* printed pages: 7.2 x 9.8 in fits inside the printable area of Letter and A4 with normal margins, in every browser */
.page { width: 7.2in; height: 9.8in; padding: 0 0 .9in; position: relative; overflow: hidden; background: #fff; color: #111; font: 16px/1.35 "CCAtk", sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.page h1 { color: #111; }
.pname { font-size: 15px; display: flex; gap: 8px; align-items: flex-end; } .pname span { flex: 0 0 3in; border-bottom: 2px solid #111; height: 22px; }
.ptitle { font-family: var(--display); font-size: 40px; line-height: 1; margin: 8px 0 2px; }
.psay { font-size: 17px; margin: 4px 0 12px; }
.pfour { display: grid; grid-template-columns: 1fr 1fr; gap: .22in .3in; }
.pcell { position: relative; }
.pcell.wide { grid-column: 1 / -1; }
.pletter { position: absolute; left: -2px; top: -4px; font-family: var(--display); font-size: 26px; }
.pboard { display: grid; grid-template-columns: repeat(6, .5in); grid-template-rows: repeat(6, .5in); margin: 0 auto; width: 3in; border: 2.5px solid #111; border-radius: 8px; }
.pboard .pc { position: relative; display: grid; place-items: center; font-family: var(--emoji); font-size: .3in; border-right: 1px solid #bbb; border-bottom: 1px solid #bbb; }
.pboard .pc:nth-child(6n) { border-right: 0; } .pboard .pc:nth-last-child(-n+6) { border-bottom: 0; }
.pboard .pc.hit::after { content: ""; position: absolute; inset: 2px; border: 3px solid #111; border-radius: 50%; }
.pboard .pc.broom { background: #F3E2B8; }
.pboard .pc.broom .arrows { position: absolute; inset: 0; pointer-events: none; }
.pboard .pc.broom.h .arrows::before, .pboard .pc.broom.h .arrows::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.pboard .pc.broom.h .arrows::before { left: -2px; border-right-color: #111; } .pboard .pc.broom.h .arrows::after { right: -2px; border-left-color: #111; }
.pboard .pc.broom.v .arrows::before, .pboard .pc.broom.v .arrows::after { content: ""; position: absolute; left: 50%; width: 0; height: 0; margin-left: -6px; border: 6px solid transparent; }
.pboard .pc.broom.v .arrows::before { top: -2px; border-bottom-color: #111; } .pboard .pc.broom.v .arrows::after { bottom: -2px; border-top-color: #111; }
.pboard .pc.swept { background: #EFEFEF; }
.pboard.small { grid-template-columns: repeat(6, .21in); grid-template-rows: repeat(6, .21in); width: 1.26in; border-width: 1.5px; border-radius: 4px; }
.pboard.small .pc { font-size: .14in; }
.pboard.small .pc.hit::after { border-width: 2px; inset: 0; }
.pq { text-align: center; font-size: 18px; margin: 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pq .pe { font-family: var(--emoji); font-size: 26px; }
.pbox { display: inline-block; width: .55in; height: .45in; border: 2.5px solid #111; border-radius: 6px; }
.pfour.own .pboard .pc { font-size: 0; }
.pdraw { display: flex; gap: .25in; justify-content: center; } .pdraw span { width: .8in; height: .8in; border: 2.5px dashed #111; border-radius: 12px; }
.pfoot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; border-top: 3px solid #111; padding-top: 6px; }
.pfoot.kid .plabel { font-family: var(--display); font-size: 34px; line-height: 1; }
.pfoot.kid .pnum { font-family: var(--display); font-size: 34px; line-height: 1; }
.pfoot .plabel, .pfoot .pnum { white-space: nowrap; }
.pfoot.kid.long .plabel, .pfoot.kid.long .pnum { font-size: 27px; }
.pfoot.adult .plabel, .pfoot.adult .pnum { font-family: "CCAtk"; font-weight: 700; font-size: 22px; letter-spacing: .12em; text-transform: uppercase; }
.cover .ctitle { font-family: var(--display); font-size: 72px; text-align: center; margin-top: .2in; }
.cover .cbrand { display: block; width: 2.2in; margin: .35in auto 0; }
.cover .csub { text-align: center; font-size: 24px; font-weight: 700; margin: 0 0 .2in; }
.plegend { display: flex; justify-content: center; gap: .2in; font-family: var(--emoji); font-size: .5in; margin: .1in 0 .3in; }
.who { width: 100%; border-collapse: collapse; font-size: 17px; }
.who th, .who td { border: 2px solid #111; padding: 10px; text-align: left; vertical-align: top; }
.who th { background: #eee; }
.cnote { margin-top: .3in; font-size: 16px; }
.blank p { text-align: center; margin-top: 3.6in; color: #555; }
.atitle { font-family: "CCAtk"; font-weight: 700; font-size: 28px; margin: 0 0 4px; }
.ah2 { font-family: "CCAtk"; font-weight: 700; font-size: 22px; margin: 16px 0 2px; }
.asay { margin: 2px 0 10px; }
.pkey { display: grid; grid-template-columns: repeat(4, 1fr); gap: .16in .12in; }
.pkey .krow { grid-column: 1 / -1; font-weight: 700; font-size: 15px; margin: 6px 0 -6px; border-bottom: 1.5px solid #111; }
.pk { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pk b { font-weight: 700; } .pk small { font-size: 12px; line-height: 1.2; text-align: center; }
.alist { margin: 6px 0; padding-left: 22px; } .alist li { margin: 4px 0; }
.alog { width: 100%; border-collapse: collapse; font-size: 14px; }
.alog th, .alog td { border: 1.5px solid #111; padding: 4px 6px; text-align: left; } .alog td { height: .34in; }
#printRoot { display: none; }
@page { margin: .5in; }
@media print {
  html, body { background: #fff !important; }
  body > *:not(#printRoot) { display: none !important; }
  #printRoot { display: block; }
  .page { break-after: page; page-break-after: always; box-shadow: none; }
}

/* ---------- toast and pop-ups ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: min(92vw, 440px); text-align: center;
  background: var(--bone); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 16px; font-weight: 700; box-shadow: 0 6px 0 rgba(0, 0, 0, .4); }
.toast.bad { background: #FFD9D2; }
.modal { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(5, 3, 2, .6); }
.modal .box { width: min(92vw, 380px); background: var(--night2); border: 4px solid var(--ink); box-shadow: 0 0 0 3px var(--brass); border-radius: 18px; padding: 18px; text-align: center; }
.modal p { margin: 0 0 14px; font-size: 18px; }
.modal .two { display: flex; gap: 10px; justify-content: center; }
.modal input { width: 100%; min-height: 46px; margin-bottom: 12px; border-radius: 10px; border: 2px solid var(--brass); padding: 6px 10px; font-size: 18px; }

@media (min-width: 760px) {
  .home .logo { width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .sky .fog { animation: none; }
}
