/* The main menu, one to one after the Gemini sketch (main.js, «menu-board»). Every piece is painted — cut from
   the Gemini UI sheets in assets/ui/menu — and sits on a 16:9 stage over the poster, at the place the sketch
   gives it, in hundredths of the stage. The stage keeps to the left edge; on a phone the pieces stack. */

:root #overlay.menu.board-page { display: block; padding: 0; overflow: hidden; }
:root #overlay.menu > .menu-board { position: fixed; left: 0; top: 0; width: 100vw; max-width: none; height: 100vh; pointer-events: none; }
.menu-board .board-stage {
  position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; container-type: size; pointer-events: none;
  font-family: 'Oswald', var(--hud-font);
}
.menu-board .board-stage > * { position: absolute; pointer-events: auto; }
.menu-board button { cursor: pointer; border: 0; padding: 0; background-color: transparent; box-shadow: none; border-radius: 0; }
.menu-board .art { display: block; background: center / 100% 100% no-repeat; }

/* The ink lettering of the sketch: cream, bold and narrow, outlined in dark. */
.menu-board .board-label, .menu-board .board-purse, .menu-board .portrait-card b, .menu-board .scrap b {
  font-family: 'Oswald', var(--hud-font); font-weight: 600; text-transform: uppercase; color: #f6e6bd;
  -webkit-text-stroke: .08em #1a0f06; paint-order: stroke fill; text-shadow: 0 .1em 0 #1a0f06, 0 0 .4em #000a; letter-spacing: .02em;
}

