/* Transparent WebP artwork supplies the silhouette, material and ornaments.
   Scores, timers, stamina and controls remain readable live HTML. */
#hud {
  --hud-gap: 10px;
  --hud-shadow: 0 2px 2px #101014, 1px 0 1px #101014, -1px 0 1px #101014;
  --hud-left: max(var(--hud-gap), env(safe-area-inset-left));
  --hud-right: max(var(--hud-gap), env(safe-area-inset-right));
  --hud-top: max(6px, env(safe-area-inset-top));
  --hud-bottom: max(31px, calc(env(safe-area-inset-bottom) + 8px));
}
#hud .scoreboard,
#hud .player-card,
#hud .skill-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  overflow: visible;
  min-width: 0;
}
#hud .scoreboard {
  background-image: url('../assets/ui/hud-scoreboard.webp');
  width: 460px;
  height: 92px;
  top: var(--hud-top);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 92px 1fr;
  align-items: center;
  padding: 8px 35px 24px;
  color: #fff0cb;
  filter: drop-shadow(0 3px 3px #08051366);
}
#hud .score-team {
  padding: 0;
  gap: 5px;
  min-width: 0;
  width: 100%;
  justify-content: flex-start;
  text-shadow: var(--hud-shadow);
}
#hud .score-team.away { justify-content: flex-end; }
#hud .score-team b {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1;
  white-space: nowrap;
}
#hud .score-team > span {
  font-size: 23px;
  line-height: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 1px #101014);
}
#hud .score-center {
  min-width: 0;
  padding: 0;
  background: transparent;
  color: #fff6d5;
  text-shadow: var(--hud-shadow);
  transform: translateY(-5px);
}
#hud .score-center > div {
  gap: 12px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#hud .score-center > div > span { color: #ffa94d; font-size: 20px; }
