@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap");
:root {
  --ink: #152e3d;
  --cream: #fff8e9;
  --gold: #f8cc6a;
  --coral: #e87660;
  --teal: #244a52;
  --line: #d4c7ab;
  --muted: #637474;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #142c3b;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  transition:
    transform 0.15s,
    background 0.15s;
}
button:hover:not(:disabled) {
  transform: translateY(-2px);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ee775c;
  outline-offset: 4px;
}
button {
  color: inherit;
}
button.primary {
  background: var(--teal);
  color: var(--cream);
  box-shadow: 0 5px 0 #102f36;
}
button.secondary {
  background: #fff6e5;
  border: 1px solid #bda882;
  color: var(--ink);
}
.primary,
.secondary {
  padding: 15px 23px;
  border-radius: 9px;
  font-weight: 800;
  font-family: Outfit, sans-serif;
}
.primary span {
  margin-left: 25px;
}
.quiet,
.icon-button {
  background: transparent;
  color: inherit;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
}
.icon-button {
  border: 1px solid #c9baa0;
  border-radius: 50%;
  width: 37px;
  height: 37px;
  font-size: 20px;
  padding: 2px;
}
#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#app {
  position: relative;
  min-height: 100svh;
}
#header {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: #fff8e9f2;
  border-bottom: 1px solid #b5b397;
  position: relative;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font:
    900 21px/0.83 Outfit,
    sans-serif;
  letter-spacing: 1px;
}
.brand-second {
  display: block;
  color: #b86540;
  letter-spacing: 3px;
  font-size: 18px;
  margin-top: 5px;
}
.brand-icon {
  font-size: 43px;
  color: #b86540;
  line-height: 1;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  padding-right: 20px;
  border-right: 1px solid #bdae93;
}
.hero {
  position: relative;
  height: 365px;
  background: linear-gradient(
    90deg,
    #fff8e9 0%,
    #fff8e9fa 28%,
    #fff8e9aa 43%,
    transparent 66%
  );
  display: flex;
  align-items: center;
  padding: 18px 5%;
}
.intro {
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.1px;
  margin: 0 0 12px;
}
.eyebrow span,
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #599174;
  margin-right: 6px;
}
h1 {
  font:
    800 clamp(36px, 4.3vw, 64px) / 1.02 Outfit,
    sans-serif;
  letter-spacing: -2.8px;
  margin: 0 0 17px;
}
h1 em {
  font-style: normal;
  color: #bf6149;
}
h2 {
  font:
    700 28px/1.1 Outfit,
    sans-serif;
  margin: 0;
}
h3 {
  font-family: Outfit, sans-serif;
  margin: 10px 0;
}
p {
  line-height: 1.6;
}
.lede {
  font-size: 13px;
  color: #58666a;
  margin: 0 0 20px;
}
.mode-actions {
  display: flex;
  gap: 10px;
}
.hero-note {
  font-size: 8px;
  letter-spacing: 1.2px;
  margin: 20px 0 0;
  font-weight: 700;
  color: #6b7874;
}
.hero-note b {
  margin: 0 9px;
}
.scene-label {
  position: absolute;
  right: 5%;
  bottom: 24px;
  background: #153d49e8;
  color: #fff5df;
  padding: 11px 16px;
  border: 1px solid #fbdb9b73;
  border-radius: 5px;
  font:
    600 10px Outfit,
    sans-serif;
  letter-spacing: 1.6px;
}
.scene-label small {
  display: block;
  font:
    8px "DM Sans",
    sans-serif;
  letter-spacing: 1px;
  margin-top: 4px;
  padding-left: 14px;
  opacity: 0.65;
}
.scene-label .live-dot {
  background: #eecf81;
  width: 6px;
  height: 6px;
}
.selection {
  padding: 25px 5% 26px;
  background: #fff8e9;
  position: relative;
  z-index: 1;
  border-top: 1px solid #c9bea1;
}
.selection-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.selection-heading .eyebrow {
  color: #9b6946;
  margin-bottom: 7px;
  font-size: 8px;
}
h2 span {
  font:
    500 11px "DM Sans",
    sans-serif;
  color: #b19c75;
  margin-left: 20px;
}
.team-filters {
  display: flex;
  gap: 4px;
  background: #e8e0cf;
  padding: 4px;
  border-radius: 7px;
}
.team-filters button {
  background: transparent;
  border-radius: 5px;
  padding: 8px 15px;
  font-size: 11px;
  font-weight: 700;
}
.team-filters .active {
  background: #fffdf4;
  box-shadow: 0 2px 3px #0e252515;
}
.selection-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 30px;
}
.roster {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.hero-card {
  position: relative;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--hero-color) 28%, #fff4de),
    color-mix(in srgb, var(--hero-color) 65%, #ddceb1)
  );
  border: 2px solid transparent;
  border-radius: 9px;
  padding: 0;
  overflow: hidden;
  min-height: 112px;
}
.hero-card.active {
  border-color: #244a52;
  box-shadow:
    0 0 0 2px #fff8e9,
    0 0 0 4px #244a52;
}
.hero-card img {
  object-fit: contain;
  height: 86px;
  display: block;
  width: 100%;
  transition: transform 0.25s;
}
.hero-card:hover img {
  transform: scale(1.07);
}
.hero-card strong {
  display: block;
  font:
    600 11px Outfit,
    sans-serif;
  padding: 5px 2px;
  background: #fff7e5db;
  white-space: nowrap;
}
.hero-card .chosen {
  position: absolute;
  right: 5px;
  top: 5px;
  background: #214850;
  color: white;
  font-size: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  line-height: 16px;
}
.profile {
  border-left: 1px solid #d4c7ab;
  padding-left: 25px;
}
.profile .subtitle {
  font:
    600 9px Outfit,
    sans-serif;
  letter-spacing: 1.6px;
  color: #a36948;
  text-transform: uppercase;
}
.profile h3 {
  font-size: 25px;
  margin: 7px 0 3px;
}
.profile p {
  font-size: 11px;
  margin: 8px 0 13px;
  color: #687270;
}
.move-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  margin: 7px 0;
}
.key {
  font:
    700 10px Outfit,
    sans-serif;
  display: inline-block;
  min-width: 22px;
  padding: 4px 5px;
  border: 1px solid #d8c9ae;
  background: #f5e9d1;
  border-radius: 4px;
  text-align: center;
  color: #775f42;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 5%;
  background: #efe7d5;
  color: #8c8069;
  font-size: 8px;
  letter-spacing: 1.4px;
}
footer b {
  margin: 0 10px;
}
dialog {
  border: 1px solid #bea982;
  border-radius: 18px;
  background: #fff8e9;
  color: var(--ink);
  box-shadow: 0 25px 100px #081d3e99;
  width: min(620px, calc(100% - 28px));
  max-height: 88svh;
  padding: 35px;
}
dialog::backdrop {
  background: #1227349c;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 32px;
  margin-bottom: 14px;
}
dialog p {
  font-size: 13px;
  color: #61716d;
}
.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  background: transparent;
  font-size: 25px;
  width: 32px;
  height: 32px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.arena-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.arena-option {
  border: 1px solid #cfbea0;
  border-radius: 10px;
  background: #f3ebd9;
  padding: 17px;
  text-align: left;
  display: flex;
  gap: 15px;
  align-items: center;
}
.arena-option.selected {
  border: 2px solid var(--teal);
  background: #dce9dd;
}
.arena-icon {
  font-size: 29px;
}
.arena-option strong {
  display: block;
  font:
    700 17px Outfit,
    sans-serif;
}
.arena-option small {
  display: block;
  color: #677068;
  margin-top: 4px;
  font-size: 11px;
}
.arena-option .progress {
  margin-left: auto;
  font-size: 12px;
  color: #b27a40;
}
.field {
  display: grid;
  gap: 6px;
  margin: 14px 0;
}
.field label {
  font-size: 12px;
  font-weight: 700;
}
.field input,
.field select {
  border: 1px solid #c9b898;
  background: #fffdf6;
  border-radius: 7px;
  padding: 11px;
  min-width: 0;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rooms {
  border-top: 1px solid #d4c7ab;
  margin-top: 25px;
  padding-top: 14px;
}
.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e3d8c2;
}
.room-item strong {
  font-size: 14px;
}
.room-item small {
  display: block;
  font-size: 10px;
  color: #7b857a;
  margin-top: 5px;
}
.room-item button {
  padding: 8px 15px;
}
.connection {
  font-size: 11px;
  color: #657670;
}
.room-code {
  font:
    800 37px Outfit,
    sans-serif;
  letter-spacing: 6px;
  background: #e9e1cc;
  padding: 16px;
  text-align: center;
  border-radius: 8px;
}
.room-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.room-player {
  border: 1px solid #cfbd9b;
  border-radius: 9px;
  padding: 16px;
  text-align: center;
}
.room-player small {
  display: block;
  color: #7a897b;
  font-size: 11px;
  margin-top: 6px;
}
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 13px;
  margin: 20px 0;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #d9cdb5;
}
.toggle-row small {
  display: block;
  margin-top: 5px;
  max-width: 360px;
  font-size: 11px;
  color: #727b71;
}
.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: #315b54;
}
body.playing #header {
  background: #142c3bcf;
  color: #ffefd1;
  border-color: #a68a5955;
  height: 65px;
}
body.playing .brand {
  color: #fff3d6;
}
body.playing .brand-second {
  color: #edc878;
}
body.playing .tag,
body.playing #helpButton {
  display: none;
}
#hud {
  position: fixed;
  top: 85px;
  left: 4%;
  right: 4%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 25px;
  pointer-events: none;
  color: white;
  z-index: 3;
}
#hud[hidden] {
  display: none;
}
.fighter-hud {
  background: linear-gradient(110deg, #142c3beb, #244f5ed9);
  border: 1px solid #dbdfb852;
  border-left: 5px solid var(--hero-color);
  border-radius: 10px;
  max-width: 290px;
  padding: 12px 18px;
  box-shadow: 0 5px 30px #10223233;
}
.fighter-hud.right {
  justify-self: end;
  width: 100%;
  text-align: right;
  border-left: 1px solid #dbdfb852;
  border-right: 5px solid var(--hero-color);
}
.fighter-hud .name {
  font:
    700 17px Outfit,
    sans-serif;
}
.fighter-hud .player-name {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.65;
  display: block;
  margin-bottom: 2px;
}
.fighter-hud .damage {
  font:
    800 33px Outfit,
    sans-serif;
  color: #ffdd9a;
  display: inline-block;
  margin-top: 4px;
}
.fighter-hud .hearts {
  color: var(--hero-color);
  font-size: 20px;
  letter-spacing: 3px;
  margin-left: 12px;
}
.fighter-hud .move {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
  opacity: 0.8;
  min-height: 14px;
}
.match-center {
  text-align: center;
  text-shadow: 0 2px 6px #142c3b;
  pointer-events: auto;
}
.match-center span {
  font:
    700 10px Outfit,
    sans-serif;
  letter-spacing: 2px;
  display: block;
  color: #fff1c9;
}
.match-center strong {
  font:
    700 35px Outfit,
    sans-serif;
  display: block;
}
.match-center button {
  color: white;
  font-size: 11px;
}
#adminBadge {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #ffe1a3;
  background: #703e53;
  padding: 5px 12px;
  border-radius: 0 0 6px 6px;
  z-index: 4;
  white-space: nowrap;
}
#moveHint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff5d9;
  background: #173d50da;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 11px;
  white-space: nowrap;
}
#announcement {
  position: fixed;
  top: 38%;
  left: 10%;
  right: 10%;
  text-align: center;
  font:
    900 65px Outfit,
    sans-serif;
  color: #fff2d0;
  text-shadow:
    0 5px 0 #143b49,
    0 10px 50px #163247;
  pointer-events: none;
  z-index: 4;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #173848;
  color: #fff7e6;
  padding: 13px 22px;
  border: 1px solid #d5b473;
  border-radius: 8px;
  font-size: 13px;
  z-index: 15;
  max-width: 90%;
}
#touchControls {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  z-index: 5;
  pointer-events: none;
}
#touchControls[hidden] {
  display: none;
}
.touch-movement,
.touch-attacks {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}
#touchControls button {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: #183c50d9;
  border: 1px solid #fff3cb82;
  color: #fff1c8;
  border-radius: 16px;
  min-width: 55px;
  height: 55px;
  font:
    800 10px Outfit,
    sans-serif;
  box-shadow: 0 4px 0 #0f2a3aaa;
}
#touchControls button small {
  display: block;
  font-size: 8px;
  opacity: 0.6;
  margin-top: 3px;
}
#touchControls button[data-action="left"],
#touchControls button[data-action="right"] {
  font-size: 20px;
  min-width: 57px;
  height: 62px;
}
#touchControls button.jump {
  height: 75px;
  background: #b77045df;
}
#touchControls button.pressed {
  background: #b98145;
  transform: translateY(3px);
}
.small-note {
  font-size: 11px !important;
  color: #8b7660 !important;
}
.victory-icon {
  font-size: 60px;
  text-align: center;
}
.result {
  text-align: center;
}
.result h2 {
  font-size: 40px;
}
.result .modal-actions {
  justify-content: center;
}
.result-stat {
  background: #eee3cb;
  padding: 15px;
  border-radius: 8px;
}
.result-stat strong {
  display: block;
  color: #b16f40;
  font-size: 20px;
}
.admin-tools {
  background: #f0dfd7;
  border: 1px solid #b4917b;
  padding: 15px;
  margin: 15px 0;
  border-radius: 9px;
}
.fatal {
  background: #fff2d8;
  border: 1px solid #bb715c;
  padding: 18px;
  position: fixed;
  left: 20px;
  right: 20px;
  top: 90px;
  z-index: 20;
}
.online-warning {
  color: #a0563b !important;
}
.loading {
  opacity: 0.6;
}
@media (min-width: 1500px) {
  .hero {
    height: 420px;
  }
  .hero-card {
    min-height: 140px;
  }
  .hero-card img {
    height: 112px;
  }
  .selection-body {
    grid-template-columns: 1fr 320px;
  }
  .profile p {
    font-size: 13px;
  }
}
@media (max-width: 850px) {
  #header {
    padding: 0 4%;
    height: 70px;
  }
  .nav {
    gap: 6px;
  }
  .tag {
    display: none;
  }
  .hero {
    height: 340px;
    padding: 20px 4%;
    background: linear-gradient(90deg, #fff8e9fa, #fff8e9d9 44%, #fff8e944 75%);
  }
  h1 {
    font-size: 45px;
  }
  .selection {
    padding: 24px 4%;
  }
  .selection-body {
    gap: 18px;
    grid-template-columns: 1fr 200px;
  }
  .profile {
    padding-left: 18px;
  }
  .profile h3 {
    font-size: 21px;
  }
  .roster {
    gap: 7px;
  }
  .hero-card img {
    height: 67px;
  }
  .hero-card {
    min-height: 91px;
  }
  .hero-card strong {
    font-size: 9px;
  }
  .team-filters button {
    padding: 7px 9px;
  }
  .selection-heading h2 {
    font-size: 24px;
  }
  .scene-label {
    display: none;
  }
  .hero-note {
    font-size: 7px;
  }
  .fighter-hud {
    padding: 9px 12px;
  }
  .fighter-hud .name {
    font-size: 13px;
  }
  #hud {
    gap: 8px;
    left: 2%;
    right: 2%;
  }
  .fighter-hud .hearts {
    font-size: 16px;
  }
  .fighter-hud .damage {
    font-size: 27px;
  }
  #moveHint {
    font-size: 9px;
    padding: 10px;
  }
  .match-center strong {
    font-size: 27px;
  }
}
@media (max-width: 600px) {
  #header {
    height: 64px;
  }
  .brand {
    font-size: 17px;
  }
  .brand-second {
    font-size: 14px;
  }
  .brand-icon {
    font-size: 34px;
  }
  .quiet {
    font-size: 11px;
  }
  .hero {
    height: 315px;
    align-items: start;
    padding-top: 30px;
    background: linear-gradient(90deg, #fff8e9fa, #fff8e9d9 60%, #fff8e988);
  }
  h1 {
    font-size: 42px;
    letter-spacing: -1.8px;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1.3px;
  }
  .lede {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .primary,
  .secondary {
    padding: 12px 15px;
    font-size: 12px;
  }
  .hero-note {
    font-size: 6px;
  }
  .selection-heading {
    display: block;
  }
  .team-filters {
    width: max-content;
    margin-top: 15px;
  }
  .selection-body {
    display: block;
  }
  .roster {
    gap: 8px;
  }
  .hero-card {
    min-height: 86px;
  }
  .hero-card img {
    height: 62px;
  }
  .hero-card strong {
    font-size: 8px;
  }
  .profile {
    border-left: 0;
    border-top: 1px solid #d4c7ab;
    margin-top: 20px;
    padding: 17px 0 0;
  }
  .profile p {
    max-width: 400px;
  }
  .profile .moves {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .profile .move-row {
    font-size: 9px;
  }
  .profile h3 {
    font-size: 24px;
  }
  footer {
    font-size: 6px;
    line-height: 1.8;
    display: block;
  }
  footer span {
    display: block;
  }
  dialog {
    padding: 27px 20px;
  }
  dialog h2 {
    font-size: 27px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .controls-grid {
    font-size: 11px;
    gap: 10px;
  }
  .fighter-hud {
    padding: 7px;
    min-width: 0;
  }
  .fighter-hud .name {
    font-size: 10px;
  }
  .fighter-hud .player-name {
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .fighter-hud .hearts {
    font-size: 12px;
    margin-left: 3px;
    letter-spacing: 0;
  }
  .fighter-hud .move {
    font-size: 8px;
  }
  .fighter-hud .damage {
    font-size: 23px;
  }
  #hud {
    top: 82px;
    grid-template-columns: 1fr 72px 1fr;
    gap: 5px;
  }
  .match-center span {
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .match-center strong {
    font-size: 24px;
  }
  .match-center button {
    font-size: 9px;
    padding: 7px 0;
  }
  body.playing #header {
    height: 55px;
  }
  #adminBadge {
    top: 55px;
    font-size: 7px;
  }
  #touchControls {
    gap: 4px;
    left: 7px;
    right: 7px;
  }
  .touch-movement,
  .touch-attacks {
    gap: 6px;
  }
  .touch-attacks {
    display: grid;
    grid-template-columns: repeat(2, 54px);
  }
  #touchControls button {
    min-width: 50px;
    width: 50px;
    height: 54px;
    border-radius: 12px;
    font-size: 8px;
  }
  #touchControls button[data-action="left"],
  #touchControls button[data-action="right"] {
    min-width: 50px;
    height: 60px;
    font-size: 16px;
  }
  #touchControls button.jump {
    height: 54px;
    min-width: 54px;
  }
  #moveHint {
    bottom: 134px;
    white-space: normal;
    width: 85%;
    text-align: center;
    font-size: 8px;
  }
  #announcement {
    font-size: 40px;
  }
  .room-code {
    font-size: 30px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  body.playing #game {
    top: 190px;
    height: calc(100% - 350px);
  }
  body.playing { background: #17394a; }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.playing #header {
    display: none;
  }
  body.playing #game {
    top: 92px;
    height: calc(100% - 174px);
  }
  body.playing { background: #17394a; }
  body.playing .brand {
    font-size: 12px;
  }
  body.playing .brand-second {
    font-size: 10px;
  }
  body.playing .brand-icon {
    font-size: 25px;
  }
  #hud {
    top: 6px;
  }
  .fighter-hud .player-name { display: none; }
  .fighter-hud .hearts { font-size: 14px; }
  .touch-attacks { display: flex; }
  .fighter-hud {
    padding: 5px 10px;
  }
  .fighter-hud .damage {
    font-size: 22px;
  }
  .fighter-hud .move {
    display: none;
  }
  .fighter-hud .name {
    font-size: 11px;
  }
  #moveHint {
    display: none;
  }
  #adminBadge {
    top: 70px;
  }
  .match-center strong {
    font-size: 22px;
  }
  #touchControls button {
    height: 50px;
  }
  #touchControls button.jump {
    height: 60px;
  }
  dialog {
    max-height: 94svh;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

body:not(.playing) #game {
  position: absolute;
  top: 85px;
  height: 365px;
}
body:not(.playing) {
  background: #efe7d5;
}
@media (min-width: 1500px) {
  body:not(.playing) #game {
    height: 420px;
  }
}
@media (max-width: 850px) {
  body:not(.playing) #game {
    top: 70px;
    height: 340px;
  }
}
@media (max-width: 600px) {
  body:not(.playing) #game {
    top: 64px;
    height: 315px;
  }
}

