/* Warfare Rush: the page around the canvas. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #11161c; color: #fff;
  font-family: Montserrat, system-ui, sans-serif; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#vig { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 52%, rgba(8,10,14,.5) 100%); }
.fl { display: inline-block; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.4); vertical-align: middle; }

/* ------------------------------------------------------------------ top bar */
#hud { position: fixed; left: 0; right: 0; top: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; pointer-events: none; }
#hud > * { pointer-events: auto; }
#flagBtn { justify-self: start; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px;
  background: rgba(14,18,24,.62); backdrop-filter: blur(6px); font: 600 14px Oswald, sans-serif; letter-spacing: .03em; text-transform: uppercase; max-width: 42vw; }
#flagBtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#score { font: 700 44px/1 Oswald, sans-serif; text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 18px rgba(0,0,0,.45); letter-spacing: .01em; }
#score span { font-size: 20px; margin-left: 3px; opacity: .85; }
#mute { justify-self: end; width: 40px; height: 40px; border-radius: 50%; background: rgba(14,18,24,.62); display: grid; place-items: center; }
#mute .xx { display: none; } #mute.off .xx { display: inline; } #mute.off .wv { display: none; }
#prog { grid-column: 1 / -1; justify-self: center; position: relative; width: min(300px, 62vw); height: 16px; border-radius: 8px;
  background: rgba(14,18,24,.6); overflow: hidden; box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); pointer-events: none; }
#prog-bar { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #2f86ff, #7fc0ff); }
#prog-label { position: absolute; inset: 0; text-align: center; font: 600 11px/16px Oswald, sans-serif; letter-spacing: .14em; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
body[data-state="start"] #score, body[data-state="start"] #prog { visibility: hidden; }
body[data-state="over"] #prog { visibility: hidden; }

/* The squad is nearly gone: the edge of the picture beats red. */
body.low #vig { background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 46%, rgba(190,24,20,.55) 100%); animation: low .7s ease-in-out infinite alternate; }
@keyframes low { from { opacity: .45; } to { opacity: 1; } }

/* How to steer, shown on a player's first runs until they do it. */
#hint { position: fixed; left: 0; right: 0; bottom: calc(15% + env(safe-area-inset-bottom)); text-align: center; pointer-events: none; animation: hintin .4s ease; }
#hint span { display: block; margin-top: 10px; font: 600 17px Oswald, sans-serif; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 2px 4px rgba(0,0,0,.85); }
#hint .hand { display: inline-block; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 0 0 10px rgba(255,255,255,.22), 0 4px 14px rgba(0,0,0,.5); animation: swipe 1.5s ease-in-out infinite alternate; }
#hint.out { opacity: 0; transition: opacity .35s; }
@keyframes swipe { from { transform: translateX(-90px); } to { transform: translateX(90px); } }
@keyframes hintin { from { opacity: 0; } }
body.demo #hint { display: none; }

/* -------------------------------------------------------------- floating text */
#pops { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font: 700 46px Oswald, sans-serif; font-style: normal; white-space: nowrap;
  -webkit-text-stroke: 2px rgba(0,0,0,.55); paint-order: stroke fill; animation: pop .95s cubic-bezier(.2,.9,.3,1) forwards; }