#hud .score-center > span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 4px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#hud .match-label {
  left: 50%;
  top: auto;
  bottom: 19px;
  width: 24%;
  font-family: var(--display);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  color: #ffe4a9;
  text-shadow: var(--hud-shadow);
  white-space: nowrap;
}
#hud .pause-button {
  top: calc(var(--hud-top) + 8px);
  right: var(--hud-right);
  width: 54px;
  height: 54px;
  padding: 0;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  filter: drop-shadow(0 2px 2px #05020b88);
}
#hud .pause-button > span {
  width: 5px;
  height: 19px;
  background: #fff0c2;
  box-shadow: 0 1px 2px #1c1027;
  border-radius: 1px;
}
#hud .pause-button:hover { filter: brightness(1.2) drop-shadow(0 2px 2px #05020b88); }
#hud .player-card {
  width: 282px;
  height: 116px;
  left: var(--hud-left);
  bottom: var(--hud-bottom);
  background-image: url('../assets/ui/hud-player.webp');
  gap: 10px;
  padding: 15px 30px 18px 34px;
  color: #fff1d1;
  text-shadow: var(--hud-shadow);
}
#hud .player-icon {
  width: 41px;
  font-size: 30px;
  flex: 0 0 41px;
  line-height: 1;
  filter: drop-shadow(0 2px 1px #43251766);
}
#hud .player-portrait { width: 46px; height: 53px; object-fit: contain; display: block; margin-left: -3px; }
#hud .score-team > span > img { width: 29px; height: 32px; object-fit: contain; display: block; }
#hud .player-copy { min-width: 0; width: 100%; }
#hud .player-card small {
  font-family: var(--display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ecd09c;
  line-height: 1;
}
#hud .player-card strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .3px;
  margin-top: 3px;
  line-height: 1;
  white-space: nowrap;
}
#hud .stamina-heading {
  margin-top: 7px;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 800;
  color: #ecd09c;
  letter-spacing: .7px;
  line-height: 1;
}
#hud .stamina-heading b { font-size: 9px; font-weight: 800; color: #fff1d1; }
#hud .player-card .energy-track {
  width: 100%;
  height: 5px;
  margin-top: 3px;
  background: #3a2922;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 1px #3b1a14aa;
}
#hud .energy-track i { border-radius: 6px; box-shadow: inset 0 1px 1px #fff5; }
#hud .dodge-status {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  color: #ffaf85;
  line-height: 1;
}
#hud .dodge-status.ready { color: #b4f2be; }
#hud .skill-card {
  width: 252px;
  height: 116px;
  right: var(--hud-right);
  bottom: var(--hud-bottom);
  padding: 22px 24px 22px 23px;
  gap: 7px;
  background-image: url('../assets/ui/hud-skill.webp');
  color: #f4efdc;
  text-shadow: var(--hud-shadow);
}
#hud .skill-key {
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 32px;
  border: 0;
  border-radius: 0;
  font-size: 20px;
  font-weight: 800;
  color: #ffe3ad;
}
#hud .skill-copy { min-width: 0; flex: 1; }
#hud .skill-card strong {
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .25px;
  white-space: nowrap;
}
#hud .skill-card small {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  max-width: none;
  line-height: 1.15;
  margin-top: 7px;
  color: #ccecd8;
}
#hud .skill-orb {
  position: relative;
  display: flex;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 50%;
  background: conic-gradient(#b9f8be var(--energy), #362c50 0);
  box-shadow: 0 2px 3px #080512aa;
}
#hud .skill-orb::after {
  content: '';
  position: absolute;
  inset: -6px;
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  pointer-events: none;
  z-index: 1;
}
#hud .skill-orb::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: conic-gradient(#bcffc2 var(--energy), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 2px #bcffc2);
}
#hud .skill-orb span {
  width: 31px;
  height: 31px;
  background: #332541;
  font-size: 23px;
  color: #b08aeb;
  z-index: 2;
}
#hud .skill-orb.ready { box-shadow: 0 0 18px #abffd56b; }
#hud .skill-orb.ready span { color: #d4ffd7; }
#hud .keyboard-hint {
  bottom: max(7px, env(safe-area-inset-bottom));
  width: calc(100% - 40px);
  gap: 12px;
  font-size: 9px;
  color: #f6e4bd;
  line-height: 1;
  text-shadow: var(--hud-shadow);
}
#hud .keyboard-hint kbd {
  display: inline-grid;
  place-items: center;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  min-width: 24px;
  min-height: 24px;
  padding: 4px 6px;
  background: url('../assets/ui/button-purple.webp') center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  color: #ffdfa0;
  margin-right: 3px;
}
#hud .frenzy-banner {
  top: calc(var(--hud-top) + 96px);
  width: 326px;
  height: 68px;
  padding: 15px 20px 10px;
  background: url('../assets/ui/hud-skill.webp') center / 100% 100% no-repeat;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .6px;
  line-height: 1;
  color: #ffe2aa;
  text-shadow: var(--hud-shadow);
}
#hud .frenzy-banner small {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  color: #edc9a9;
  margin-top: 7px;
}
#hud #frenzyClock {
  border: 0;
  border-radius: 0;
  padding: 0;
  min-width: 22px;
  margin-left: 7px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  vertical-align: baseline;
  color: #d8ffd0;
}
#hud .goal-banner { color: #ffb65c; font-weight: 800; text-shadow: 0 3px #4d201a, 0 0 30px #db703855; }
#hud .shot-charge {
  bottom: calc(var(--hud-bottom) + 13px);
  width: 158px;
  height: 54px;
  padding: 12px 24px;
  background: url('../assets/ui/button-gold.webp') center / 100% 100% no-repeat;
  color: #361e15;
}
#hud .shot-charge > span { font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: .6px; text-shadow: none; }
#hud .shot-charge > div { height: 5px; margin-top: 4px; background: #5e3427; border: 0; border-radius: 6px; overflow: hidden; }
#hud .shot-charge i { background: #e4ffce; }
#hud .touch-controls { display: none; left: var(--hud-left); right: var(--hud-right); bottom: max(8px, env(safe-area-inset-bottom)); height: 162px; }
#hud .joystick {
  width: 118px;
  height: 118px;
  left: 0;
  bottom: 4px;
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 2px 2px #08041677);
}
#hud .joystick-cross::before, #hud .joystick-cross::after { background: #efdeb455; }
#hud .joystick-knob {
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -27px;
  border: 0;
  border-radius: 0;
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  box-shadow: none;
  filter: brightness(1.35) drop-shadow(0 3px 2px #130b25aa);
}
#hud .touch-actions { width: 206px; height: 156px; transform: none; }
#hud .touch-actions > button {
  width: 58px;
  height: 58px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  color: #ffe4b8;
  font-size: 29px;
  font-weight: 800;
  line-height: .85;
  text-shadow: var(--hud-shadow);
  filter: drop-shadow(0 2px 2px #08041688);
}
#hud .touch-actions small { font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: .15px; margin-top: 5px; }
#hud .touch-actions .touch-shoot { width: 76px; height: 76px; right: 0; bottom: 0; color: #ffcb75; font-size: 36px; }
#hud .touch-pass { right: 81px; bottom: 0; }
#hud .touch-tackle { right: 146px; bottom: 0; }
#hud .touch-dodge { right: 84px; bottom: 70px; }
#hud .touch-skill { right: 14px; bottom: 85px; }
#hud .touch-actions .touch-sprint { right: 148px; bottom: 69px; width: 50px !important; height: 50px !important; font-size: 26px !important; }
#hud .touch-actions > button:active { filter: brightness(1.35) drop-shadow(0 2px 2px #08041688); transform: scale(.94); }
#toast {
  max-width: min(85vw, 390px);
  width: max-content;
  min-width: 210px;
  min-height: 70px;
  padding: 22px 35px;
  background: url('../assets/ui/hud-player.webp') center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff1d1;
  text-shadow: 0 2px 2px #101014, 1px 0 1px #101014, -1px 0 1px #101014;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  filter: drop-shadow(0 3px 3px #08051377);
}

