* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 18px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f1ea;
  color: #1f1d1a;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
[hidden] { display: none !important; }
main { max-width: 480px; margin: 0 auto; padding: 16px; }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 12px; }
.note { margin: 6px 0 12px; color: #4a463f; }
.big-note { font-size: 22px; margin: 6px 0 12px; }
label, .label { display: block; font-weight: 600; margin: 12px 0 6px; }
input {
  width: 100%; height: 56px; padding: 0 14px; font-size: 18px;
  border: 2px solid #c9c3b6; border-radius: 12px; background: #fff; color: inherit;
}
.btn, .team-btn {
  display: block; width: 100%; min-height: 56px; margin: 10px 0; padding: 12px 16px;
  font: inherit; font-weight: 700; color: #fff; background: #3b3a37;
  border: 3px solid transparent; border-radius: 14px; touch-action: manipulation;
}
.btn.primary { background: #1f1d1a; }
.btn.good { background: #2e9e5b; }
.btn.neutral { background: #8a867d; }
.btn.small { width: auto; flex: 1; background: #fff; color: #1f1d1a; border-color: #c9c3b6; }
.btn.small.on { background: #1f1d1a; color: #fff; border-color: #1f1d1a; }
.btn:disabled { opacity: 0.4; }
.teams { display: flex; gap: 8px; }
.team-btn { margin: 0 0 12px; padding: 12px 4px; opacity: 0.55; }
.team-btn.on { opacity: 1; border-color: #1f1d1a; }
.row { display: flex; gap: 10px; }
.timer { font-size: 72px; font-weight: 800; text-align: center; margin: 8px 0; }
.timer.over { font-size: 36px; }
.word { font-size: 40px; font-weight: 800; text-align: center; margin: 8px 0; overflow-wrap: anywhere; }
canvas { display: block; width: 100%; background: #fff; border: 2px solid #c9c3b6; border-radius: 12px; touch-action: none; }
.team-card { border-radius: 12px; padding: 10px 14px; margin: 8px 0; color: #fff; }
.team-card strong { display: block; font-size: 20px; }
.team-card .off { opacity: 0.55; }
.banner {
  position: fixed; left: 0; right: 0; top: 0; z-index: 10; padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top)); background: #b3261e; color: #fff; text-align: center; font-weight: 600;
}
footer { display: flex; justify-content: center; gap: 24px; padding: 8px 16px 20px; }
.link { font: inherit; min-height: 56px; background: none; border: 0; color: #6b665c; text-decoration: underline; }
