:root {
  --bg: #060b11;
  --panel: #0d151f;
  --panel-2: #111d29;
  --panel-3: #172736;
  --line: #263b4c;
  --line-bright: #3f6178;
  --text: #eef7fb;
  --muted: #8298a8;
  --cyan: #6bd5f5;
  --cyan-2: #248cbb;
  --gold: #f2ca63;
  --red: #ef6971;
  --green: #72d59b;
  --violet: #bd95ef;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --font:
    Manrope, "DejaVu Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}
body {
  overflow-x: hidden;
  background-image:
    radial-gradient(
      circle at 50% -20%,
      rgba(43, 119, 153, 0.2),
      transparent 42%
    ),
    linear-gradient(160deg, #071019, #05090e 70%);
}
button,
select {
  font: inherit;
}
.hidden {
  display: none !important;
}
.app-shell {
  min-height: 100dvh;
}
.screen {
  min-height: 100dvh;
}
.game-header {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 21, 0.96);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #4e7d96;
  background: linear-gradient(145deg, #18394d, #0b1923);
  clip-path: polygon(18% 0, 82% 0, 100% 50%, 82% 100%, 18% 100%, 0 50%);
  color: #c8f2ff;
  font-size: 12px;
  font-weight: 1000;
}
.brand h1 {
  font-size: 15px;
  letter-spacing: 0.18em;
  margin: 0;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: #7593a6;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}
.brand.compact {
  min-width: 205px;
}
.header-metrics,
.battle-metrics {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}
.metric {
  min-width: 104px;
  padding: 6px 9px;
  border: 1px solid #203442;
  border-radius: 8px;
  background: linear-gradient(
    145deg,
    rgba(21, 37, 50, 0.82),
    rgba(9, 16, 24, 0.72)
  );
}
.metric span {
  display: flex;
  justify-content: space-between;
  color: #718c9f;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.11em;
}
.metric b {
  display: block;
  margin-top: 3px;
  color: #eef9fd;
  font-size: 12px;
  white-space: nowrap;
}
.metric.token {
  border-color: #574b27;
  background: linear-gradient(
    145deg,
    rgba(69, 55, 20, 0.28),
    rgba(9, 16, 24, 0.72)
  );
}
.metric.token b {
  color: #ffe188;
}
.base-metric {
  min-width: 142px;
}
.base-metric span i {
  color: #9fb3bf;
  font-style: normal;
}
.metric em,
.objective em,
.pity em {
  display: block;
  height: 3px;
  margin-top: 4px;
  border-radius: 3px;
  background: #17242e;
  overflow: hidden;
}
.metric em i,
.objective em i,
.pity em i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3caecf, #78def6);
}
.base-metric em i {
  background: linear-gradient(90deg, #3dac73, #78d9a0);
}

.hub-screen {
  background-image:
    linear-gradient(rgba(4, 9, 14, 0.64), rgba(4, 8, 13, 0.9)),
    radial-gradient(
      circle at 50% 42%,
      rgba(44, 133, 165, 0.17),
      transparent 38%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(92, 174, 202, 0.025) 0 1px,
      transparent 1px 74px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(92, 174, 202, 0.02) 0 1px,
      transparent 1px 74px
    );
}
.hub-stage {
  min-height: calc(100dvh - 62px);
  padding: 18px clamp(18px, 3vw, 54px);
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(360px, 1fr) minmax(
      210px,
      270px
    );
  grid-template-rows: minmax(350px, 1fr) auto auto;
  gap: 12px 24px;
  align-items: stretch;
}
.hub-nav {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  padding: 34px 0;
}
.hub-tile {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto;
  column-gap: 11px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(
    145deg,
    rgba(17, 30, 41, 0.93),
    rgba(8, 14, 21, 0.88)
  );
  color: var(--text);
  padding: 11px;
  text-align: left;
  cursor: pointer;
  transition: 0.16s;
}
.hub-tile:hover:not(:disabled) {
  border-color: var(--cyan);
  transform: translateX(3px);
  box-shadow: 0 0 28px rgba(75, 184, 223, 0.11);
}
.hub-nav-right .hub-tile:hover:not(:disabled) {
  transform: translateX(-3px);
}
.tile-icon {
  grid-row: 1/3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid #35566c;
  border-radius: 8px;
  background: #122431;
  color: #7edbf8;
  font-size: 9px;
  font-weight: 1000;
}
.hub-tile b {
  font-size: 11px;
  letter-spacing: 0.08em;
}
.hub-tile small {
  margin-top: 3px;
  color: #748e9f;
  font-size: 7px;
  letter-spacing: 0.07em;
}
.hub-tile.future {
  opacity: 0.48;
  cursor: not-allowed;
}
.hub-tile.future small {
  color: #b59a55;
}
.hub-core {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 350px;
  overflow: hidden;
}
.core-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.core-rings i {
  position: absolute;
  width: min(49vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgba(90, 196, 231, 0.13);
  border-radius: 50%;
  animation: rotate 28s linear infinite;
}
.core-rings i:nth-child(2) {
  width: min(39vw, 400px);
  border-style: dashed;
  animation-duration: 18s;
  animation-direction: reverse;
}
.core-rings i:nth-child(3) {
  width: min(29vw, 300px);
  border-color: rgba(242, 202, 99, 0.12);
  animation-duration: 35s;
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
.core-kicker {
  position: relative;
  margin-bottom: 9px;
  color: #80aabe;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 0.18em;
}
.fight-button {
  position: relative;
  width: 230px;
  height: 230px;
  border: 1px solid #60c5e6;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 42%,
    #1c5873 0,
    #113246 42%,
    #091722 70%
  );
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 0 0 10px rgba(64, 159, 193, 0.05),
    0 0 50px rgba(50, 163, 203, 0.17),
    inset 0 0 35px rgba(104, 217, 250, 0.12);
  transition: 0.18s;
}
.fight-button::before,
.fight-button::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(135, 222, 247, 0.28);
  border-radius: 50%;
}
.fight-button::after {
  inset: 28px;
  border-style: solid;
  border-color: rgba(242, 202, 99, 0.13);
}
.fight-button:hover:not(:disabled) {
  transform: scale(1.025);
  border-color: #c3f4ff;
  box-shadow:
    0 0 0 12px rgba(64, 159, 193, 0.07),
    0 0 68px rgba(50, 176, 219, 0.28);
}
.fight-button:disabled {
  filter: grayscale(0.65);
  cursor: default;
}
.fight-button span {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 29px;
  font-weight: 1000;
  letter-spacing: 0.12em;
}
.fight-button b {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: #9ddff3;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.hub-core p {
  position: relative;
  width: min(420px, 90%);
  margin: 12px auto 0;
  color: #7891a1;
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}
.hub-report {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 16, 24, 0.74);
}
.hub-report div {
  padding: 7px 11px;
  border-right: 1px solid #1d303e;
}
.hub-report div:last-child {
  border-right: 0;
}
.hub-report span {
  display: block;
  color: #718b9c;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.hub-report b {
  display: block;
  margin-top: 4px;
  font-size: 9px;
}
.directive-panel {
  grid-column: 1/-1;
  border: 1px solid #554926;
  border-radius: 11px;
  background: linear-gradient(
    135deg,
    rgba(47, 39, 17, 0.52),
    rgba(10, 18, 26, 0.9)
  );
  padding: 10px;
}
.directive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.directive-head span {
  display: block;
  color: #d0ae53;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}
.directive-head b {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.text-button {
  border: 1px solid #39566a;
  border-radius: 7px;
  background: #111e29;
  color: #b8d6e4;
  padding: 7px 10px;
  font-size: 8px;
  font-weight: 1000;
  cursor: pointer;
}
.text-button:hover:not(:disabled) {
  border-color: #62c6e8;
  color: #fff;
}
.text-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.perk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 8px;
}
.perk {
  min-height: 76px;
  border: 1px solid #334452;
  border-radius: 8px;
  background: #0e1922;
  color: var(--text);
  padding: 9px;
  text-align: left;
  cursor: pointer;
}
.perk:hover,
.perk.selected {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(242, 202, 99, 0.14);
}
.perk span {
  display: block;
  color: #7c91a0;
  font-size: 7px;
}
.perk b {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}
.perk small {
  display: block;
  margin-top: 3px;
  color: #8196a5;
  font-size: 8px;
  line-height: 1.3;
}

.hub-page {
  height: calc(100dvh - 62px);
  padding: 16px clamp(18px, 3vw, 52px);
  overflow: auto;
}
.page-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
}
.page-head > div:nth-child(2) {
  text-align: center;
}
.page-head span {
  color: #6ec8e8;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.16em;
}
.page-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
  letter-spacing: 0.15em;
}
.back-button {
  justify-self: start;
  border: 1px solid #345266;
  border-radius: 8px;
  background: #101d28;
  color: #b9d6e2;
  padding: 9px 12px;
  font-size: 8px;
  font-weight: 1000;
  cursor: pointer;
}
.back-button:hover {
  border-color: var(--cyan);
  color: #fff;
}
.page-token {
  justify-self: end;
  border: 1px solid #584b28;
  border-radius: 8px;
  background: #211d11;
  padding: 9px 12px;
  color: #d5b65f !important;
}
.page-token b {
  margin-left: 6px;
  color: #ffe189;
  font-size: 13px;
}
.subtabs {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 14px 0 12px;
}
.subtab {
  min-width: 120px;
  border: 1px solid #2b4456;
  background: #0d1822;
  color: #8399a8;
  border-radius: 7px;
  padding: 9px 14px;
  font-size: 8px;
  font-weight: 1000;
  cursor: pointer;
}
.subtab.active {
  border-color: #58bde0;
  background: #15364a;
  color: #fff;
}
.hero-pane {
  display: none;
}
.hero-pane.active {
  display: block;
}
.squad-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto 10px;
  padding: 10px 12px;
  border: 1px solid #273c4c;
  border-radius: 9px;
  background: rgba(10, 18, 26, 0.78);
}
.squad-intro span {
  color: #6ec9e8;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.12em;
}
.squad-intro h3 {
  margin: 3px 0 0;
  font-size: 12px;
}
.squad-intro p {
  max-width: 580px;
  margin: 0;
  color: #8298a8;
  font-size: 8px;
  line-height: 1.4;
}
.squad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 520px));
  justify-content: center;
  gap: 12px;
}
.squad-slot {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  border: 1px solid #2b4253;
  border-radius: 12px;
  background: linear-gradient(145deg, #101b26, #09121a);
  padding: 12px;
  min-height: 310px;
}
.squad-slot.filled {
  border-color: #3c5f76;
}
.squad-slot header {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #243846;
  padding-bottom: 8px;
}
.squad-slot header span {
  color: #6d8798;
  font-size: 7px;
  font-weight: 1000;
}
.squad-slot header b {
  font-size: 10px;
}
.hero-portrait {
  position: relative;
  width: 120px;
  min-height: 150px;
  border: 1px solid #36556c;
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(104, 213, 245, 0.28),
      transparent 35%
    ),
    linear-gradient(155deg, #1b3d51, #0b1721);
}
.hero-portrait::before,
.hero-portrait::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(127, 219, 247, 0.16);
  transform: rotate(45deg);
}
.hero-portrait::before {
  width: 92px;
  height: 92px;
}
.hero-portrait::after {
  width: 55px;
  height: 55px;
}
.hero-portrait.armor {
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(242, 202, 99, 0.25),
      transparent 35%
    ),
    linear-gradient(155deg, #43391d, #131810);
  border-color: #66582f;
}
.hero-portrait.air {
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(180, 149, 239, 0.25),
      transparent 35%
    ),
    linear-gradient(155deg, #2a2044, #0e0d18);
  border-color: #5a4a8a;
}
.hero-portrait span {
  position: relative;
  z-index: 2;
  font-size: 34px;
  font-weight: 1000;
  letter-spacing: 0.04em;
}
.hero-portrait i {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  color: #83c9de;
  font-size: 7px;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: 0.15em;
}
.hero-portrait.armor i {
  color: #e5c76f;
}
.hero-portrait.air i {
  color: #c3a3f2;
}
.hero-portrait.unknown {
  filter: grayscale(1);
  opacity: 0.44;
}
.empty-portrait {
  width: 120px;
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px dashed #384b58;
  border-radius: 10px;
  color: #536b7a;
  font-size: 34px;
}
.slot-controls {
  display: grid;
  gap: 7px;
}
.slot-controls label {
  color: #6f8898;
  font-size: 7px;
  font-weight: 900;
}
.slot-controls select {
  display: block;
  width: 100%;
  margin-top: 3px;
  border: 1px solid #314b5e;
  border-radius: 7px;
  background: #0c1720;
  color: #eaf7fb;
  padding: 8px;
  font-size: 9px;
}
.slot-controls select:disabled {
  opacity: 0.4;
}
.slot-effect {
  grid-column: 1/-1;
  border: 1px solid #2a4a5d;
  border-radius: 8px;
  background: #102331;
  padding: 8px;
}
.slot-effect span {
  display: block;
  color: #7699ac;
  font-size: 7px;
}
.slot-effect b {
  display: block;
  margin-top: 3px;
  color: #9ee5f8;
  font-size: 9px;
}
.field-toggle {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #3c5f76;
  border-radius: 8px;
  background: #0d1b26;
  padding: 8px 10px;
  color: #9ee5f8;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}
.field-toggle input {
  accent-color: #68d5f5;
}
.clear-hero {
  grid-column: 1/-1;
}
.empty-copy {
  grid-column: 1/-1;
  color: #728999;
  font-size: 8px;
  line-height: 1.4;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 1300px;
  margin: auto;
}
.hero-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  min-height: 285px;
  border: 1px solid #2d4658;
  border-radius: 12px;
  background: linear-gradient(145deg, #101c27, #09121a);
  padding: 11px;
}
.hero-card.locked {
  opacity: 0.43;
}
.hero-card-body > .rarity {
  color: #f0ca68;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.hero-card-body h3 {
  font-size: 13px;
  margin: 5px 0 0;
}
.hero-card-body > p {
  margin: 3px 0 8px;
  color: #839aa9;
  font-size: 8px;
}
.ability-line {
  padding: 6px 0;
  border-top: 1px solid #203441;
}
.ability-line span {
  display: block;
  color: #66c8e9;
  font-size: 6px;
  font-weight: 1000;
}
.ability-line b {
  display: block;
  margin-top: 2px;
  font-size: 8px;
}
.ability-line small {
  display: block;
  margin-top: 2px;
  color: #7d93a2;
  font-size: 7px;
  line-height: 1.3;
}
.hero-card-body > em {
  display: block;
  margin-top: 8px;
  color: #9edcee;
  font-size: 7px;
  font-style: normal;
  font-weight: 1000;
}
.summon-layout {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(380px, 1fr);
  gap: 12px;
  max-width: 1180px;
  margin: auto;
}
.banner,
.pull-ledger {
  border: 1px solid #2d4658;
  border-radius: 13px;
  background: linear-gradient(145deg, #101c27, #081119);
  padding: 16px;
}
.banner {
  border-color: #57492b;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(242, 202, 99, 0.13),
      transparent 36%
    ),
    linear-gradient(145deg, #1e1a11, #0a1219);
}
.banner-signal {
  text-align: center;
  padding: 20px 10px;
}
.banner-signal span {
  display: block;
  color: #b89b53;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.15em;
}
.banner-signal b {
  display: block;
  margin-top: 7px;
  font-size: 30px;
  letter-spacing: 0.04em;
}
.banner-signal small {
  display: block;
  margin-top: 7px;
  color: #8b8170;
  font-size: 7px;
}
.rates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.rates span {
  border: 1px solid #403b2d;
  border-radius: 7px;
  background: rgba(12, 16, 18, 0.65);
  padding: 8px;
  color: #8f9ba0;
  font-size: 8px;
  text-align: center;
}
.rates b {
  display: block;
  color: #f5d579;
  font-size: 11px;
}
.pity {
  margin-top: 10px;
  border: 1px solid #334654;
  border-radius: 8px;
  background: #0b141c;
  padding: 10px;
}
.pity span {
  color: #879dad;
  font-size: 7px;
  font-weight: 1000;
}
.pity b {
  float: right;
  font-size: 9px;
}
.pity small {
  display: block;
  margin-top: 5px;
  color: #728898;
  font-size: 7px;
}
.pity em {
  clear: both;
  height: 4px;
  margin-top: 7px;
}
.pity em i {
  background: linear-gradient(90deg, #7e64ab, #d2a5ff);
}
.summon-button {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 1px solid #ad8d3d;
  border-radius: 9px;
  background: linear-gradient(145deg, #554319, #2e260f);
  color: #fff0bd;
  padding: 12px;
  cursor: pointer;
}
.summon-button:hover:not(:disabled) {
  border-color: #ffe28a;
  box-shadow: 0 0 30px rgba(242, 202, 99, 0.12);
}
.summon-button:disabled {
  opacity: 0.42;
  cursor: default;
}
.summon-button span {
  display: block;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.1em;
}
.summon-button b {
  display: block;
  margin-top: 4px;
  font-size: 8px;
}
.banner > p {
  text-align: center;
  color: #796f5e;
  font-size: 7px;
}
.pull-ledger header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #253947;
  padding-bottom: 9px;
}
.pull-ledger header span {
  display: block;
  color: #6ec8e8;
  font-size: 7px;
}
.pull-ledger header b {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.rarity-counts {
  display: flex;
  gap: 5px;
}
.rarity-counts i {
  border: 1px solid #364b58;
  border-radius: 5px;
  padding: 5px;
  color: #c7d4da;
  font-size: 7px;
  font-style: normal;
}
.history-list {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}
.history-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  border: 1px solid #273d4c;
  border-radius: 7px;
  background: #0b151e;
  padding: 8px;
}
.history-row > span {
  color: #708998;
  font-size: 7px;
}
.history-row b {
  font-size: 9px;
}
.history-row small {
  color: #7691a0;
  font-size: 7px;
}
.history-row.rarity-4 {
  border-color: #554a72;
}
.history-row.rarity-5 {
  border-color: #8b7232;
  background: #19170f;
}
.empty-history {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #6d8392;
  font-size: 8px;
  text-align: center;
}

.loadout-pane {
  display: block;
}
.loadout-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  max-width: 1300px;
  margin: 0 auto;
}
.loadout-column {
  min-width: 0;
}
.loadout-column .squad-intro {
  max-width: none;
}
.loadout-column .squad-grid {
  grid-template-columns: 1fr;
  max-width: none;
}
.loadout-column .research-grid {
  grid-template-columns: 1fr 1fr;
}

.battle-screen {
  height: 100dvh;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 82px;
  overflow: hidden;
}
.battle-header {
  height: 58px;
  padding: 7px 10px;
}
.battle-metrics {
  justify-content: center;
}
.battle-metrics .metric {
  min-width: 92px;
  padding: 5px 7px;
}
.battle-metrics .base-metric {
  min-width: 135px;
}
.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid #335166;
  border-radius: 7px;
  background: #101d28;
  color: #a9c9d7;
  font-size: 9px;
  font-weight: 1000;
  cursor: pointer;
}
.battle-main {
  position: relative;
  min-height: 0;
  background: #071018;
}
.battle-map-column {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 66px;
  padding: 6px;
}
.canvas-wrap {
  position: relative;
  min-height: 0;
  max-width: calc((100dvh - 58px - 82px - 78px) * 1.735);
  width: 100%;
  margin: auto;
  border: 1px solid #2b4557;
  border-radius: 10px;
  background: #081018;
  overflow: hidden;
  box-shadow: var(--shadow);
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.canvas-brief {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: 70%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(79, 142, 169, 0.55);
  border-radius: 7px;
  background: rgba(6, 13, 19, 0.9);
  padding: 6px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}
.canvas-brief span {
  color: #76d1ee;
  font-size: 7px;
  font-weight: 1000;
}
.canvas-brief b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b8ccd6;
  font-size: 8px;
}
.lane-picker {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}
.lane-btn {
  pointer-events: auto;
  min-width: 126px;
  max-width: 220px;
  border: 1px solid rgba(50, 79, 97, 0.9);
  border-radius: 7px;
  background: rgba(7, 14, 20, 0.91);
  color: #91a6b3;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
}
.lane-btn:hover,
.lane-btn.active {
  border-color: #67cdeb;
  background: rgba(17, 54, 73, 0.94);
  color: #effcff;
}
.lane-btn.reserve-lane {
  border-style: dashed;
  border-color: #6d5a2d;
  color: #e4c572;
}
.lane-btn b {
  display: block;
  font-size: 8px;
}
.lane-btn small {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 6px;
}
.battle-status {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(280px, 420px);
  gap: 7px;
  align-items: center;
  padding-top: 6px;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.node {
  position: relative;
  height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid #243b4b;
  border-radius: 7px;
  background: #0c1721;
  color: #6e8797;
}
.node span {
  font-size: 11px;
  font-weight: 1000;
}
.node small {
  font-size: 6px;
  margin-top: 2px;
}
.node.done {
  border-color: #28543e;
  color: #78d69c;
  background: #0c1c17;
}
.node.current {
  border-color: #54bade;
  color: #e9fbff;
  background: #123449;
  box-shadow: 0 0 18px rgba(75, 186, 222, 0.14);
}
.node.boss {
  border-color: #66542b;
}
.objective {
  height: 48px;
  border: 1px solid #273f50;
  border-radius: 7px;
  background: #0c1721;
  padding: 7px 9px;
}
.objective > span {
  display: block;
  color: #6f899b;
  font-size: 6px;
  font-weight: 1000;
}
.objective > b {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 8px;
}
.objective em {
  height: 3px;
}
.context-panel {
  position: fixed;
  z-index: 55;
  right: 0;
  top: 58px;
  bottom: 82px;
  width: min(370px, 94vw);
  display: grid;
  grid-template-rows: auto auto 1fr;
  border-left: 1px solid #345265;
  background: rgba(9, 16, 24, 0.98);
  box-shadow: -22px 0 55px rgba(0, 0, 0, 0.45);
  transform: translateX(104%);
  transition: 0.18s;
}
.context-panel.open {
  transform: none;
}
.context-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #223744;
}
.context-head span {
  color: #68c5e5;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.14em;
}
.context-head h2 {
  margin: 3px 0 0;
  font-size: 13px;
}
.context-head p {
  margin: 4px 0 0;
  color: #738a9a;
  font-size: 7px;
  line-height: 1.35;
}
.side-close {
  width: 32px;
  height: 32px;
  border: 1px solid #324f61;
  border-radius: 7px;
  background: #111e29;
  color: #c2d9e3;
  font-size: 19px;
  cursor: pointer;
}
.context-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 6px;
  border-bottom: 1px solid #1e3240;
}
.tab {
  border: 1px solid #263c4b;
  border-radius: 5px;
  background: #0d1822;
  color: #758c9b;
  padding: 7px 3px;
  font-size: 6px;
  font-weight: 1000;
  cursor: pointer;
}
.tab.active {
  border-color: #4caacb;
  background: #143246;
  color: #e9faff;
}
.tab-pane {
  display: none;
  overflow: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #2d485a transparent;
}
.tab-pane.active {
  display: block;
}
.section-title {
  margin: 9px 2px 6px;
  color: #6f899a;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.1em;
}
.panel-card,
.intel-brief,
.sector-hero {
  border: 1px solid #2b4354;
  border-radius: 8px;
  background: linear-gradient(145deg, #111e29, #0a141d);
  padding: 9px;
  margin-bottom: 7px;
}
.panel-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.panel-card header b {
  font-size: 9px;
}
.panel-card header span {
  color: #78cde9;
  font-size: 8px;
  font-weight: 1000;
}
.panel-card p,
.sector-hero p,
.intel-brief p {
  margin: 4px 0 0;
  color: #7c92a1;
  font-size: 7px;
  line-height: 1.4;
}
.panel-action {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #3c6177;
  border-radius: 6px;
  background: #153044;
  color: #e8f8ff;
  padding: 7px;
  font-size: 8px;
  font-weight: 1000;
  cursor: pointer;
}
.panel-action:disabled {
  opacity: 0.35;
}
.muted {
  display: block;
  color: #657c8b;
  font-size: 7px;
  margin-top: 6px;
}
.reserve-units {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
}
.reserve-units button {
  border: 1px solid #34566b;
  border-radius: 6px;
  background: #132737;
  color: #eaf9ff;
  padding: 7px;
  text-align: left;
  cursor: pointer;
}
.reserve-units b {
  display: block;
  font-size: 8px;
}
.reserve-units small {
  display: block;
  margin-top: 2px;
  color: #77c5e3;
  font-size: 6px;
}
.buy-row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #263d4d;
  border-radius: 8px;
  background: #0d1822;
  color: var(--text);
  padding: 7px;
  margin-bottom: 5px;
  text-align: left;
  cursor: pointer;
}
.buy-row:hover:not(:disabled) {
  border-color: #4aa9ca;
  background: #102331;
}
.buy-row:disabled {
  opacity: 0.37;
  cursor: default;
}
.unit-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #3a5c70;
  border-radius: 7px;
  background: #142b3a;
  color: #87d9f3;
  font-size: 8px;
  font-weight: 1000;
}
.row-copy b {
  display: block;
  font-size: 8px;
}
.row-copy b i {
  color: #efd171;
  font-size: 6px;
  font-style: normal;
}
.row-copy small {
  display: block;
  margin-top: 2px;
  color: #78909f;
  font-size: 7px;
  line-height: 1.25;
}
.row-copy em {
  display: block;
  margin-top: 3px;
  color: #66889c;
  font-size: 6px;
  font-style: normal;
}
.price {
  color: #dfeef4;
  font-size: 10px;
  font-weight: 1000;
  text-align: right;
}
.price small {
  display: block;
  margin-top: 3px;
  color: #6e8797;
  font-size: 6px;
}
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.research-card {
  min-height: 83px;
  position: relative;
  border: 1px solid #293f4f;
  border-radius: 8px;
  background: #0d1721;
  color: var(--text);
  padding: 7px;
  text-align: left;
  cursor: pointer;
}
.research-card:hover:not(:disabled) {
  border-color: #50b1d2;
}
.research-card:disabled {
  cursor: default;
}
.research-card.unlocked {
  border-color: #28533f;
  background: #0d1b17;
}
.research-card.blocked {
  opacity: 0.3;
}
.research-card > span {
  color: #6dc8e7;
  font-size: 6px;
}
.research-card > b {
  display: block;
  margin-top: 5px;
  font-size: 8px;
}
.research-card > small {
  display: block;
  margin-top: 2px;
  color: #718897;
  font-size: 7px;
  line-height: 1.25;
}
.research-card > em {
  position: absolute;
  right: 6px;
  top: 6px;
  color: #e9cc76;
  font-size: 6px;
  font-style: normal;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.help-grid > div {
  border: 1px solid #273d4c;
  border-radius: 7px;
  background: #0c1720;
  padding: 7px;
}
.help-grid b {
  display: block;
  color: #a8dceb;
  font-size: 7px;
}
.help-grid span {
  display: block;
  margin-top: 3px;
  color: #748b9b;
  font-size: 6px;
  line-height: 1.35;
}
.intel-brief span,
.sector-hero span {
  color: #69c6e6;
  font-size: 6px;
  font-weight: 1000;
}
.intel-brief b,
.sector-hero b {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.sector-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 7px;
}
.sector-stats div {
  border: 1px solid #293f4e;
  border-radius: 7px;
  background: #0c1721;
  padding: 7px;
}
.sector-stats span {
  display: block;
  color: #6e8696;
  font-size: 6px;
}
.sector-stats b {
  display: block;
  margin-top: 3px;
  font-size: 8px;
}
.intel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.intel-list span {
  border: 1px solid #2a4050;
  border-radius: 5px;
  background: #0c1620;
  padding: 5px;
  color: #869ba8;
  font-size: 7px;
}
.intel-list span.elite {
  border-color: #6a4d29;
  color: #f0b970;
}
.action-dock {
  height: 82px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto minmax(360px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-top: 1px solid #294353;
  background: rgba(8, 14, 21, 0.98);
  position: relative;
  z-index: 30;
}
.dock-tools {
  display: flex;
  gap: 4px;
}
.dock-tools button,
.dock-secondary {
  height: 44px;
  border: 1px solid #294555;
  border-radius: 7px;
  background: #101d28;
  color: #8299a8;
  padding: 6px 9px;
  font-size: 7px;
  font-weight: 1000;
  cursor: pointer;
}
.dock-tools button:hover,
.dock-secondary:hover {
  border-color: #4caacb;
  color: #effbff;
}
.dock-tools button span {
  display: block;
  color: #69c9e9;
  font-size: 11px;
  margin-bottom: 2px;
}
.phase-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.dock-secondary {
  min-width: 42px;
}
.restart-wave {
  color: #d9a2a6;
  border-color: #5b3c42;
  white-space: nowrap;
}
.return-truce {
  color: #e4c572;
  border-color: #5b512f;
  white-space: nowrap;
}
.dock-primary {
  height: 46px;
  min-width: 174px;
  border: 1px solid #66cbea;
  border-radius: 8px;
  background: linear-gradient(145deg, #1b5872, #123b50);
  color: #f1fbff;
  padding: 8px 14px;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(70, 181, 219, 0.13);
}
.dock-primary:hover:not(:disabled) {
  border-color: #b7f0ff;
}
.dock-primary:disabled,
.dock-secondary:disabled {
  opacity: 0.35;
  cursor: default;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(2, 5, 8, 0.8);
  backdrop-filter: blur(6px);
  padding: 16px;
}
.modal.open {
  display: grid;
}
.modal-card {
  position: relative;
  width: min(760px, 96vw);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid #38566a;
  border-radius: 14px;
  background: linear-gradient(145deg, #111d28, #080f16);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  padding: 20px;
}
.compact-card {
  width: min(520px, 94vw);
}
.modal-kicker {
  text-align: center;
  color: #64c7e8;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.16em;
}
.modal-title {
  text-align: center;
  margin-top: 5px;
  font-size: 19px;
  font-weight: 1000;
  letter-spacing: 0.08em;
}
.modal-sub {
  max-width: 620px;
  margin: 7px auto 0;
  color: #8096a5;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
}
.difficulty-grid button {
  min-height: 145px;
  border: 1px solid #2c4354;
  border-radius: 10px;
  background: #0d1822;
  color: var(--text);
  padding: 13px;
  text-align: left;
  cursor: pointer;
}
.difficulty-grid button:hover {
  border-color: #61c4e5;
  transform: translateY(-2px);
}
.difficulty-grid span {
  color: #64c9ea;
  font-size: 7px;
  font-weight: 1000;
}
.difficulty-grid b {
  display: block;
  margin-top: 10px;
  font-size: 13px;
}
.difficulty-grid small {
  display: block;
  margin-top: 6px;
  color: #7d94a4;
  font-size: 8px;
  line-height: 1.4;
}
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.action {
  border: 1px solid #3d6177;
  border-radius: 7px;
  background: #153348;
  color: #eefaff;
  padding: 9px 13px;
  font-size: 8px;
  font-weight: 1000;
  cursor: pointer;
}
.action.ghost {
  background: #0d1720;
  color: #92a8b6;
}
.action.danger {
  border-color: #82464c;
  background: #422026;
  color: #ffc8cb;
}
.action:disabled {
  opacity: 0.35;
}
.resume {
  width: 100%;
}
.modal-x {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid #425867;
  border-radius: 50%;
  background: #111a22;
  color: #c8d8df;
  font-size: 17px;
  cursor: pointer;
}
.pull-result-card {
  width: min(470px, 94vw);
  text-align: center;
  overflow: hidden;
}
.pull-flare {
  position: absolute;
  width: 380px;
  height: 380px;
  left: 50%;
  top: -220px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(114, 205, 241, 0.26),
    transparent 64%
  );
  pointer-events: none;
}
.result-rarity {
  position: relative;
  color: #f2cb69;
  font-size: 20px;
  letter-spacing: 0.1em;
}
.result-rarity.rarity-4 {
  color: #c9a3f2;
}
.result-rarity.rarity-5 {
  color: #ffe285;
  text-shadow: 0 0 22px rgba(255, 217, 102, 0.45);
}
.test-card {
  position: relative;
  width: 230px;
  height: 290px;
  display: grid;
  place-items: center;
  align-content: center;
  margin: 12px auto;
  border: 1px solid #557b90;
  border-radius: 13px;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(100, 202, 237, 0.2),
      transparent 35%
    ),
    linear-gradient(145deg, #183548, #09151f);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}
.test-card.rarity-4 {
  border-color: #8e6bb8;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(189, 149, 239, 0.23),
      transparent 35%
    ),
    linear-gradient(145deg, #302144, #0e1320);
}
.test-card.rarity-5 {
  border-color: #c8a348;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(242, 202, 99, 0.25),
      transparent 35%
    ),
    linear-gradient(145deg, #403419, #11140f);
}
.test-card span {
  color: #8ea5b2;
  font-size: 7px;
  letter-spacing: 0.12em;
}
.test-card b {
  margin-top: 8px;
  font-size: 27px;
}
.test-card small {
  max-width: 160px;
  margin-top: 10px;
  color: #718894;
  font-size: 6px;
  line-height: 1.4;
}
.toast-stack {
  position: fixed;
  z-index: 180;
  right: 12px;
  top: 74px;
  display: grid;
  gap: 7px;
  width: min(330px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  border: 1px solid #36576b;
  border-radius: 8px;
  background: rgba(10, 20, 29, 0.96);
  box-shadow: var(--shadow);
  padding: 9px 11px;
  animation: toastin 0.2s ease;
}
.toast b {
  display: block;
  color: #dff8ff;
  font-size: 9px;
}
.toast span {
  display: block;
  margin-top: 3px;
  color: #8299a8;
  font-size: 7px;
  line-height: 1.35;
}
@keyframes toastin {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
}
.reward-burst,
.unlock-burst {
  position: fixed;
  z-index: 85;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.reward-burst.show,
.unlock-burst.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.reward-card,
.unlock-burst {
  min-width: 270px;
  border: 1px solid #80692e;
  border-radius: 11px;
  background: linear-gradient(
    145deg,
    rgba(26, 23, 14, 0.97),
    rgba(8, 15, 21, 0.97)
  );
  box-shadow: var(--shadow);
  padding: 11px 17px;
  text-align: center;
}
.reward-card span,
.unlock-burst span {
  display: block;
  color: #b89a52;
  font-size: 7px;
  font-weight: 1000;
}
.reward-card b,
.unlock-burst b {
  display: block;
  margin-top: 4px;
  color: #ffe187;
  font-size: 16px;
}
.reward-card small {
  display: block;
  margin-top: 3px;
  color: #79c9e7;
  font-size: 8px;
}
.level-burst {
  position: fixed;
  z-index: 86;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  padding: 40px 70px;
  background: radial-gradient(
    circle,
    rgba(74, 175, 211, 0.34),
    transparent 65%
  );
  transition: 0.2s;
}
.level-burst.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.level-burst span {
  display: block;
  color: #8fddf4;
  font-size: 8px;
}
.level-burst b {
  display: block;
  color: #fff;
  font-size: 58px;
  text-shadow: 0 0 22px #50bbdf;
}
.level-burst small {
  color: #f0cf75;
  font-size: 8px;
}
.tutorial-coach {
  position: fixed;
  z-index: 150;
  width: min(310px, calc(100vw - 24px));
  display: none;
  border: 1px solid #65c9e9;
  border-radius: 10px;
  background: rgba(7, 15, 22, 0.98);
  box-shadow:
    0 22px 65px rgba(0, 0, 0, 0.56),
    0 0 0 3px rgba(101, 201, 233, 0.07);
  padding: 11px 12px;
}
.tutorial-coach.open {
  display: block;
}
.tutorial-step {
  color: #69c9e9;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}
.tutorial-coach > b {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.tutorial-coach p {
  margin: 5px 0 0;
  color: #90a4b2;
  font-size: 8px;
  line-height: 1.4;
}
.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tutorial-coach button {
  display: none;
  margin-top: 8px;
  border: 1px solid #42829f;
  border-radius: 6px;
  background: #16384b;
  color: #fff;
  padding: 6px 9px;
  font-size: 7px;
  font-weight: 1000;
  cursor: pointer;
}
.tutorial-coach.has-button #tutorialOk,
.tutorial-skip {
  display: inline-block !important;
}
.tutorial-skip {
  background: transparent !important;
  border: 0 !important;
  color: #6d8494 !important;
}
.tutorial-arrow {
  position: absolute;
  width: 15px;
  height: 15px;
  left: -8px;
  top: 24px;
  border-left: 2px solid #6ed3f2;
  border-top: 2px solid #6ed3f2;
  transform: rotate(-45deg);
}
.tutorial-target {
  position: relative !important;
  z-index: 149 !important;
  box-shadow:
    0 0 0 3px #72d8f5,
    0 0 32px rgba(84, 197, 232, 0.55) !important;
  animation: tutorialpulse 0.8s ease-in-out infinite alternate !important;
}
@keyframes tutorialpulse {
  to {
    box-shadow:
      0 0 0 4px #b6f0ff,
      0 0 43px rgba(84, 197, 232, 0.78);
  }
}
.crash {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: none;
  place-items: center;
  background: #080b0f;
  color: #fff;
  padding: 20px;
  text-align: center;
}
.crash.open {
  display: grid;
}
.crash pre {
  max-width: 850px;
  white-space: pre-wrap;
  color: #ff999f;
  text-align: left;
  font-size: 10px;
}

body.kawaii {
  --bg: #fff1f8;
  --panel: #fff8fc;
  --panel-2: #ffeaf4;
  --panel-3: #ffddea;
  --line: #efbfd4;
  --line-bright: #e49abb;
  --text: #604154;
  --muted: #987487;
  --cyan: #ef7eb6;
  --cyan-2: #ce6c9f;
  --gold: #de8eaf;
  --red: #e96e99;
  --green: #68bda0;
  background-image: linear-gradient(#fff5fb, #f4edff);
}
body.kawaii .game-header,
body.kawaii .context-panel,
body.kawaii .action-dock {
  background: rgba(255, 247, 251, 0.97);
}
body.kawaii .hub-tile,
body.kawaii .metric,
body.kawaii .panel-card,
body.kawaii .buy-row,
body.kawaii .research-card,
body.kawaii .hero-card,
body.kawaii .squad-slot {
  background: #fff8fc;
}
body.kawaii #gameCanvas {
  filter: saturate(0.82) brightness(1.08) hue-rotate(315deg);
}

@media (max-width: 1366px) {
  .game-header {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    min-width: 190px;
  }
  .metric {
    min-width: 88px;
  }
  .hub-stage {
    grid-template-columns: 220px minmax(340px, 1fr) 220px;
    padding: 14px 22px;
    gap: 10px 15px;
  }
  .fight-button {
    width: 205px;
    height: 205px;
  }
  .hub-nav {
    padding: 28px 0;
  }
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .action-dock {
    grid-template-columns: minmax(330px, 1fr) auto minmax(330px, 1fr);
  }
  .dock-tools button {
    padding: 5px 7px;
  }
  .dock-primary {
    min-width: 150px;
  }
  .battle-metrics .metric {
    min-width: 82px;
  }
  .brand.compact {
    min-width: 170px;
  }
}
@media (max-width: 1050px) {
  .hub-stage {
    grid-template-columns: 1fr 1.2fr 1fr;
  }
  .hub-tile {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .tile-icon {
    display: none;
  }
  .action-dock {
    grid-template-columns: 1fr auto;
  }
  .dock-tools {
    grid-row: 2;
  }
  .phase-actions {
    grid-row: 2;
  }
  .battle-screen {
    grid-template-rows: 92px minmax(0, 1fr) 116px;
  }
  .battle-header {
    height: 92px;
    flex-wrap: wrap;
  }
  .battle-metrics {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
  .battle-metrics .metric {
    flex: 1;
  }
  .context-panel {
    top: 92px;
    bottom: 116px;
  }
  .canvas-wrap {
    max-width: calc((100dvh - 92px - 116px - 78px) * 1.735);
  }
  .action-dock {
    height: 116px;
  }
  .summon-layout {
    grid-template-columns: 1fr;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    max-width: 720px;
    margin: auto;
  }
  .loadout-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .game-header {
    height: auto;
    min-height: 58px;
  }
  .brand {
    min-width: 0;
  }
  .brand h1 {
    font-size: 12px;
  }
  .brand small {
    font-size: 6px;
  }
  .hub-header {
    display: grid;
    grid-template-columns: 1fr;
  }
  .header-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
  }
  .header-metrics .metric {
    min-width: 0;
  }
  .hub-stage {
    min-height: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
  }
  .hub-core {
    order: 1;
    min-height: 290px;
  }
  .hub-nav {
    order: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0;
  }
  .hub-nav-right {
    order: 3;
  }
  .hub-tile {
    min-height: 70px;
    padding: 8px;
  }
  .hub-report {
    order: 4;
    grid-template-columns: 1fr;
  }
  .hub-report div {
    border-right: 0;
    border-bottom: 1px solid #1d303e;
  }
  .directive-panel {
    order: 5;
  }
  .perk-grid {
    grid-template-columns: 1fr;
  }
  .fight-button {
    width: 190px;
    height: 190px;
  }
  .hub-page {
    height: auto;
    padding: 12px;
  }
  .page-head {
    grid-template-columns: 1fr auto;
  }
  .page-head > div:nth-child(2) {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .back-button {
    font-size: 7px;
  }
  .subtab {
    min-width: 0;
    flex: 1;
  }
  .squad-intro {
    display: block;
  }
  .squad-intro p {
    margin-top: 7px;
  }
  .squad-grid {
    grid-template-columns: 1fr;
  }
  .squad-slot {
    grid-template-columns: 90px 1fr;
  }
  .hero-portrait,
  .empty-portrait {
    width: 90px;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .hero-card {
    grid-template-columns: 90px 1fr;
  }
  .summon-layout {
    grid-template-columns: 1fr;
  }
  .rates {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .pull-ledger header {
    display: block;
  }
  .rarity-counts {
    margin-top: 7px;
  }
  .battle-screen {
    height: 100dvh;
    grid-template-rows: 118px minmax(0, 1fr) 122px;
  }
  .battle-header {
    height: 118px;
    padding: 6px;
  }
  .brand.compact {
    width: 100%;
    justify-content: center;
  }
  .battle-metrics {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }
  .battle-metrics .metric {
    min-width: 84px;
  }
  .battle-metrics .base-metric {
    min-width: 120px;
  }
  .battle-header > .icon-button {
    position: absolute;
    right: 7px;
    top: 7px;
  }
  .battle-map-column {
    grid-template-rows: minmax(0, 1fr) 54px;
    padding: 3px;
  }
  .canvas-wrap {
    max-width: none;
    height: 100%;
  }
  .canvas-brief {
    max-width: 88%;
  }
  .lane-picker {
    left: 4px;
    right: 4px;
    bottom: 4px;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .lane-btn {
    min-width: 105px;
  }
  .battle-status {
    grid-template-columns: 1fr;
  }
  .objective {
    display: none;
  }
  .node {
    height: 44px;
  }
  .action-dock {
    height: 122px;
    grid-template-columns: 1fr;
    padding: 5px;
  }
  .dock-tools {
    grid-column: 1;
    grid-row: 2;
    overflow-x: auto;
  }
  .dock-tools button {
    min-width: 58px;
    height: 40px;
  }
  .phase-actions {
    grid-column: 1;
    grid-row: 3;
  }
  .dock-secondary {
    height: 38px;
    min-width: 36px;
  }
  .restart-wave {
    font-size: 0;
  }
  .restart-wave::after {
    content: "↻";
    font-size: 14px;
  }
  .dock-primary {
    height: 38px;
    min-width: 145px;
  }
  .context-panel {
    top: 0;
    bottom: 0;
    width: 100vw;
    z-index: 170;
  }
  .research-grid {
    grid-template-columns: 1fr;
  }
  .help-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tutorial-coach {
    left: 10px !important;
    right: 10px !important;
    bottom: 130px !important;
    top: auto !important;
    width: auto !important;
    transform: none !important;
  }
  .tutorial-arrow {
    display: none;
  }
  .difficulty-grid {
    grid-template-columns: 1fr;
  }
  .difficulty-grid button {
    min-height: 95px;
  }
  .toast-stack {
    top: 8px;
  }
  .page-token {
    font-size: 6px !important;
  }
}
