/* Menu e arsenal: arena gráfica, sem fontes ou imagens externas. */
.ui-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#menu,
#select {
  --cream: #f3f0df;
  --lime: #d6f266;
  --muted: #959b92;
  --line: #ffffff20;
  --orange: #ff824c;
  background: #171c19;
  color: var(--cream);
  padding: 0 max(32px, env(safe-area-inset-right)) 0 max(32px, env(safe-area-inset-left));
  gap: 0;
  text-align: left;
  font-weight: 500;
  isolation: isolate;
  overflow: hidden;
}

#menu::before,
#select::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(#ffffff03 1px, transparent 1px), linear-gradient(90deg, #ffffff03 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, transparent, #000);
}

#menu> :first-child,
#select> :first-child {
  margin-top: 0;
}

#menu> :last-child,
#select> :last-child {
  margin-bottom: 0;
}

#menu button,
#select button {
  -webkit-tap-highlight-color: transparent;
}

#menu button:focus-visible,
#select button:focus-visible,
#menu input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.arena-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  flex: none;
  padding-top: env(safe-area-inset-top);
}

.arena-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
}

.arena-brand>.ui-icon {
  width: 30px;
  height: 30px;
  color: var(--lime);
}

.arena-brand small {
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 600;
  vertical-align: middle;
}

.brand-slash {
  margin: 0 9px;
  color: #5e675d;
  font-weight: 400;
}

.menu-tools {
  display: flex;
  gap: 8px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #c4c9bf;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 12px;
}

.tool-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.tool-btn:hover {
  color: var(--lime);
  border-color: var(--line);
  background: #ffffff06;
}

#menu-scroll,
#select-scroll {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}

#menu-scroll {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 0;
  overflow: hidden;
}

#menu-scroll> :first-child,
#menu-scroll> :last-child,
#select-scroll> :first-child,
#select-scroll> :last-child {
  margin-top: 0;
  margin-bottom: 0;
}

.menu-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 12px 0 12px 28px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  display: inline-block;
  flex: none;
  box-shadow: 0 0 12px #d6f23335;
}

#menu h1 {
  margin: 22px 0 18px;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(48px, 6.6vw, 96px);
  font-weight: 950;
  font-style: italic;
  line-height: .91;
  letter-spacing: -6px;
  text-shadow: none;
  color: var(--cream);
}

#menu h1 em {
  display: inline-block;
  font-size: 1.58em;
  font-style: inherit;
  color: var(--lime);
  letter-spacing: -9px;
}

#menu h1 em span {
  color: var(--orange);
}

.menu-intro {
  font-size: 14px;
  line-height: 1.65;
  color: #aeb4a9;
  margin: 0 0 24px;
}

.player-id {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 420px);
  padding: 12px 0;
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
}

.player-id>.ui-icon {
  width: 34px;
  height: 34px;
  background: #2b332b;
  color: var(--lime);
  border-radius: 7px;
  padding: 8px;
}

.player-id label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: var(--muted);
}

#menu #inp-name {
  background: transparent;
  border: 0;
  border-radius: 2px;
  color: var(--cream);
  padding: 0;
  width: 150px;
  text-align: left;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: 0;
}

#menu #inp-name:hover {
  color: var(--lime);
}

#acc-level {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  line-height: 1.6;
}

#acc-level b {
  display: block;
  color: var(--lime);
  font-size: 15px;
}

#play-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 460px;
  justify-content: stretch;
}

.mode-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
  padding: 15px 18px;
  background: var(--lime);
  color: #1c2519;
  border: 1px solid var(--lime);
  border-radius: 5px;
  text-align: left;
  transition: background .15s, transform .15s, box-shadow .15s;
}

.mode-btn:hover {
  background: #e8ff95;
  transform: translateY(-3px);
  box-shadow: 0 6px 0 #10170f;
}

.mode-btn:active {
  transform: translateY(1px);
}

.mode-btn>span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mode-btn small {
  font-size: 7px;
  letter-spacing: 1.1px;
  font-weight: 700;
}

.mode-btn b {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.5px;
  white-space: nowrap;
}

#btn-online {
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  background: #262e27;
  color: var(--cream);
  border-color: #59634c;
  padding-bottom: 18px;
}

