/* Play is a single viewport. Other routes keep normal scroll and zoom. */
html.play-route, .play-route body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
.play-route body {
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.play-route .shell { width: min(1000px, calc(100% - 24px)); }
.play-route .topbar { flex: none; height: clamp(45px, 7dvh, 70px); }
.play-route #app {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: clamp(7px, 1.8dvh, 20px) 0 0;
}
.play-screen {
  width: 100%;
  max-width: none;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(5px, 1.25dvh, 14px);
}
.play-screen .play-heading, .play-screen .game-toolbar { margin: 0; }
.play-heading h1 { font-size: clamp(28px, 6dvh, 56px); }
.play-screen .play-footer {
  margin: 0;
  gap: 4px 10px;
  font-size: 11px;
  min-height: 25px;
}
.play-footer .invite-button { min-height: 28px; }
.play-route .legal-footer {
  flex: none;
  margin: 0 auto;
  gap: 2px 18px;
  padding: 2px 0 5px;
  font-size: 10px;
}

.play-screen .game-card {
  display: grid;
  grid-template-rows: auto 5px auto minmax(0, 1fr) auto;
  min-height: 0;
  touch-action: none;
  box-shadow: 0 4px 0 var(--ink);
}
.play-screen .game-topline { grid-row: 1; min-height: 42px; padding: 7px clamp(10px, 2vw, 20px); }
.play-screen .phase-meter { grid-row: 2; }
.play-screen .live-h2h { grid-row: 3; padding: 4px 10px; }
.play-screen .arena {
  grid-row: 4;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  padding: 0 clamp(8px, 3vw, 24px);
  justify-content: flex-start;
}
.play-screen .solo-arena { padding-top: clamp(4px, 4cqh, 24px); gap: clamp(2px, 1.5cqh, 6px); }
.play-screen .solo-score { font-size: clamp(36px, 27cqh, 105px); font-feature-settings: "tnum"; }
.play-screen .best-track { height: 5px; }
.play-screen .mascot-wrap,
.play-screen .game-card:not(.solo-mode) .mascot-wrap {
  width: clamp(48px, 45cqh, 160px);
  height: clamp(52px, 42cqh, 162px);
  bottom: 1%;
}
.play-screen .mascot, .play-screen .game-card:not(.solo-mode) .mascot { width: 90%; height: 100%; }
.play-screen .game-card:not(.solo-mode) .mascot-wrap { width: clamp(38px, 27cqh, 125px); height: clamp(40px, 28cqh, 130px); }
.play-screen .contestants { padding-top: clamp(3px, 3cqh, 16px); gap: clamp(40px, 13vw, 85px); }
.play-screen .country-name { font-size: clamp(11px, 6cqh, 19px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-screen .score { font-size: clamp(22px, 15cqh, 56px); }
.play-screen .flag-frame { min-width: 32px; height: clamp(22px, 14cqh, 45px); padding: 3px; }
.play-screen .flag-frame img { height: 100%; width: auto; aspect-ratio: 4/3; }
.play-screen .versus { top: 30%; width: 33px; height: 33px; }
.play-screen .rope-stage { height: clamp(26px, 16cqh, 50px); }
.play-screen .world-lobby-title { margin-top: 12cqh; font-size: clamp(20px, 15cqh, 48px); }
.play-screen .game-bottom { grid-row: 5; padding: 9px 10px 5px; gap: 7px; }
.play-screen .tap-button {
  min-height: clamp(46px, 9dvh, 100px);
  padding: 7px 9px;
  transition: background .08s, box-shadow .05s;
  touch-action: none;
  transform: none; /* The hit target must not move under a fast tap. */
}
.play-screen .tap-button:active, .play-screen .tap-button.pressed { background: #dc5238; }
.play-screen .personal-line { min-height: 17px; gap: 3px 9px; }
.play-screen .personal-count { font-size: 10px; }
.play-screen .personal-count b { font-size: 14px; }
.pull-pace { display: none; margin-left: auto; font-size: 10px; white-space: nowrap; }
.pull-pace b { color: var(--ink); font-size: 14px; }
[data-phase="match"] .pull-pace { display: inline; }
[data-phase="match"] .personal-count { margin-left: 0; }
.play-screen .match-note { font-size: 10px; }
.play-screen .tap-pop { bottom: 30%; }
#input-notice {position:absolute;z-index:8;left:50%;top:50%;transform:translate(-50%,-50%);max-width:92%;padding:10px 15px;border:2px solid var(--ink);border-radius:10px;background:#fff1ce;color:#822d20;font-weight:900;text-align:center;pointer-events:none;box-shadow:0 3px 0 var(--ink);}
#input-notice[hidden] {display:none;}
#leader-sections[data-board="solo"] { grid-template-columns: minmax(0, 1fr); }
#leader-sections[data-board="solo"] > .stack:first-child,
#leader-sections[data-board="solo"] > .stack:nth-child(2) > .panel:not(#solo-leaderboard-panel) { display: none; }

@container (max-height: 195px) {
  .game-card:not(.solo-mode) .arena .mascot-wrap { display: none; }
  .arena .contestants .score-line { margin: 2px 0 0; }
  .arena .solo-score-label { margin-bottom: 0; }
}
@media (max-width: 340px) {
  .play-route .shell { width: calc(100% - 16px); }
  .play-route .nav-link { padding-inline: 9px; }
  .play-screen .game-toolbar .mode-switch button { min-width: 44px; padding-inline: 8px; }
  .play-screen .game-toolbar .game-country span { max-width: 82px; }
}
@media (orientation: landscape) and (max-height: 510px) {
  .play-route .topbar { height: 41px; }
  .play-route .brand-mark { width: 30px; height: 30px; }
  .play-screen .play-heading { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .play-screen { grid-template-rows: auto minmax(0, 1fr) auto; gap: 5px; }
  .play-screen .game-toolbar .mode-switch button { min-height: 29px; padding-block: 4px; }
  .play-screen .game-card { grid-template-columns: minmax(0, 1fr) minmax(126px, 26%); }
  .play-screen .game-topline, .play-screen .phase-meter, .play-screen .live-h2h { grid-column: 1 / -1; }
  .play-screen .game-topline { min-height: 34px; padding-block: 5px; }
  .play-screen .clock strong { font-size: 23px; }
  .play-screen .arena { grid-column: 1; }
  .play-screen .game-bottom { grid-row: 4; grid-column: 2; grid-template-rows: minmax(0, 1fr) auto; border-top: none; border-left: 1px solid var(--line); }
  .play-screen .tap-button { align-self: stretch; min-height: 0; }
  .play-screen .personal-line { flex-wrap: wrap; }
  .play-route .legal-footer .geo-attribution { flex-basis: auto; }
}
