:root {
  --bg0: #fff6e8;
  --bg1: #ffe9c8;
  --bg2: #ffd9a0;
  --ink: #1a1a1a;
  --mut: #6a5a48;
  --line: #c9a87a;
  --input: #ffffff;
  --input-border: #2a2a2a;
  --panel: #fffdf8;
  --panel-border: #1a1a1a;
  --logo: #ff6a00;
  --play: #176318;
  --play-hi: #266f27;
  --play-text: #ffffff;
  --yellow: #f5c400;
  --ok: #1f8a3a;
  --bad: #c42222;
  --tile: #fff8e8;
  --tile-border: #1a1a1a;
  --acc: #e67a00;
  --shadow: #1a1a1a;
  --cloud: #ffffff;
  --ribbon-open: #2f8a2f;
  --ribbon-closed: #d63b3b;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  min-height: 100vh;
  color: var(--ink);
  font:
    1rem/1.45 "Nunito",
    Verdana,
    Geneva,
    sans-serif;
  font-weight: 700;
  background:
    radial-gradient(circle at 8% 12%, var(--cloud) 0 42px, transparent 44px),
    radial-gradient(circle at 92% 8%, var(--cloud) 0 56px, transparent 58px),
    radial-gradient(
      circle at 48% 6%,
      rgba(255, 255, 255, 0.55) 0 24px,
      transparent 26px
    ),
    radial-gradient(
      circle at 68% 18%,
      rgba(255, 255, 255, 0.45) 0 18px,
      transparent 20px
    ),
    radial-gradient(
      circle at 78% 78%,
      rgba(255, 255, 255, 0.7) 0 36px,
      transparent 38px
    ),
    radial-gradient(
      circle at 18% 72%,
      rgba(255, 255, 255, 0.65) 0 28px,
      transparent 30px
    ),
    radial-gradient(
      circle at 38% 88%,
      rgba(255, 255, 255, 0.4) 0 20px,
      transparent 22px
    ),
    linear-gradient(180deg, #fff8ea 0%, #ffe3b8 42%, #f0c98a 100%);
  display: flex;
  flex-direction: column;
}
.client-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(circle at 10% 10%, var(--cloud) 0 48px, transparent 50px),
    radial-gradient(circle at 90% 6%, var(--cloud) 0 64px, transparent 66px),
    radial-gradient(
      circle at 28% 4%,
      rgba(255, 255, 255, 0.7) 0 22px,
      transparent 24px
    ),
    radial-gradient(
      circle at 52% 12%,
      rgba(255, 255, 255, 0.5) 0 16px,
      transparent 18px
    ),
    radial-gradient(
      circle at 72% 8%,
      rgba(255, 255, 255, 0.55) 0 28px,
      transparent 30px
    ),
    radial-gradient(
      circle at 4% 34%,
      rgba(255, 255, 255, 0.45) 0 20px,
      transparent 22px
    ),
    radial-gradient(
      circle at 96% 40%,
      rgba(255, 255, 255, 0.5) 0 32px,
      transparent 34px
    ),
    radial-gradient(
      circle at 14% 52%,
      rgba(255, 255, 255, 0.35) 0 14px,
      transparent 16px
    ),
    radial-gradient(
      circle at 86% 56%,
      rgba(255, 255, 255, 0.4) 0 18px,
      transparent 20px
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(255, 255, 255, 0.75) 0 40px,
      transparent 42px
    ),
    radial-gradient(
      circle at 62% 88%,
      rgba(255, 255, 255, 0.45) 0 26px,
      transparent 28px
    ),
    radial-gradient(
      circle at 34% 78%,
      rgba(255, 255, 255, 0.4) 0 20px,
      transparent 22px
    ),
    radial-gradient(
      circle at 8% 84%,
      rgba(255, 255, 255, 0.5) 0 30px,
      transparent 32px
    ),
    radial-gradient(
      circle at 48% 42%,
      rgba(255, 255, 255, 0.22) 0 12px,
      transparent 14px
    ),
    radial-gradient(
      circle at 22% 24%,
      rgba(255, 240, 200, 0.55) 0 36px,
      transparent 38px
    ),
    radial-gradient(
      circle at 78% 30%,
      rgba(255, 230, 180, 0.4) 0 24px,
      transparent 26px
    ),
    linear-gradient(180deg, #fff8ea 0%, #ffe3b8 42%, #f0c98a 100%);
}
.client-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.45 0 0 0 0 0.28 0 0 0 0 0.1 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='turbulence' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.45'/%3E%3C/svg%3E"),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 2px,
      rgba(140, 90, 35, 0.045) 2px,
      rgba(140, 90, 35, 0.045) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 2px,
      rgba(140, 90, 35, 0.035) 2px,
      rgba(140, 90, 35, 0.035) 3px
    ),
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 5px,
      rgba(120, 70, 25, 0.03) 5px,
      rgba(120, 70, 25, 0.03) 6px
    ),
    radial-gradient(
      circle at 15% 20%,
      rgba(90, 50, 10, 0.06) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 70% 35%,
      rgba(90, 50, 10, 0.05) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 40% 75%,
      rgba(90, 50, 10, 0.055) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(90, 50, 10, 0.05) 0 1px,
      transparent 2px
    );
  background-size:
    220px 220px,
    110px 110px,
    6px 6px,
    6px 6px,
    11px 11px,
    28px 28px,
    34px 34px,
    22px 22px,
    40px 40px;
  mix-blend-mode: multiply;
}
.client-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(
      ellipse 90% 55% at 50% -10%,
      rgba(255, 255, 255, 0.45),
      transparent 60%
    ),
    radial-gradient(
      circle at 12% 18%,
      rgba(255, 255, 255, 0.55) 0 18px,
      transparent 20px
    ),
    radial-gradient(
      circle at 38% 8%,
      rgba(255, 255, 255, 0.4) 0 12px,
      transparent 14px
    ),
    radial-gradient(
      circle at 58% 22%,
      rgba(255, 255, 255, 0.35) 0 10px,
      transparent 12px
    ),
    radial-gradient(
      circle at 82% 14%,
      rgba(255, 255, 255, 0.5) 0 22px,
      transparent 24px
    ),
    radial-gradient(
      circle at 94% 28%,
      rgba(255, 255, 255, 0.3) 0 14px,
      transparent 16px
    ),
    radial-gradient(
      circle at 6% 46%,
      rgba(255, 255, 255, 0.35) 0 16px,
      transparent 18px
    ),
    radial-gradient(
      circle at 26% 58%,
      rgba(255, 255, 255, 0.28) 0 11px,
      transparent 13px
    ),
    radial-gradient(
      circle at 70% 48%,
      rgba(255, 255, 255, 0.32) 0 13px,
      transparent 15px
    ),
    radial-gradient(
      circle at 90% 62%,
      rgba(255, 255, 255, 0.4) 0 20px,
      transparent 22px
    ),
    radial-gradient(
      circle at 16% 76%,
      rgba(255, 255, 255, 0.38) 0 15px,
      transparent 17px
    ),
    radial-gradient(
      circle at 44% 86%,
      rgba(255, 255, 255, 0.3) 0 12px,
      transparent 14px
    ),
    radial-gradient(
      circle at 74% 82%,
      rgba(255, 255, 255, 0.42) 0 18px,
      transparent 20px
    ),
    radial-gradient(
      circle at 54% 64%,
      rgba(255, 255, 255, 0.22) 0 9px,
      transparent 11px
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 160, 60, 0.1),
      transparent 35%
    ),
    radial-gradient(
      circle at 85% 70%,
      rgba(210, 130, 40, 0.08),
      transparent 30%
    );
}
@media (min-width: 900px) {
  body {
    padding: 12px;
    background:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E"),
      repeating-linear-gradient(
        0deg,
        transparent 0,
        transparent 3px,
        rgba(120, 80, 30, 0.04) 3px,
        rgba(120, 80, 30, 0.04) 4px
      ),
      #e8d2a8;
    background-size:
      170px 170px,
      7px 7px,
      auto;
  }
  .client-frame {
    min-height: calc(100vh - 24px);
    border-radius: 18px;
    box-shadow:
      0 10px 0 rgba(0, 0, 0, 0.18),
      inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  }
}

