* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: linear-gradient(#3b1209, #120604 55%, #1c0b05); color: #ffd9a0;
  font-family: system-ui, -apple-system, sans-serif;
  overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
canvas { display: block; touch-action: none; }

.screen {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}
[hidden] { display: none !important; }
#screen-play, #screen-countdown { pointer-events: none; }
#screen-title { justify-content: flex-end; padding-bottom: 10vh; background: linear-gradient(transparent 30%, rgba(18, 6, 4, .85) 62%); }
.panel { background: rgba(18, 6, 4, .84); }

h1 { margin: 0; font-size: clamp(44px, 14vw, 64px); line-height: .95; letter-spacing: 2px; font-weight: 900; color: #ffb347; text-shadow: 0 0 18px #ff5a1f, 0 3px 0 #7a2410; }
h2 { margin: 0; color: #ffb347; text-shadow: 0 0 10px #ff5a1f; }
.how { list-style: none; padding: 0; margin: 0 0 8px; font-size: 16px; line-height: 1.6; }

.btn {
  appearance: none; border: 0; border-radius: 999px; padding: 16px 32px; min-width: 240px;
  font: 900 20px system-ui, sans-serif; color: #fff; background: #ff5a1f;
  box-shadow: 0 0 22px rgba(255, 90, 31, .7), 0 4px 0 #9a2a08; touch-action: manipulation;
}
.btn:active { transform: translateY(2px); box-shadow: 0 0 14px rgba(255, 90, 31, .6), 0 2px 0 #9a2a08; }
.btn.ghost { background: transparent; border: 2px solid #ffb347; color: #ffb347; box-shadow: none; font-size: 16px; padding: 12px 24px; }
.btn.small { min-width: 0; padding: 12px 20px; font-size: 16px; }
.icon {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 48px; height: 48px;
  border-radius: 50%; border: 2px solid #ffb347; background: rgba(18, 6, 4, .6); font-size: 22px; touch-action: manipulation;
}

.count { font: 900 120px system-ui, sans-serif; color: #fff; text-shadow: 0 0 30px #ff5a1f; }
.hint { font-size: 18px; margin: 0; }
.kicker { margin: 0; letter-spacing: 3px; font-weight: 800; opacity: .8; }
.big { font: 900 64px system-ui, sans-serif; color: #fff; text-shadow: 0 0 24px #ff5a1f; }
.detail { margin: 0; opacity: .85; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 340px; margin: 8px auto; }
.chip { border: 2px solid #ffb347; background: transparent; color: #ffd9a0; border-radius: 999px; padding: 10px 16px; font: 700 17px system-ui, sans-serif; touch-action: manipulation; }
form { display: flex; gap: 8px; justify-content: center; }
input {
  font: 600 17px system-ui, sans-serif; padding: 12px 14px; width: 180px; border-radius: 12px;
  border: 2px solid #ffb347; background: #1f0b06; color: #fff;
  -webkit-user-select: text; user-select: text; touch-action: manipulation;
}

.board { list-style: none; padding: 0; margin: 8px 0 12px; width: min(340px, 100%); }
.board li { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 18px; border-bottom: 1px solid rgba(255, 179, 71, .15); }
.board li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 12px; }
.board li.me { background: rgba(255, 179, 71, .25); border-radius: 10px; font-weight: 800; }
.board li.empty { justify-content: center; opacity: .7; }

#rotate { display: none; position: fixed; inset: 0; z-index: 10; background: #120604; align-items: center; justify-content: center; font-size: 22px; }
@media (orientation: landscape) and (max-height: 520px) { #rotate { display: flex; } }
.haptic { position: fixed; left: -9999px; top: 0; }