/* The shared painted modal plate is sliced so its bone corners retain their
   proportions on both the tall pause screen and the wider result screen. */
.modal-panel,
.result-panel {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.modal-panel::before,
.result-panel::before {
  content: '';
  position: absolute;
  inset: -20px;
  z-index: -1;
  border: 60px solid transparent;
  border-image: url('../assets/ui/hud-modal.webp') 20% fill stretch;
  pointer-events: none;
  filter: drop-shadow(0 7px 6px #08051399);
}
.modal-panel .eyebrow,
.result-panel .eyebrow { color: #dcf5c8; }
.pause-panel p,
.result-heading p,
.result-score small,
.result-stats span { color: #d0c8c9; }
.pause-links .text-button { color: #ebddc8; }
.result-score { border-color: #dabf7944; }
.result-score > b > span { color: #d5bc88; }
.result-panel .result-heading h1,
.pause-panel h1 { text-shadow: 0 2px 2px #150b18; }
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.result-actions .primary { grid-column: 1 / -1; width: 100%; }
.result-actions .button {
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}
.result-actions .secondary,
.result-actions .plain { font-size: 25px; }

/* The same bone plate frames secondary choices without introducing flat cards. */
.team-option,
.team-option.selected,
.team-option:hover,
.tips-panel,
.cup-round,
.cup-round.active,
.arena-option,
.arena-option.selected {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.team-option::before,
.tips-panel::before,
.cup-round::before,
.arena-option::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border: 29px solid transparent;
  border-image: url('../assets/ui/hud-modal.webp') 20% fill stretch;
  pointer-events: none;
}
.arena-option::before { border-width: 16px; }
.team-option.selected::before,
.arena-option.selected::before,
.cup-round.active::before { filter: brightness(1.22) drop-shadow(0 0 4px var(--team, #c8eeb0)); }
.team-option:hover::before { filter: brightness(1.13); }
.crest {
  background: url('../assets/ui/hud-rune.webp') center / contain no-repeat;
  border: 0;
  clip-path: none;
}
.crest > span { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; }
.crest img { display: block; width: 84%; height: 90%; object-fit: contain; }

/* Touch status stays out of the stick and action button hit areas. */
@media (pointer: coarse) {
  #hud { --hud-bottom: max(176px, calc(env(safe-area-inset-bottom) + 176px)); }
  #hud .touch-controls { display: block; }
  #hud .keyboard-hint { display: none; }
  #hud .shot-charge { bottom: calc(var(--hud-bottom) + 120px); }
  #toast { bottom: 306px; }
}
@media (max-width: 700px) {
  #hud { --hud-left: max(7px, env(safe-area-inset-left)); --hud-right: max(7px, env(safe-area-inset-right)); --hud-bottom: max(176px, calc(env(safe-area-inset-bottom) + 176px)); }
  #hud .touch-controls { display: block; }
  #hud .keyboard-hint { display: none; }
  #hud .scoreboard { width: min(400px, calc(100% - 80px)); height: 82px; left: calc(50% - 15px); grid-template-columns: 1fr 72px 1fr; padding: 10px 21px 21px; }
  #hud .score-team { gap: 3px; }
  #hud .score-team b { font-size: 17px; letter-spacing: .15px; }
  #hud .score-team > span { font-size: 18px; }
  #hud .score-center > div { font-size: 31px; gap: 9px; }
  #hud .score-center > span { font-size: 10px; }
  #hud .match-label { bottom: 17px; font-size: 6px; letter-spacing: 0; width: 24%; }
  #hud .pause-button { width: 45px; height: 45px; top: calc(var(--hud-top) + 12px); }
  #hud .player-card { width: calc(50% - 12px); height: 93px; padding: 14px 19px 14px 20px; gap: 5px; }
  #hud .player-icon { width: 23px; flex-basis: 23px; font-size: 23px; }
  #hud .player-portrait { width: 29px; height: 37px; }
  #hud .score-team > span > img { width: 22px; height: 28px; }
  #hud .player-card small { font-size: 7px; letter-spacing: .6px; }
  #hud .player-card strong { font-size: 16px; letter-spacing: 0; margin-top: 3px; }
  #hud .stamina-heading { margin-top: 5px; font-size: 8px; }
  #hud .stamina-heading b { font-size: 8px; }
  #hud .dodge-status { font-size: 8px; margin-top: 4px; letter-spacing: .2px; }
  #hud .skill-card { width: calc(50% - 12px); height: 93px; padding: 16px 17px 16px 21px; gap: 6px; }
  #hud .skill-key { display: none; }
  #hud .skill-card strong { font-size: 17px; letter-spacing: 0; }
  #hud .skill-card small { font-size: 10px; margin-top: 5px; line-height: 1.1; }
  #hud .skill-orb { display: flex; width: 31px; height: 31px; flex-basis: 31px; }
  #hud .skill-orb span { width: 23px; height: 23px; font-size: 19px; }
  #hud .skill-orb::after { inset: -4px; }
  #hud .frenzy-banner { top: calc(var(--hud-top) + 86px); width: 286px; height: 62px; font-size: 22px; padding-top: 13px; }
  #hud .frenzy-banner small { font-size: 9px; }
  #hud .shot-charge { bottom: calc(var(--hud-bottom) + 101px); }
  #toast { bottom: 306px; font-size: 17px; padding: 20px 30px; }
}
@media (max-width: 450px) {
  .result-actions .secondary,
  .result-actions .plain { min-height: 56px; height: 56px; padding: 12px 8px; font-size: 22px; white-space: nowrap; }
  #hud .scoreboard { width: calc(100% - 78px); grid-template-columns: 1fr 62px 1fr; padding-left: 21px; padding-right: 21px; }
  #hud .score-team b { font-size: 15px; }
  #hud .score-team > span { font-size: 16px; }
  #hud .score-center > div { font-size: 28px; gap: 7px; }
  #hud .player-icon { display: block; width: 27px; flex-basis: 27px; }
  #hud .player-portrait { width: 32px; height: 40px; margin-left: -3px; }
  #hud .player-card { padding-left: 19px; padding-right: 16px; gap: 5px; }
  #hud .player-card strong { font-size: 15px; }
  #hud .skill-card { padding-left: 22px; padding-right: 17px; }
  #hud .skill-orb { width: 28px; height: 28px; flex-basis: 28px; }
  #hud .skill-orb span { width: 21px; height: 21px; font-size: 17px; }
  #hud .skill-card strong { font-size: 16px; }
  #hud .skill-card small { font-size: 9px; }
  #hud .joystick { width: 112px; height: 112px; }
  #hud .touch-actions { width: 204px; }
}

/* Short landscape: compact parchment plaques sit in the central lower gutter. */
@media (max-height: 550px) and (orientation: landscape) {
  #hud { --hud-bottom: max(5px, env(safe-area-inset-bottom)); }
  #hud .scoreboard { width: 410px; height: 80px; left: 50%; padding: 8px 32px 21px; grid-template-columns: 1fr 80px 1fr; }
  #hud .score-team b { font-size: 19px; }
  #hud .score-team > span { font-size: 20px; }
  #hud .score-center > div { font-size: 31px; }
  #hud .score-center > span { font-size: 10px; }
  #hud .match-label { font-size: 7px; bottom: 16px; letter-spacing: 0; width: 24%; }
  #hud .pause-button { width: 47px; height: 47px; top: calc(var(--hud-top) + 9px); }
  #hud .frenzy-banner { top: calc(var(--hud-top) + 82px); width: 286px; height: 60px; font-size: 22px; padding-top: 12px; }
  #hud .frenzy-banner small { font-size: 9px; margin-top: 5px; }
  #hud .player-card { width: 230px; height: 100px; left: max(132px, calc(env(safe-area-inset-left) + 128px)); padding: 17px 28px; gap: 7px; }
  #hud .player-icon { display: block; width: 25px; flex-basis: 25px; font-size: 25px; }
  #hud .player-portrait { width: 32px; height: 43px; }
  #hud .player-card small { font-size: 8px; }
  #hud .player-card strong { font-size: 18px; }
  #hud .stamina-heading, #hud .stamina-heading b { font-size: 8px; }
  #hud .stamina-heading { margin-top: 5px; }
  #hud .dodge-status { font-size: 9px; margin-top: 4px; }
  #hud .skill-card { width: 224px; height: 100px; right: max(208px, calc(env(safe-area-inset-right) + 208px)); padding: 21px 24px 21px 24px; gap: 7px; }
  #hud .skill-key { display: none; }
  #hud .skill-card strong { font-size: 19px; }
  #hud .skill-card small { font-size: 10px; margin-top: 5px; }
  #hud .skill-orb { display: flex; width: 32px; height: 32px; flex-basis: 32px; }
  #hud .skill-orb span { width: 23px; height: 23px; font-size: 18px; }
  #hud .skill-orb::after { inset: -4px; }
  #hud .keyboard-hint { display: none; }
  #hud .touch-controls { display: block; bottom: max(5px, env(safe-area-inset-bottom)); height: 150px; }
  #hud .joystick { width: 112px; height: 112px; }
  #hud .joystick-knob { width: 49px; height: 49px; margin-left: -24.5px; margin-top: -24.5px; }
  #hud .touch-actions { width: 190px; height: 145px; transform: scale(.91); transform-origin: right bottom; }
  #hud .shot-charge { bottom: max(112px, calc(env(safe-area-inset-bottom) + 112px)); width: 148px; height: 51px; }
  #hud .goal-banner { top: 33%; font-size: 71px; }
  #hud .goal-banner.kickoff-count { top: 28%; font-size: 90px; }
  #toast { top: 39%; bottom: auto; font-size: 17px; padding: 19px 32px; }
}
@media (max-height: 550px) and (orientation: landscape) and (max-width: 740px) {
  #hud .player-card { left: max(116px, env(safe-area-inset-left)); width: 185px; height: 87px; padding: 16px 23px; }
  #hud .player-icon { display: none; }
  #hud .skill-card { right: max(183px, env(safe-area-inset-right)); width: 176px; height: 87px; padding: 17px 18px 17px 21px; }
  #hud .player-card strong, #hud .skill-card strong { font-size: 17px; }
  #hud .skill-orb { width: 25px; height: 25px; flex-basis: 25px; }
  #hud .skill-orb span { width: 19px; height: 19px; font-size: 15px; }
  #hud .skill-card small { font-size: 9px; }
  #hud .touch-actions { transform: scale(.82); }
  #hud .joystick { width: 99px; height: 99px; }
}
@media (min-width: 1200px) and (min-height: 700px) {
  #hud { --hud-gap: 18px; --hud-top: max(12px, env(safe-area-inset-top)); --hud-bottom: max(39px, calc(env(safe-area-inset-bottom) + 12px)); }
  #hud .scoreboard { width: 506px; height: 101px; padding-left: 42px; padding-right: 42px; }
  #hud .score-team b { font-size: 23px; }
  #hud .score-center > div { font-size: 40px; }
  #hud .player-card { width: 302px; height: 124px; }
  #hud .player-card strong { font-size: 23px; }
  #hud .skill-card { width: 272px; height: 124px; }
  #hud .skill-card strong { font-size: 23px; }
  #hud .frenzy-banner { top: calc(var(--hud-top) + 107px); }
}

/* Modals share the uniform 900×600 board scale used by other landscape pages. */
@media (min-aspect-ratio: 1/1) {
  .page-screen .team-option { min-height: 254px; height: 254px; padding: 18px; }
  .page-screen .arena-option { padding: 10px 16px; }
  .page-screen .team-option .crest { width: 48px; height: 52px; }
  .page-screen .team-option h2 { font-size: 23px; line-height: 1; margin-top: 7px; }
  .page-screen .team-skill { font-size: 10px; line-height: 1.2; margin-top: 6px; }
  .page-screen .team-option p { font-size: 10px; line-height: 1.35; margin-top: 7px; min-height: 27px; }
  .page-screen .team-traits { margin-top: 9px; gap: 12px; }
  .page-screen .team-select-label { margin-top: 10px; padding-top: 8px; font-size: 8px; line-height: 1.2; }
  .page-screen .page-footer { margin-top: 8px; padding-top: 6px; }
  .page-screen .credits-content > .button { width: 310px; max-width: 310px; min-height: 56px; height: 56px; padding: 12px 22px; font-size: 25px; }
  .modal-screen { padding: 0; align-items: center; justify-content: center; overflow: hidden; }
  .modal-panel,
  .result-panel {
    flex: 0 0 auto;
    max-width: none;
    margin: 0;
    transform: scale(var(--page-scale, 1));
    transform-origin: center;
  }
  .pause-panel { width: 420px; padding: 39px; }
  .pause-panel h1 { font-size: 72px; line-height: .94; margin-top: 20px; }
  .pause-panel p { font-size: 13px; line-height: 1.4; margin: 18px 0 22px; }
  .pause-panel .button { min-height: 60px; padding: 14px 20px; font-size: 32px; }
  .pause-links { gap: 10px; margin-top: 20px; }
  .pause-links .text-button { font-family: var(--display); font-size: 16px; font-weight: 700; text-transform: uppercase; }
  .result-panel { width: 820px; padding: 30px 44px; }
  .result-heading h1 { font-size: 54px; line-height: 1; margin-top: 12px; }
  .result-heading p { font-size: 12px; line-height: 1.4; margin-top: 10px; }
  .result-score { gap: 26px; padding: 16px 0; margin-top: 16px; }
  .result-score .crest { width: 58px; height: 64px; }
  .result-score strong { font-size: 13px; line-height: 1.2; margin: 8px auto 0; max-width: none; }
  .result-score small { font-size: 9px; line-height: 1.2; margin-top: 3px; letter-spacing: 1px; }
  .result-score > b { font-size: 70px; min-width: 140px; }
  .result-score > b > span { font-size: 45px; margin: 0 13px; }
  .result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; padding: 16px 0; }
  .result-stats > div { margin: 0; font-size: 13px; }
  .result-stats b { font-size: 22px; }
  .result-stats span { font-size: 12px; }
  .result-actions { grid-template-columns: repeat(3, 1fr); margin-top: 14px; gap: 10px; }
  .result-actions .primary { grid-column: auto; width: 100%; }
  .result-actions .button { min-height: 56px; padding: 12px 18px; font-size: 28px; }
  .result-trophy { position: absolute; right: 44px; top: 30px; width: 34px; margin: 0; }
  .result-trophy svg { height: 42px; }
}