#btn-online:hover {
  background: #343e2b;
  border-color: var(--lime);
}

#btn-online>.ui-icon {
  color: var(--lime);
  width: 24px;
}

#btn-online>span>small {
  color: #aeb4a9;
  font-size: 7px;
  letter-spacing: 1.1px;
  line-height: 1.2;
  margin: 0;
}

#btn-online #menu-count {
  position: absolute;
  right: 8px;
  bottom: 5px;
  margin: 0;
  font-size: 8px;
  color: var(--lime);
}

.menu-showcase {
  position: relative;
  height: min(560px, 65vh);
  min-height: 340px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-coord {
  position: absolute;
  top: 5px;
  right: 10px;
  font: 9px monospace;
  color: #80897e;
  letter-spacing: 1.4px;
}

.showcase-coord span {
  color: var(--orange);
  margin: 0 10px;
}

.showcase-word {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%) rotate(-9deg);
  font-size: clamp(95px, 13vw, 188px);
  font-style: italic;
  font-weight: 950;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #b6c59529;
  letter-spacing: -10px;
  pointer-events: none;
}

.showcase-orbit {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #d6f23528;
  background: radial-gradient(circle, #d6f2260a, transparent 65%);
}

.showcase-orbit::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed #d6f23519;
  border-radius: 50%;
}

.showcase-orbit::after {
  content: "+";
  position: absolute;
  right: -7px;
  top: 48%;
  color: var(--orange);
  font: 26px monospace;
}

.showcase-platform {
  position: absolute;
  width: 76%;
  height: 22%;
  bottom: 16%;
  background: #a5b87b;
  border: 1px solid #d6f26666;
  border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 0 10px 0 #5a6846, 0 18px 0 #35402e, 0 35px 50px #0007;
  background-image: repeating-linear-gradient(90deg, transparent 0 39px, #4b633629 40px 41px), repeating-linear-gradient(0deg, transparent 0 39px, #4b633629 40px 41px);
}

#menu-hero {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  color: var(--cream);
}

#menu-hero canvas {
  width: auto;
  height: 84%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(12px 18px 10px #0004);
  margin-top: -25px;
  transition: transform .3s;
}

#menu-hero:hover canvas {
  transform: translateY(-8px) rotate(-3deg);
}

.hero-caption {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  row-gap: 4px;
  align-items: center;
  width: 72%;
  padding: 13px 16px;
  background: #232b23;
  border: 1px solid #566348;
  border-radius: 5px;
  text-align: left;
  box-shadow: 0 8px 20px #0003;
}

.hero-caption small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1.5px;
}

.hero-caption b {
  display: block;
  font-size: 21px;
  font-weight: 850;
}

.hero-caption>.ui-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--lime);
  width: 28px;
  height: 28px;
}

.hero-caption .hero-change {
  color: var(--lime);
  font-size: 8px;
  letter-spacing: 1px;
}

.showcase-plus {
  position: absolute;
  left: 12%;
  top: 30%;
  color: var(--orange);
  font-size: 46px;
  pointer-events: none;
  transform: rotate(-12deg);
}

.showcase-note {
  position: absolute;
  bottom: -24px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 7px;
  letter-spacing: 1.5px;
  color: var(--muted);
  pointer-events: none;
}

.showcase-note .live-dot {
  width: 4px;
  height: 4px;
  background: var(--orange);
}

.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  width: 100%;
  min-height: 42px;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  gap: 12px;
}

.arena-motto {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #7e887b;
}

.arena-motto b {
  color: #a5af9e;
  font-weight: 600;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-btn,
#menu .ver {
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  color: #a1aa9a;
  padding: 8px 0;
  font-size: 10px;
  text-decoration: none;
  margin: 0;
  white-space: nowrap;
}

.footer-btn:hover,
#menu .ver:hover {
  color: var(--lime);
}

.footer-btn .ui-icon {
  width: 15px;
  height: 15px;
}

#btn-dev {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Arsenal : vitrine à esquerda, coleção à direita, confirmação sempre visível. */
#select-scroll {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.8fr);
  align-items: stretch;
  gap: 32px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 0;
  overflow: hidden;
}

.select-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font: 10px monospace;
}

.select-step span {
  font: 8px "Segoe UI", sans-serif;
  letter-spacing: 1px;
  color: #bdc6b4;
}