.bg-scape {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-tiles {
  position: absolute;
  inset: 0;
}
.bg-tile {
  position: absolute;
  width: clamp(34px, 5vw, 48px);
  height: clamp(34px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(1rem, 2.4vw, 1.375rem);
  color: #1a1a1a;
  background: #fff8ea;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.22);
  opacity: 0.55;
  animation: bg-tile-float 5.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.28s);
}
.bg-tile.t1 {
  top: 16%;
  left: 3%;
  background: #ffd24a;
  --tilt: -4deg;
}
.bg-tile.t2 {
  top: 34%;
  left: 10%;
  background: #7dff9a;
  --tilt: -8deg;
}
.bg-tile.t3 {
  top: 12%;
  left: 26%;
  background: #ff8ec8;
  --tilt: 5deg;
}
.bg-tile.t4 {
  top: 36%;
  right: 3%;
  background: #8ec8ff;
  --tilt: 10deg;
}
.bg-tile.t5 {
  top: 26%;
  right: 14%;
  background: #ffb04a;
  --tilt: -3deg;
}
.bg-tile.t6 {
  top: 54%;
  right: 3%;
  background: #d2a0ff;
  --tilt: -6deg;
}
.bg-tile.t7 {
  top: 62%;
  left: 6%;
  background: #fff38a;
  --tilt: 8deg;
}
.bg-tile.t8 {
  top: 48%;
  left: 28%;
  background: #ffa0a0;
  --tilt: 7deg;
  opacity: 0.4;
}
.bg-tile.t9 {
  top: 70%;
  right: 22%;
  background: #9affd2;
  --tilt: -5deg;
}
.bg-tile.t10 {
  top: 20%;
  right: 3%;
  background: #ffd24a;
  --tilt: -12deg;
  opacity: 0.5;
}
.bg-tile.t11 {
  top: 58%;
  left: 20%;
  background: #ffc4ff;
  --tilt: 14deg;
  opacity: 0.4;
}
.bg-tile.t12 {
  top: 6%;
  left: 14%;
  background: #a8f0ff;
  --tilt: 9deg;
  opacity: 0.45;
}
.bg-tile.t13 {
  top: 78%;
  left: 18%;
  background: #ffd0a0;
  --tilt: -7deg;
  opacity: 0.45;
}
.bg-tile.t14 {
  top: 44%;
  left: 3%;
  background: #c4ffb0;
  --tilt: 6deg;
  opacity: 0.42;
}
.bg-tile.t15 {
  top: 66%;
  right: 32%;
  background: #ffb8e0;
  --tilt: -9deg;
  opacity: 0.4;
}
.bg-tile.t16 {
  top: 10%;
  right: 24%;
  background: #ffe08a;
  --tilt: 11deg;
  opacity: 0.42;
}
.bg-coin {
  position: absolute;
  width: clamp(36px, 6vw, 56px);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.25));
  opacity: 0.9;
  animation: bg-coin-bob 3.6s ease-in-out infinite;
}
.bg-coin-sm {
  width: clamp(26px, 4.5vw, 38px);
  opacity: 0.82;
}
.bg-coin-a {
  top: 44%;
  right: 16%;
  left: auto;
  animation-delay: 0.2s;
}
.bg-coin-b {
  top: 50%;
  right: 30%;
  animation-delay: 1.1s;
}
.bg-coin-c {
  top: 8%;
  right: 8%;
  left: auto;
  width: clamp(28px, 4.5vw, 42px);
  animation-delay: 1.8s;
}
.bg-coin-d {
  top: 74%;
  left: 10%;
  animation-delay: 2.2s;
}
.bg-coin-e {
  top: 82%;
  right: 8%;
  animation-delay: 2.6s;
}
.bg-coin-f {
  top: 28%;
  left: 4%;
  animation-delay: 0.7s;
}
@keyframes bg-tile-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }
  50% {
    transform: translateY(-10px) rotate(var(--tilt, 0deg));
  }
}
@keyframes bg-coin-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-12px) rotate(6deg);
  }
}
@media (max-width: 760px) {
  .bg-tile.t8,
  .bg-tile.t11,
  .bg-tile.t12,
  .bg-tile.t13,
  .bg-tile.t14,
  .bg-tile.t15,
  .bg-tile.t16,
  .bg-coin-c,
  .bg-coin-e,
  .bg-coin-f {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bg-tile,
  .bg-coin {
    animation: none;
  }
}

.logo-pixel {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 5;
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  font-family: "Moirai One", cursive;
  font-weight: 400;
  font-size: clamp(2.125rem, 6.5vw, 3.25rem);
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
  color: #ff8a00;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 #000;
}
.logo-pixel small {
  display: block;
  margin-top: 0;
  font-size: 0.82em;
  font-weight: 400;
  letter-spacing: 0.14em;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  color: #ffc400;
  -webkit-text-stroke: 1px #000;
  text-shadow: 2px 2px 0 #000;
}

main {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 128px 20px 180px;
}
@media (max-width: 560px) {
  main {
    padding-top: 118px;
  }
}
.client-frame.no-logo > main {
  padding-top: 28px;
  padding-bottom: 40px;
}
.client-frame > main {
  flex: 1;
}
h1,
.page-title {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 3rem);
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.sub {
  color: var(--mut);
  margin: 0 0 18px;
  font-weight: 600;
  font-size: 0.9375rem;
}
.wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  max-width: 920px;
  width: 100%;
  margin: 0;
}
.grid-card {
  width: 100%;
  min-width: 0;
  container-type: inline-size;
  container-name: puzzle;
}
@media (max-width: 760px) {
  .wrap {
    max-width: 100%;
  }
}

