@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/brand/ubuntu-700.woff2") format("woff2");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 70% 20%, rgba(255, 225, 84, 0.16), transparent 60%),
    #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top)) 24px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}
.when {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px calc(48px + env(safe-area-inset-bottom));
}
@media (min-width: 861px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  .top, .layout { width: 100%; }
  .layout { flex: 1; align-content: center; }
}
h1 {
  margin: 0;
  font-family: Ubuntu, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.show {
  margin: 8px 0 0;
  font-family: Ubuntu, sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffe154;
}
.lede, .ready, .hint {
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.4;
}
.lede { margin: 16px 0 0; }
.field {
  display: block;
  margin: 22px 0 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.combo { position: relative; }
input, select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #2c2c2e;
  border-radius: 14px;
  background: #141416;
  outline: none;
}
input:focus, select:focus { border-color: #ffe154; }
.results {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  background: #1c1c1e;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.results button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}
.results button:hover, .results button[aria-selected="true"] { background: #2c2c2e; }
.results img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  image-rendering: pixelated;
  background: #ffe154;
}
.results strong { display: block; font-size: 15px; }
.results span { color: rgba(255, 255, 255, 0.55); font-size: 13px; }
.miss {
  margin: 8px 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}
.ready { margin: 8px 0 0; min-height: 1.4em; }
.actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.btn {
  flex: 1;
  min-height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.light { border: 0; background: #fff; color: #111; }
.btn.dark { border: 1px solid #3a3a3c; background: #1c1c1e; color: #fff; }
.hint { margin: 10px 0 0; font-size: 13px; }

.stage { min-width: 0; }
canvas {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }
  .stage { order: -1; }
  .actions { flex-direction: column; }
  h1 { font-size: 42px; }
  .when { font-size: 11px; letter-spacing: 0.04em; }
}