.select-step span:last-child {
  color: #717d6b;
}

.select-step i {
  display: inline-block;
  width: 32px;
  height: 1px;
  margin: 0 10px;
  background: #536148;
}

.fighter-preview {
  min-height: 0;
  position: relative;
  background: #222a22;
  border: 1px solid #49513f;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #526245 transparent;
  touch-action: pan-y;
}

.fighter-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fighter-topline>span {
  font-size: 8px;
  color: var(--lime);
  letter-spacing: 2px;
}

.fighter-topline .fighter-number {
  font: 12px monospace;
  color: #849276;
  white-space: nowrap;
}

.fighter-stage {
  position: relative;
  flex: 1 1 160px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  background: radial-gradient(ellipse, #d6f26613, transparent 68%);
}

.fighter-stage::before {
  content: "";
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  max-height: 95%;
  border: 1px solid #c8d4a522;
  border-radius: 50%;
}

.fighter-stage::after {
  content: "";
  position: absolute;
  width: 65%;
  height: 20%;
  bottom: 6%;
  border-radius: 50%;
  background: #a2b67a;
  transform: rotate(-8deg);
  box-shadow: 0 5px 0 #5b6a46, 0 10px 0 #35412d;
}

.fighter-stage canvas {
  position: absolute;
  width: 100%;
  height: 120%;
  object-fit: contain;
  z-index: 1;
  top: -14%;
  filter: drop-shadow(5px 10px 6px #0004);
}

.fighter-preview h3 {
  position: relative;
  margin: 8px 0 3px;
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -1.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.fighter-desc {
  color: #afb8a4;
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.4;
}

.fighter-loadout {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 10px;
}

.fighter-loadout .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--orange);
}

.fighter-loadout>div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fighter-loadout small {
  font-size: 7px;
  color: var(--muted);
  letter-spacing: 1.1px;
}

.fighter-loadout>span {
  margin-left: auto;
  color: var(--lime);
  font-size: 9px;
}

.fighter-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px 0;
}

.fighter-stat>span {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 5px;
}

.fighter-stat b {
  color: var(--cream);
  font-size: 10px;
}

.stat-track {
  display: block;
  height: 3px;
  background: #ffffff13;
  border-radius: 2px;
  overflow: hidden;
}

.stat-track i {
  display: block;
  height: 100%;
  background: var(--lime);
}

.fighter-actions {
  display: flex;
  gap: 8px;
}

.fighter-actions button {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  color: #d5ddcb;
  border: 1px solid #536048;
  border-radius: 4px;
  background: transparent;
  font-size: 9px;
}

.fighter-actions button:hover {
  background: #d6f26615;
  color: var(--lime);
}

.fighter-actions .ui-icon {
  width: 15px;
  height: 15px;
}

.roster-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.roster-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0 16px;
}

.roster-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-bottom: 7px;
}

#select .sel-title {
  margin: 0;
  font-size: clamp(20px, 2.1vw, 32px);
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow: none;
  color: var(--cream);
  line-height: 1.1;
}

.sel-title em {
  font-style: normal;
  color: var(--lime);
}

.roster-count {
  font: 10px monospace;
  color: var(--muted);
  padding-bottom: 2px;
  white-space: nowrap;
}

.char-filters {
  display: flex;
  gap: 6px;
  padding: 0 0 14px;
  flex: none;
}

.char-filters button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #3f4a39;
  color: #aab59f;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 9px;
  white-space: nowrap;
}

.char-filters button small {
  color: #77866b;
  font-size: 8px;
}

.char-filters button:hover {
  border-color: #9eaf87;
  color: var(--cream);
}

.char-filters button.active {
  background: var(--cream);
  border-color: var(--cream);
  color: #222a1b;
  font-weight: 750;
}

.char-filters button.active small {
  color: #626d53;
}

/* O total da coleção define as linhas de referência, mesmo ao filtrar. */
#chars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(var(--roster-rows, 3), minmax(144px, 1fr));
  grid-auto-rows: minmax(144px, 1fr);
  align-content: start;
  gap: 10px;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  overflow: auto;
  padding: 2px 4px 5px 2px;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #657451 transparent;
}

