:root {
  --paper: #F3E7D3;
  --paper-deep: #E4D3BA;
  --paper-light: #F8F0E1;
  --ink: #15100D;
  --crimson: #D0301C;
  --jade: #1E5B4B;
  --amber: #E3A72B;
  --rust: #9E4B2B;
  --strip-h: 22vh;
  --bar-h: clamp(58px, 11vh, 104px);
  --left-accent: var(--crimson);
  --right-accent: var(--jade);
  --bang: 4px;
  --btn: clamp(58px, 9vh, 82px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-synthesis: none;
  overscroll-behavior: none;
  touch-action: none;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

#stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: var(--ink);
}

#stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.edge-frame {
  position: absolute;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  border: 5px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 6px var(--ink);
}

.paper-grain {
  position: absolute;
  inset: 0;
  z-index: 94;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.62' fill='%2315100D' fill-opacity='.42'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.paper-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Ccircle cx='2' cy='2' r='1.05' fill='%2315100D' fill-opacity='.18'/%3E%3C/svg%3E");
  background-size: 13px 13px;
}

/* ---------- masthead ---------- */

.masthead {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--strip-h);
  z-index: 40;
  pointer-events: none;
}

.torn-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(.92);
}

.title-lockup {
  position: absolute;
  top: 1vh;
  left: 50%;
  transform: translateX(-50%) rotate(-1.7deg);
  width: 62vw;
  max-width: 470px;
  z-index: 2;
  top: 1.6vh;
  filter: drop-shadow(2px 2px 0 rgba(21,16,13,.22));
}
.title-mark {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.sound-toggle {
  position: absolute;
  top: max(8px, calc(env(safe-area-inset-top, 0px) + 6px));
  right: max(8px, calc(var(--safe-r) + 8px));
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  z-index: 3;
  box-shadow: 2px 2px 0 var(--ink);
}
.sound-toggle svg { width: 100%; height: 100%; display: block; fill: var(--ink); stroke: var(--ink); stroke-width: 1.8; stroke-linecap: square; fill-rule: evenodd; }
.sound-toggle .wave, .sound-toggle .wave2 { fill: none; }
.sound-toggle .slash { fill: none; stroke: var(--crimson); stroke-width: 2.2; display: none; }
.sound-toggle.muted .slash { display: block; }
.sound-toggle.muted .wave, .sound-toggle.muted .wave2 { display: none; }
.sound-toggle:active { transform: translate(2px, 2px); box-shadow: none; }

@media (min-aspect-ratio: 1/1) {
  .sound-toggle { top: max(10px, calc(env(safe-area-inset-top, 0px) + 8px)); }
}

/* ---------- shared type ---------- */

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 700;
  font-size: clamp(8px, 1.05vmin, 11px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}
.kicker .rule {
  width: clamp(14px, 2.6vw, 44px);
  height: 2px;
  background: var(--ink);
  display: inline-block;
}

/* ---------- select screen ---------- */

.select-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  padding: calc(var(--strip-h) + 1.5vh) 3vw calc(12px + var(--safe-b));
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.select-screen[hidden] { display: none; }

.select-inner {
  width: min(1040px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1vh;
  text-align: center;
}

.select-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: clamp(6px, 1vh, 11px) clamp(12px, 3vw, 26px) clamp(6px, 1vh, 10px);
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-.35deg);
  max-width: 94vw;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.select-title {
  margin: 0;
  font-family: 'Ultra', 'Rockwell', Georgia, serif;
  font-weight: 400;
  font-size: clamp(25px, 6.2vw, 54px);
  line-height: .86;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 3px 0 0 var(--crimson);
}
.select-sub {
  margin: 0;
  font-family: 'Archivo', sans-serif;
  font-size: clamp(7px, 1.25vmin, 10px);
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink);
}

.roster {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(6px, 1.6vw, 20px);
  margin: auto 0;
}