.card {
  background: var(--panel);
  border: 3px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.card.grid-card {
  padding: 6px;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  margin: 0;
  box-sizing: border-box;
}
.bar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--mut);
  font-size: 0.875rem;
}
.bar b {
  color: var(--ink);
}
.puzzle-req-note {
  margin: 8px 0 0;
  color: #c42222;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.35;
}
.puzzle-req-note b {
  font-weight: 800;
}
.play-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 180px;
  padding: 28px 20px;
  background: var(--panel);
  border: 3px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--shadow);
  color: var(--mut);
  font-size: 1.125rem;
  font-weight: 800;
}
.play-loading[hidden] {
  display: none !important;
}
.play-loading-spin {
  width: 26px;
  height: 26px;
  border: 3px solid #e0d2bc;
  border-top-color: #ff8a00;
  border-radius: 50%;
  animation: load-spin 0.75s linear infinite;
  flex: none;
}
@media (prefers-reduced-motion: reduce) {
  .play-loading-spin {
    animation: none;
    border-top-color: #ff8a00;
  }
}
.play-topbar {
  margin: 0 0 12px;
  flex-wrap: wrap;
  font-size: 1.25rem;
  gap: 12px;
}
.play-topbar > .play-solved {
  flex: 0 0 auto;
  min-width: 7em;
  margin: 0;
  color: inherit;
  font: inherit;
}
.play-topbar b {
  font-size: 1.35em;
}
.play-topbar button {
  margin: 0;
  flex: 0 0 auto;
}
#cur {
  flex: 1 1 120px;
  min-width: 0;
  min-height: 40px;
  padding: 4px 12px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--acc);
  background: #fff3d6;
  border: 2px solid #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
}
#cur.has-letters {
  opacity: 1;
}
#cur.is-wrong {
  color: #c42222;
  background: #ffe0e0;
}
#grid {
  --cols: 1;
  --gap: clamp(2px, 0.45cqw, 5px);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.c {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  /* Scales with tile width: board width ÷ columns */
  font-size: clamp(
    0.625rem,
    calc(((100cqi / var(--cols)) - var(--gap)) * 0.48),
    2.25rem
  );
  line-height: 1;
  background: var(--tile);
  border: 2px solid var(--tile-border);
  cursor: pointer;
  color: #1a1a1a;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  transition:
    transform 100ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}