#select .char {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding: 12px;
  background: #252d24;
  border: 1px solid #414b39;
  border-radius: 6px;
  box-shadow: none;
  cursor: default;
  color: var(--muted);
  overflow: hidden;
  transition: border-color .15s, background .15s;
  transform: none;
}

#select .char::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 45%, var(--char-color, #d6f266) 0, transparent 70%);
  opacity: .09;
  pointer-events: none;
}

#select .char:hover:not(.locked) {
  border-color: #899b70;
  background: #303a2b;
  box-shadow: none;
  transform: none;
}

#select .char.sel {
  background: #36442b;
  border-color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}

#select .char.sel::before {
  opacity: .12;
}

.char-pick {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  z-index: 2;
  border-radius: 5px;
}

#select .char-pick:focus-visible {
  outline-offset: -4px;
}

.char-index {
  position: absolute;
  top: 10px;
  left: 11px;
  font: 8px monospace;
  color: #8a967f;
  z-index: 1;
}

.char-check {
  position: absolute;
  top: 9px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: #253017;
  background: var(--lime);
  border-radius: 50%;
}

.char-check .ui-icon {
  width: 12px;
  height: 12px;
  stroke-width: 3px;
}

/* O retrato encolhe no espaço restante sem cortar a cabeça nem comprimir o texto. */
#select .char canvas {
  align-self: center;
  flex: 0 1 auto;
  min-height: 0;
  width: 92%;
  height: clamp(60px, 13.8vh, 148px);
  object-fit: contain;
  margin-top: 0;
  margin-bottom: -2px;
  pointer-events: none;
  filter: drop-shadow(3px 5px 4px #0004);
}

#select .char .cname {
  flex-shrink: 0;
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: none;
  pointer-events: none;
  z-index: 1;
}

#select .char .wp {
  flex-shrink: 0;
  display: block;
  font-size: 8px;
  line-height: 1.5;
  color: #aab59e;
  pointer-events: none;
  z-index: 1;
  margin-top: 2px;
  padding-right: 20px;
}

#select .char .info {
  position: absolute;
  right: 5px;
  bottom: 7px;
  padding: 4px;
  margin: 0;
  color: #a3b291;
  background: transparent;
  border: 0;
  z-index: 3;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  text-decoration: none;
}

#select .char .info .ui-icon {
  width: 15px;
  height: 15px;
}

#select .char .info:hover {
  color: var(--lime);
  background: #ffffff15;
}

#select .char.sel .cname {
  color: var(--lime);
}

#select .char.locked {
  opacity: .45;
  filter: grayscale(.8);
}

#select .char.locked .char-pick {
  cursor: default;
}

.char-lock {
  color: var(--orange);
  font-size: 8px;
  z-index: 1;
}

.roster-empty {
  color: var(--muted);
  font-size: 12px;
}

#select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
  min-height: 60px;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c0c9b4;
  background: transparent;
  border: 0;
  padding: 12px 4px;
  font-size: 10px;
  letter-spacing: 1px;
}

.back-btn:hover {
  color: var(--lime);
}

.back-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.selection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 11px;
  flex: 1;
}

#selection-label {
  color: #e0e8d1;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

.selection-status small {
  font-size: 8px;
  color: var(--muted);
  border-left: 1px solid #ffffff30;
  padding-left: 12px;
  margin-left: 3px;
  letter-spacing: 1px;
}

#select #btn-start {
  border: 0;
  border-radius: 4px;
  background: var(--lime);
  color: #20291a;
  min-width: 210px;
  padding: 12px 30px;
  box-shadow: none;
  text-shadow: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
}

#select #btn-start::after {
  content: "↗";
  margin-left: 28px;
  font-size: 19px;
  line-height: 0;
}

#select #btn-start:hover {
  background: #e7ff93;
}

#select #btn-start:active {
  transform: translateY(2px);
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #1c231c;
  border: 1px solid #47533d;
  border-radius: 6px;
}

.mode-pill {
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #aeb8a4;
  padding: 7px 11px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}

.mode-pill:hover:not(:disabled) {
  color: var(--cream);
  background: #ffffff0a;
}

.mode-pill.active {
  background: var(--lime);
  color: #1d2618;
  border-color: var(--lime);
  font-weight: 850;
}

