/* Turkey TD. The look is docs/BUILD_PLAN.md "Art style": a bright, sunlit palette, chunky rounded buttons with thick
   dark outlines, and a big rounded display font in white with a black outline. */
/* Two free fonts, served from public/fonts/ so a map makes no network calls: Luckiest Guy (Apache 2.0) for the logo,
   buttons, numbers and headings, and Lilita One (Open Font License) for the few full sentences. */
@font-face { font-family: "Luckiest Guy"; src: url("./fonts/LuckiestGuy.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("./fonts/LilitaOne.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
:root {
  --ink: #2b2b3a; --grass: #7cc242; --gold: #f6c33b; --gold-dark: #c98d1c; --cranberry: #d7263d; --pumpkin: #f58a1f;
  --blue: #3d9be9; --cream: #fff1d0; --wood: #a5692f; --wood-dark: #6b4220; --bg: #226c26;
  --font: "Luckiest Guy", "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --text: "Lilita One", "Luckiest Guy", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --outline: -2px -2px 0 #1b1b26, 2px -2px 0 #1b1b26, -2px 2px 0 #1b1b26, 2px 2px 0 #1b1b26, 0 -2px 0 #1b1b26, 0 2px 0 #1b1b26, -2px 0 0 #1b1b26, 2px 0 0 #1b1b26, 0 4px 0 rgba(0, 0, 0, 0.35);
}
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--font); font-weight: 900; color: #fff; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; text-shadow: var(--outline); letter-spacing: 0.02em; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; text-shadow: inherit; letter-spacing: inherit; margin: 0; padding: 0; border: 0; background: none; touch-action: manipulation; }

/* Landscape first: in portrait a picture asks the player to turn the phone (no words, per the spec's text rules). */
#rotate { display: none; position: fixed; inset: 0; background: var(--bg); align-items: center; justify-content: center; z-index: 10; }
#rotate .phone { width: 64px; height: 108px; border: 6px solid #fff; border-radius: 14px; animation: turn 1.6s ease-in-out infinite; }
@keyframes turn { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (max-width: 900px) { #rotate { display: flex; } }

/* Chunky buttons: thick dark outline, a lighter top, a darker lip underneath. */
.btn { pointer-events: auto; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 3px solid #1b1b26; border-radius: 16px; background: linear-gradient(#ffd75e, var(--gold) 55%, var(--gold-dark)); box-shadow: 0 5px 0 #1b1b26, inset 0 3px 0 rgba(255, 255, 255, 0.55); color: #fff; font-size: 20px; line-height: 1; transition: transform 0.06s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1b1b26, inset 0 3px 0 rgba(255, 255, 255, 0.4); }
.btn.go { background: linear-gradient(#b6f05a, #6fcf2e 55%, #3f9c1c); padding: 12px 26px; font-size: 30px; border-radius: 20px; }
.btn.go.big { font-size: 44px; padding: 16px 54px; border-radius: 26px; }
.btn.plain { background: linear-gradient(#7fc4ff, var(--blue) 55%, #236fb8); padding: 12px 22px; font-size: 24px; }
.btn.round { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(#7fc4ff, var(--blue) 55%, #236fb8); font-size: 20px; }
.btn.speed.on { background: linear-gradient(#ffb36b, var(--pumpkin) 55%, #c05f0c); }
.btn.pause i { display: block; width: 6px; height: 18px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 2px #1b1b26; }
.ico { text-shadow: none; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)); }
.coin { display: inline-block; width: 0.95em; height: 0.95em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3a8 0 18%, var(--gold) 19% 62%, var(--gold-dark) 63%); border: 2.5px solid #1b1b26; box-shadow: inset 0 0 0 2px #ffe27a; vertical-align: -0.12em; flex: none; }

/* HUD */
.hud > * { position: absolute; display: flex; align-items: center; gap: 10px; }
.tl { top: calc(10px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); }
.tr { top: calc(10px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
.tc { top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); flex-direction: column; gap: 8px; }
.tools { top: calc(60px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); flex-direction: column; gap: 8px; }
/* The next wave, under the wave count while the game waits for it: who is coming, over a bar that fills as the wait runs out. */
/* The countdown to the next wave, in the middle of the screen: its number, who is coming and a bar that fills. */
.gaptrack { width: min(46vw, 250px); height: 11px; margin-top: 4px; border: 3px solid #1b1b26; border-radius: 8px; background: rgba(27, 27, 38, 0.62); overflow: hidden; }
.gapbar { display: block; height: 100%; width: 0; background: var(--gold); }
.banner.wave { flex-direction: column; gap: 2px; }
.banner .sub { font-size: 0.5em; color: #ffe27a; }
.pointer { position: absolute; width: 62px; transform: translate(-50%, -100%); transform-origin: 50% 100%; pointer-events: none; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.3)); }
/* The note under the dishes counter on the first map: its right edge lines up with the counter's, and a notch points up at it. */
.dishtip { position: absolute; transform: translateX(-100%); display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 7px 14px 8px; border: 3px solid #1b1b26; border-radius: 16px; background: rgba(27, 27, 38, 0.86); color: #fff; font-size: 17px; white-space: nowrap; pointer-events: none; animation: tipin 0.2s ease-out; }
.dishtip b { color: var(--gold); font-size: 21px; font-weight: normal; } .dishtip[hidden] { display: none; }
.dishtip::before { content: ''; position: absolute; right: 34px; top: -11px; border: 9px solid transparent; border-top: 0; border-bottom: 10px solid #1b1b26; }
@keyframes tipin { from { opacity: 0; margin-top: -8px; } to { opacity: 1; margin-top: 0; } }
.pointer[hidden] { display: none; } .pointer svg { display: block; width: 100%; animation: pointbob 0.38s ease-in-out infinite alternate; }
@keyframes pointbob { from { transform: translateY(-20px); } to { transform: translateY(0); } }
.banner .lineup { display: flex; gap: 0.5em; font-size: 0.55em; padding: 0.12em 0.6em; border: 3px solid #1b1b26; border-radius: 16px; background: rgba(27, 27, 38, 0.62); } .banner .lineup > span { display: flex; align-items: center; gap: 0.12em; }
.pill { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 10px; border: 3px solid #1b1b26; border-radius: 999px; background: rgba(27, 27, 38, 0.62); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); font-size: 26px; }
/* The dishes and gold readouts are kept short: height is scarce on a phone held sideways. */
.pill.gold { font-size: 34px; padding: 1px 20px 1px 10px; line-height: 1.08; color: #ffe27a; }
.pill.gold .coin { width: 1.05em; height: 1.05em; }
.pill.bump { animation: bump 0.3s; } .shake { animation: shake 0.3s; }
@keyframes bump { 40% { transform: scale(1.18); } }
@keyframes shake { 20% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 80% { transform: translateX(-4px); } }
.flag { width: 18px; height: 22px; border-left: 4px solid #fff; background: linear-gradient(var(--cranberry), var(--cranberry)) no-repeat 0 0 / 14px 12px; filter: drop-shadow(0 0 0 #1b1b26) drop-shadow(1.5px 1.5px 0 #1b1b26) drop-shadow(-1.5px -1.5px 0 #1b1b26); }
.feast { display: grid; grid-template-columns: repeat(10, 16px); gap: 4px; padding: 7px 12px; border: 3px solid #1b1b26; border-radius: 16px; background: rgba(27, 27, 38, 0.62); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.feast i { width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box; border: 2px solid #1b1b26; background: radial-gradient(circle, var(--cream) 0 28%, var(--pumpkin) 30%); transition: transform 0.2s, background 0.2s; }
.feast i:nth-child(3n) { background: radial-gradient(circle, #ff8fa3 0 28%, var(--cranberry) 30%); }
.feast i:nth-child(4n + 1) { background: radial-gradient(circle, #fff 0 28%, #ffd84a 30%); }
.feast i.eaten { background: #4a4860; transform: scale(0.6); }
.boss { display: flex; align-items: center; gap: 8px; font-size: 30px; }
.boss .bar { width: min(46vw, 420px); height: 22px; border: 3px solid #1b1b26; border-radius: 12px; background: #3a1a5a; overflow: hidden; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.boss .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(#ff7a6b, var(--cranberry)); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45); transition: width 0.15s; }
.preview { display: flex; gap: 10px; padding: 6px 12px; border: 3px solid #1b1b26; border-radius: 14px; background: rgba(27, 27, 38, 0.62); font-size: 22px; }
.preview > span { display: flex; align-items: center; gap: 3px; } .preview .ico { font-size: 26px; }

/* The ring of towers around a pad, and Upgrade and Sell beside a tower. Both sit on a zero-size anchor. */
.ring, .menu { position: absolute; width: 0; height: 0; }
.pick { position: absolute; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; flex-direction: column; gap: 0; background: linear-gradient(#8a88a6, #4a4860 55%, #34334a); border-color: var(--gold); box-shadow: 0 0 0 3px #1b1b26, 0 6px 0 #1b1b26, inset 0 3px 0 rgba(255, 255, 255, 0.3); font-size: 15px; animation: popin 0.16s backwards; }
.pick .ico { font-size: 30px; line-height: 1.05; } .pick .cost, .act .cost { display: flex; align-items: center; gap: 3px; color: #ffe27a; }
.pick.poor, .act.poor { filter: grayscale(0.85) brightness(0.75); } .pick.poor .cost, .act.poor .cost { color: #ff8a8a; }
.pick.locked { border-color: #6d6b85; filter: brightness(0.7); font-size: 26px; }
@keyframes popin { from { transform: scale(0.2); opacity: 0; } }
.menu .act { position: absolute; top: -34px; width: 84px; height: 68px; flex-direction: column; gap: 0; font-size: 17px; animation: popin 0.16s backwards; }
.menu .act .ico { font-size: 28px; line-height: 1.05; }
.menu .up { left: 44px; background: linear-gradient(#b6f05a, #6fcf2e 55%, #3f9c1c); } .menu .up:only-of-type { left: 44px; }
.menu .sell { right: 44px; background: linear-gradient(#ff8f8f, var(--cranberry) 55%, #9c1830); }
.menu .lvl { position: absolute; left: 0; top: -78px; transform: translateX(-50%); white-space: nowrap; font-size: 22px; color: #ffe27a; }

/* Floating numbers and banners */
.pop { position: absolute; transform: translate(-50%, -50%); font-size: 22px; color: #ffe27a; animation: rise 0.8s ease-out forwards; white-space: nowrap; }
@keyframes rise { from { opacity: 1; margin-top: 0; } 70% { opacity: 1; } to { opacity: 0; margin-top: -46px; } }
.banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(0.4); opacity: 0; font-size: min(11vw, 76px); white-space: nowrap; transition: transform 0.18s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.18s; display: flex; align-items: center; gap: 14px; }
.banner.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.banner.danger { color: #ff3b3b; text-shadow: -3px -3px 0 #fff, 3px -3px 0 #fff, -3px 3px 0 #fff, 3px 3px 0 #fff, 0 -3px 0 #fff, 0 3px 0 #fff, -3px 0 0 #fff, 3px 0 0 #fff, 0 7px 0 rgba(0, 0, 0, 0.4); animation: throb 0.5s infinite alternate; }
.banner.good { color: #b6f05a; } .banner.wave { font-size: min(9vw, 60px); }
@keyframes throb { to { filter: brightness(1.25); } }

/* Title, end and pause screens */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: min(4vh, 22px); background: rgba(20, 50, 24, 0.45); pointer-events: auto; padding: 12px; box-sizing: border-box; }
.screen.show { display: flex; }
.logo { margin: 0; font-size: min(15vw, 22vh, 120px); line-height: 0.95; letter-spacing: 0.03em; text-shadow: -4px -4px 0 #1b1b26, 4px -4px 0 #1b1b26, -4px 4px 0 #1b1b26, 4px 4px 0 #1b1b26, 0 -4px 0 #1b1b26, 0 4px 0 #1b1b26, -4px 0 0 #1b1b26, 4px 0 0 #1b1b26, 0 10px 0 rgba(0, 0, 0, 0.35); font-weight: 900; }
.logo em { font-style: normal; color: #ff3b3b; }
.maps { display: flex; gap: 14px; }
.btn.map { flex-direction: column; gap: 2px; width: min(26vw, 150px); padding: 10px 6px; background: linear-gradient(#c98a4a, var(--wood) 55%, var(--wood-dark)); font-size: min(4.4vw, 20px); }
.btn.map .ico { font-size: min(9vw, 40px); } .btn.map .stars { color: #ffe27a; font-size: min(5vw, 22px); }
.btn.map.locked { filter: grayscale(0.7) brightness(0.72); }
.card { display: flex; flex-direction: column; align-items: center; gap: min(3vh, 16px); padding: 18px 30px 16px; border: 4px solid #1b1b26; border-radius: 26px; background: linear-gradient(#c98a4a, var(--wood) 30%, var(--wood-dark)); box-shadow: 0 8px 0 #1b1b26, inset 0 4px 0 rgba(255, 255, 255, 0.35); }
.card h2 { margin: 0; font-size: min(9vw, 52px); } .card h2.good { color: #b6f05a; } .card h2.danger { color: #ff6b6b; }
.bigstars { font-size: min(14vw, 72px); line-height: 1; color: #4a4860; } .bigstars .on { color: var(--gold); }
.row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.coming { margin: 4px 0 0; font-size: 17px; text-align: center; }
.more { font-family: var(--text); font-size: 16px; color: #fff; text-decoration: none; padding: 2px 12px; border-radius: 999px; background: rgba(27, 27, 38, 0.5); } .more b { color: var(--gold); text-decoration: underline; }
@media (max-height: 420px) { .more { font-size: 13px; padding: 1px 10px; } }
.discord { pointer-events: auto; color: #cfe4ff; font-size: 19px; text-decoration: underline; }
@media (max-height: 420px) {
  .btn.round { width: 44px; height: 44px; } .pill { font-size: 22px; } .pill.gold { font-size: 28px; } .btn.go { font-size: 26px; padding: 10px 22px; }
  .feast { grid-template-columns: repeat(10, 13px); gap: 3px; padding: 5px 9px; } .feast i { width: 13px; height: 13px; }
  .card { padding: 10px 24px; gap: 8px; } .bigstars { font-size: 50px; } .card h2 { font-size: 36px; }
}

/* The Gobblewock: a dimmed screen for its warning, its speech bubble, and markers for turkeys out of view. */
.dim { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(30, 0, 44, 0.15) 25%, rgba(24, 0, 36, 0.78)); opacity: 0; transition: opacity 0.4s; }
.dim.show { opacity: 1; }
.bubble { position: absolute; transform: translate(-50%, -100%) scale(0); transform-origin: 50% 100%; transition: transform 0.16s cubic-bezier(0.2, 1.6, 0.4, 1); padding: 7px 16px 8px; border: 3px solid #1b1b26; border-radius: 20px; background: #fff; color: #5b2a86; text-shadow: none; font-size: 21px; white-space: nowrap; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.bubble.show { transform: translate(-50%, -100%) scale(1); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px; background: #fff; border: solid #1b1b26; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.mark { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; box-sizing: border-box; border: 3px solid var(--gold); border-radius: 50%; background: rgba(27, 27, 38, 0.82); box-shadow: 0 0 0 3px #1b1b26; display: flex; align-items: center; justify-content: center; font-size: 22px; animation: nudge 0.7s ease-in-out infinite alternate; }
.mark b { position: absolute; right: -9px; bottom: -9px; font-size: 17px; }
.mark::after { content: ""; position: absolute; border: 9px solid transparent; }
.mark.left::after { right: calc(100% + 4px); border-right-color: var(--gold); } .mark.right::after { left: calc(100% + 4px); border-left-color: var(--gold); }
.mark.top::after { bottom: calc(100% + 4px); border-bottom-color: var(--gold); } .mark.bottom::after { top: calc(100% + 4px); border-top-color: var(--gold); }
@keyframes nudge { to { filter: brightness(1.25); scale: 1.08; } }

/* The drawn icons (icons.js). Sized by font-size unless a rule below says otherwise. */
img.ico { height: 1.3em; width: 1.3em; object-fit: contain; vertical-align: middle; -webkit-user-drag: none; pointer-events: none; }
.pick img.ico { height: 46px; width: 46px; margin: -6px 0 -4px; } .act img.ico, .lvl img.ico { height: 34px; width: 34px; }
.preview img.ico { height: 36px; width: 36px; margin: -4px 0; } .mark img.ico { height: 36px; width: 36px; } .boss img.ico { height: 44px; width: 44px; margin: -8px 0; }
.banner img.ico { height: 1.5em; width: 1.5em; }
.btn.help { font-size: 26px; }

/* Expose intro: the unit on a turntable, its name, one short line and a big check button. */
.screen.intro, .screen.book { background: rgba(20, 30, 50, 0.6); }
.introcard { flex-direction: row; gap: min(4vw, 30px); padding: 16px 26px; }
.spot { width: min(52vh, 34vw, 280px); aspect-ratio: 1; border: 4px solid #1b1b26; border-radius: 50%; overflow: hidden; background: repeating-conic-gradient(from 0deg, #ffe27a 0 15deg, #ffd04a 15deg 30deg); box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.45), 0 6px 0 rgba(0, 0, 0, 0.3); }
.spot .turntable { width: 100%; height: 100%; display: block; }
.side { display: flex; flex-direction: column; align-items: center; gap: min(3vh, 14px); min-width: min(36vw, 260px); }
.side h2 { text-align: center; line-height: 1; } .card h2.warm { color: #ffe27a; }
.line { margin: 0; font-size: min(6vw, 30px); text-align: center; }
.btn.ok { font-size: 50px; padding: 8px 60px 12px; }
.grid { display: grid; grid-template-columns: repeat(5, auto); gap: 12px; }
.btn.unit { width: min(13vw, 76px); height: min(13vw, 76px); border-radius: 18px; background: linear-gradient(#8a88a6, #4a4860 55%, #34334a); border-color: var(--gold); font-size: 30px; }
.btn.unit img.ico { height: 86%; width: 86%; } .btn.unit.unseen { border-color: #6d6b85; filter: brightness(0.7); pointer-events: none; }
@media (max-height: 420px) { .btn.ok { font-size: 40px; padding: 4px 48px 8px; } .btn.unit { width: 60px; height: 60px; } .grid { gap: 8px; } }

/* Staging for scripts/capture-media.mjs (?shot=og, ?shot=icon): no HUD, a logo, or just the icon. */
body.shot .hud, body.shot .bubble, body.shot .marks, body.shot .dim, body.shot .banner, body.shot .pops, body.shot #rotate { display: none !important; }
.shotlogo { position: fixed; left: 0; right: 0; top: 3%; display: flex; flex-direction: column; align-items: center; gap: 1vh; pointer-events: none; text-shadow: var(--outline); }
.shotlogo .logo { font-size: 12.5vw; } .shotlogo p { margin: 0; font-size: 3.8vw; color: #ffe27a; }
.shoticon { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(from 0deg, #ffe27a 0 15deg, #ffc93a 15deg 30deg); }
.shoticon img { width: 90%; height: 90%; object-fit: contain; filter: drop-shadow(0 1.5vmin 0 rgba(0, 0, 0, 0.25)); }

/* Drawn icons in their other places. */
.btn.map img.ico { height: min(11vw, 54px); width: min(11vw, 54px); } .btn.sound img.ico { height: 30px; width: 30px; }
.pick.locked img.ico { height: 34px; width: 34px; margin: 0; }

/* Star rating: live beside the feast, popping in on the end screen, and the total on the title. */
.feastrow { display: flex; align-items: center; gap: 8px; }
.rating { display: flex; gap: 1px; padding: 1px 10px 3px; border: 3px solid #1b1b26; border-radius: 16px; background: rgba(27, 27, 38, 0.62); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); font-size: 28px; line-height: 1.1; color: #5a5872; }
.rating span { transition: color 0.3s, transform 0.3s; } .rating .on { color: var(--gold); } .rating span:not(.on) { transform: scale(0.8); }
.rating.drop { animation: shake 0.4s; }
.pill.total { font-size: 28px; padding: 4px 18px 6px 12px; color: #ffe27a; } .pill.total .star { color: var(--gold); font-size: 1.15em; }
.bigstars span { display: inline-block; } .bigstars .on { animation: starpop 0.45s backwards; }
.bigstars .on:nth-child(2) { animation-delay: 0.3s; } .bigstars .on:nth-child(3) { animation-delay: 0.6s; }
@keyframes starpop { from { transform: scale(0) rotate(-50deg); } 70% { transform: scale(1.3) rotate(8deg); } }
.scoreline { display: flex; align-items: center; gap: 22px; font-size: 28px; }
.saved, .goal { display: flex; align-items: center; gap: 6px; } .saved img.ico { height: 38px; width: 38px; }
.goal { font-size: 20px; color: #ffe27a; padding: 2px 12px; border-radius: 999px; background: rgba(27, 27, 38, 0.45); } .goal i { font-style: normal; color: var(--gold); } .goal img.ico { height: 24px; width: 24px; }
@media (max-height: 420px) { .rating { font-size: 22px; } .scoreline { font-size: 22px; } .saved img.ico { height: 30px; width: 30px; } .pill.total { font-size: 22px; } .screen.title { gap: 8px; } }
/* Narrow phones: the feast and the boss bar drop to a second row on the right, clear of the buttons. */
@media (max-width: 760px) { .tc { left: auto; right: calc(68px + env(safe-area-inset-right)); transform: none; top: calc(62px + env(safe-area-inset-top)); align-items: flex-end; } .boss .bar { width: min(40vw, 300px); } }

/* Support the game: a gold pill on the title screen and at the end of a map, and the box it opens. */
.btn.supportopen { gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px; border-color: var(--gold); background: rgba(27, 27, 38, 0.78); box-shadow: 0 0 0 3px #1b1b26, 0 5px 0 #1b1b26, 0 0 14px rgba(246, 195, 59, 0.5); color: #ffe27a; font-size: 18px; }
.btn.supportopen .coin { width: 22px; height: 22px; }
.row.links { align-items: center; gap: 18px; }
.screen.support { background: rgba(20, 30, 50, 0.66); z-index: 5; }
.supportcard { max-width: min(92vw, 560px); gap: min(2vh, 10px); text-align: center; }
.supportcard p { margin: 0; font-size: 18px; line-height: 1.3; } .supportcard .lead b { color: #ffe27a; }
.supportcard .status { color: #b6f05a; letter-spacing: 0.05em; text-transform: uppercase; }
.supportcard .address { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.supportcard code { max-width: 100%; padding: 4px 8px; border: 3px solid #1b1b26; border-radius: 10px; background: #1b1b26; color: #fff; font: 13px ui-monospace, Menlo, Consolas, monospace; text-shadow: none; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.btn.copy { font-size: 16px; padding: 6px 14px; } a.btn { text-decoration: none; }
.supportcard .fine { font-size: 13px; opacity: 0.9; }
@media (max-height: 420px) { .supportcard p { font-size: 15px; } .btn.supportopen { font-size: 15px; padding: 4px 12px 4px 6px; } .supportcard h2 { font-size: 30px; } .screen.title { gap: 6px; } }
/* Short phones: the title screen now carries the star total and the support pill, so everything is a little smaller. */
@media (max-height: 420px) { .logo { font-size: min(14vw, 21vh); } .btn.map { padding: 5px 6px; } .btn.map img.ico { height: 40px; width: 40px; } .btn.go.big { font-size: 32px; padding: 9px 44px; } .pill.total { font-size: 20px; padding: 2px 14px 3px 10px; } }

/* Full sentences read better in the plainer of the two fonts. */
.coming, .discord, .supportcard p { font-family: var(--text); }

/* The map picker: chapters across the top, the chapter's six maps under them. */
.titletop { display: flex; align-items: center; gap: 18px; }
.titletop .logo { font-size: min(9vw, 16vh, 78px); }
.chapters, .levels { display: flex; gap: 10px; justify-content: center; }
/* The menu's two rows, each with a word saying what it is: worlds, and the maps of the world chosen. The maps sit in a
   gold-edged panel with a pointer up at their world's tab. */
.menurow { display: flex; align-items: center; gap: 10px; }
.menulabel { min-width: 3.4em; font-size: 15px; letter-spacing: 0.04em; text-align: right; color: #ffe27a; }
.levelpanel { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 14px 11px 10px; border: 3px solid var(--gold); border-radius: 22px; background: rgba(27, 27, 38, 0.6); box-shadow: 0 0 0 3px #1b1b26; }
.levelpanel::before { content: ''; position: absolute; left: var(--notch, -99px); top: -13px; transform: translateX(-50%); border: 10px solid transparent; border-top: 0; border-bottom: 11px solid var(--gold); }
/* The difficulty switch on the main menu, between Play and Support the game. */
.difficulty { display: flex; flex-direction: column; align-items: center; gap: 3px; } .difficulty > span { font-family: var(--text); font-size: 13px; color: #fff; text-shadow: 0 1px 0 #1b1b26; }
.difficulty .btn.seg { font-size: 17px; padding: 8px 12px; } .difficulty .btn.seg img.ico { height: 16px; width: 16px; margin-left: 2px; }
.btn.seg.insane.on, .btn.go.insane { background: linear-gradient(#ff8a70, #e02b3c 55%, #96172a); } .btn.seg.locked { filter: grayscale(0.7) brightness(0.72); }
@media (max-height: 420px) { .difficulty .btn.seg { font-size: 14px; padding: 5px 9px; } .difficulty > span { font-size: 11px; } }
/* Endless, after a world's six maps: a wider button in gold. */
.btn.level.endless { width: auto; padding: 0 14px; gap: 4px; background: linear-gradient(#ffd86a, #e0a23a 55%, #a86a16); font-size: min(3.4vw, 22px); } .btn.level.endless .best { font-size: 0.5em; color: #fff; white-space: nowrap; }
.btn.level.locked b { opacity: 0.75; } .btn.level.locked img.ico { height: 0.6em; width: 0.6em; }
@media (max-height: 420px) { .menulabel { font-size: 12px; } .levelpanel { padding: 4px 10px 7px 8px; border-radius: 18px; } }
.btn.chapter { gap: 8px; padding: 5px 14px 5px 8px; border-radius: 16px; background: linear-gradient(#c98a4a, var(--wood) 55%, var(--wood-dark)); font-size: min(2.6vw, 16px); }
.btn.chapter img.ico { height: 38px; width: 38px; }
.btn.chapter span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; white-space: nowrap; }
.btn.chapter i { font-style: normal; font-size: 0.82em; color: #ffe27a; }
.btn.chapter.on { border-color: var(--gold); background: linear-gradient(#7fc4ff, var(--blue) 55%, #236fb8); box-shadow: 0 0 0 3px #1b1b26, 0 5px 0 #1b1b26; }
.btn.chapter.locked, .btn.level.locked { filter: grayscale(0.7) brightness(0.72); }
.btn.level { flex-direction: column; gap: 2px; width: min(11vw, 76px); height: min(11vw, 76px); border-radius: 18px; background: linear-gradient(#8a88a6, #4a4860 55%, #34334a); font-size: min(5.2vw, 34px); }
.btn.level .stars { font-size: 0.42em; color: var(--gold); letter-spacing: 0; } .btn.level .stars i { font-style: normal; color: #2b2b3a; text-shadow: none; }
.btn.level.next { border-color: var(--gold); box-shadow: 0 0 0 3px #1b1b26, 0 5px 0 #1b1b26, 0 0 16px rgba(246, 195, 59, 0.7); animation: nudge 0.8s ease-in-out infinite alternate; }
.btn.level img.ico { height: 36px; width: 36px; }
.mapname { font-size: 20px; color: #ffe27a; margin-bottom: -8px; }
@media (max-height: 420px) { .titletop .logo { font-size: min(8vw, 16vh); } .btn.level { width: 62px; height: 62px; font-size: 28px; } .btn.chapter img.ico { height: 30px; width: 30px; } .mapname { font-size: 16px; } }
@media (max-width: 760px) { .btn.chapter span i { display: none; } .btn.chapter { padding: 4px 10px 4px 6px; } .btn.level { width: 54px; height: 54px; font-size: 24px; } }

/* Scores: the best on each map's tile, and this game's score on the end screen. */
.btn.level .best { font-size: 0.34em; color: #ffe27a; letter-spacing: 0; line-height: 1; }
.btn.level { line-height: 1; }
.btn.play { flex-direction: column; gap: 2px; padding-top: 8px; padding-bottom: 8px; line-height: 1; }
.btn.play small { font-size: 0.36em; color: #f4ffd8; letter-spacing: 0.04em; }
.score { display: flex; align-items: baseline; gap: 14px; font-size: min(9vw, 46px); line-height: 1; color: #fff; }
.score .bestline { font-size: 0.42em; color: #ffe27a; }
.score .newbest { font-size: 0.42em; color: #b6f05a; animation: throb 0.5s infinite alternate; }
@media (max-height: 420px) { .score { font-size: 32px; } .card { gap: 6px; } .bigstars { font-size: 44px; } .card h2 { font-size: 30px; } }

/* The stars and the dishes in one box, so it reads as "these dishes earn these stars". */
.feastbox { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 8px; border: 3px solid #1b1b26; border-radius: 16px; background: rgba(27, 27, 38, 0.62); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.feastbox .rating, .feastbox .feast { padding: 0; border: 0; background: none; box-shadow: none; }
.feastbox .rating { font-size: 24px; padding-right: 10px; border-right: 3px solid rgba(255, 255, 255, 0.25); border-radius: 0; }
.feastbox .feast { grid-template-columns: repeat(10, 13px); gap: 3px; } .feastbox .feast i { width: 13px; height: 13px; }
.tl { gap: 8px; } .tools .btn.round { width: 46px; height: 46px; }
@media (max-width: 830px) { .tc { left: auto; right: calc(12px + env(safe-area-inset-right)); transform: none; top: calc(62px + env(safe-area-inset-top)); align-items: flex-end; } .boss .bar { width: min(40vw, 300px); } }
/* How to get full screen on an iPhone. */
.tip { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(27, 27, 38, 0.62); font-size: 14px; font-family: var(--text); white-space: nowrap; }
.tip img.ico { height: 26px; width: 26px; }
/* Very short screens: a phone on its side with the browser's bars showing. */
@media (max-height: 340px) {
  .screen.title { gap: 5px; padding: 4px; } .titletop .logo { font-size: min(7vw, 15vh); } .pill.total { font-size: 17px; }
  .btn.chapter { padding: 3px 10px 3px 6px; font-size: 13px; } .btn.chapter img.ico { height: 26px; width: 26px; }
  .btn.level { width: 54px; height: 54px; font-size: 24px; border-radius: 14px; } .btn.go.big { font-size: 26px; padding: 6px 34px; }
  .btn.supportopen { font-size: 13px; } .card { padding: 6px 20px; gap: 4px; } .bigstars { font-size: 36px; } .card h2 { font-size: 26px; } .score { font-size: 26px; }
  .coming, .discord { font-size: 14px; } .btn.go, .btn.plain { font-size: 20px; padding: 7px 16px; }
}

/* Settings: speed, sound and music in a row, each with its name under it. */
.btn.gear img.ico { height: 30px; width: 30px; }
.titletop .btn.gear { width: 46px; height: 46px; }
.card.settings { gap: min(3vh, 16px); padding: 14px 34px 16px; }
.options { display: flex; gap: 30px; align-items: flex-end; }
.option { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; }
.segment { display: flex; border: 3px solid #1b1b26; border-radius: 18px; overflow: hidden; box-shadow: 0 5px 0 #1b1b26; }
.btn.seg { border: 0; border-radius: 0; box-shadow: none; padding: 12px 18px; font-size: 26px; background: linear-gradient(#8a88a6, #4a4860 55%, #34334a); color: #b9b7cc; }
.btn.seg.on { background: linear-gradient(#ffb36b, var(--pumpkin) 55%, #c05f0c); color: #fff; }
.btn.seg:active { transform: none; }
.btn.toggle { width: 60px; height: 60px; } .btn.toggle img.ico { height: 36px; width: 36px; }
.btn.toggle.off { background: linear-gradient(#8a88a6, #4a4860 55%, #34334a); }
@media (max-height: 340px) { .card.settings { gap: 6px; padding: 6px 26px 8px; } .btn.toggle { width: 48px; height: 48px; } .btn.seg { padding: 8px 14px; font-size: 20px; } .option { font-size: 14px; gap: 3px; } }

/* Dishes left, beside the gold. The top middle of the screen is kept clear for the map; only the Gobblewock's bar
   appears there. */
.pill.dishes { font-size: 28px; padding: 1px 16px 1px 8px; line-height: 1.08; } .pill.dishes img.ico { height: 32px; width: 32px; margin: -1px 0; }
.pill.dishes.low { color: #ff8a8a; animation: throb 0.5s infinite alternate; }
.boss .bar { width: min(32vw, 360px); }
@media (min-width: 761px) { .tc { left: 50%; right: auto; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); align-items: center; } }
@media (max-width: 760px) { .tc { top: calc(64px + env(safe-area-inset-top)); } .boss .bar { width: min(40vw, 300px); } }
@media (max-height: 420px) { .pill.dishes { font-size: 24px; } .pill.dishes img.ico { height: 28px; width: 28px; } }

/* The coach's hand. Its fingertip, not its corner, sits on the spot it points at. */
.coach { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 3; }
.coach img.ico { position: absolute; left: -22px; top: -4px; width: 70px; height: 70px; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35)); animation: poke 0.6s ease-in-out infinite alternate; }
@keyframes poke { from { transform: translate(10px, 16px); } to { transform: translate(0, 0); } }
/* Big moments: a white flash, and confetti over a win. */
.flashwhite { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.flashwhite.go { animation: whiteout 0.55s ease-out; }
@keyframes whiteout { from { opacity: 0.85; } to { opacity: 0; } }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; border-radius: 2px; animation: fall linear infinite; }
@keyframes fall { to { top: 110%; rotate: 720deg; } }
.screen.end .card { position: relative; z-index: 1; }
.btn.share { font-size: 18px; padding: 8px 16px; }
.coach img.ico { transform-origin: 22px 7px; } .coach.flip img.ico { animation-name: pokeflip; }
@keyframes pokeflip { from { transform: rotate(180deg) translate(10px, 16px); } to { transform: rotate(180deg); } }

/* An intro in the animated-icon look: the picture itself, bobbing in the spotlight. */
.spot.iconspot { display: flex; align-items: center; justify-content: center; }
.spot.iconspot img.ico { width: 78%; height: 78%; animation: bobble 0.5s ease-in-out infinite alternate; }
@keyframes bobble { from { transform: translateY(4%) rotate(-5deg) scale(1.04, 0.96); } to { transform: translateY(-6%) rotate(5deg) scale(0.97, 1.04); } }
