@font-face {
  font-family: Unbounded;
  src: url("/fonts/unbounded-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Commissioner;
  src: url("/fonts/commissioner-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-weight: 400;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: #1a120c;
  background:
    radial-gradient(ellipse at 50% 30%, #f3e2c0 0%, #e7d3ae 45%, #c4a574 100%);
  font-family: Commissioner, sans-serif;
}

.pick {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.brand {
  margin: 12px 0 0;
  font-family: Unbounded, sans-serif;
  font-size: 40px;
  letter-spacing: -0.04em;
}

.lead { margin: 8px 0 18px; color: #3a2a14; }

.kicker {
  margin: 16px 0 8px;
  font-family: Unbounded, sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picks { display: grid; gap: 8px; }

.picks button, #start, .end {
  font-family: Unbounded, sans-serif;
  border: 0;
  cursor: pointer;
}

.picks button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6edd4;
  color: #1a120c;
  border: 3px solid #1a120c;
  box-shadow: 4px 4px 0 #1a120c;
}

.picks button[aria-pressed="true"] {
  border-color: #1a120c;
  background: #f0d48a;
}

.picks small { display: block; margin-top: 4px; font-family: Commissioner, sans-serif; color: #3a2a14; }

#start {
  margin-top: 22px;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: #f0d48a;
  color: #1a120c;
  border: 3px solid #1a120c;
  box-shadow: 5px 5px 0 #1a120c;
  font-size: 18px;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.felt {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.felt canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.note {
  position: fixed;
  top: 52px;
  left: 50%;
  z-index: 8;
  transform: translateX(-50%);
  margin: 0;
  max-width: 86vw;
  padding: 8px 12px;
  border: 3px solid #1a120c;
  border-radius: 10px;
  background: #f6edd4;
  color: #1a120c;
  text-align: center;
  font-family: Commissioner, sans-serif;
  font-size: 16px;
  box-shadow: 4px 4px 0 #1a120c;
  pointer-events: none;
}

.note[hidden] { display: none; }

.timer {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 8;
  margin: 0;
  transform: translateX(-50%);
  padding: 4px 10px;
  border: 3px solid #1a120c;
  border-radius: 8px;
  background: #f6edd4;
  color: #1a120c;
  text-align: center;
  font-family: Unbounded, sans-serif;
  pointer-events: none;
}

.arm,
.end {
  position: fixed;
  z-index: 9;
  border-radius: 14px;
  color: #1a120c;
  border: 3px solid #1a120c;
  box-shadow: 5px 5px 0 #1a120c;
  pointer-events: auto;
  font-family: Unbounded, sans-serif;
  font-size: 12px;
  line-height: 1.25;
  padding: 8px 6px;
}

.arm {
  position: absolute;
  width: 92px;
  min-height: 48px;
  background: #e8a84a;
  pointer-events: auto;
}

.end {
  right: 12px;
  width: 108px;
  min-height: 56px;
  background: #f0d48a;
}

.arm small {
  display: block;
  margin-top: 4px;
  font-family: Commissioner, sans-serif;
  font-size: 11px;
  font-weight: 400;
}

.arm:disabled,
.end:disabled {
  filter: grayscale(0.55);
  opacity: 0.85;
}

.zoom {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: min(280px, 86vw);
  padding: 16px;
  border-radius: 16px;
  background: #f8f1dc;
  color: #1a120c;
  border: 3px solid #1a120c;
  box-shadow: 8px 8px 0 #1a120c;
  z-index: 9;
}

.zoom p { margin: 0 0 8px; }
#zoom-art {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #efe2c2;
}
#zoom-art[hidden] { display: none; }
#zoom-name { font-family: Unbounded, sans-serif; font-size: 22px; }

.result {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(10, 8, 6, 0.72);
  text-align: center;
}

.result[hidden] { display: none; }

#result-title {
  margin: 0;
  font-family: Unbounded, sans-serif;
  font-size: clamp(28px, 8vw, 40px);
  color: #fff6ea;
  text-shadow: 4px 4px 0 #1a120c;
}

#result-hint {
  margin: 0 0 8px;
  font-size: 18px;
  color: #f6edd4;
}

.result[data-outcome="you"] #result-title { color: #ffe08a; }
.result[data-outcome="foe"] #result-title { color: #ffb4a8; }

#result-ok {
  justify-self: center;
  min-width: 180px;
  padding: 14px 20px;
  border-radius: 14px;
  border: 3px solid #1a120c;
  background: #f0d48a;
  color: #1a120c;
  font-family: Unbounded, sans-serif;
  font-size: 16px;
  box-shadow: 5px 5px 0 #1a120c;
}

body.shake .felt { animation: shake 0.25s linear; }

@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
