/* Phone page: big targets, one thing at a time. */
body { background: radial-gradient(120% 70% at 50% 0%, #17336a 0%, var(--navy-800) 55%, var(--navy-900) 100%) fixed;
  min-height: 100dvh; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.app { min-height: 100dvh; display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 16px
  max(18px, env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; }
.center { margin: auto 0; text-align: center; }
h1, h2 { margin: 0; }
h1.display { font-size: 44px; }
h2.display { font-size: 32px; }
p { line-height: 1.45; }
.lead { font-size: 18px; color: var(--ice); }
.muted { color: var(--ice-dim); font-size: 15px; }
.small { font-size: 13px; color: var(--ice-dim); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.spacer { flex: 1; min-height: 12px; }

.btn { display: block; width: 100%; padding: 17px 18px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700;
  font-size: 18px; background: var(--gold); color: #1b1404; text-align: center; text-decoration: none; }
.btn:active { transform: translateY(1px); filter: brightness(.95); }
.btn.ghost { background: rgba(255,255,255,.08); color: var(--ice); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }
.btn.quiet { background: none; color: var(--ice-dim); font-weight: 600; padding: 12px; font-size: 16px; }
.btn[disabled] { opacity: .45; }
.link { background: none; border: 0; color: var(--ice-dim); text-decoration: underline; padding: 8px; font-size: 15px; cursor: pointer; }

.brand { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.brand svg { width: 26px; height: 26px; }
.brand span { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; color: var(--ice-dim); }

.nation { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06);
  box-shadow: inset 4px 0 0 var(--c, var(--gold)); }
.nation img.flag { width: 72px; }
.nation .name { font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
.tables { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tables button { border: 0; border-radius: 14px; padding: 12px; background: rgba(255,255,255,.07); cursor: pointer; text-align: left;
  box-shadow: inset 0 -4px 0 var(--c); display: flex; flex-direction: column; gap: 8px; }
.tables button img { width: 100%; }
.tables button b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 19px; line-height: 1; }
.tables button[disabled] { opacity: .4; }

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.person { border: 0; background: rgba(255,255,255,.07); border-radius: 14px; padding: 10px 6px 12px; cursor: pointer; display: flex;
  flex-direction: column; align-items: center; gap: 6px; font-size: 14px; line-height: 1.2; }
.person img { width: 72px; height: 72px; object-fit: contain; }
.person.taken { opacity: .45; }
.person small { color: var(--ice-dim); }

input.text { width: 100%; padding: 16px; font-size: 20px; border-radius: 12px; border: 0; background: #fff; color: #0b1d3a; }
input.code { text-transform: uppercase; letter-spacing: .4em; text-align: center; font-family: var(--display); font-weight: 800; font-size: 34px; }
.error { background: rgba(255,107,107,.15); color: #ffd2d2; padding: 10px 12px; border-radius: 10px; font-size: 15px; }

.hero { display: flex; justify-content: center; padding: 8px 0; }
.hero .athlete { --w: 170px; }

/* selfie */
.crop-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto; touch-action: none; }
.crop-canvas { width: 280px; height: 280px; border-radius: 16px; background: #000; touch-action: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(7,21,48,.6); pointer-events: none;
  outline: 3px solid var(--gold); outline-offset: -3px; }
.crop-zoom { width: 100%; margin-top: 12px; accent-color: var(--gold); }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--gold);
  animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* in the show */
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06);
  box-shadow: inset 0 -3px 0 var(--c); margin-bottom: 14px; }
.topbar img.flag { width: 44px; }
.topbar .who { line-height: 1.15; flex: 1; min-width: 0; }
.topbar .who b { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who span { font-size: 13px; color: var(--ice-dim); }
.topbar .pts { font-family: var(--display); font-weight: 800; font-size: 22px; }

.card { background: rgba(255,255,255,.06); border-radius: 16px; padding: 16px; }
.joker { display: grid; gap: 8px; }
.joker button { border: 0; border-radius: 12px; padding: 13px 14px; text-align: left; background: rgba(255,255,255,.07); cursor: pointer;
  font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.joker button.on { background: var(--gold); color: #1b1404; }
.joker button[disabled] { opacity: .4; }

.question { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 4px 0 14px; }
.timer { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; margin-bottom: 14px; }
.timer i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.answers { display: grid; gap: 10px; flex: 1; grid-auto-rows: minmax(68px, 1fr); }
.answers button { border: 0; border-radius: 16px; padding: 12px 16px; text-align: left; font-size: 19px; font-weight: 700; color: #fff;
  cursor: pointer; display: flex; align-items: center; gap: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.answers button .k { font-family: var(--display); font-weight: 800; font-size: 26px; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; background: rgba(0,0,0,.18); flex: none; }
.answers button:nth-child(1) { background: var(--a1); } .answers button:nth-child(2) { background: var(--a2); }
.answers button:nth-child(3) { background: var(--a3); color: #241a05; text-shadow: none; } .answers button:nth-child(4) { background: var(--a4); }
.answers.locked button:not(.pick) { opacity: .28; }
.answers.locked button.pick { box-shadow: 0 0 0 4px #fff; }
.answers button.right { box-shadow: 0 0 0 4px var(--ok); opacity: 1 !important; }

.result { text-align: center; padding: 18px; border-radius: 18px; }
.result.ok { background: rgba(60,207,142,.16); }
.result.no { background: rgba(255,107,107,.13); }
.result .big { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1; text-transform: uppercase; }
.lookup { text-align: center; margin: auto 0; }
.lookup .display { font-size: 38px; }

.cheers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cheers button { border: 0; border-radius: 14px; padding: 14px 4px; background: rgba(255,255,255,.08); cursor: pointer; font-size: 30px; }
.cheers button span { display: block; font-size: 12px; color: var(--ice-dim); margin-top: 4px; }

table.medals { width: 100%; border-collapse: collapse; font-size: 15px; }
table.medals td { padding: 7px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
table.medals td.r { text-align: right; font-weight: 700; }
table.medals tr.mine td { color: var(--gold); font-weight: 700; }
table.medals img { width: 28px; vertical-align: middle; border-radius: 3px; }

.net { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: #b8860b; color: #1b1404; text-align: center;
  padding: 6px; font-weight: 700; font-size: 14px; }
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(7,21,48,.92); display: grid; place-items: center; text-align: center; padding: 24px; }
.overlay .display { font-size: 40px; }
