:root {
  color-scheme: dark;
  --ink: #071a22;
  --paper: #f7f0d4;
  --panel: #0b4f6c;
  --panel-deep: #062f43;
  --panel-soft: #12677e;
  --mint: #7de1cf;
  --teal: #55c0d3;
  --amber: #f2c35b;
  --rose: #d96b78;
  --cream: #fff8df;
  --line: rgba(255, 248, 223, 0.18);
  --shadow: rgba(0, 0, 0, 0.32);
  --screen-zoom: 1;
  --device-fit-scale: 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--cream);
  background:
    linear-gradient(135deg, rgba(85, 192, 211, 0.22), transparent 35%),
    linear-gradient(315deg, rgba(242, 195, 91, 0.12), transparent 42%),
    #0b4f6c;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overscroll-behavior: none;
}

button {
  font: inherit;
}

html,
body,
*,
*::before,
*::after {
  cursor: url("../../assets/ui/gyattrados-pokeball-cursor-sm.png") 10 10, auto !important;
}

.game-shell {
  width: min(1220px, calc(100vw - 20px));
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(6px, 1.2vh, 14px) 0;
  display: grid;
  grid-template-columns: minmax(680px, 1fr);
  gap: 0;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}

.cartridge {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 223, 0.3);
  border-radius: 46px 46px 70px 70px / 34px 34px 56px 56px;
  padding: clamp(16px, 2.4vw, 30px) clamp(16px, 2.8vw, 34px) clamp(18px, 2.6vw, 30px);
  display: grid;
  grid-template-columns: minmax(96px, 128px) minmax(420px, 1fr) minmax(96px, 128px);
  grid-template-rows: auto auto auto auto auto;
  column-gap: clamp(8px, 2vw, 18px);
  row-gap: 12px;
  align-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 248, 223, 0.24), transparent 22%),
    radial-gradient(circle at 86% 86%, rgba(6, 47, 67, 0.38), transparent 32%),
    linear-gradient(145deg, #65b7dc 0%, #2879ac 46%, #1d5f8d 100%);
  box-shadow:
    0 30px 70px var(--shadow),
    inset 0 0 0 5px rgba(255, 248, 223, 0.08),
    inset 0 -16px 30px rgba(6, 22, 33, 0.24);
  transform: scale(var(--device-fit-scale));
  transform-origin: center;
  will-change: transform;
}

.cartridge::before,
.cartridge::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.cartridge::before {
  inset: 10px 12px auto;
  height: 42%;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 248, 223, 0.18), transparent);
  opacity: 0.55;
}

.cartridge::after {
  left: 8%;
  right: 8%;
  bottom: 12px;
  height: 16px;
  border-radius: 999px;
  background: rgba(5, 30, 45, 0.18);
  box-shadow: inset 0 4px 10px rgba(255, 248, 223, 0.12);
}

.gba-top {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  padding: 0 14px;
}

.power-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff6d75;
  box-shadow: 0 0 0 3px rgba(12, 27, 36, 0.25), 0 0 12px rgba(255, 109, 117, 0.85);
}

.console-brand {
  flex: 1;
  color: rgba(255, 248, 223, 0.82);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(4, 18, 26, 0.4);
}

.console-wordmark,
.game-wordmark {
  color: #ffcb05;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  -webkit-text-stroke: 0.04em #2a5dad;
  text-shadow:
    0.04em 0.04em 0 #fff6a4,
    0.08em 0.08em 0 #2a75bb,
    0.13em 0.13em 0 #173b87;
}

.console-wordmark {
  color: #ffdf42;
  font-size: 0.78rem;
  transform: skew(-5deg);
}

.speaker-slots {
  display: grid;
  grid-template-columns: repeat(4, 7px);
  gap: 5px;
  align-items: center;
}

.speaker-slots span {
  display: block;
  height: 26px;
  border-radius: 999px;
  background: #17445d;
  box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 248, 223, 0.16);
}

.screen-bezel {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 2;
  width: min(100%, calc(760px * var(--screen-zoom)), clamp(470px, calc((100dvh - 330px) * 1.142857), 760px));
  margin: 0 auto;
  padding: clamp(14px, 2.5vw, 26px) clamp(18px, 3.3vw, 36px) clamp(20px, 2.7vw, 30px);
  border: 1px solid rgba(255, 248, 223, 0.18);
  border-radius: 18px 18px 34px 34px;
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.08), transparent 26%),
    #18252c;
  box-shadow:
    inset 0 0 0 5px rgba(0, 0, 0, 0.28),
    inset 0 -10px 20px rgba(0, 0, 0, 0.28),
    0 16px 30px rgba(7, 22, 31, 0.3);
}