.c.b {
  background: #59564e;
  opacity: 1;
  border-color: #2d2b27;
  cursor: not-allowed;
  color: transparent;
  box-shadow: none;
}
.c.k {
  background: hsl(var(--h) 70% 55%);
  color: #10182b;
  border-color: #000;
  cursor: default;
}
.c.s {
  background: var(--yellow);
  color: #1a1a1a;
  border-color: #000;
  transform: scale(0.94);
}
.c.bad {
  background: #ff5a5a;
  color: #1a1a1a;
  border-color: #000;
  transform: scale(0.94);
}
.shake {
  animation: sh 0.3s;
}
@keyframes sh {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shake,
  .c {
    animation: none;
    transition: none;
  }
}

ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
ol li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 10px;
  border: 2px solid #000;
  border-radius: 8px;
  cursor: default;
  background: #fff8ea;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}
ol li .d {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-top: 5px;
  flex: none;
  border: 2px solid #000;
  background: transparent;
}
ol li.ok .d {
  background: hsl(var(--h) 70% 55%);
  border-color: #000;
}
.q {
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--ink);
}
.p {
  display: block;
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.2em;
  color: var(--mut);
  font-size: 1.1875rem;
  line-height: 1.45;
}
.p-blanks {
  display: inline;
  white-space: pre-wrap;
}
.p-label {
  display: inline;
  margin-left: 0.55em;
  white-space: nowrap;
  color: var(--mut);
  font-family: "Nunito", Verdana, Geneva, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: capitalize;
}
ol li.ok .p {
  color: var(--ink);
  font-weight: 800;
}