.menu-board .board-sign { left: 3.4%; top: 1%; width: 34%; aspect-ratio: 1057 / 384; background: url(assets/ui/menu/sign.webp) center / 100% 100% no-repeat; filter: drop-shadow(.3cqw .5cqw 0 #0009); animation: sign-sway 6s ease-in-out infinite; transform-origin: 50% 0; }
.menu-board .board-sign h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes sign-sway { 50% { rotate: -1deg; } }

.menu-board .board-purse {
  left: 39.3%; top: 7%; width: 22%; aspect-ratio: 1054 / 276; background: url(assets/ui/menu/plank.webp) center / 100% 100% no-repeat;
  display: flex; align-items: center; justify-content: center; gap: .4em; font-size: 2.1cqw; filter: drop-shadow(.3cqw .5cqw 0 #0009);
}
.menu-board .board-purse .sack { width: 2.6cqw; aspect-ratio: 1; background: url(assets/ui/menu/seeds.webp) 50% 45% / 260% auto no-repeat; }
.menu-board .board-purse b { color: #d8ff7a; text-shadow: 0 0 .5em #b9f34f, 0 .1em 0 #1a0f06; }

/* The belt hangs from the sign; the medallions sit in its four iron sockets. */
.menu-board .board-belt { left: 10%; top: 20%; width: 11.6%; aspect-ratio: 399 / 905; background: url(assets/ui/menu/belt.webp) center / 100% 100% no-repeat; filter: drop-shadow(.3cqw .5cqw 0 #0009); }
:root #overlay.menu .menu-board .board-belt .habit-slot {
  position: absolute; left: 50.5%; width: 25%; aspect-ratio: 1; translate: -50% -50%; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(#26301c, #0d120a 75%); box-shadow: inset 0 .2cqw .5cqw #000c; color: #d8c89a; font: 700 2cqw/1 var(--title-font);
  transition: filter .15s ease-out, scale .15s ease-out;
}
:root #overlay.menu .menu-board .board-belt .socket0 { top: 26.5%; } :root #overlay.menu .menu-board .board-belt .socket1 { top: 45.3%; }
:root #overlay.menu .menu-board .board-belt .socket2 { top: 63.9%; } :root #overlay.menu .menu-board .board-belt .socket3 { top: 82.4%; }
:root #overlay.menu .menu-board .board-belt .habit-slot .icon { --size: 100%; width: 100%; height: 100%; border-radius: 50%; }
:root #overlay.menu .menu-board .board-belt .habit-slot.full { box-shadow: 0 0 1cqw #b9f34faa; }
:root #overlay.menu .menu-board .board-belt .habit-slot span { opacity: .45; }
:root #overlay.menu .menu-board .board-belt .habit-slot small { position: absolute; right: -16%; bottom: -16%; padding: 0 .35em; border-radius: .5em; border: 2px solid #1f1209; background: #efdfb8; color: #3a2716; font: 700 .8cqw/1.3 var(--title-font); }
:root #overlay.menu .menu-board .board-belt .habit-slot:hover { filter: brightness(1.25) drop-shadow(0 0 .6cqw #b9f34f); scale: 1.1; }

/* Weapons. */
.menu-board .board-label { font-size: 1.9cqw; line-height: 1; white-space: nowrap; }
.menu-board .arms-label { left: 23.2%; top: 32.6%; }
.menu-board .heroes-label { left: 36.4%; top: 41.5%; }
.menu-board .board-arms { left: 30.6%; top: 27.5%; display: flex; gap: .8%; width: 28%; }
.menu-board .scrap { position: relative; flex: 1; display: grid; justify-items: center; gap: .3cqw; filter: drop-shadow(.2cqw .35cqw 0 #0009); transition: scale .15s ease-out, filter .15s ease-out; }
.menu-board .scrap .art { width: 100%; aspect-ratio: 582 / 334; }
.menu-board .scrap b { font-size: .95cqw; line-height: 1.05; text-align: center; }
.menu-board .scrap[aria-pressed="true"] { filter: drop-shadow(0 0 .25cqw #b9f34f) drop-shadow(0 0 .8cqw #b9f34fcc) drop-shadow(.2cqw .35cqw 0 #0009); }
.menu-board .scrap:disabled { cursor: default; filter: grayscale(.85) brightness(.6) drop-shadow(.2cqw .35cqw 0 #0009); }
.menu-board .scrap:hover:enabled { scale: 1.06; }
.menu-board .w-fox0 { background-image: url(assets/ui/menu/w-fox0.webp); } .menu-board .w-fox1 { background-image: url(assets/ui/menu/w-fox1.webp); }
.menu-board .w-fox2 { background-image: url(assets/ui/menu/w-fox2.webp); } .menu-board .w-badger0 { background-image: url(assets/ui/menu/w-badger0.webp); }
.menu-board .w-badger1 { background-image: url(assets/ui/menu/w-badger1.webp); } .menu-board .w-badger2 { background-image: url(assets/ui/menu/w-badger2.webp); }

/* Heroes. */
.menu-board .portrait-card { top: 45.8%; width: 11.6%; aspect-ratio: 587 / 589; filter: grayscale(.8) brightness(.6) drop-shadow(.3cqw .5cqw 0 #000a); transition: filter .18s ease-out, translate .18s ease-out; }
.menu-board .portrait-card.hero0 { left: 30%; } .menu-board .portrait-card.hero1 { left: 44%; }
.menu-board .portrait-card .art { width: 100%; height: 100%; }
.menu-board .portrait-card.hero0 .art { background-image: url(assets/ui/menu/portrait-fox.webp); }
.menu-board .portrait-card.hero1 .art { background-image: url(assets/ui/menu/portrait-badger.webp); }
.menu-board .portrait-card b {
  position: absolute; left: 6%; right: 6%; bottom: -3%; padding: .45em .2em; background: url(assets/ui/menu/plank.webp) center / 100% 100% no-repeat;
  font-size: 1.05cqw; text-align: center; -webkit-text-stroke: .06em #1a0f06;
}
.menu-board .portrait-card:hover { filter: brightness(.95) drop-shadow(.3cqw .5cqw 0 #000a); translate: 0 -.3cqw; }
.menu-board .portrait-card[aria-pressed="true"] { filter: drop-shadow(0 0 .3cqw #b9f34f) drop-shadow(0 0 1.2cqw #b9f34fcc) drop-shadow(.3cqw .5cqw 0 #000a); translate: 0 -.4cqw; }

/* Difficulty on two scrolls. */
.menu-board .scroll { left: 7.6%; width: 16.4%; filter: brightness(.68) drop-shadow(.25cqw .4cqw 0 #0009); transition: filter .15s ease-out, rotate .15s ease-out; background: center / 100% 100% no-repeat; }
.menu-board .scroll0 { top: 76.5%; aspect-ratio: 608 / 162; background-image: url(assets/ui/menu/scroll-veteran.webp); }
.menu-board .scroll1 { top: 85.4%; left: 8%; width: 15%; aspect-ratio: 552 / 160; background-image: url(assets/ui/menu/scroll-nightmare.webp); }
.menu-board .scroll[aria-pressed="true"] { filter: drop-shadow(0 0 .3cqw #b9f34f) drop-shadow(0 0 1cqw #b9f34fbb) drop-shadow(.25cqw .4cqw 0 #0009); }
.menu-board .scroll1[aria-pressed="true"] { filter: drop-shadow(0 0 .3cqw #ff5a3a) drop-shadow(0 0 1cqw #ff5a3abb) drop-shadow(.25cqw .4cqw 0 #0009); }
.menu-board .scroll:hover { rotate: -1.5deg; }
.menu-board .scroll small { position: absolute; right: 8%; bottom: -26%; padding: 0 .5em; border-radius: .4em; background: #3a0e08; color: #ffb4a0; font: 600 .85cqw/1.4 'Oswald', var(--hud-font); }

/* Into battle: the spiked heater shield, breathing lime light. */
.menu-board .board-go {
  left: 28.6%; top: 71.5%; width: 14%; aspect-ratio: 600 / 700; background: url(assets/ui/menu/go.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 1.2cqw #b9f34f99) drop-shadow(.3cqw .5cqw 0 #000b); animation: shield-breathe 2.4s ease-in-out infinite; transition: scale .15s ease-out;
}
.menu-board .board-go:hover { scale: 1.06; }
.menu-board .board-go:active { scale: .96; }
@keyframes shield-breathe { 50% { filter: drop-shadow(0 0 2.6cqw #d8ff7a) drop-shadow(.3cqw .5cqw 0 #000b); } }

/* The painted planks. */
.menu-board .art-plank { background: center / 100% 100% no-repeat; filter: drop-shadow(.25cqw .4cqw 0 #0009); transition: filter .15s ease-out, rotate .15s ease-out, scale .15s ease-out; }
.menu-board .art-plank:hover { filter: brightness(1.18) drop-shadow(0 0 .8cqw #b9f34f99) drop-shadow(.25cqw .4cqw 0 #0009); rotate: -1.5deg; scale: 1.04; }
.menu-board .board-coop { left: 46.2%; top: 88%; width: 12.9%; aspect-ratio: 592 / 184; background-image: url(assets/ui/menu/coop.webp); }
.menu-board .peg-mycelium { left: 85.4%; top: 81.6%; width: 12.2%; aspect-ratio: 566 / 173; background-image: url(assets/ui/menu/mycelium.webp); }
.menu-board .peg-settings { left: 85.4%; top: 90.4%; width: 12.2%; aspect-ratio: 562 / 168; background-image: url(assets/ui/menu/settings.webp); }

/* Phones and tall screens: the pieces stack into one scrolling column. */
@media (orientation: portrait), (max-width: 760px) {
  :root #overlay.menu.board-page { overflow-y: auto; }
  :root #overlay.menu > .menu-board { position: static; width: auto; height: auto; }
  .menu-board .board-stage { position: static; translate: none; width: 100%; aspect-ratio: auto; container-type: inline-size; display: grid; grid-template-columns: repeat(6, 1fr); gap: 3cqw 2cqw; padding: 16vh 4cqw 6cqw; box-sizing: border-box; justify-items: center; align-items: center; }
  .menu-board .board-stage > * { position: relative; left: auto !important; top: auto !important; }
  .menu-board .board-sign { grid-column: 1 / -1; width: 80cqw; animation: none; }
  .menu-board .board-purse { grid-column: 1 / -1; width: 56cqw; font-size: 5cqw; }
  .menu-board .board-purse .sack { width: 6cqw; }
  .menu-board .board-belt { grid-column: 1 / -1; width: auto; aspect-ratio: auto; background: #3a2414; border: 3px solid #1f1209; border-radius: 10px; display: flex; gap: 4cqw; padding: 2cqw 4cqw; }
  :root #overlay.menu .menu-board .board-belt .habit-slot { position: relative; left: auto; top: auto; translate: none; width: 13cqw; font-size: 5cqw; }
  .menu-board .board-label { grid-column: 1 / -1; font-size: 5cqw; }
  .menu-board .board-arms { grid-column: 1 / -1; width: 92cqw; }
  .menu-board .scrap b { font-size: 2.6cqw; }
  .menu-board .portrait-card { grid-column: span 3; width: 40cqw; }
  .menu-board .portrait-card b { font-size: 3cqw; }
  .menu-board .scroll { grid-column: span 3; width: 42cqw !important; }
  .menu-board .board-go { grid-column: span 3; width: 34cqw; }
  .menu-board .board-coop { grid-column: span 3; width: 40cqw; }
  .menu-board .peg-mycelium, .menu-board .peg-settings { grid-column: span 3; width: 40cqw; }
}
/* The habits belt hangs from under the FireFox sign: the sign is in front, the belt's top tucked behind it. */
:root #overlay.menu .menu-board .board-sign { z-index: 3; }
:root #overlay.menu .menu-board .board-belt { z-index: 2; top: 18.5%; }