.screen-bezel::after {
  position: absolute;
  inset: 10px 12px auto;
  height: 34%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent);
  pointer-events: none;
}

.screen-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 9px;
}

.screen-tool {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 248, 223, 0.26);
  border-radius: 7px;
  color: rgba(255, 248, 223, 0.92);
  background: #0d465b;
  box-shadow: 0 3px 0 #071719;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.screen-tool.reset {
  width: 38px;
  font-size: 0.68rem;
}

.screen-toolbar .home-screen-tool {
  width: 58px;
  margin-right: auto;
  color: #151d19;
  background: var(--amber);
  border-color: #ffe093;
  font-size: 0.62rem;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 134px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(255, 248, 223, 0.18);
  border-radius: 7px;
  background: rgba(7, 23, 25, 0.45);
}

.mute-screen-tool {
  width: 50px;
  height: 22px;
  font-size: 0.55rem;
}

.mute-screen-tool[aria-pressed="true"] {
  color: #151d19;
  background: #f2c35b;
  border-color: #ffe093;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 96px;
  color: rgba(255, 248, 223, 0.92);
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1;
}

.volume-control span {
  width: 24px;
  text-align: right;
}

.volume-control input {
  width: 76px;
  min-width: 76px;
  height: 18px;
  accent-color: var(--amber);
  cursor: pointer;
  touch-action: pan-x;
}

.screen-tool:hover {
  background: #233b43;
  border-color: rgba(242, 195, 91, 0.75);
}

.screen-tool:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #071719;
}

.screen-tool:disabled {
  cursor: default;
  color: rgba(255, 248, 223, 0.38);
  background: #172125;
  transform: none;
  box-shadow: 0 3px 0 #071719;
}

.zoom-label {
  min-width: 48px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 248, 223, 0.14);
  border-radius: 7px;
  color: var(--amber);
  background: rgba(255, 248, 223, 0.06);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.screen-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 256 / 224;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(6px, 1.1vw, 10px);
  background: #09100f;
  box-shadow:
    inset 0 0 0 1px #6eb9c5,
    inset 0 0 20px rgba(0, 0, 0, 0.9),
    0 0 0 2px rgba(255, 248, 223, 0.08);
}

body.screen-zoomed .game-shell {
  width: min(calc(100vw - 20px), calc(1100px * var(--screen-zoom)));
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

body.screen-zoomed .cartridge {
  grid-template-columns: minmax(78px, 104px) minmax(540px, 1fr) minmax(78px, 104px);
  column-gap: 12px;
  padding-inline: clamp(12px, 2vw, 24px);
}

body.screen-zoomed .screen-bezel {
  grid-column: 1 / -1;
  grid-row: 2;
  width: min(100%, calc(920px * var(--screen-zoom)), clamp(500px, calc((100dvh - 350px) * 1.142857), 900px));
}

body.screen-zoomed .action-bar {
  grid-column: 1 / -1;
  grid-row: 3;
  max-width: min(100%, calc(880px * var(--screen-zoom)));
}

body.screen-zoomed .dpad-cluster {
  grid-column: 1;
  grid-row: 4;
  width: 118px;
}

body.screen-zoomed .system-buttons {
  grid-column: 2;
  grid-row: 4;
}

body.screen-zoomed .face-buttons {
  grid-column: 3;
  grid-row: 4;
}

body.screen-zoomed .round-button {
  width: 52px;
}

body.screen-zoomed .status-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: #78c9d4;
  cursor: default;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: manipulation;
  user-select: none;
}

.game-boot-fallback {
  position: absolute;
  inset: clamp(6px, 1.1vw, 10px);
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 10px;
  border-radius: 3px;
  border: 3px solid #1b2722;
  color: #113f88;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255, 220, 99, 0.72) 9% 15%, transparent 15% 29%, rgba(53, 172, 190, 0.8) 29% 36%, transparent 36% 49%, rgba(255, 220, 99, 0.72) 49% 55%, transparent 55% 100%),
    #78c9d4;
  font-family: "Press Start 2P", monospace;
  text-align: center;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.game-boot-fallback strong {
  color: #ffd736;
  font-size: clamp(1.3rem, 5vw, 2.35rem);
  line-height: 1;
  text-shadow:
    3px 0 #113f88,
    -3px 0 #113f88,
    0 3px #113f88,
    0 -3px #113f88,
    4px 4px 0 #0b2f69;
}

.game-boot-fallback span {
  color: #314f47;
  font-size: clamp(0.48rem, 1.4vw, 0.72rem);
}

body.game-booted .game-boot-fallback {
  opacity: 0;
  visibility: hidden;
}

.water-boss-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
  background:
    radial-gradient(circle at 50% 42%, rgba(125, 225, 207, 0.34), transparent 28rem),
    linear-gradient(180deg, rgba(5, 16, 24, 0.86), rgba(6, 47, 67, 0.94));
}