button,
.btn {
  font-family: "Nunito", Verdana, Geneva, sans-serif;
  font-weight: 800;
  font-size: 0.875rem;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  color: #fff;
  background: linear-gradient(180deg, #6a8fa8, #3d5f78);
  box-shadow: 0 3px 0 #000;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease,
    filter 90ms ease;
}
button:hover:not(:disabled),
.btn:hover:not(:disabled) {
  filter: brightness(1.06);
}
button:active:not(:disabled),
.btn:active:not(:disabled) {
  transform: translateY(3px) scale(0.98);
  box-shadow: 0 0 0 #000;
}
button.btn-primary,
.btn-primary {
  background: linear-gradient(180deg, #266f27, #176318);
  color: #fff;
  border-color: #000;
  box-shadow: 3px 3px 0 #000;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
button.btn-primary:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
.btn-soft {
  background: #fffdf8;
  color: #1a1a1a;
  box-shadow: 3px 3px 0 #000;
  text-shadow: none;
}
.btn-soft:hover:not(:disabled) {
  background: #fff1b8;
  filter: none;
}
button.btn-danger,
.btn-danger {
  background: linear-gradient(180deg, #ff6b6b, #d63b3b);
  color: #fff;
  border-color: #000;
  box-shadow: 3px 3px 0 #000;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
button.btn-danger:hover:not(:disabled),
.btn-danger:hover:not(:disabled) {
  filter: brightness(1.06);
}
button.btn-danger:disabled,
.btn-danger:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  color: #555;
  background: #d8d0c4;
  box-shadow: 2px 2px 0 #888;
  text-shadow: none;
  filter: none;
}
.btn-block {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 14px;
  font-size: 0.9375rem;
  box-sizing: border-box;
}
.btn-lg {
  min-width: 120px;
  padding: 10px 28px;
  font-size: 1rem;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
}
button.btn-primary:disabled,
.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  color: #555;
  background: #d8d0c4;
  box-shadow: 2px 2px 0 #888;
  text-shadow: none;
  filter: none;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #ff8a00;
  outline-offset: 2px;
}
.act {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.finishers-toolbar {
  display: block;
  margin-bottom: 12px;
}
.finishers-search {
  width: 100%;
  border: 2px solid #ff8a00 !important;
  border-radius: 10px;
  box-shadow: 2px 2px 0 rgba(255, 138, 0, 0.35);
}
.finishers-search-hint {
  margin: 8px 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mut);
}
.finishers-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 4px;
  color: var(--mut);
  font-weight: 700;
}
.finishers-loading[hidden] {
  display: none !important;
}
.finishers-loading-spin {
  width: 22px;
  height: 22px;
  border: 3px solid #e0d2bc;
  border-top-color: #ff8a00;
  border-radius: 50%;
  animation: load-spin 0.75s linear infinite;
  flex: none;
}
.finishers-ul[hidden],
.finishers-empty[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .finishers-loading-spin {
    animation: none;
    border-top-color: #ff8a00;
  }
}
.finishers-ul {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.finishers-ul li {
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
}
.finishers-title {
  font-family: "Rubik Puddles", cursive;
  font-weight: 400;
  color: #5a3a1a;
  -webkit-text-stroke: 1px #fff;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #000;
}
.finishers-page-card {
  max-width: 720px;
}
.row-actions {
  margin: 10px 0 0;
  justify-content: flex-start;
}
.row-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(100px, 140px) minmax(
      130px,
      180px
    );
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
@media (max-width: 620px) {
  .row {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .row span {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    padding-top: 12px;
  }
  .row input {
    grid-column: 2;
  }
}
.row span {
  color: var(--mut);
  text-align: right;
}
input {
  font: inherit;
  font-weight: 600;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid var(--input-border);
  background: var(--input);
  color: #222;
  min-width: 0;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}
input::placeholder {
  color: #9aa7b2;
}
.row input:last-child {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#msg,
.msg {
  color: var(--bad);
  margin-top: 8px;
  min-height: 22px;
  font-weight: 700;
}
.msg.ok {
  color: var(--ok);
}

.gate {
  max-width: 560px;
  margin: 6vh auto 0;
  position: relative;
  z-index: 3;
}
.gate h1,
.gate .welcome-title {
  margin: 0 0 18px;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.section-heading {
  margin: 0;
  font: inherit;
  font-weight: 800;
}
.welcome-kicker-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.welcome-emblems {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.welcome-emblem {
  display: block;
  width: clamp(48px, 9vw, 64px);
  height: clamp(48px, 9vw, 64px);
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.45));
  flex-shrink: 0;
}
.welcome-kicker {
  display: block;
  margin: 0;
  font-family: "Rubik Puddles", cursive;
  font-size: clamp(1.625rem, 5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #5a3a1a;
  -webkit-text-stroke: 1px #fff;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #000;
}
.welcome-brand {
  display: block;
  margin: 0;
  font-family: "Moirai One", cursive;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(2.75rem, 9vw, 4.5rem);
  line-height: 1;
  color: #ff8a00;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #000;
  white-space: nowrap;
}
.welcome-card {
  background: #fffdf8;
  border: 2px solid #ff8a00;
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow: 5px 5px 0 #ff8a00;
}
.welcome-card .period-banner {
  margin-bottom: 14px;
}
.welcome-card .period-banner:last-child {
  margin-bottom: 0;
}
.welcome-card .field {
  margin: 0;
}
.welcome-card .field label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: #3a2a1a;
}
.welcome-card input {
  border: 2px solid #ff8a00;
  border-radius: 10px;
  box-shadow: 2px 2px 0 rgba(255, 138, 0, 0.35);
}
.welcome-card input:focus {
  outline: 2px solid #ff8a00;
  outline-offset: 2px;
  border-color: #ff8a00;
}
.welcome-card .hint {
  color: var(--mut);
  font-size: 0.8125rem;
  margin: 10px 0 0;
  font-weight: 600;
}
.welcome-card .act {
  margin-top: 16px;
}
.welcome-card .act .btn-primary {
  min-width: 110px;
}
.gate .hint {
  color: var(--mut);
  font-size: 0.8125rem;
  margin: 10px 0 0;
  font-weight: 600;
}
.gate .act {
  margin-top: 16px;
}
.gate .act .btn-primary {
  min-width: 110px;
}
.admin-login {
  max-width: 420px;
}
.admin-login .page-title {
  font-family: "Rubik Puddles", cursive;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #5a3a1a;
  -webkit-text-stroke: 1px #fff;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #000;
}
.admin-login .card {
  background: #fffdf8;
  border: 2px solid #ff8a00;
  border-radius: 16px;
  box-shadow: 5px 5px 0 #ff8a00;
}
.admin-login .field label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  display: block;
}
.admin-login input {
  border: 2px solid #ff8a00;
  border-radius: 10px;
  box-shadow: 2px 2px 0 rgba(255, 138, 0, 0.35);
}
.admin-login input:focus {
  outline: 2px solid #ff8a00;
  outline-offset: 2px;
  border-color: #ff8a00;
}
.admin-login .btn-primary {
  box-shadow: 3px 3px 0 #000;
}

.period-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 3px solid #000;
  background: #fff8ea;
  color: var(--mut);
  font-size: 0.875rem;
  display: grid;
  gap: 4px;
  box-shadow: 3px 3px 0 #000;
}
.period-banner.open {
  background: linear-gradient(180deg, var(--play-hi), var(--play));
  border-color: #000;
  color: #fff;
}
.period-banner.open strong {
  font-weight: 800;
  color: #fff;
}
.period-banner .period-range {
  display: block;
  font-weight: 700;
  opacity: 0.98;
  word-break: break-word;
}
.period-banner .period-tz {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.88;
}

.period-banner.closed {
  border: 3px solid #000;
  border-radius: 10px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #ff6b6b, #d63b3b);
  color: #fff;
  box-shadow: 3px 3px 0 #000;
  gap: 6px;
}
.period-banner.closed strong {
  color: #fff;
  font-weight: 800;
}
.period-banner.closed .period-range {
  color: #fff;
  opacity: 1;
}

.load-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(50, 50, 50, 0.72);
  backdrop-filter: blur(2px);
}
.load-modal.hidden {
  display: none;
}
.load-modal-card {
  width: min(420px, 100%);
  background: #fffdf8;
  color: var(--ink);
  border: 3px solid #000;
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 6px 6px 0 #000;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.howto-card {
  width: min(620px, 100%);
  gap: 12px;
}
.howto-description,
.howto-extra {
  max-width: 390px;
  margin: 0;
  color: #3a2a1a;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
}
.howto-demo {
  width: min(360px, 100%);
  padding: 16px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff8e8;
  box-shadow: 3px 3px 0 #000;
}
.howto-question {
  margin: 0 0 10px;
  color: #3a2a1a;
  font-size: 0.875rem;
  font-weight: 800;
}
.howto-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  justify-content: center;
  gap: 5px;
}
.howto-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid #000;
  border-radius: 4px;
  background: #fffdf8;
  color: #1a1a1a;
  font-size: 1.4375rem;
  font-weight: 900;
  box-shadow: 2px 2px 0 #000;
}
.howto-blocker {
  background: #59564e;
  border-color: #2d2b27;
}
.howto-demo.is-playing .howto-tile:nth-child(1),
.howto-demo.is-playing .howto-tile:nth-child(2),
.howto-demo.is-playing .howto-tile:nth-child(3) {
  animation: howto-trace 2.7s ease-in-out infinite;
}
.howto-demo.is-playing .howto-tile:nth-child(2) {
  animation-delay: 0.45s;
}
.howto-demo.is-playing .howto-tile:nth-child(3) {
  animation-delay: 0.9s;
}
.howto-answer-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 0;
  color: #3a2a1a;
  font-size: 0.875rem;
  font-weight: 800;
}
.howto-answer {
  color: #2f7b35;
  letter-spacing: 0.08em;
}
.howto-demo.is-playing .howto-answer {
  animation: howto-answer 2.7s ease-in-out infinite;
  animation-delay: 1.35s;
}
.howto-extra {
  font-size: 0.875rem;
}
@keyframes howto-trace {
  0%,
  5%,
  100% {
    transform: scale(1);
    background: #fffdf8;
    box-shadow: 2px 2px 0 #000;
  }
  12%,
  30% {
    transform: scale(1.08);
    background: #ffe56b;
    box-shadow:
      0 0 0 3px #e79b21,
      2px 2px 0 #000;
  }
}
@keyframes howto-answer {
  0%,
  20%,
  100% {
    opacity: 0.35;
    transform: translateY(2px);
  }
  30%,
  75% {
    opacity: 1;
    transform: translateY(0);
  }
}
.load-modal-title {
  margin: 0;
  font-family: "Rubik Puddles", cursive;
  font-weight: 400;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  color: #5a3a1a;
  -webkit-text-stroke: 1px #fff;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #000;
}
.load-modal-spin {
  width: 48px;
  height: 48px;
  border: 4px solid #e0d2bc;
  border-top-color: #ff8a00;
  border-radius: 50%;
  animation: load-spin 0.75s linear infinite;
}
.load-modal.is-ready .load-modal-spin {
  animation: none;
  border-color: #2f8a2f;
  border-top-color: #2f8a2f;
  background: #2f8a2f;
  box-shadow: inset 0 0 0 8px #fffdf8;
}
.load-modal-count {
  margin: 0;
  min-height: 1.1em;
  font-size: clamp(3.25rem, 12vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}
.load-modal-count.pop {
  animation: load-pop 0.35s ease;
}
.load-modal-body {
  display: grid;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: #3a2a1a;
  text-align: left;
}
.load-modal-body p {
  margin: 0;
}
.load-modal-body strong {
  font-weight: 800;
  color: #1a1a1a;
}
.load-modal .btn-primary {
  margin-top: 4px;
}
@keyframes load-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes load-pop {
  from {
    transform: scale(0.7);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .load-modal-spin {
    animation: none;
    border-top-color: #ff8a00;
  }
  .load-modal-count {
    animation: none;
  }
  .howto-demo.is-playing .howto-tile:nth-child(-n + 3) {
    animation: none;
    background: #ffe56b;
    box-shadow:
      0 0 0 2px #e79b21,
      2px 2px 0 #000;
  }
  .howto-demo.is-playing .howto-answer {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.flatpickr-calendar {
  background: #fff8ea !important;
  border: 3px solid #000 !important;
  box-shadow: 4px 4px 0 #000 !important;
  font-family: Verdana, Geneva, sans-serif;
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
span.flatpickr-weekday,
.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-am-pm {
  background: transparent !important;
  color: #1a1a1a !important;
  fill: #1a1a1a !important;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #1a1a1a !important;
}
.flatpickr-day {
  color: #1a1a1a !important;
}
.flatpickr-day:hover,
.flatpickr-day:focus {
  background: #ffe3b8 !important;
  border-color: #000 !important;
  color: #000 !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #2f8a2f !important;
  border-color: #000 !important;
  color: #fff !important;
}
.flatpickr-day.today {
  border-color: #ff8a00 !important;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #a09080 !important;
}
.numInputWrapper span {
  border-color: #c9a87a !important;
}
.flatpickr-time {
  border-top: 1px solid #c9a87a !important;
}
input.flatpickr-input[readonly],
input.flatpickr-alt-input {
  cursor: pointer;
  background: #fff !important;
  color: #222 !important;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  font-size: 0.875rem;
}
.nav a {
  color: #b85a00;
  text-decoration: none;
  font-weight: 700;
}
.nav a:hover {
  color: #000;
  text-decoration: underline;
}

.names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.names li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 2px solid #000;
  border-radius: 8px;
  cursor: default;
  min-width: 0;
  background: #fff8ea;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}
.names .meta {
  color: var(--mut);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.names li.winner {
  border-color: #000;
  background: #fff0a8;
}
.empty {
  color: var(--mut);
  padding: 8px 0;
}
.play-frame {
  position: relative;
}
.play-page > .deco-left {
  z-index: 1;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(170px, 177px) minmax(0, 1fr);
  grid-template-areas:
    "logo player"
    "nav main";
  gap: 18px 28px;
  align-items: start;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px 140px;
  box-sizing: border-box;
}
.play-brand {
  display: contents;
}
.play-frame .logo-pixel {
  position: static;
  display: inline-flex;
  grid-area: logo;
  z-index: 3;
  margin: 0;
}
.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  grid-area: nav;
  z-index: 3;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}
.play-actions > .btn-block,
.play-actions > .questions-coach-wrap {
  flex: 1 1 9.5rem;
  min-width: 0;
  margin: 0;
}
.play-actions .btn-block {
  width: 100%;
  margin: 0;
}
.play-player-row {
  --plate-h: 40px;
  display: inline-grid;
  grid-template-columns: auto minmax(0, max-content);
  align-items: center;
  column-gap: 6px;
  grid-area: player;
  justify-self: start;
  align-self: center;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  height: var(--plate-h);
  margin: 0;
  padding: 0 16px 0 8px;
  border: 2px solid #1a1208;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(165deg, #ffc44d 0%, #f08a00 48%, #d46500 100%);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  overflow: visible;
  box-sizing: border-box;
  z-index: 3;
}
.play-player {
  display: grid;
  align-items: center;
  margin: 0;
  padding: 0;
  min-width: 0;
  height: 100%;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  color: #fffdf8;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 1px rgba(0, 0, 0, 0.35);
}
.play-player b {
  display: block;
  font-size: inherit;
  font-weight: 800;
  line-height: 1;
  color: inherit;
  /* bold caps sit optically high in the em-box */
  transform: translateY(0.08em);
}
.play-avatar {
  position: relative;
  width: 44px;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.play-avatar.is-empty {
  width: 8px;
}
.play-avatar img {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 62px;
  height: 62px;
  margin: 0;
  transform: translate(-50%, -58%);
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.play-avatar img[hidden] {
  display: none;
}
.questions-coach-wrap {
  position: relative;
  min-width: 0;
}
.questions-coach-tip {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  margin: 0;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.35;
  color: #1a1208;
  background: #fff1b8;
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
  pointer-events: none;
}
.questions-coach-tip.hidden {
  display: none;
}
body.questions-coach-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(26, 18, 8, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: auto;
}
body.questions-coach-active .client-frame,
body.questions-coach-active .credit-row,
body.questions-coach-active .site-copyright,
body.questions-coach-active .deco {
  pointer-events: none;
}
body.questions-coach-active .play-frame .logo-pixel,
body.questions-coach-active .play-actions {
  position: relative;
  z-index: 55;
  pointer-events: none;
}
body.questions-coach-active #questionsButton {
  position: relative;
  z-index: 56;
  pointer-events: auto;
  box-shadow:
    0 0 0 4px #ff8a00,
    3px 3px 0 #000;
  animation: questions-coach-pulse 1.2s ease-in-out infinite;
}
body.questions-coach-active .questions-coach-tip {
  z-index: 57;
}
@keyframes questions-coach-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.questions-coach-active #questionsButton {
    animation: none;
  }
}
.questions-modal-card {
  width: min(980px, calc(100vw - 24px));
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.questions-modal-body {
  overflow: auto;
  margin: 8px 0 14px;
  padding-right: 4px;
  max-height: min(68vh, 680px);
  text-align: left;
}
.questions-modal-card .btn-primary {
  align-self: center;
  width: 100%;
  max-width: 180px;
}
.questions-modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 640px) {
  .questions-modal-list {
    grid-template-columns: 1fr 1fr;
  }
}
.questions-modal-list li {
  margin: 0;
  padding: 10px 12px;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  background: #fff8ea;
}
.play-page {
  --credit-clearance: 0px;
}
.play-layout > main {
  grid-area: main;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 8px 0 0 !important;
  box-sizing: border-box;
}
.play-layout .wrap {
  max-width: none;
}
@media (min-width: 901px) {
  .play-layout .grid-card {
    width: 100%;
    max-width: 1100px;
    align-self: center;
    padding: 6px;
  }
}
@media (max-width: 900px) {
  .play-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "player"
      "nav"
      "main";
    gap: 10px;
    padding: 10px 16px 140px;
  }
  .play-page > .deco-left {
    display: none;
  }
  .play-layout > main {
    padding-top: 4px !important;
  }
  .play-player-row {
    margin: 4px 0 6px;
  }
  .play-player {
    max-width: min(14rem, calc(100vw - 7rem));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .play-player b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.stack {
  display: grid;
  gap: 18px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}
.field label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: #3a2a1a;
}
.field .hint {
  color: var(--mut);
  font-size: 0.8125rem;
  margin: 6px 0 0;
}
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 800;
  border: 2px solid #000;
  background: #fff8ea;
  color: var(--ink);
  box-shadow: 2px 2px 0 #000;
}
.status-pill.open {
  background: linear-gradient(180deg, var(--play-hi), var(--play));
  color: #fff;
}
.status-pill.closed {
  background: #d63b3b;
  color: #fff;
}
.draw-result {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--play-hi), var(--play));
  color: var(--play-text);
  font-weight: 800;
  display: none;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.draw-result.show {
  display: block;
}
.draw-result ol {
  margin: 8px 0 0;
  padding-left: 1.2em;
  display: grid;
  gap: 4px;
}
.draw-result li {
  border: none;
  padding: 0;
  cursor: default;
  display: list-item;
  background: transparent;
  box-shadow: none;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--mut);
}
.inline-check input {
  width: auto;
  accent-color: var(--play);
}

.prize-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 10px;
}
.prize-counts .field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.875rem;
}
.prize-counts .field input {
  width: 100%;
  max-width: none;
}
@media (max-width: 720px) {
  .prize-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .prize-counts {
    grid-template-columns: 1fr;
  }
}
.prize-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.prize-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 2px solid #000;
  border-radius: 10px;
  background: #fff8ea;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}