.team {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.team-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: center;
  padding: 3px 8px 2px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-.7deg);
}
.team[data-country="thailand"] .team-banner { transform: rotate(.7deg); }
.team-banner .flag {
  width: clamp(16px, 2.4vw, 27px);
  height: auto;
  border: 1px solid var(--ink);
  display: block;
  flex: none;
}
.team-name {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: clamp(10px, 1.55vw, 16px);
  letter-spacing: .1em;
  line-height: 1;
}
.team-code {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(6px, .85vw, 8px);
  font-weight: 600;
  letter-spacing: .08em;
  opacity: .65;
}
.team-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(5px, 1vw, 10px);
}

.fighter-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.card-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-.6deg);
}
.fighter-card:nth-child(2n) .card-frame { transform: rotate(.6deg); }
.card-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(1.02);
  user-select: none;
  -webkit-user-drag: none;
}
.card-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Ccircle cx='1' cy='1' r='.7' fill='%2315100D' fill-opacity='.17'/%3E%3C/svg%3E");
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}
.gender-stamp {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
  color: var(--ink);
  z-index: 2;
}
.you-stamp, .rival-stamp {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 4px 0;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.15;
  border: 1.5px solid var(--ink);
  z-index: 3;
  display: none;
  transform: rotate(-6deg);
}
.you-stamp { background: var(--fc); color: var(--paper-light); }
.rival-stamp { background: var(--ink); color: var(--paper-light); left: auto; right: 3px; transform: rotate(6deg); }
.fighter-card.is-you .card-frame { border-color: var(--fc); box-shadow: 4px 4px 0 var(--fc); transform: translateY(-3px) rotate(-.6deg); }
.fighter-card.is-you .you-stamp { display: block; }
.fighter-card.is-rival .card-frame { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translateY(-3px) rotate(.6deg); }
.fighter-card.is-rival .rival-stamp { display: block; }
.card-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 96%;
  margin: 3px auto 0;
  padding: 1px 4px 0;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-.35deg);
}
.fighter-card:nth-child(2n) .card-label { transform: rotate(.35deg); }
.fighter-card.is-you .card-label { border-color: var(--fc); box-shadow: 2px 2px 0 var(--fc); }
.card-name {
  display: block;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: clamp(12px, 1.5vw, 18px);
  line-height: 1;
  letter-spacing: .08em;
}
.card-style {
  display: block;
  margin-top: 1px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: clamp(4.8px, .7vw, 7px);
  letter-spacing: .08em;
  color: var(--ink);
  opacity: .72;
  line-height: 1.1;
}

.vs-seal {
  align-self: center;
  width: clamp(32px, 4.4vw, 54px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-light);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2.5px var(--ink);
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
  flex: none;
}
.vs-seal span {
  font-family: 'Ultra', Georgia, serif;
  font-size: clamp(10px, 1.4vw, 16px);
  line-height: 1;
  letter-spacing: .02em;
  transform: translateY(1px);
}

.select-hint {
  margin: 0;
  min-height: 13px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: clamp(6.5px, 1.15vmin, 9px);
  letter-spacing: .07em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 1;
  padding: 2px 7px 1px;
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-.3deg);
}
.select-actions { flex-direction: column; gap: 4px; justify-content: center; }
.select-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 22px);
  flex-wrap: wrap;
  width: 100%;
}

.start-fight {
  appearance: none;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper-light);
  font-family: 'Ultra', Georgia, serif;
  font-size: clamp(15px, 2vw, 24px);
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: clamp(8px, 1.4vh, 13px) clamp(18px, 3vw, 34px) clamp(7px, 1.2vh, 12px);
  box-shadow: 5px 5px 0 var(--crimson);
  cursor: pointer;
  min-width: clamp(190px, 26vw, 280px);
}
.start-fight:disabled {
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  opacity: .62;
  cursor: default;
  font-size: clamp(11px, 1.4vw, 15px);
}
.start-fight:not(:disabled):active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--crimson); }
.start-fight.small { min-width: 150px; font-size: clamp(13px, 1.8vw, 18px); padding: 9px 18px 8px; }