.mode-pill:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (min-width:1600px) {

  #menu,
  #select {
    padding-left: max(64px, env(safe-area-inset-left));
    padding-right: max(64px, env(safe-area-inset-right));
  }
}

@media (max-width:1050px) {

  #menu,
  #select {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }

  .menu-copy {
    padding-left: 4px;
  }

  #menu h1 {
    letter-spacing: -4px;
  }

  #menu h1 em {
    letter-spacing: -6px;
  }

  .mode-btn {
    padding: 13px 12px;
    gap: 8px;
  }

  .mode-btn b {
    font-size: 17px;
  }

  .mode-btn small {
    font-size: 6px;
  }

  #btn-online>span>small {
    font-size: 6px;
  }

  #select-scroll {
    grid-template-columns: minmax(220px, .9fr) minmax(0, 1.9fr);
    gap: 18px;
  }

  .fighter-preview {
    padding: 15px;
  }

  .char-filters button {
    padding: 6px 10px;
    gap: 5px;
  }

  #select .char {
    padding: 10px;
  }

  #select .char .cname {
    font-size: 11px;
  }

  .selection-status small {
    display: none;
  }
}

@media (max-height:650px) and (min-width:701px) {
  .arena-header {
    min-height: 50px;
  }

  #menu-scroll {
    padding: 16px 0 24px;
  }

  #menu h1 {
    margin: 12px 0;
    font-size: clamp(42px, 5.4vw, 70px);
  }

  .menu-intro {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .player-id {
    padding: 9px 0;
    margin-bottom: 7px;
  }

  .mode-btn {
    min-height: 64px;
  }

  .menu-showcase {
    height: 100%;
    max-height: 410px;
    min-height: 250px;
  }

  .showcase-note {
    bottom: -18px;
  }

  #select-scroll {
    padding: 14px 0;
  }

  .roster-heading {
    padding-bottom: 10px;
  }

  #select .sel-title {
    font-size: 22px;
  }

  .char-filters {
    padding-bottom: 10px;
  }

  #chars {
    gap: 8px;
    grid-template-rows: repeat(var(--roster-rows, 3), minmax(100px, 1fr));
    grid-auto-rows: minmax(100px, 1fr);
  }

  #select .char canvas {
    height: clamp(46px, 11vh, 83px);
  }

  .fighter-preview {
    padding: 12px;
  }

  .fighter-preview h3 {
    font-size: 25px;
  }

  .fighter-desc {
    font-size: 9px;
    margin-bottom: 6px;
  }

  .fighter-loadout {
    padding: 7px 0;
  }

  .fighter-stats {
    padding: 9px 0;
  }

  #select-bar {
    min-height: 52px;
    padding-top: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  #select #btn-start {
    padding: 10px 22px;
  }
}

