.full-game.ginger-game {
  --ginger-cream: #fff2d8;
  --ginger-gold: #d7b37b;
  --ginger-ink: #20191b;
  color: var(--ginger-cream);
  background: linear-gradient(#291b1a36,#24161379),url("./gingerbread-art/workbench.webp") center 43% / cover,#513326;
}
.full-game.ginger-game.ginger-ready { grid-template-rows: auto auto minmax(0,1fr); }
.ginger-game .full-game-header {
  border-bottom-color: #cb905a;
  background: linear-gradient(110deg,#311f23f4,#24332bf5);
}
.ginger-game .ginger-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: .19rem max(.65rem,env(safe-area-inset-right));
  background: #211b1cd9;
}
.ginger-audio {
  min-height: 30px;
  border: 1px solid #e2bc7a91;
  border-radius: 1rem;
  padding: .12rem .62rem;
  background: #293d35;
  color: var(--ginger-cream);
  font: 680 .76rem/1.1 system-ui,sans-serif;
}
.ginger-audio [data-audio-status] { margin-inline-start: .33rem; color: #ffe0a5; }
.ginger-panel {
  width: min(calc(100% - 1rem),40rem);
  display: grid;
  gap: .65rem;
  margin: .6rem auto;
  padding: .65rem;
  border: 1px solid var(--ginger-gold);
  border-radius: .9rem;
  background: linear-gradient(130deg,#402a26f5,#211d22f4 57%,#20362df7);
  box-shadow: inset 0 0 0 3px #f1c47b24,0 .45rem 1.6rem #1e110fc4;
  text-align: center;
}
.ginger-panel :is(h3,p) { margin: 0; }
.ginger-panel h3 {
  color: #ffdf9d;
  font: 750 clamp(1.55rem,6vw,2.5rem)/1.04 Georgia,serif;
  overflow-wrap: anywhere;
}
.ginger-loading, .ginger-empty { margin: 1rem auto; text-align: center; }
.ginger-player-art {
  display: block;
  width: min(100%,26rem);
  height: clamp(5rem,24dvh,12rem);
  margin: auto;
  object-fit: contain;
  border: 1px solid #cfaa74;
  border-radius: .64rem;
  background: radial-gradient(ellipse,#e2a45e70,#49332dd9 62%,#291e24),url("./gingerbread-art/workbench.webp") center / cover;
}
.ginger-player .roster-picker { margin-inline: auto; }
.ginger-intro { display: grid; justify-items: center; gap: .35rem; }
.ginger-intro .roster-badge { margin: 0; }
.ginger-intro p { font-size: .92rem; }
.ginger-models {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .5rem;
}
.ginger-game .ginger-model {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: .1rem;
  justify-items: center;
  width: 100%;
  min-width: 0;
  min-height: 7.25rem;
  margin: 0;
  padding: .27rem .27rem .44rem;
  border: 1px solid #bd8f59;
  border-radius: .65rem;
  background: radial-gradient(ellipse at 50% 33%,#936443,#3e272a 62%,#281f25);
  box-shadow: inset 0 0 0 .15rem #edc18124,0 .15rem .34rem #150c12a0;
  color: #fff2d8;
}
.ginger-game .ginger-model:last-child:nth-child(odd) { grid-column: 1/-1; width: calc((100% - .5rem)/2); justify-self: center; }
.ginger-model img {
  width: 100%;
  height: clamp(4.7rem,14vh,7.4rem);
  object-fit: contain;
  pointer-events: none;
}
.ginger-model strong { font: 700 clamp(.9rem,3.7vw,1.23rem)/1.06 Georgia,serif; }
.ginger-model small { font: 700 .76rem/1.18 system-ui,sans-serif; color: #ecd1a7; }
.ginger-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.ginger-game .ginger-primary,.ginger-game .ginger-secondary {
  min-height: 44px;
  margin: 0;
  padding: .34rem .63rem;
  touch-action: manipulation;
  font-size: clamp(.76rem,3.3vw,.95rem);
}
.ginger-game .ginger-primary { border-color: #fff0ba; background: linear-gradient(#ffebb0,#d79f58); color: #2e1b1a; }
.ginger-game .ginger-secondary { border-color: #cbad76; background: linear-gradient(#42433a,#233430); color: #fff0d4; }
.ginger-game :is(.ginger-primary,.ginger-secondary,.ginger-model,.ginger-audio):focus-visible { outline: 2px solid #fff0ba; outline-offset: 2px; }

.ginger-build { width: min(calc(100% - .85rem),30rem); gap: .45rem; padding: .48rem; }
.ginger-build-title { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .65rem; }
.ginger-build-title h3 { font-size: clamp(1.28rem,5.5vw,2rem); }
.ginger-count { color: #f5d5a2; font-size: .8rem; font-weight: 780; }
.ginger-board {
  position: relative;
  width: min(100%,26rem);
  margin-inline: auto;
  aspect-ratio: 400 / 302;
  border-radius: .52rem;
  outline: 1px solid #b5c9d0;
  background:
    linear-gradient(90deg,#b6deed1d 1px,transparent 1px),
    linear-gradient(#b6deed1d 1px,transparent 1px),
    radial-gradient(ellipse at 49% 45%,#34617b,#1f4059 65%,#162c40);
  background-size: 6% 8%,6% 8%,auto;
  box-shadow: inset 0 0 0 .26rem #c6e0e535,inset 0 0 1.1rem #0d172c;
}
.ginger-board::before {
  content: "";
  position: absolute;
  inset: .54rem;
  pointer-events: none;
  border: 1px solid #bed6de47;
  border-radius: .22rem;
}
.ginger-board-ready { outline: 2px solid #ffe2a0; }
.ginger-board canvas { display: block; width: 100%; height: 100%; }
.ginger-game .ginger-slot {
  position: absolute;
  translate: -50% -50%;
  width: 34px;
  height: 34px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  touch-action: manipulation;
}
.ginger-game .ginger-slot[hidden] { display: none; }
.ginger-slot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  translate: -50% -50%;
  border: 1px solid #dbebf7a2;
  border-radius: 50%;
}
.ginger-game .ginger-slot-selected { z-index: 1; }
.ginger-slot-selected::after {
  width: 13px;
  height: 13px;
  border-color: #ffe6aa;
  background: #ffd28188;
  box-shadow: 0 0 .38rem #eac880;
}
.ginger-game .ginger-slot:focus-visible { outline: 2px solid #ffe6aa; }
.ginger-status {
  min-height: 2.05em;
  display: grid;
  align-content: center;
  color: #ffebc3;
  font: 710 clamp(.76rem,3.45vw,.93rem)/1.16 system-ui,sans-serif;
}
.ginger-tray {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: .29rem;
}
.ginger-tray[hidden] { display: none; }
.ginger-game .ginger-piece {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  gap: .1rem;
  min-height: 52px;
  min-width: 0;
  margin: 0;
  padding: .18rem .1rem;
  border: 1px solid #a67450;
  border-radius: .42rem;
  background: linear-gradient(#674436,#462d2e);
  box-shadow: inset 0 0 .24rem #25161b;
  touch-action: none;
  cursor: grab;
}
.ginger-piece img {
  width: 100%;
  height: clamp(1.42rem,6.3dvh,2.6rem);
  object-fit: contain;
  pointer-events: none;
}
.ginger-piece small { color: #ffe5bd; font: 700 clamp(.57rem,2.55vw,.71rem)/1 system-ui,sans-serif; overflow-wrap: anywhere; }
.ginger-game .ginger-piece:is(:focus-visible,[aria-pressed="true"]) {
  outline: 1.5px solid #fff1c1;
  background: #765844;
}
.ginger-game .ginger-piece-used { opacity: .28; filter: saturate(.4); }
.ginger-game .ginger-piece-lifted { opacity: .45; }
.ginger-drag {
  position: fixed;
  z-index: 30;
  translate: -50% -50%;
  pointer-events: none;
}
.ginger-drag img { display: block; width: 100%; height: auto; transform: rotate(var(--turn)); }
.ginger-snap {
  position: absolute;
  translate: -50% -50%;
  font-size: 1.75rem;
  pointer-events: none;
  color: #fff1b6;
  animation: ginger-spark .52s ease-out both;
}
@keyframes ginger-spark { from { transform: translateY(7px) scale(.3); } to { opacity: 0; transform: translateY(-18px) scale(1.2); } }
.ginger-board-finished {
  background: radial-gradient(ellipse at 50% 33%,#9b6e4c,#57362b 55%,#321e24);
  outline-color: #d7b37b;
}
.ginger-board-finished::before { border-color: #e6c28a4b; }
.ginger-board-lit { box-shadow: inset 0 0 0 .26rem #ffe3a342,0 0 1.05rem #f5bc6b74; }
.ginger-result { justify-items: center; }
.ginger-result-art {
  display: block;
  width: min(100%,26rem);
  border: 1px solid var(--ginger-gold);
  border-radius: .65rem;
  background: radial-gradient(ellipse,#e4a36255,#56372c 69%,#381f24);
}
.ginger-podium {
  position: relative;
  width: 100%;
  min-height: clamp(9rem,28dvh,14rem);
  display: grid;
  place-items: center;
  border: 1px solid #d7b37b;
  border-radius: .65rem;
  background: radial-gradient(ellipse,#ffda9b9c,transparent 68%),linear-gradient(#1a131b50,#381e1eda),url("./gingerbread-art/workbench.webp") center 28% / cover;
  overflow: hidden;
}
.ginger-podium img {
  height: clamp(7rem,23dvh,12rem);
  width: auto;
  filter: drop-shadow(0 0 1.2rem #ffc85abd);
  animation: ginger-cup .72s cubic-bezier(.2,1.4,.45,1) both;
}
@keyframes ginger-cup { from { transform: translateY(35%) scale(.55) rotate(-10deg); opacity: 0; } }
.ginger-collection {
  display: grid;
  width: 100%;
  max-width: 31rem;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: .25rem;
  padding: .18rem;
  border-block: 1px solid #d6a9688c;
  background: #d7a56f20;
}
.ginger-collection img { width: 100%; }
@media (max-height: 635px) {
  .ginger-build { gap: .35rem; margin-block: .38rem; }
  .ginger-board { width: min(100%,calc(58dvh - 3rem),22rem); }
  .ginger-piece img { height: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ginger-podium img { animation: none; }
  .ginger-snap { animation-duration: 1ms; }
}
@media (max-width: 365px) and (max-height: 635px) {
  .ginger-build-title { column-gap: .3rem; }
  .ginger-build-title h3 { font-size: 1.13rem; }
  .ginger-count { font-size: .72rem; }
  .ginger-build .ginger-actions { gap: .26rem; }
  .ginger-build :is(.ginger-primary,.ginger-secondary) { padding-inline: .32rem; font-size: .69rem; }
  .ginger-game .ginger-build .ginger-piece { min-height: 47px; }
}