#open-moves-select {
  position: absolute;
  left: max(14px, calc(var(--safe-l) + 14px));
  bottom: calc(14px + var(--safe-b));
  z-index: 5;
  padding: 5px 9px 4px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transform: rotate(-1.1deg);
}
#open-moves-select:active { transform: translate(2px, 2px); box-shadow: none; }

.text-button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: none;
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: clamp(7px, 1.05vw, 9px);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 1px 2px;
  cursor: pointer;
}
.text-button.light { color: var(--paper-light); border-color: var(--paper-light); }

/* ---------- fight HUD ---------- */

.fight-ui {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}
.fight-ui[hidden] { display: none; }

.hud {
  position: absolute;
  top: calc(var(--strip-h) + .8vh);
  left: 0;
  width: 100%;
  z-index: 30;
  padding: 0 max(8px, 2vw) 0 max(8px, calc(var(--safe-l) + 2vw));
  pointer-events: none;
}
.bar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1vw;
  width: 100%;
}

.bar {
  position: relative;
  width: 39vw;
  height: var(--bar-h);
  flex: none;
}
.bar-skin {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: drop-shadow(2px 2px 0 rgba(21,16,13,.28));
}
.bar-left .bar-skin { background-image: url("assets/hud_frames_01_left_endcap.webp"); }
.bar-right .bar-skin { background-image: url("assets/hud_frames_02_right_endcap.webp"); }
.bar-portrait {
  position: absolute;
  top: 12%;
  left: 2.4%;
  height: 76%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  z-index: 2;
}
.bar-right .bar-portrait { left: auto; right: 2.4%; }
.hp-track {
  position: absolute;
  left: 20%;
  right: 2.2%;
  top: 25%;
  height: 50%;
  overflow: hidden;
  z-index: 1;
  background-color: var(--paper-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5'%3E%3Ccircle cx='1' cy='1' r='.7' fill='%2315100D' fill-opacity='.16'/%3E%3C/svg%3E");
  background-size: 5px 5px;
  border: 1.5px solid var(--ink);
  box-shadow: inset 1px 1px 0 rgba(21,16,13,.25), inset 0 0 0 1px rgba(248,240,225,.55);
}
.bar-right .hp-track { left: 2.2%; right: 20%; }
.hp-fill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  right: 2px;
  transform-origin: left center;
  background-color: var(--left-accent);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Ccircle cx='1' cy='1' r='.8' fill='%2315100D' fill-opacity='.30'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11'%3E%3Ccircle cx='2' cy='2' r='1.15' fill='%23F3E7D3' fill-opacity='.08'/%3E%3C/svg%3E");
  background-size: 4px 4px, 11px 11px;
  border: 1.5px solid var(--ink);
  box-sizing: border-box;
}
.hp-fill::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  background: rgba(243,231,211,.16);
}
.hp-fill::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: rgba(21,16,13,.20);
}
.bar-right .hp-fill { transform-origin: right center; background-color: var(--right-accent); }
.hp-mid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(21,16,13,.62);
  box-shadow: 1px 0 0 rgba(243,231,211,.24);
  z-index: 2;
  pointer-events: none;
}
.name-tag {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 1px 4px 1px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(21,16,13,.85);
  line-height: 1.05;
  white-space: nowrap;
  z-index: 3;
}
.bar-right .name-tag { left: auto; right: 0; flex-direction: row-reverse; }
.name-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.03;
}
.gender-mini {
  display: inline-block;
  min-width: 12px;
  padding: 0 3px;
  background: var(--ink);
  color: var(--paper-light);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(7px, .9vw, 9px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  letter-spacing: .02em;
}
.hp-readout {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(10px, 1.35vw, 14px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  min-width: 17px;
  text-align: right;
}
.bar-right .hp-readout { text-align: left; }
.name-main {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: clamp(11px, 1.6vw, 16px);
  letter-spacing: .07em;
}
.name-side {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(5.5px, .78vw, 7.5px);
  font-weight: 600;
  letter-spacing: .08em;
  opacity: .78;
}
.you-tag {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(6px, .82vw, 8px);
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--paper-light);
  background: var(--left-accent);
  border: 1px solid var(--ink);
  padding: 0 3px;
}
.bar-right .you-tag { background: var(--right-accent); }
.you-tag[hidden] { display: none; }

.timer-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: clamp(56px, 8.4vw, 104px);
  margin-top: -.4vh;
  z-index: 4;
}
.timer-plate {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: url("assets/hud_frames_03_timer_plate.webp") center / 100% 100% no-repeat;
  display: grid;
  place-items: center;
  filter: drop-shadow(2px 2px 0 rgba(21,16,13,.32));
}
.timer-num {
  display: block;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 4.7vh, 46px);
  line-height: .85;
  letter-spacing: -.02em;
  transform: translateY(-4%);
  color: var(--ink);
}
.pip-row {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 4.5vw, 22px);
  margin-top: 1px;
}
.pip-side { display: flex; gap: 3px; }
.pip {
  display: block;
  width: clamp(11px, 1.55vw, 15px);
  height: clamp(11px, 1.55vw, 15px);
  background: url("assets/hud_frames_04_round_pip.webp") center / 100% 100% no-repeat;
  opacity: .55;
  filter: grayscale(1) contrast(1.2);
  position: relative;
}
.pip.won { opacity: 1; filter: none; }
.pip.won::after {
  content: "";
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: var(--pip);
}
.round-label {
  margin-top: 1px;
  padding: 1px 4px 0;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(5.5px, .8vw, 8px);
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.1;
  white-space: nowrap;
}

