:root {
  --ink: #090c18;
  --panel: #171d35;
  --panel-2: #202a4c;
  --line: #52618e;
  --cream: #f3ead0;
  --gold: #f2c45c;
  --cyan: #58d9ef;
  --violet: #a16ae8;
  --red: #db5d70;
  --green: #6bd48a;
  --orange: #f08b4a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--cream);
  background:
    linear-gradient(rgba(7, 10, 23, .91), rgba(7, 10, 23, .98)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.025) 3px 4px),
    #0b1020;
  font-family: "Courier New", monospace;
  image-rendering: pixelated;
}
button, a, input { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.game-frame {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 15px 0 25px;
}

.game-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}
.game-brand p { margin: 0 0 3px; color: var(--cyan); font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.game-brand h1 { margin: 0; font-size: clamp(25px, 4vw, 40px); line-height: .95; text-shadow: 4px 4px #050711; }
.game-brand h1 span { color: var(--gold); }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.header-actions button, .home-link {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 2px solid var(--line);
  color: var(--cream);
  background: var(--panel);
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset -3px -3px rgba(0,0,0,.25);
}
.home-link { color: var(--gold); }
.header-actions button:hover, .home-link:hover { border-color: var(--gold); color: var(--ink); background: var(--gold); }
#fullscreenButton[aria-pressed="true"] { color: var(--ink); background: var(--gold); }

.chapter-strip {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 9px 12px;
  border: 2px solid var(--line);
  background: linear-gradient(90deg, #1c2442, #10172b);
}
.chapter-strip div:first-child { display: grid; gap: 2px; }
.chapter-strip span { color: var(--cyan); font-size: 8px; letter-spacing: 2px; }
.chapter-strip strong { color: var(--gold); font-size: 11px; }
.chapter-strip > b { color: #aeb7d6; font-size: 9px; letter-spacing: 1px; }
.chapter-progress { height: 8px; border: 2px solid #090c18; background: #303957; }
.chapter-progress i { display: block; width: 5%; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .3s; }

.party-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 7px;
  margin-top: 9px;
}
.party-slot {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  min-height: 57px;
  padding: 7px;
  border: 2px solid #39466d;
  background: #141a30;
}
.party-slot.empty { place-items: center; color: #56607f; font-size: 8px; }
.hero-pixel {
  position: relative;
  width: 34px;
  height: 40px;
  border: 2px solid #070a14;
  background: var(--hero-color, #556);
  box-shadow: inset 0 -10px rgba(0,0,0,.2);
}
.hero-pixel::before { content: ""; position: absolute; top: 5px; left: 8px; width: 16px; height: 13px; background: #e4bc95; }
.hero-pixel::after { content: ""; position: absolute; top: 3px; left: 6px; width: 20px; height: 6px; background: var(--hair-color, #24232a); }
.party-info { min-width: 0; }
.party-info strong { display: block; overflow: hidden; color: var(--gold); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.party-info span { color: #8b96ba; font-size: 7px; }
.mini-bars { display: grid; gap: 3px; margin-top: 5px; }
.mini-bar { height: 5px; border: 1px solid #080a14; background: #343d5d; }
.mini-bar i { display: block; height: 100%; background: var(--green); }
.mini-bar.energy i { background: var(--cyan); }
.inventory-quick {
  display: grid;
  grid-template-columns: auto 22px;
  align-content: center;
  gap: 4px 7px;
  min-width: 135px;
  padding: 8px 10px;
  border: 2px solid #39466d;
  background: #11172b;
}
.inventory-quick span { color: #8e99bb; font-size: 7px; }
.inventory-quick b { color: var(--gold); font-size: 12px; text-align: right; }

.screen-wrap {
  position: relative;
  margin-top: 10px;
  overflow: hidden;
  border: 5px solid #070a14;
  outline: 2px solid var(--line);
  background: #060914;
  box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 40px rgba(88,217,239,.1);
}
#gameCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: saturate(1.12) contrast(1.04);
}
.quest-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(270px, 44%);
  padding: 9px 11px;
  border: 3px solid #080b17;
  background: rgba(15,21,40,.91);
  box-shadow: inset -3px -3px rgba(0,0,0,.3);
  pointer-events: none;
}
.quest-panel span { color: var(--cyan); font-size: 7px; letter-spacing: 1px; }
.quest-panel strong { display: block; margin: 3px 0; color: var(--gold); font-size: 11px; }
.quest-panel p { margin: 0; color: #aab4d2; font-size: 8px; line-height: 1.4; }
.interaction-hint {
  position: absolute;
  bottom: 13px;
  left: 50%;
  padding: 7px 11px;
  border: 2px solid #070a14;
  color: #fff;
  background: rgba(15,20,37,.94);
  font-size: 9px;
  transform: translateX(-50%);
}
kbd { padding: 2px 5px; color: var(--ink); background: var(--gold); font-weight: 700; }
.touch-key { display: none; }

.dialog-box {
  position: absolute;
  z-index: 9;
  right: 6%;
  bottom: 18px;
  left: 6%;
  min-height: 112px;
  padding: 22px 24px 18px;
  border: 4px solid #070a14;
  outline: 2px solid var(--gold);
  background: rgba(18,24,45,.97);
}
.speaker {
  position: absolute;
  top: -17px;
  left: 14px;
  padding: 7px 12px;
  border: 3px solid #070a14;
  color: var(--ink);
  background: var(--gold);
  font-size: 10px;
  font-weight: 700;
}
.dialog-box p { margin: 4px 0 0; font-size: 13px; line-height: 1.65; }
.dialog-next { position: absolute; right: 12px; bottom: 8px; color: var(--cyan); font-size: 7px; }

.battle-panel {
  position: absolute;
  z-index: 14;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  padding: 12px;
  background:
    radial-gradient(circle at 70% 25%, rgba(161,106,232,.2), transparent 35%),
    rgba(6,9,20,.97);
}
.battle-header { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border: 2px solid #3d4d7b; background: #121a33; }
.battle-header div { display: grid; gap: 2px; }
.battle-header span { color: var(--cyan); font-size: 7px; letter-spacing: 2px; }
.battle-header strong { color: var(--gold); font-size: 13px; }
.battle-header > b { color: #9da8cb; font-size: 9px; }
.battlefield { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; min-height: 170px; padding: 8px; }
.battle-party, .battle-enemies { display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.fighter-card {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(128px, 31%);
  min-height: 124px;
  padding: 8px 6px;
  border: 2px solid #41517d;
  background: #12182b;
  transition: transform .15s, border-color .15s;
}
.fighter-card.active { border-color: var(--gold); transform: translateY(-5px); }
.fighter-card.targeted { border-color: var(--red); box-shadow: 0 0 18px rgba(219,93,112,.35); }
.fighter-card.defeated { opacity: .35; filter: grayscale(1); }
.fighter-sprite { position: relative; width: 38px; height: 48px; margin: 4px 0; background: var(--fighter-color, #556); box-shadow: inset 0 -14px rgba(0,0,0,.25); }
.fighter-sprite::before { content: ""; position: absolute; top: 6px; left: 9px; width: 20px; height: 16px; background: #dfb790; }
.fighter-sprite::after { content: ""; position: absolute; top: 3px; left: 7px; width: 24px; height: 8px; background: var(--fighter-hair, #222); }
.fighter-card strong { min-height: 21px; color: var(--cream); font-size: 8px; text-align: center; }
.fighter-card small { color: #8893b4; font-size: 7px; }
.fighter-hp { width: 100%; height: 7px; margin-top: 5px; border: 1px solid #05070e; background: #333c58; }
.fighter-hp i { display: block; height: 100%; background: var(--green); }
.fighter-energy { width: 100%; height: 5px; margin-top: 2px; border: 1px solid #05070e; background: #333c58; }
.fighter-energy i { display: block; height: 100%; background: var(--cyan); }
.enemy-sprite { width: 46px; height: 55px; margin: 2px 0; background: linear-gradient(135deg, var(--violet), #202648); clip-path: polygon(25% 0, 75% 0, 100% 30%, 82% 100%, 18% 100%, 0 30%); box-shadow: 0 0 18px var(--violet); }
.battle-log { min-height: 38px; padding: 8px 10px; border: 2px solid #37456e; color: #cbd2ea; background: #0d1327; font-size: 9px; line-height: 1.45; }
.battle-command { display: grid; grid-template-columns: 140px 1fr; gap: 8px; margin-top: 8px; }
.active-fighter { display: grid; align-content: center; padding: 7px 10px; border: 2px solid #37456e; background: #11182e; }
.active-fighter span { color: var(--cyan); font-size: 7px; }
.active-fighter strong { color: var(--gold); font-size: 9px; }
.battle-actions, .skill-menu, .item-menu { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.battle-actions button, .skill-menu button, .item-menu button {
  min-height: 42px;
  padding: 6px;
  border: 2px solid #4b5980;
  background: #202947;
  font-size: 8px;
  font-weight: 700;
}
.battle-actions button:hover, .skill-menu button:hover, .item-menu button:hover { border-color: var(--gold); color: var(--ink); background: var(--gold); }
.skill-menu, .item-menu { grid-column: 2; }
.skill-menu button small { display: block; margin-top: 3px; color: #94a0c3; font-size: 6px; font-weight: 400; }

.title-screen, .ending-screen {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(88,217,239,.2), transparent 30%),
    linear-gradient(135deg, rgba(8,12,28,.97), rgba(14,8,29,.96));
}
.title-screen img { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; }
.title-screen p, .ending-screen > p { margin: 10px 0 2px; color: var(--cyan); font-size: 8px; letter-spacing: 3px; }
.title-screen h2 { margin: 4px 0 0; color: var(--cream); font-size: clamp(31px, 6vw, 64px); line-height: .9; text-shadow: 5px 5px #080a14; }
.title-screen h3 { margin: 4px 0 13px; color: var(--gold); font-size: clamp(20px, 4vw, 38px); }
.title-screen > span { color: #b1bad5; font-size: 10px; line-height: 1.6; }
.title-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: min(430px, 90%); margin: 19px 0 11px; }
.title-actions button, .ending-screen button {
  min-height: 43px;
  padding: 8px 12px;
  border: 2px solid #4a5882;
  color: var(--cream);
  background: #1b2442;
  font-size: 8px;
  font-weight: 700;
}
.title-actions .primary, .ending-screen button { border-color: #fff0b3; color: var(--ink); background: var(--gold); }
.title-actions button:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.7); }
.title-screen small { color: #6f7998; font-size: 7px; }
.ending-screen h2 { margin: 5px 0; color: var(--gold); font-size: clamp(32px, 6vw, 58px); }
.ending-screen blockquote { max-width: 650px; margin: 15px auto; color: #cbd2e7; font-size: 13px; line-height: 1.7; }
.ending-screen > strong { margin: 14px 0; color: var(--cyan); font-size: 10px; }
.ending-roster { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; }
.ending-roster span { padding: 6px 8px; border: 1px solid #4b5980; color: var(--gold); background: #171d35; font-size: 7px; }

.overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4,6,14,.9);
  backdrop-filter: blur(8px);
}
.overlay-window {
  width: min(960px, 95vw);
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
  border: 3px solid #080a14;
  outline: 2px solid var(--line);
  background: #11172a;
}
.overlay-window > header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #3a4569; }
.overlay-window header div { display: grid; gap: 3px; }
.overlay-window header span { color: var(--cyan); font-size: 7px; letter-spacing: 2px; }
.overlay-window h2 { margin: 0; color: var(--gold); }
.overlay-window header button { width: 36px; height: 36px; color: var(--ink); background: var(--gold); font-weight: 700; }
.codex-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0; }
.codex-tabs button { padding: 8px 10px; border: 1px solid #4b5980; background: #1b2442; font-size: 7px; }
.codex-tabs button.active { color: var(--ink); background: var(--cyan); }
.codex-content { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.codex-entry { padding: 13px; border: 1px solid #394669; background: #151c32; }
.codex-entry.locked { opacity: .45; }
.codex-entry b { color: var(--cyan); font-size: 8px; }
.codex-entry h3 { margin: 5px 0; color: var(--gold); font-size: 14px; }
.codex-entry p { margin: 0; color: #aeb7d0; font-size: 9px; line-height: 1.55; }
.options-window { width: min(500px, 95vw); }
.options-window > label { display: grid; gap: 8px; margin: 20px 0; color: var(--gold); font-size: 9px; }
.options-window input { width: 100%; accent-color: var(--gold); }
.options-window > button, .confirm-team { width: 100%; min-height: 44px; margin: 5px 0; border: 2px solid #4b5980; background: #202947; font-size: 9px; font-weight: 700; }
.options-window article { margin-top: 15px; padding: 12px; border: 1px solid #394669; color: #aeb7d0; font-size: 9px; line-height: 1.6; }
.options-window article b { color: var(--cyan); }
.team-window > p { color: #aeb7d0; font-size: 9px; }
.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 15px 0; }
.team-member {
  min-height: 170px;
  padding: 10px;
  border: 2px solid #3b486e;
  background: #151c32;
  text-align: center;
}
.team-member.selected { border-color: var(--gold); box-shadow: inset 0 0 20px rgba(242,196,92,.12); }
.team-member.locked { opacity: .35; pointer-events: none; }
.team-member .hero-pixel { margin: 0 auto 8px; }
.team-member strong { display: block; min-height: 28px; color: var(--gold); font-size: 9px; }
.team-member span { color: #8f99b8; font-size: 7px; }
.team-member small { display: block; margin-top: 8px; color: #b8c0d8; font-size: 7px; line-height: 1.5; }
.confirm-team { color: var(--ink); background: var(--gold); }

.controls { padding-top: 13px; }
.desktop-help { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; color: #737e9e; font-size: 8px; }
.touch-controls { display: none; align-items: center; justify-content: space-between; user-select: none; -webkit-user-select: none; touch-action: none; }
.dpad { display: grid; grid-template: repeat(3, 48px) / repeat(3, 48px); }
.dpad .up { grid-area: 1 / 2; }
.dpad .left { grid-area: 2 / 1; }
.dpad .down { grid-area: 2 / 2; }
.dpad .right { grid-area: 2 / 3; }
.dpad button, .action-button, .potion-button {
  border: 3px solid #070a14;
  color: #eef2ff;
  background: #293353;
  box-shadow: inset -3px -3px rgba(0,0,0,.25);
  touch-action: none;
}
.dpad button { min-width: 48px; min-height: 48px; font-size: 21px; }
.touch-actions { display: flex; align-items: flex-end; gap: 14px; }
.action-button, .potion-button { border-radius: 50%; }
.action-button { width: 76px; height: 76px; color: var(--ink); background: var(--gold); }
.potion-button { width: 58px; height: 58px; background: var(--red); }
.action-button span, .potion-button span { display: block; font-size: 21px; line-height: 1; }
.action-button small, .potion-button small { display: block; margin-top: 4px; font-size: 6px; }
.is-pressed { color: var(--ink) !important; background: var(--cyan) !important; transform: translateY(2px); }

body.mobile-fullscreen { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; padding: 0; background: #070a14; }
body.mobile-fullscreen .game-frame { position: fixed; inset: 0; width: 100%; height: 100dvh; margin: 0; padding: 0; }
body.mobile-fullscreen .game-header { position: fixed; z-index: 60; top: max(6px, env(safe-area-inset-top)); right: max(6px, env(safe-area-inset-right)); display: block; width: auto; margin: 0; }
body.mobile-fullscreen .game-brand, body.mobile-fullscreen .home-link, body.mobile-fullscreen #musicButton,
body.mobile-fullscreen #codexButton, body.mobile-fullscreen #optionsButton, body.mobile-fullscreen #saveButton { display: none; }
body.mobile-fullscreen .header-actions { display: block; width: auto; }
body.mobile-fullscreen #fullscreenButton { min-width: 112px; color: var(--ink); background: var(--gold); }
body.mobile-fullscreen .chapter-strip { display: none; }
body.mobile-fullscreen .party-hud { position: fixed; z-index: 27; top: max(6px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); width: min(62vw, 520px); margin: 0; }
body.mobile-fullscreen .inventory-quick { display: none; }
body.mobile-fullscreen .screen-wrap { position: fixed; inset: 0; display: grid; place-items: center; width: 100%; height: 100dvh; margin: 0; border: 0; outline: 0; box-shadow: none; }
body.mobile-fullscreen #gameCanvas { width: min(100vw, calc(100dvh * 1.6667)); max-width: 100vw; height: auto; max-height: 100dvh; }
body.mobile-fullscreen .controls { padding: 0; }

@media (max-width: 760px), (pointer: coarse) {
  .game-frame { width: calc(100% - 10px); padding-top: 7px; }
  .game-header { align-items: flex-start; }
  .game-brand p { display: none; }
  .header-actions { max-width: 410px; }
  .party-hud { grid-template-columns: repeat(3, 1fr); }
  .inventory-quick { grid-column: 1 / -1; grid-template-columns: auto 20px auto 20px; min-height: 35px; }
  .party-slot { grid-template-columns: 30px 1fr; min-height: 52px; }
  .hero-pixel { width: 30px; height: 36px; }
  .chapter-strip { grid-template-columns: auto 1fr; }
  .chapter-strip > b { display: none; }
  .desktop-help { display: none; }
  .touch-key { display: inline; }
  .keyboard-key { display: none; }
  .touch-controls {
    display: flex;
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 174px;
    padding: 8px max(18px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    border-top: 3px solid #070a14;
    background: linear-gradient(rgba(12,17,35,.84), rgba(7,10,22,.98));
    backdrop-filter: blur(7px);
  }
  body { padding-bottom: calc(174px + env(safe-area-inset-bottom)); overscroll-behavior: none; }
  .battle-panel { padding: 7px; }
  .battlefield { gap: 7px; min-height: 150px; }
  .fighter-card { min-height: 110px; }
  .battle-command { grid-template-columns: 105px 1fr; }
  .battle-actions, .skill-menu, .item-menu { grid-template-columns: repeat(3, 1fr); }
  .skill-menu, .item-menu { grid-column: 1 / -1; }
  .battle-actions button, .skill-menu button, .item-menu button { min-height: 38px; font-size: 7px; }
}

@media (max-width: 480px) {
  .game-header { flex-direction: column; align-items: stretch; }
  .game-brand { text-align: center; }
  .header-actions { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; max-width: none; }
  .header-actions button, .home-link { min-width: 0; padding-inline: 4px; font-size: 7px; }
  .chapter-strip { gap: 8px; }
  .chapter-strip strong { font-size: 9px; }
  .party-info span { display: none; }
  .party-slot { grid-template-columns: 26px 1fr; padding: 5px; }
  .hero-pixel { width: 26px; height: 32px; }
  .hero-pixel::before { left: 6px; width: 12px; }
  .hero-pixel::after { left: 5px; width: 15px; }
  .party-info strong { font-size: 7px; }
  .quest-panel { width: 48%; }
  .quest-panel p { display: none; }
  .dialog-box { right: 4%; left: 4%; min-height: 105px; padding: 20px 15px 15px; }
  .dialog-box p { font-size: 11px; }
  .title-screen { padding: 15px; }
  .title-screen img { width: 64px; height: 64px; }
  .title-screen h2 { font-size: 32px; }
  .title-screen h3 { font-size: 21px; }
  .title-actions { width: 100%; }
  .codex-content, .team-grid { grid-template-columns: 1fr; }
  .team-member { min-height: 125px; }
  .touch-controls { min-height: 160px; }
  body { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
  .dpad { grid-template: repeat(3, 44px) / repeat(3, 44px); }
  .dpad button { min-width: 44px; min-height: 44px; }
  .action-button { width: 68px; height: 68px; }
  .potion-button { width: 52px; height: 52px; }
}

@media (orientation: landscape) and (max-height: 620px) and (pointer: coarse) {
  body { padding-bottom: 0; }
  .game-frame { width: min(100%, 920px); padding-inline: 112px; }
  .game-header, .chapter-strip, .party-hud, .controls { margin-inline: -104px; }
  .touch-controls {
    top: 50%;
    bottom: auto;
    min-height: 0;
    padding: 0 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: translateY(-50%);
    pointer-events: none;
  }
  .dpad, .touch-actions { pointer-events: auto; }
  body.mobile-fullscreen .game-frame { width: 100%; padding: 0; }
  body.mobile-fullscreen .game-header, body.mobile-fullscreen .party-hud, body.mobile-fullscreen .controls { margin: 0; }
  body.mobile-fullscreen .party-hud { grid-template-columns: repeat(3, minmax(0,1fr)); }
  body.mobile-fullscreen .party-slot { min-height: 46px; }
  body.mobile-fullscreen .title-screen, body.mobile-fullscreen .ending-screen { padding-inline: 158px; }
  body.mobile-fullscreen .title-screen img { width: 55px; height: 55px; }
  body.mobile-fullscreen .title-screen h2 { font-size: 31px; }
  body.mobile-fullscreen .title-screen h3 { font-size: 21px; margin-bottom: 6px; }
  body.mobile-fullscreen .title-screen > span { font-size: 8px; }
  body.mobile-fullscreen .title-actions { margin: 9px 0 5px; }
  body.mobile-fullscreen .title-actions button { min-height: 34px; }
  body.mobile-fullscreen .battle-panel { padding-inline: 158px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