@media (max-height:440px) {

  #menu,
  #select {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .arena-header {
    min-height: 38px;
  }

  .arena-brand {
    font-size: 18px;
    gap: 7px;
  }

  .arena-brand>.ui-icon {
    width: 23px;
    height: 23px;
  }

  .arena-brand small {
    font-size: 8px;
    letter-spacing: 2px;
  }

  .brand-slash {
    margin: 0 5px;
  }

  .menu-tools {
    gap: 7px;
  }

  .tool-btn {
    padding: 6px;
    font-size: 9px;
    gap: 5px;
  }

  .tool-btn .ui-icon {
    width: 15px;
    height: 15px;
  }

  #menu-scroll {
    grid-template-columns: 1fr 1fr;
    padding: 9px 0 18px;
    overflow: hidden;
  }

  .menu-copy {
    padding: 2px 0;
  }

  .eyebrow {
    font-size: 7px;
    letter-spacing: 1.6px;
    gap: 6px;
  }

  #menu h1 {
    font-size: clamp(35px, 5.5vw, 55px);
    margin: 10px 0;
    letter-spacing: -2.5px;
  }

  #menu h1 em {
    font-size: 1.45em;
    letter-spacing: -4px;
  }

  .menu-intro {
    font-size: 9px;
    line-height: 1.5;
    margin: 0 0 9px;
  }

  .player-id {
    margin-bottom: 7px;
    padding: 7px 0 0;
    width: 94%;
    gap: 8px;
  }

  .player-id>.ui-icon {
    width: 27px;
    height: 27px;
    padding: 6px;
  }

  .player-id label {
    font-size: 6px;
    letter-spacing: 1.2px;
    gap: 2px;
  }

  #menu #inp-name {
    width: 110px;
    font-size: 12px;
  }

  #acc-level {
    font-size: 7px;
    line-height: 1.3;
  }

  #acc-level b {
    font-size: 11px;
  }

  #play-row {
    gap: 7px;
    width: 100%;
    max-width: 360px;
  }

  .mode-btn {
    min-height: 50px;
    padding: 8px 10px;
    border-radius: 4px;
    gap: 6px;
  }

  .mode-btn b {
    font-size: 14px;
  }

  .mode-btn small {
    font-size: 5.5px;
    letter-spacing: .6px;
  }

  .mode-btn>span {
    gap: 4px;
  }

  .mode-btn>.ui-icon {
    width: 18px;
    height: 18px;
  }

  #btn-online {
    padding-bottom: 11px;
  }

  #btn-online>.ui-icon {
    width: 19px;
  }

  #btn-online>span>small {
    font-size: 5.5px;
    letter-spacing: .6px;
  }

  #btn-online #menu-count {
    font-size: 6px;
    bottom: 2px;
  }

  .menu-showcase {
    height: 100%;
    min-height: 0;
  }

  .showcase-coord {
    top: 2px;
    right: 0;
    font-size: 6px;
    letter-spacing: 1px;
  }

  .showcase-word {
    font-size: 100px;
    top: 7%;
    letter-spacing: -5px;
  }

  .showcase-orbit {
    width: 67%;
    max-height: 95%;
  }

  .showcase-platform {
    width: 65%;
    bottom: 19%;
    height: 21%;
    box-shadow: 0 6px 0 #5a6846, 0 11px 0 #35402e, 0 20px 30px #0007;
  }

  #menu-hero canvas {
    height: 93%;
    margin-top: -12px;
  }

  .hero-caption {
    bottom: 0;
    width: 70%;
    padding: 8px 11px;
    gap: 3px 10px;
  }

  .hero-caption small {
    font-size: 6px;
    letter-spacing: 1px;
  }

  .hero-caption b {
    font-size: 15px;
  }

  .hero-caption .hero-change {
    font-size: 6px;
  }

  .hero-caption>.ui-icon {
    width: 20px;
    height: 20px;
  }

  .showcase-plus {
    font-size: 30px;
    top: 25%;
    left: 10%;
  }

  .showcase-note {
    font-size: 5px;
    bottom: -12px;
    letter-spacing: 1px;
  }

  .menu-footer {
    min-height: 26px;
    gap: 8px;
  }

  .arena-motto {
    font-size: 6px;
    letter-spacing: 1px;
  }

  .footer-actions {
    gap: 10px;
  }

  .footer-btn,
  #menu .ver {
    padding: 5px 0;
    font-size: 7px;
  }

  .footer-btn .ui-icon {
    width: 12px;
    height: 12px;
  }

  .select-step {
    font-size: 8px;
    gap: 5px;
  }

  .select-step span {
    font-size: 6px;
    letter-spacing: .6px;
  }

  .select-step i {
    width: 20px;
    margin: 0 5px;
  }

  #select-scroll {
    grid-template-columns: minmax(190px, .85fr) minmax(0, 2fr);
    gap: 15px;
    padding: 10px 0;
  }

  .fighter-preview {
    padding: 10px 12px;
    border-radius: 5px;
  }

  .fighter-topline>span {
    font-size: 6px;
    letter-spacing: 1.3px;
  }

  .fighter-topline .fighter-number {
    font-size: 8px;
  }

  .fighter-stage {
    flex-basis: 60px;
    min-height: 48px;
    margin: 0;
  }

  .fighter-stage canvas {
    height: 137%;
    top: -25%;
  }

  .fighter-preview h3 {
    font-size: 20px;
    margin: 4px 0 3px;
    letter-spacing: -.7px;
  }

  .fighter-desc {
    display: none;
  }

  .fighter-loadout {
    padding: 6px 0;
    gap: 5px;
    font-size: 9px;
  }

  .fighter-loadout .ui-icon {
    width: 15px;
    height: 15px;
  }

  .fighter-loadout small {
    display: none;
  }

  .fighter-loadout>span {
    font-size: 8px;
  }

  .fighter-stats {
    padding: 8px 0;
    gap: 9px;
  }

  .fighter-stat>span {
    font-size: 7px;
    margin-bottom: 4px;
  }

  .fighter-stat b {
    font-size: 8px;
  }

  .stat-track {
    height: 3px;
  }

  .fighter-actions {
    gap: 5px;
  }

  .fighter-actions button {
    min-height: 32px;
    padding: 6px 3px;
    gap: 5px;
    font-size: 9px;
  }

  .fighter-actions .ui-icon {
    width: 13px;
    height: 13px;
  }

  .roster-heading {
    padding: 0 0 7px;
  }

  .roster-heading .eyebrow {
    font-size: 5.5px;
    letter-spacing: 1px;
    margin-bottom: 3px;
  }

  #select .sel-title {
    font-size: 18px;
    letter-spacing: -.6px;
  }

  .roster-count {
    font-size: 7px;
  }

  .char-filters {
    padding-bottom: 7px;
    gap: 5px;
  }

  .char-filters button {
    min-height: 28px;
    font-size: 9px;
    padding: 6px 10px;
    gap: 7px;
  }

  .char-filters button small {
    font-size: 8px;
  }

  #chars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(var(--roster-rows, 3), minmax(53px, 1fr));
    grid-auto-rows: minmax(53px, 1fr);
    gap: 6px;
    padding: 1px 3px 2px 1px;
  }

  #select .char {
    padding: 6px 7px;
    border-radius: 4px;
  }

  #select .char canvas {
    position: absolute;
    top: 4%;
    right: 0;
    width: 56%;
    height: 92%;
    margin: 0;
  }

  #select .char .cname {
    font-size: 10px;
    max-width: 100%;
    margin-top: 25px;
    text-shadow: 0 1px 5px #000;
  }

  #select .char .wp {
    font-size: 8px;
    margin: 2px 0 0;
    line-height: 1.1;
    padding-right: 22px;
    text-shadow: 0 1px 5px #000;
  }

  .char-index {
    top: 6px;
    left: 6px;
    font-size: 6px;
  }

  .char-check {
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
  }

  .char-check .ui-icon {
    width: 9px;
    height: 9px;
  }

  #select .char .info {
    right: 0;
    bottom: 0;
    width: 28px;
    height: 28px;
    padding: 7px;
  }

  #select .char .info .ui-icon {
    width: 14px;
    height: 14px;
  }

  #select-bar {
    min-height: 42px;
    padding: 4px 0 max(4px, env(safe-area-inset-bottom));
    gap: 12px;
  }

  .back-btn {
    font-size: 8px;
    padding: 7px 2px;
    gap: 7px;
  }

  .back-btn .ui-icon {
    width: 14px;
    height: 14px;
  }

  .selection-status {
    font-size: 11px;
    gap: 7px;
  }

  .selection-status .live-dot {
    width: 4px;
    height: 4px;
  }

  #select #btn-start {
    min-width: 160px;
    padding: 8px 20px;
    font-size: 11px;
  }

  #select #btn-start::after {
    font-size: 14px;
    margin-left: 22px;
  }
}