/* Power feedback uses existing HUD space so mobile combat stays unobstructed. */
.power-meter { height: 4px; margin-top: 3px; border-radius: 4px; overflow: hidden; background: #071e2a99; }
.power-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hero-color), #fff1b4); transition: width .1s linear; }
.power-time { float: right; font-size: 8px; margin-left: 5px; color: #ffe19c; }
#touchControls button[data-action="burst"] { position: relative; border-color: #ffda91; }
#touchControls button[data-action="burst"]::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 5px; height: 3px; background: #ffe0a1; border-radius: 3px; transform-origin: left; transform: scaleX(var(--charge, 1)); }
#powerBanner { position: fixed; bottom: 86px; left: 4%; z-index: 4; pointer-events: none; color: #fff5db; background: linear-gradient(100deg, #112e44ef, #112e4499, transparent); border-left: 5px solid var(--power-color, #ffdf8d); padding: 10px 24px 12px 15px; font: 900 25px Outfit, sans-serif; letter-spacing: -.5px; text-shadow: 0 2px 0 #15283e; opacity: 0; transform: translateX(-18px); transition: opacity .12s, transform .18s; }
#powerBanner.visible { opacity: 1; transform: translateX(0); }
@media (max-width: 600px) and (orientation: portrait) { #powerBanner { bottom: 170px; font-size: 18px; padding: 7px 22px 8px 10px; } .power-time { font-size: 7px; } }
@media (max-height: 500px) and (orientation: landscape) { #powerBanner { bottom: 86px; left: 24%; font-size: 17px; padding: 5px 20px 6px 10px; } }
@media (prefers-reduced-motion: reduce) { #powerBanner { transform: none; transition: none; } }

.power-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.power-time { flex-shrink: 0; }
