/* Challenger — premium urban adventure. Dark navy/black + restrained yellow. */
:root {
  --bg: #0b0e17;
  --bg2: #101424;
  --card: #151b30;
  --card-2: #1c2440;
  --ink: #f4f2ea;
  --dim: #a3adc7;
  --accent: #f5c518;
  --accent-ink: #141414;
  --green: #35d05a;
  --red: #ff5348;
  --blue: #4da3ff;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: radial-gradient(120% 60% at 50% -10%, #1a2140 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.5; min-height: 100vh;
}
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.landing { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px 20px; text-align: center; gap: 16px; }
.landing.narrow { max-width: 560px; margin: 0 auto; }
.play { max-width: 520px; margin: 0 auto; padding: 16px 16px 32px; min-height: 100vh; }
.team-page { justify-content: flex-start; padding-top: 28px; }
.admin { max-width: 920px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.mark { font-size: 44px; font-weight: 900; color: var(--accent); letter-spacing: 1px; }
.mark-big { font-size: 72px; font-weight: 900; color: var(--accent); }
.mark-sm { font-weight: 900; color: var(--accent); }

h1 { font-size: clamp(30px, 9vw, 50px); font-weight: 900; letter-spacing: .5px; }
h2 { font-size: 26px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; letter-spacing: .3px; }
.tagline { font-size: clamp(17px, 5vw, 24px); font-weight: 800; color: var(--accent); letter-spacing: 2px; }
.sub { color: var(--dim); font-size: 15px; }
.fineprint { color: var(--dim); font-size: 12px; }
.fineprint.center, .center { text-align: center; }
.label { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.big { font-size: 20px; font-weight: 800; }
.points { color: var(--accent); font-weight: 800; font-size: 20px; }
.status { font-weight: 700; font-size: 14px; }
.status.live { color: var(--green); }
.status.idle { color: var(--dim); }
.status.error { color: var(--red); }

.card { background: var(--card); border: 1px solid #2a3358; border-radius: var(--radius);
  padding: 18px; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.card.mission { border-color: var(--accent); }
.card.safety { text-align: left; font-size: 13px; }
.card.text { text-align: left; }
.card.text p { margin-bottom: 8px; }

.btn { display: inline-block; background: var(--card-2); color: var(--ink);
  border: 1px solid #39436e; border-radius: 12px; padding: 12px 18px; font-size: 15px;
  font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; text-align: center;
  min-height: 48px; }
.btn:hover { background: #252d55; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-big { padding: 16px; font-size: 17px; background: var(--accent); color: var(--accent-ink); border: none; }
.btn-big:hover { background: #ffd83d; }
.btn-success { background: var(--green); color: #05230f; border: none; }
.btn-danger { background: var(--red); color: #fff; border: none; }
.btn-skip { background: transparent; color: var(--dim); border: 1px solid #39436e; }
.btn-ghost { background: transparent; border: 1px solid #39436e; width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn-row.wrap { flex-wrap: wrap; }
.inline-form { display: inline; }
.inline-form .btn { width: auto; }
.inline-form-col { display: flex; flex-direction: column; gap: 10px; }
.linklike { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 4px; }

label { font-size: 13px; font-weight: 600; color: var(--dim); display: block; margin-top: 6px; text-align: left; }
input[type=text], input[type=password], input:not([type]), input[type=number], textarea, select {
  background: var(--bg2); color: var(--ink); border: 1px solid #39436e; border-radius: 10px;
  padding: 12px; font-size: 16px; width: 100%; min-height: 48px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; text-align: left; }
.checkbox input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }

.zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zone { display: flex; align-items: center; gap: 8px; background: var(--bg2);
  border: 1px solid #39436e; border-radius: 10px; padding: 12px; font-size: 14px;
  color: var(--ink); cursor: pointer; min-height: 52px; }
.zone.active { border-color: var(--accent); }
.zone input { width: 20px; height: 20px; }

.mission-card { background: var(--card); border: 1px solid #2a3358; border-radius: var(--radius);
  padding: 22px; margin: 14px 0; }
.mission-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mission-type { background: var(--accent); color: var(--accent-ink); font-size: 12px;
  font-weight: 800; padding: 4px 12px; border-radius: 99px; letter-spacing: 1px; }
.mission-id { color: var(--dim); font-size: 13px; font-weight: 600; }
.mission-title { font-size: 23px; font-weight: 800; margin-bottom: 8px; }
.mission-instruction { font-size: 16px; margin-bottom: 10px; white-space: pre-wrap; }
.mission-points { color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.actions { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.consent { background: rgba(53, 208, 90, .1); border: 1px solid rgba(53, 208, 90, .4);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.hunt-banner { background: rgba(255, 83, 72, .12); border: 1px solid rgba(255, 83, 72, .5);
  border-radius: 10px; padding: 12px 14px; margin: 10px 0; font-weight: 700; font-size: 14px; }
.pause-banner { background: rgba(77, 163, 255, .12); border: 1px solid rgba(77, 163, 255, .5);
  border-radius: 10px; padding: 12px 14px; margin: 10px 0; font-weight: 700; font-size: 14px; text-align: center; }
.mission-hint { margin-top: 14px; padding: 10px 12px; background: var(--bg2);
  border-radius: 10px; font-size: 13px; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.empty-state { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid #2a3358; flex-wrap: wrap; }
.topbar .left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar .right { display: flex; gap: 10px; align-items: center; }
.pts { color: var(--accent); font-weight: 800; }
.mission-count { color: var(--dim); font-size: 13px; font-weight: 600; }
.zone-badge { background: var(--accent); color: var(--accent-ink); font-size: 11px;
  font-weight: 800; padding: 2px 8px; border-radius: 99px; }

.clues { margin: 18px 0; }
.clues ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.clues li { background: var(--bg2); border: 1px dashed #4a5585; border-radius: 10px;
  padding: 10px 14px; font-size: 14px; }
.member-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.invite-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid #2a3358; }

.bottom-nav { display: flex; gap: 10px; margin-top: 22px; }
.nav-btn { flex: 1; text-align: center; padding: 14px 8px; background: var(--card-2);
  border: 1px solid #39436e; border-radius: 10px; text-decoration: none; color: var(--ink);
  font-weight: 700; min-height: 52px; display: flex; align-items: center; justify-content: center; }

.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { background: var(--card); border: 1px solid #2a3358; border-radius: 10px; padding: 12px; }
.metric strong { font-size: 24px; display: block; }
.metric .hint { color: var(--dim); font-size: 12px; }
.metrics-grid.kpi { grid-template-columns: repeat(2, 1fr); }
.metric.big { background: var(--accent); color: var(--accent-ink); padding: 16px; border: none; }
.metric.big .label { color: rgba(0,0,0,.65); }
.metric.big strong { font-size: 32px; }
.metric.big .hint { color: rgba(0,0,0,.6); }
.mr-x-row { font-size: 14px; }
.fb-row { display: flex; gap: 8px; }
.fb-row .btn { width: auto; flex: 1; font-size: 20px; padding: 10px 0; }
.cards { display: grid; gap: 14px; }
.cards .card { max-width: none; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid #2a3358; text-align: left; }
.table th { color: var(--dim); font-size: 12px; text-transform: uppercase; }
.events { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.events .ts { color: var(--dim); margin-right: 8px; }
.events .kind { color: var(--accent); font-weight: 700; margin-right: 8px; }
.inline { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.poster { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 30px; gap: 14px; }
.poster h1 { font-size: clamp(40px, 10vw, 64px); }
.qr { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 10px; }
.qr-big { width: 300px; height: 300px; background: #fff; padding: 12px; border-radius: 14px; }
.url { color: var(--dim); font-size: 14px; word-break: break-all; }

@media (max-width: 480px) {
  .btn-big { padding: 18px 16px; font-size: 18px; }
  .mission-instruction { font-size: 17px; line-height: 1.6; }
  .actions { gap: 12px; }
  textarea[name="note"] { min-height: 64px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@supports (padding: max(0px, 0px)) {
  .play { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
  .landing { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media print {
  body { background: #fff; color: #000; }
  .poster { min-height: auto; padding: 2cm; gap: 20px; }
  .poster h1 { font-size: 54pt; }
  @page { size: A4 portrait; margin: 0; }
}