@media (max-width:650px) and (max-height:440px) {

  #menu,
  #select {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .tool-btn span {
    display: none;
  }

  .tool-btn {
    padding: 7px;
  }

  #menu h1 {
    font-size: 35px;
    margin: 9px 0 7px;
  }

  #menu h1 em {
    font-size: 1.5em;
  }

  .menu-intro {
    font-size: 8px;
    margin-bottom: 6px;
  }

  .mode-btn {
    padding: 7px;
    min-height: 46px;
  }

  .mode-btn b {
    font-size: 12px;
  }

  .mode-btn small {
    font-size: 4.8px;
    letter-spacing: .3px;
  }

  #btn-online {
    gap: 6px;
  }

  #btn-online>.ui-icon {
    width: 15px;
  }

  #btn-online>span>small {
    font-size: 4.8px;
    letter-spacing: .3px;
  }

  .showcase-coord {
    font-size: 5px;
    letter-spacing: .4px;
  }

  .showcase-coord span {
    margin: 0 4px;
  }

  .showcase-word {
    font-size: 80px;
  }

  .hero-caption {
    width: 84%;
  }

  .hero-caption b {
    font-size: 14px;
  }

  .showcase-note {
    font-size: 4.5px;
    letter-spacing: .5px;
  }

  .arena-motto {
    font-size: 5px;
    letter-spacing: .5px;
  }

  .select-step {
    font-size: 0;
  }

  .select-step span {
    font-size: 6px;
  }

  .select-step span:last-child,
  .select-step i {
    display: none;
  }

  #select-scroll {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
  }

  .fighter-preview {
    padding: 8px;
  }

  .fighter-preview h3 {
    font-size: 18px;
  }

  .fighter-topline>span {
    font-size: 5px;
    letter-spacing: 1px;
    white-space: nowrap;
  }

  .fighter-stage {
    min-height: 40px;
    flex-basis: 40px;
  }

  .fighter-stat>span {
    font-size: 6px;
  }

  .fighter-stat b {
    font-size: 7px;
  }

  .fighter-actions button {
    font-size: 8px;
    min-height: 30px;
  }

  .fighter-loadout>span {
    max-width: 62px;
    text-align: right;
  }

  .roster-heading .eyebrow {
    display: none;
  }

  #select .sel-title {
    font-size: 15px;
  }

  .roster-count {
    font-size: 6px;
  }

  .char-filters {
    gap: 4px;
  }

  .char-filters button {
    font-size: 8px;
    padding: 6px 7px;
    gap: 4px;
  }

  .char-filters button small {
    display: none;
  }

  #chars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 64px;
    gap: 5px;
    scrollbar-gutter: stable;
  }

  #select .char .cname {
    font-size: 10px;
  }

  #select .char .wp {
    font-size: 7px;
  }

  .selection-status {
    font-size: 10px;
  }

  #select #btn-start {
    min-width: 135px;
    padding: 8px 14px;
    font-size: 10px;
  }
}