.water-boss-video-overlay[hidden] {
  display: none;
}

.water-boss-video-card {
  width: min(920px, 100%);
  padding: clamp(10px, 2vw, 16px);
  border: 5px solid var(--ink);
  border-radius: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(85, 192, 211, 0.16) 0 18px, rgba(247, 240, 212, 0.12) 18px 36px),
    linear-gradient(180deg, #d9f3ff, #55c0d3 58%, #12677e);
  box-shadow:
    12px 12px 0 rgba(0, 0, 0, 0.36),
    0 0 0 8px rgba(255, 248, 223, 0.22),
    0 0 68px rgba(85, 192, 211, 0.52);
}

.water-boss-video-card video {
  display: block;
  width: 100%;
  max-height: min(68vh, 600px);
  object-fit: contain;
  border: 4px solid var(--ink);
  border-radius: 10px;
  background: #061621;
}

.water-boss-video-topline,
.water-boss-video-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  text-transform: uppercase;
}

.water-boss-video-topline {
  padding: 0 0 10px;
  font-weight: 900;
}

.water-boss-video-topline span {
  padding: 5px 9px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 3px 3px 0 rgba(7, 26, 34, 0.28);
}

.water-boss-video-bottom {
  padding: 10px 0 0;
  font-weight: 900;
}