.pop.good { color: #8cc4ff; } .pop.bad { color: #ff6b5e; } .pop.perk { color: #ffd166; font-size: 36px; }
.pop.streak { color: #fff; font-size: 22px; letter-spacing: .1em; text-transform: uppercase; -webkit-text-stroke: 1.5px rgba(0,0,0,.6); }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 18% { opacity: 1; transform: translate(-50%, -70%) scale(1.25); }
  60% { opacity: 1; transform: translate(-50%, -150%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -210%) scale(.9); } }
#banner { position: fixed; left: 0; right: 0; top: 24%; text-align: center; pointer-events: none; opacity: 0; }
#banner b { display: block; font: 700 clamp(38px, 9vw, 72px)/1 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .02em;
  color: #ffd166; text-shadow: 0 3px 0 rgba(0,0,0,.6), 0 0 30px rgba(0,0,0,.6); }
#banner span { display: block; margin-top: 8px; font: 600 clamp(14px, 3.4vw, 20px) Oswald, sans-serif; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 2px 4px rgba(0,0,0,.8); }
#banner.on { animation: ban 2.6s ease forwards; }
@keyframes ban { 0% { opacity: 0; transform: scale(1.5); } 12% { opacity: 1; transform: scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }

/* -------------------------------------------------------------------- cards */
.sheet { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(430px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow-y: auto; padding: 20px 20px 16px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, rgba(22,28,36,.93), rgba(13,17,22,.96)); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(10px); animation: up .35s cubic-bezier(.2,.9,.3,1); }
@keyframes up { from { opacity: 0; transform: translate(-50%, 30px); } }
.sheet h1 { margin: 0; font: 700 44px/1 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.sheet h1 em { font-style: normal; color: #ffd166; }
.kick { margin: 6px 0 12px; font: 600 12px Oswald, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #9fb0c3; }
.flagrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); text-align: left; font-size: 17px; }
.flagrow span { flex: 1; } .flagrow .chg { font: 600 11px Oswald, sans-serif; font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #8cc4ff; }
.dare { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; padding: 9px 10px; border-radius: 12px;
  background: rgba(229,65,58,.16); box-shadow: inset 0 0 0 1px rgba(229,65,58,.5); font-size: 14.5px; }
.stand { margin: 12px 4px 0; font-size: 14.5px; line-height: 1.4; color: #cfd8e3; min-height: 20px; }
.stand b { color: #ffd166; }
.go { display: block; width: 100%; margin-top: 14px; padding: 15px; border-radius: 16px; font: 700 26px Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(180deg, #4c9bff, #1f6fe6); box-shadow: 0 5px 0 #154ea6, 0 10px 24px rgba(31,111,230,.45); transition: transform .08s; }
.go:active { transform: translateY(3px); box-shadow: 0 2px 0 #154ea6; }
.alt { display: block; width: 100%; margin-top: 12px; padding: 12px; border-radius: 14px; font: 600 17px Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,209,102,.14); color: #ffd166; box-shadow: inset 0 0 0 1.5px rgba(255,209,102,.6); }
.how { margin: 12px 0 0; font-size: 13px; color: #9fb0c3; }
.how a { color: #8cc4ff; white-space: nowrap; }
.tiny { margin: 6px 0 0; font-size: 12px; color: #71808f; }
.big { font: 700 76px/1 Oswald, sans-serif; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.big small { font-size: 30px; opacity: .8; }
.forrow { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 8px; font-size: 16px; }
#ov-best { margin: 8px 0 0; font-size: 13px; color: #9fb0c3; }
#ov-best.fresh { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #ffd166; color: #1b1405; font: 700 13px Oswald, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.near { margin: 10px 4px 0; font-size: 15px; font-weight: 600; color: #ffd166; }
.near:empty { display: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.stats div { padding: 8px 4px 7px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.stats b { display: block; font: 700 22px/1.1 Oswald, sans-serif; }
.stats span { display: block; margin-top: 2px; font: 600 10px Oswald, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #9fb0c3; }
.board h3 { margin: 16px 0 6px; font: 600 11px Oswald, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #9fb0c3; }
.board ol { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; font-size: 14.5px; text-align: left; }
.board li.me { background: rgba(47,134,255,.2); box-shadow: inset 0 0 0 1px rgba(47,134,255,.6); }
.board .rk { width: 20px; font: 600 13px Oswald, sans-serif; font-style: normal; color: #9fb0c3; text-align: right; }
.board b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board em { font: 600 14px Oswald, sans-serif; font-style: normal; color: #ffd166; }
.more { display: block; margin-top: 14px; font-size: 13px; color: #8cc4ff; text-decoration: none; }
.more b { text-decoration: underline; }

/* --------------------------------------------------------------- country list */
#pick { position: fixed; inset: 0; background: rgba(6,8,11,.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 14px; z-index: 5; }
.pick-in { width: min(520px, 100%); max-height: min(680px, 92vh); display: flex; flex-direction: column; border-radius: 20px; background: #151b23; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 20px 60px rgba(0,0,0,.6); overflow: hidden; }
.pick-in header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; font: 600 20px Oswald, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
#pick-x { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); }
#pick-q { margin: 6px 16px 10px; padding: 11px 14px; border-radius: 12px; border: 0; outline: 0; background: rgba(255,255,255,.08); color: #fff; font: 500 16px Montserrat, sans-serif; user-select: text; -webkit-user-select: text; }
#pick-list { overflow-y: auto; padding: 0 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
#pick-list button { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; text-align: left; font-size: 14px; }
#pick-list button:hover { background: rgba(255,255,255,.08); }
#pick-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Recording clips (?demo): a caption block inside the platforms' safe area, no start card. */
#hook { position: fixed; left: 0; right: 0; top: 13%; padding: 0 7%; text-align: center; pointer-events: none; }
#hook span { display: block; font: 700 clamp(30px, 8.4vw, 64px)/1.08 Oswald, sans-serif; text-transform: uppercase; color: #fff;
  -webkit-text-stroke: 3px rgba(0,0,0,.6); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(0,0,0,.45); }
#hook span + span { color: #ffd166; }
body.demo #start, body.demo #mute, body.demo .more, body.demo #ov-share { display: none; }

/* A portal's copy: nothing that leads off the portal. */
body.portal .more, body.portal #ov-share, body.portal .how a { display: none; }

#toast { position: fixed; left: 50%; top: 84px; transform: translate(-50%, -20px); padding: 10px 16px; border-radius: 12px; background: #fff; color: #10151b;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 6; max-width: 90vw; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .sheet { left: auto; right: 28px; bottom: 28px; transform: none; animation-name: upr; }
  @keyframes upr { from { opacity: 0; transform: translateY(30px); } }
}
/* A clip is recorded at 1080 wide with no device scaling: everything on top is drawn double. */
@media (min-width: 1000px) and (max-aspect-ratio: 3/4) {
  body.demo #hud, body.demo #hook, body.demo #banner, body.demo .sheet { zoom: 2; }
  body.demo .sheet { width: 430px; bottom: 60px; }
  body.demo #flagBtn span { display: none; }
  body.demo .pop { font-size: 92px; }
  body.demo .pop.streak { font-size: 44px; }
}
@media (max-width: 520px) { #flagBtn span { display: none; } #flagBtn { padding: 6px; } }
@media (max-height: 640px) {
  .sheet h1 { font-size: 34px; } .big { font-size: 56px; } .board, .stats { display: none; }
}
/* In a clip the stage banner drops below the hook's caption. */
body.demo #banner { top: 42%; }
@media (min-width: 1000px) and (max-aspect-ratio: 3/4) { body.demo #banner { top: 21%; } }
/* A phone held sideways: the card goes wide and low, the two buttons sit side by side,
   so "March again" is on screen without scrolling. */
@media (max-height: 480px) and (min-aspect-ratio: 5/4) {
  .sheet { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 14px); bottom: calc(7px + env(safe-area-inset-bottom)); padding: 10px 16px 10px; border-radius: 16px;
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; align-items: center; }
  .sheet > * { grid-column: 1 / -1; margin-top: 3px !important; margin-bottom: 3px !important; }
  .sheet .big { font-size: 44px; line-height: 1; }
  .sheet h1 { font-size: 28px; }
  .sheet .go, .sheet .alt { grid-column: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; font-size: 18px; }
  .sheet .stand, .sheet .more { font-size: 12px; }
  .sheet #st-go { grid-column: 1 / -1; }
  .sheet #ov-best { justify-self: center; }
}

.more a { color: #8cc4ff; text-decoration: none; }
p.more { margin-bottom: 0; line-height: 1.5; color: #7f8ea0; }