.prize-label {
  font-weight: 800;
  color: var(--ink);
  min-width: 0;
}
.prize-name {
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prize-name.empty-slot {
  color: var(--mut);
  font-weight: 600;
}
@media (max-width: 420px) {
  .prize-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .prize-name {
    text-align: left;
  }
}

.deco {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  line-height: 0;
}
.deco img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.25));
}

.deco-left {
  left: max(-120px, env(safe-area-inset-left, 0px) - 80px);
  bottom: max(-60px, env(safe-area-inset-bottom, 0px) - 40px);
  width: clamp(220px, 42vw, 480px);
}

.site-copyright {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 22px));
  z-index: 30;
  margin: 0;
  padding: 0 12px;
  text-align: center;
  pointer-events: none;
  font-family: "Freckle Face", cursive;
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: #f0b400;
  text-shadow:
    1px 1px 0 #000,
    -1px 0 0 #000,
    0 -1px 0 #000;
}
.credit-row {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 30;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 14px;
  line-height: 1;
  pointer-events: none;
}
.sponsor-credit,
.creator-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  transform-origin: 50% 0%;
}
.credit-anim-sway .sponsor-credit {
  animation: credit-sway 2.8s ease-in-out infinite;
}
.credit-anim-sway .creator-credit {
  animation: credit-sway 3.2s ease-in-out infinite;
  animation-delay: -1.4s;
}
.sponsor-head,
.creator-head {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}
.sponsor-name,
.creator-name {
  display: block;
  margin-top: -12px;
  text-align: center;
  font-family: "Freckle Face", cursive;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: #f0b400;
  text-shadow:
    1px 1px 0 #000,
    -1px 0 0 #000,
    0 -1px 0 #000;
}
.creator-name {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

@keyframes credit-sway {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .credit-anim-sway .sponsor-credit,
  .credit-anim-sway .creator-credit {
    animation: none;
  }
}
@media (max-width: 900px) {
  .deco-left {
    left: max(-90px, env(safe-area-inset-left, 0px) - 60px);
    bottom: max(-50px, env(safe-area-inset-bottom, 0px) - 30px);
    width: clamp(180px, 48vw, 360px);
  }
  main {
    padding-bottom: clamp(120px, 22vh, 200px);
  }
}
@media (max-width: 560px) {
  .credit-row {
    right: max(8px, env(safe-area-inset-right));
    gap: 10px;
  }
  .sponsor-head,
  .creator-head {
    width: 56px;
    height: 56px;
  }
  .sponsor-name {
    font-size: 0.6875rem;
  }
  .creator-name {
    font-size: 0.8125rem;
  }
  .deco-left {
    left: max(-70px, env(safe-area-inset-left, 0px) - 40px);
    bottom: max(-40px, env(safe-area-inset-bottom, 0px) - 24px);
    width: clamp(150px, 52vw, 280px);
  }
  main {
    padding-bottom: clamp(100px, 28vh, 180px);
  }
  .welcome-brand {
    white-space: normal;
  }
}
@media (max-width: 380px) {
  .deco-left {
    left: -50px;
    bottom: -36px;
    width: 170px;
  }
}