.water-boss-video-bottom button {
  min-width: 132px;
  padding: 9px 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cream), var(--amber));
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(7, 26, 34, 0.3);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.water-boss-video-bottom button:hover,
.water-boss-video-bottom button:focus-visible {
  background: linear-gradient(180deg, #ffffff, var(--mint));
  outline: 0;
  transform: translate(-1px, -1px);
}

.action-bar {
  grid-column: 2;
  grid-row: 3;
  min-height: 70px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.action-bar[data-mode="title"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.action-bar button,
.pad-button,
.round-button,
.system-pill {
  min-width: 0;
  border: 1px solid rgba(255, 248, 223, 0.28);
  color: var(--cream);
  background: #0d465b;
  border-radius: 8px;
  box-shadow: 0 4px 0 #151d19;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.action-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 54px;
  padding: 9px 7px;
  overflow: hidden;
  font-size: clamp(0.72rem, 1.28vw, 0.92rem);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}

.action-bar button .action-index {
  flex: 0 0 auto;
  white-space: nowrap;
}

.action-bar button .action-label {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.action-bar button .action-text {
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.action-bar button .action-subtitle {
  max-width: 100%;
  color: inherit;
  font-size: 0.58em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.86;
}

.action-bar button.exit-website {
  gap: 4px;
  padding-inline: 5px;
}

.action-bar button.exit-website .action-label {
  white-space: nowrap;
  font-size: clamp(0.66rem, 1.14vw, 0.84rem);
}

.action-bar button.exit-action::before {
  content: "";
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  image-rendering: pixelated;
}

.action-bar button.exit-hotel::before {
  background:
    linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px, currentColor 5px 7px, transparent 7px 10px, currentColor 10px 12px, transparent 12px),
    linear-gradient(180deg, transparent 0 5px, currentColor 5px 7px, transparent 7px),
    linear-gradient(180deg, var(--amber) 0 42%, var(--teal) 42% 100%);
}

.action-bar button.exit-website::before {
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 6px, currentColor 6px 8px, transparent 8px),
    linear-gradient(180deg, transparent 0 6px, currentColor 6px 8px, transparent 8px),
    radial-gradient(circle, transparent 0 5px, currentColor 5px 7px, transparent 7px),
    var(--teal);
}

.action-bar button.ca-soon-action {
  color: #102834;
  border-color: #7bdcf6;
  background: linear-gradient(180deg, #f9fdff 0%, #7bdcf6 48%, #2e8ed1 100%);
  padding-inline: 4px;
}

.action-bar button.ca-soon-action .action-label {
  letter-spacing: 0.04em;
}

.action-bar button.ca-soon-action .action-text {
  gap: 1px;
}

.action-bar button.ca-soon-action .action-subtitle {
  width: 100%;
  font-size: clamp(0.34rem, 0.72vw, 0.46rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-transform: none;
  word-break: break-all;
}

.action-bar button.x-social-action {
  color: #f8fdff;
  border-color: #b8ecff;
  background: linear-gradient(180deg, #111d26 0%, #162f3f 100%);
}

.action-bar button.x-social-action::before {
  content: "X";
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #07121a;
  font-size: 0.72rem;
  line-height: 1;
}

.action-bar button:hover,
.pad-button:hover,
.round-button:hover,
.system-pill:hover {
  background: #3b4f45;
  border-color: rgba(242, 195, 91, 0.75);
}

.action-bar button:active,
.pad-button:active,
.round-button:active,
.system-pill:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #151d19;
}

.action-bar button.primary {
  color: #151d19;
  background: var(--amber);
  border-color: #ffe093;
}

.action-bar button.nav-selected {
  border-color: #fff8df;
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  box-shadow:
    0 4px 0 #151d19,
    0 0 0 4px rgba(85, 192, 211, 0.52);
}

.action-bar button.nav-selected:not(.primary):not(:disabled) {
  color: #fff8df;
  background: #12677e;
}

.action-bar button.danger {
  background: #6b3037;
}

.action-bar button:disabled {
  cursor: default;
  color: rgba(255, 248, 223, 0.54);
  background: #202923;
  transform: none;
}

.battle-chat {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 4;
  display: grid;
  gap: 7px;
  width: 100%;
  margin: -2px auto 0;
  padding: 9px;
  border: 1px solid rgba(255, 248, 223, 0.26);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.09), rgba(7, 26, 34, 0.16)),
    rgba(7, 24, 29, 0.68);
  box-shadow: inset 0 0 0 1px rgba(7, 26, 34, 0.42), 0 4px 0 rgba(7, 15, 19, 0.32);
}

.battle-chat[hidden] {
  display: none;
}

.battle-chat-log {
  display: grid;
  gap: 4px;
  min-height: 22px;
  max-height: 56px;
  overflow: auto;
  padding: 5px 7px;
  border: 1px solid rgba(255, 248, 223, 0.16);
  border-radius: 7px;
  background: rgba(255, 248, 223, 0.08);
  color: rgba(255, 248, 223, 0.88);
  font-size: 0.68rem;
  line-height: 1.25;
}

.battle-chat-message {
  display: flex;
  gap: 5px;
  min-width: 0;
}

.battle-chat-message strong {
  flex: 0 0 auto;
  color: var(--amber);
}

.battle-chat-message span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.battle-chat-message.is-empty {
  color: rgba(255, 248, 223, 0.56);
}

.battle-chat-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.battle-chat-row span {
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-chat-row input {
  min-width: 0;
  height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 248, 223, 0.34);
  border-radius: 7px;
  color: var(--ink);
  background: var(--cream);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.battle-chat-row input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.battle-chat-row button {
  height: 30px;
  min-width: 58px;
  padding: 5px 10px;
  border: 1px solid #ffe093;
  border-radius: 7px;
  color: #151d19;
  background: var(--amber);
  box-shadow: 0 3px 0 #151d19;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-chat-row button:hover,
.battle-chat-row button:focus-visible {
  background: var(--mint);
  outline: 0;
}

.touch-pad {
  position: relative;
  z-index: 1;
  display: contents;
}

.dpad-cluster {
  grid-column: 1;
  grid-row: 2 / span 3;
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  width: 150px;
  max-width: 100%;
  aspect-ratio: 1;
  filter: drop-shadow(0 7px 0 rgba(7, 15, 19, 0.52));
}

.pad-button {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0;
  border-radius: 10px;
  color: rgba(255, 248, 223, 0.92);
  background: #171f23;
  box-shadow: inset 0 2px 0 rgba(255, 248, 223, 0.1);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  z-index: 2;
}

.dpad-center {
  grid-column: 2;
  grid-row: 2;
  border-radius: 8px;
  background: #151b1e;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 223, 0.08), inset 0 7px 12px rgba(0, 0, 0, 0.32);
}

.pad-up {
  grid-column: 2;
  grid-row: 1;
}

.pad-left {
  grid-column: 1;
  grid-row: 2;
}

.pad-right {
  grid-column: 3;
  grid-row: 2;
}

.pad-down {
  grid-column: 2;
  grid-row: 3;
}

.system-buttons {
  grid-column: 2;
  grid-row: 5;
  justify-self: center;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.system-pill {
  min-height: 28px;
  min-width: 74px;
  padding: 5px 12px;
  border-radius: 999px;
  color: rgba(255, 248, 223, 0.76);
  background: #596e78;
  box-shadow: 0 3px 0 #151d19;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.home-pill {
  color: #151d19;
  background: var(--amber);
  border-color: #ffe093;
}

.face-buttons {
  grid-column: 3;
  grid-row: 2 / span 3;
  justify-self: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding-right: 4px;
  transform: rotate(-10deg);
}

.round-button {
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1;
  border-radius: 50%;
  min-height: 0;
  padding: 0;
  font-weight: 800;
  box-shadow: 0 6px 0 #151d19, inset 0 2px 0 rgba(255, 248, 223, 0.16);
}

.round-button:not(.muted) {
  background: #81404b;
}

.round-button.muted {
  background: #12677e;
}

.status-panel {
  display: none;
  gap: 12px;
}

.panel-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(23, 33, 30, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.panel-block.identity {
  background:
    linear-gradient(135deg, rgba(242, 195, 91, 0.16), transparent 45%),
    rgba(6, 47, 67, 0.9);
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--amber);
  font-size: 0.74rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 2.05rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 0.9rem;
  letter-spacing: 0;
}

.identity p,
.compact p,
#questText {
  margin-top: 8px;
  color: rgba(255, 248, 223, 0.75);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-heading span {
  color: var(--teal);
  font-size: 0.82rem;
  white-space: nowrap;
}

.party-list,
.bag-list {
  display: grid;
  gap: 8px;
}

.party-card,
.bag-row {
  border: 1px solid rgba(255, 248, 223, 0.12);
  border-radius: 7px;
  background: rgba(255, 248, 223, 0.06);
}

.party-card {
  padding: 9px;
}

.party-top,
.bag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.party-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.type-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 3px;
  background: var(--mint);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16);
}

.party-name strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-level,
.bag-row span:last-child {
  color: var(--amber);
  white-space: nowrap;
}

.bag-row span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hp-track,
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 223, 0.12);
}

.hp-track {
  margin-top: 8px;
}

.hp-track span,
.progress-track span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mint), var(--teal));
}