/* ---------- announcements ---------- */

.announce {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  z-index: 55;
  pointer-events: none;
}
.announce[hidden] { display: none; }
.announce-plate {
  padding: clamp(7px, 1.2vh, 13px) clamp(18px, 4vw, 44px) clamp(6px, 1vh, 11px);
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.2deg);
  text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.announce-main {
  font-family: 'Ultra', Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 6.6vmin, 76px);
  line-height: .86;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 4px 0 0 var(--crimson);
  white-space: nowrap;
}
.announce-sub {
  margin-top: 3px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(7px, 1.1vmin, 10px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}
.announce.flash .announce-plate { background: var(--amber); }

.combo {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translateX(-50%) rotate(1.4deg);
  z-index: 54;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 7px 1px;
  background: var(--ink);
  color: var(--paper-light);
  border: 2px solid var(--paper-light);
  box-shadow: 3px 3px 0 var(--crimson);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(8px, 1.2vmin, 11px);
  font-weight: 800;
  letter-spacing: .1em;
  white-space: nowrap;
  pointer-events: none;
}
.combo[hidden] { display: none; }
.combo #combo-num {
  font-size: 1.8em;
  line-height: .8;
  color: var(--amber);
}

/* ---------- meter ---------- */

.meter-wrap {
  position: absolute;
  z-index: 31;
  right: max(14px, calc(var(--safe-r) + 14px));
  bottom: calc(18px + var(--safe-b) + (var(--btn) + 13px) * 2 + 14px);
  width: clamp(150px, 21vw, 260px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.meter-rail {
  position: relative;
  width: 100%;
  aspect-ratio: 696 / 90;
  background: url("assets/hud_frames_05_meter_rail.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(2px 2px 0 rgba(21,16,13,.3));
}
.meter-fill {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 26%;
  bottom: 26%;
  width: 0%;
  background: var(--amber);
  border-top: 1px solid rgba(21,16,13,.4);
  border-bottom: 1px solid rgba(21,16,13,.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5'%3E%3Ccircle cx='1' cy='1' r='.65' fill='%2315100D' fill-opacity='.24'/%3E%3C/svg%3E");
  background-size: 5px 5px;
}
.meter-caption {
  order: -1;
  display: inline-block;
  margin-bottom: 2px;
  padding: 0 4px;
  text-align: center;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(6px, .82vw, 8px);
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  transform: rotate(-.4deg);
}

/* ---------- controls ---------- */

.controls {
  position: absolute;
  z-index: 32;
  right: max(14px, calc(var(--safe-r) + 14px));
  bottom: calc(12px + var(--safe-b));
  display: grid;
  grid-template-columns: repeat(2, var(--btn));
  grid-auto-rows: auto;
  gap: 5px;
  pointer-events: auto;
  transform: rotate(-.4deg);
}
.action-button {
  position: relative;
  width: var(--btn);
  height: calc(var(--btn) + 13px);
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.action-button img {
  display: block;
  width: var(--btn);
  height: var(--btn);
  pointer-events: none;
  filter: drop-shadow(2px 2px 0 rgba(21,16,13,.35));
}
.action-button .keycap {
  position: relative;
  z-index: 3;
  margin-top: -2px;
  min-width: 15px;
  padding: 0 3px 0;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(8px, 1.1vw, 11px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
}
.action-button:active img { transform: translate(1px, 2px); }
.action-button:active .keycap { transform: translate(1px, 2px); }
.special-arc {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--btn);
  height: var(--btn);
  pointer-events: none;
  transform: rotate(-90deg);
  z-index: 2;
}
.special-arc svg { width: 100%; height: 100%; display: block; overflow: visible; }
.arc-track { fill: none; stroke: rgba(243,231,211,.38); stroke-width: 2.6; }
.arc-fill {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3.4;
  stroke-linecap: butt;
  stroke-dasharray: 282.7;
  stroke-dashoffset: 282.7;
}

.moves-tab {
  display: none;
  position: absolute;
  z-index: 33;
  left: max(12px, calc(var(--safe-l) + 12px));
  bottom: calc(14px + var(--safe-b));
  padding: 6px 10px 5px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  transform: rotate(-1.2deg);
}
.moves-tab:active { transform: translate(2px, 2px); box-shadow: none; }

.drag-hint {
  display: none;
  position: absolute;
  z-index: 30;
  left: max(12px, calc(var(--safe-l) + 12px));
  bottom: calc(48px + var(--safe-b));
  padding: 2px 6px 1px;
  background: rgba(243,231,211,.72);
  border: 1px solid rgba(21,16,13,.55);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink);
  pointer-events: none;
  white-space: nowrap;
}
.drag-hint span { color: var(--crimson); }

.movebox {
  position: absolute;
  z-index: 28;
  left: max(14px, calc(var(--safe-l) + 14px));
  bottom: calc(14px + var(--safe-b));
  width: clamp(218px, 23vw, 292px);
  padding: 5px 8px 4px;
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-.5deg);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.movebox-head {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .18em;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 3px;
}
.movebox-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 10px;
}
.move-pair {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  font-family: 'Archivo', sans-serif;
  font-size: clamp(6.5px, .82vw, 8.5px);
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.45;
}
.move-pair b {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1.15em;
  font-weight: 800;
}
.movebox-foot {
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px solid rgba(21,16,13,.45);
  font-family: 'Archivo', sans-serif;
  font-size: 5.8px;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.3;
  opacity: .8;
}
.movebox-foot b { font-family: 'Barlow Condensed', sans-serif; font-size: 1.3em; }

/* ---------- move sheet ---------- */

.move-sheet {
  position: absolute;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21,16,13,.58);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Ccircle cx='2' cy='2' r='.8' fill='%23F3E7D3' fill-opacity='.1'/%3E%3C/svg%3E");
  background-size: 9px 9px;
}
.move-sheet[hidden] { display: none; }
.move-sheet-plate {
  position: relative;
  width: min(90vw, 490px);
  max-height: 88vh;
  overflow: auto;
  padding: clamp(14px, 2.2vh, 22px) clamp(14px, 3vw, 26px) clamp(12px, 2vh, 18px);
  background: var(--paper-light);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(.4deg);
  text-align: left;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Ccircle cx='1' cy='1' r='.65' fill='%2315100D' fill-opacity='.11'/%3E%3C/svg%3E");
  background-size: 7px 7px;
}
.sheet-close {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 20;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper-light);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.sheet-close:active { transform: translate(1px, 1px); }
.sheet-kicker {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .2em;
  opacity: .7;
}
.move-sheet h2 {
  margin: 1px 0 3px;
  font-family: 'Ultra', Georgia, serif;
  font-weight: 400;
  font-size: clamp(19px, 4.6vw, 30px);
  line-height: .95;
  letter-spacing: .01em;
  text-shadow: 2px 0 0 var(--crimson);
}
.sheet-matchup {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 7px;
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sheet-move {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
}
.sm-key {
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-light);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}
.sm-name {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .05em;
}
.sm-type {
  font-family: 'Archivo', sans-serif;
  font-size: 6px;
  font-weight: 600;
  letter-spacing: .06em;
  opacity: .7;
  line-height: 1.2;
}
.sheet-foot {
  margin-top: 8px;
  font-family: 'Archivo', sans-serif;
  font-size: clamp(6.5px, 1.2vmin, 8px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .02em;
}
.sheet-foot p { margin: 0 0 4px; }
.sheet-note { opacity: .65; }
.sheet-foot b { font-family: 'Barlow Condensed', sans-serif; font-size: 1.2em; }

/* ---------- winner ---------- */

.winner-screen {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21,16,13,.58);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Ccircle cx='2' cy='2' r='.8' fill='%23F3E7D3' fill-opacity='.1'/%3E%3C/svg%3E");
  background-size: 9px 9px;
}
.winner-screen[hidden] { display: none; }
.winner-plate {
  width: min(88vw, 390px);
  padding: clamp(12px, 2vh, 20px) clamp(14px, 3vw, 26px) clamp(14px, 2.2vh, 22px);
  background: var(--paper-light);
  border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(-.6deg);
  text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.winner-kicker {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .2em;
}
.winner-portrait {
  width: clamp(68px, 13vh, 104px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--crimson);
  margin: 4px auto 5px;
  display: block;
  transform: rotate(1.5deg);
}
.winner-name {
  font-family: 'Ultra', Georgia, serif;
  font-size: clamp(26px, 6vw, 44px);
  line-height: .9;
  letter-spacing: .01em;
  text-shadow: 3px 0 0 var(--crimson);
}
.winner-call {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  margin-top: 1px;
}
.result-score {
  margin: 5px 0 1px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: clamp(24px, 4.6vh, 38px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: .06em;
}
.result-stats {
  font-family: 'Archivo', sans-serif;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .12em;
  opacity: .8;
}
.winner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 11px;
}

/* ---------- toast ---------- */

.toast {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) rotate(-1deg);
  z-index: 75;
  padding: 4px 10px 3px;
  background: var(--amber);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.toast[hidden] { display: none; }

/* ---------- responsive ---------- */

@media (min-aspect-ratio: 1/1) {
  :root {
    --strip-h: 21vh;
    --bar-h: clamp(62px, 10.8vh, 104px);
    --btn: clamp(58px, 9.2vh, 82px);
  }
  .title-lockup { width: 24.5vw; max-width: 430px; top: 1vh; }
  .hud { top: calc(var(--strip-h) + 1.1vh); padding-left: max(10px, 2vw); padding-right: max(10px, 2vw); }
  .bar { width: 38.5vw; }
  .bar-row { gap: 1.5vw; }
  .timer-cluster { width: clamp(68px, 7.6vw, 104px); }
  .name-tag { font-size: 13px; }
  .announce { top: 32%; }
  .combo { top: 43%; }
  .meter-wrap { right: max(18px, calc(var(--safe-r) + 18px)); }
  .controls { right: max(18px, calc(var(--safe-r) + 18px)); }
  .select-screen { padding-top: calc(var(--strip-h) + 1.2vh); }
  .select-inner { width: min(1120px, 100%); }
  .select-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: clamp(6px, 1vh, 11px) clamp(12px, 3vw, 26px) clamp(6px, 1vh, 10px);
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-.35deg);
  max-width: 94vw;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.select-title { font-size: clamp(28px, 3.4vw, 50px); }
  .team-cards { gap: 12px; }
  .card-name { font-size: clamp(15px, 1.55vw, 22px); }
  .select-hint { font-size: 8.5px; }
}

@media (max-width: 720px) {
  :root {
    --btn: 44px;
    --bar-h: clamp(60px, 10.8vh, 92px);
  }
  .title-lockup { width: 64vw; max-width: 300px; }
  .bar { width: 39vw; }
  .timer-cluster { width: 15.5vw; min-width: 56px; max-width: 70px; }
  .name-tag { padding: 1px 3px; gap: 2px; }
  .name-side { font-size: 6.5px; }
  .name-main { font-size: 11px; }
  .gender-mini { font-size: 7px; padding: 0 2px; min-width: 10px; }
  .hp-readout { font-size: 10px; min-width: 15px; }
  .select-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: clamp(6px, 1vh, 11px) clamp(12px, 3vw, 26px) clamp(6px, 1vh, 10px);
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-.35deg);
  max-width: 94vw;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.select-title { font-size: clamp(24px, 6.4vw, 34px); }
  .select-sub { letter-spacing: .08em; }
  .roster { grid-template-columns: 1fr; gap: 7px; }
  .vs-seal { display: none; }
  .team-cards { gap: 5px; width: min(74vw, 30vh); max-width: 330px; margin: 0 auto; }
  .team { gap: 4px; }
  .team-banner { align-self: center; }
  .team-banner { padding: 2px 5px; }
  .team-code { display: none; }
  .vs-seal { width: 32px; border-width: 2px; box-shadow: 0 0 0 2px var(--ink); }
  .vs-seal span { font-size: 10px; }
  .card-frame { border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
  .card-name { font-size: 12px; }
  .card-style { font-size: 5.4px; }
  .card-label { padding: 1px 3px 0; margin-top: 2px; }
  .gender-stamp { width: 14px; height: 14px; line-height: 11px; font-size: 8px; }
  .you-stamp, .rival-stamp { font-size: 8px; padding: 1px 3px 0; }
  .select-hint { font-size: 7.2px; }
  .start-fight { min-width: 170px; font-size: 16px; padding: 9px 18px 8px; }
  .text-button { font-size: 7px; }
  .movebox { display: none; }
  .moves-tab { display: block; }
  .drag-hint { display: block; }
  .controls {
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(-.4deg);
    bottom: calc(8px + var(--safe-b));
    gap: 4px;
  }
  .meter-wrap {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: calc(12px + var(--safe-b) + (var(--btn) + 13px) * 2 + 8px);
    width: clamp(140px, 34vw, 190px);
  }
  .meter-caption { text-align: center; }
  .action-button { height: calc(var(--btn) + 11px); }
  .action-button .keycap { font-size: 8px; margin-top: -1px; }
  .action-button img { filter: drop-shadow(1px 1px 0 rgba(21,16,13,.35)); }
  .announce { top: 39%; }
  .announce-main { font-size: clamp(29px, 9vw, 52px); }
  .announce-sub { font-size: 7px; }
  .combo { top: 47%; }
  .hud { padding-left: 7px; padding-right: 7px; }
  .bar-row { gap: 4px; }
  .bar-portrait { top: 13%; height: 74%; left: 2%; }
  .bar-right .bar-portrait { left: auto; right: 2%; }
  .hp-track { left: 42%; right: 3%; top: 26%; height: 48%; }
  .bar-right .hp-track { left: 3%; right: 42%; }
  .name-tag { top: calc(100% + 2px); }
  .pip-row { gap: 10px; }
  .pip { width: 12px; height: 12px; }
  .round-label { font-size: 6px; }
  .winner-plate { width: min(90vw, 360px); }
  .sheet-grid { gap: 5px; }
  .sheet-move { padding: 3px 4px; column-gap: 4px; }
  .sm-key { width: 20px; height: 20px; line-height: 20px; font-size: 10px; }
  .sm-name { font-size: 10px; }
  .sm-type { font-size: 5.4px; }
}

@media (max-height: 520px) {
  :root {
    --strip-h: 17vh;
    --bar-h: clamp(46px, 12.5vh, 66px);
    --btn: clamp(50px, 14vh, 62px);
  }
  .title-lockup { width: 20vw; max-width: 280px; }
  .select-screen { padding-top: calc(var(--strip-h) + 2px); padding-bottom: 5px; }
  .select-inner { gap: .4vh; }
  .select-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: clamp(6px, 1vh, 11px) clamp(12px, 3vw, 26px) clamp(6px, 1vh, 10px);
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-.35deg);
  max-width: 94vw;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.55' fill='%2315100D' fill-opacity='.12'/%3E%3C/svg%3E");
  background-size: 6px 6px;
}
.select-title { font-size: clamp(17px, 2.6vw, 26px); }
  .select-sub { font-size: 6px; }
  .kicker { font-size: 7px; }
  .select-hint { font-size: 6px; min-height: 8px; }
  .card-name { font-size: 11px; margin-top: 2px; }
  .card-style { font-size: 5.4px; }
  .team-banner { padding: 1px 5px; }
  .team-cards { gap: 6px; width: min(100%, 285px); margin: 0 auto; }
  .roster { gap: 10px; }
  .start-fight { min-width: 150px; font-size: 14px; padding: 6px 16px; }
  .start-fight:disabled { font-size: 10px; }
  .select-actions { gap: 10px; }
  .hud { top: calc(var(--strip-h) + 1vh); }
  .name-tag { display: none; }
  .timer-num { font-size: clamp(20px, 5.2vh, 28px); }
  .bar-portrait { top: 14%; height: 72%; }
  .bar { width: 39vw; }
  .timer-cluster { width: clamp(48px, 9vh, 62px); }
  .announce { top: 34%; }
  .announce-main { font-size: clamp(24px, 7vh, 40px); }
  .movebox { display: none; }
  .moves-tab { display: block; }
  .controls { right: max(10px, calc(var(--safe-r) + 10px)); bottom: calc(8px + var(--safe-b)); }
  .meter-wrap { right: max(10px, calc(var(--safe-r) + 10px)); bottom: calc(10px + var(--safe-b) + (var(--btn) + 13px) * 2 + 4px); width: 190px; }
  .action-button { height: calc(var(--btn) + 11px); }
  .controls { transform: rotate(-.4deg); left: auto; }
  .drag-hint { display: none; }
  .move-sheet-plate { max-height: 92vh; padding: 10px 14px; }
  .move-sheet h2 { font-size: 18px; }
  .sheet-grid { gap: 4px; }
  .sheet-foot { font-size: 6px; }
  .winner-plate { width: min(72vw, 340px); padding: 8px 16px; }
  .winner-portrait { width: 54px; }
  .winner-name { font-size: 24px; }
  .result-score { font-size: 24px; }
  .winner-actions { margin-top: 6px; }
  .winner-call, .result-stats { font-size: 6px; }
}

@media (max-width: 720px) and (max-height: 520px) {
  .controls { left: 50%; right: auto; transform: translateX(-50%) rotate(-.4deg); }
  .meter-wrap { left: 50%; right: auto; transform: translateX(-50%); width: 160px; }
  .moves-tab { display: block; }
  .drag-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .announce-plate, .title-lockup, .select-title, .start-fight, .movebox, .winner-plate { transform-style: flat; }
}