@media (max-width:700px) and (min-height:441px) {

  #menu,
  #select {
    padding-left: 18px;
    padding-right: 18px;
  }

  .arena-header {
    min-height: 56px;
  }

  .arena-brand {
    font-size: 20px;
  }

  .arena-brand small {
    font-size: 9px;
  }

  .tool-btn span {
    display: none;
  }

  .tool-btn {
    padding: 8px;
  }

  #menu-scroll {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: auto;
    touch-action: pan-y;
    padding: 24px 0;
  }

  .menu-copy {
    flex: none;
    padding: 0;
    max-width: 420px;
  }

  #menu h1 {
    font-size: 60px;
    margin: 18px 0;
  }

  #menu h1 em {
    letter-spacing: -6px;
  }

  .menu-intro {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .menu-showcase {
    flex: none;
    width: 100%;
    max-width: 420px;
    height: 350px;
    min-height: 350px;
    margin: 30px 0;
  }

  .showcase-word {
    font-size: 130px;
  }

  .showcase-note {
    bottom: -20px;
  }

  .menu-footer {
    min-height: 36px;
  }

  .arena-motto {
    display: none;
  }

  .footer-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }

  .select-step {
    display: none;
  }

  #select-scroll {
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 16px 0;
    gap: 20px;
    touch-action: pan-y;
  }

  .fighter-preview {
    flex: none;
    min-height: 420px;
  }

  .fighter-stage {
    min-height: 175px;
  }

  .fighter-preview h3 {
    font-size: 30px;
  }

  .roster-section {
    flex: none;
  }

  #select .sel-title {
    font-size: 21px;
  }

  #chars {
    flex: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 155px;
    overflow: visible;
  }

  #select .char canvas {
    height: 92px;
  }

  #select .char .cname {
    font-size: 11px;
  }

  .char-filters {
    flex-wrap: wrap;
  }

  .char-filters button {
    font-size: 9px;
    padding: 7px 10px;
  }

  #select-bar {
    min-height: 58px;
    gap: 10px;
  }

  .selection-status {
    display: none;
  }

  #select #btn-start {
    min-width: 180px;
    padding: 10px 20px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion:reduce) {

  #menu *,
  #select * {
    animation: none !important;
    transition: none !important;
  }
}