.party-meta {
  margin-top: 6px;
  color: rgba(255, 248, 223, 0.66);
  font-size: 0.74rem;
}

.bag-row {
  padding: 9px;
}

.progress-track {
  margin-top: 12px;
}

.empty-copy {
  color: rgba(255, 248, 223, 0.58);
  font-size: 0.84rem;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .game-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .status-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-block.identity,
  .panel-block.compact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .game-shell {
    width: min(100vw - 16px, 760px);
    padding: 8px 0 16px;
    gap: 12px;
  }

  .cartridge {
    display: block;
    border-radius: 28px 28px 44px 44px / 24px 24px 38px 38px;
    padding: 10px;
  }

  .gba-top {
    min-height: 24px;
    margin-bottom: 8px;
    padding: 0 8px;
    gap: 8px;
  }

  .power-dot {
    width: 9px;
    height: 9px;
  }

  .console-brand {
    font-size: 0.62rem;
  }

  .speaker-slots {
    grid-template-columns: repeat(4, 5px);
    gap: 3px;
  }

  .speaker-slots span {
    height: 18px;
  }

  .screen-bezel {
    padding: 10px 12px 14px;
    border-radius: 14px 14px 22px 22px;
  }

  .screen-frame {
    padding: 5px;
  }

  .battle-chat {
    margin-top: 10px;
  }

  .screen-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .screen-toolbar .home-screen-tool {
    margin-right: 0;
  }

  .audio-controls {
    flex: 1 1 156px;
    min-width: 156px;
  }

  .volume-control input {
    width: 78px;
  }

  .action-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 128px;
    margin-top: 12px;
  }

  .action-bar[data-mode="title"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .touch-pad {
    display: grid;
    min-height: 112px;
    margin-top: 12px;
    grid-template-columns: 112px minmax(64px, 1fr) 104px;
    gap: 7px;
  }

  .dpad-cluster {
    grid-column: auto;
    grid-row: auto;
    width: 112px;
  }

  .pad-button {
    font-size: 0.85rem;
  }

  .system-buttons {
    grid-column: auto;
    grid-row: auto;
    flex-direction: column;
    align-self: center;
    gap: 7px;
    padding-bottom: 0;
  }

  .system-pill {
    min-width: 56px;
    min-height: 22px;
    padding: 4px 7px;
    font-size: 0.58rem;
  }

  .face-buttons {
    grid-column: auto;
    grid-row: auto;
    gap: 8px;
    padding-right: 0;
  }

  .round-button {
    width: 45px;
    font-size: 0.85rem;
  }

  .status-panel {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.7rem;
  }
}
