/* Arena layout; shared components own color and material. */
.arena-full { width: 100%; }
.arena-home #main { overflow-wrap: anywhere; }
/* Approved scene, shared by first-time and returning players. The art is purely
   presentation; breed, level, power and XP remain localized server data. */
.arena-home .arena-scene {
  position: relative; isolation: isolate; display: grid;
  grid-template-columns: 40% minmax(0, 1fr); align-items: center; gap: 0;
  width: 100%; max-width: 600px; min-height: clamp(196px, 50vw, 248px);
  margin: 0 auto var(--ui-space-4); padding: var(--ui-space-6) var(--ui-space-3) var(--ui-space-4) 0;
  overflow: hidden; border: 0; border-radius: var(--ui-radius-panel);
  background: var(--ui-bg); box-shadow: inset 0 -3px var(--ui-ink);
}
.arena-scene-background {
  position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 52%; pointer-events: none;
}
.arena-scene::after {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, var(--ui-bg), transparent 18%);
}
.arena-scene .arena-scene-hero {
  position: absolute; z-index: 2; left: 0; bottom: 0;
  width: 50%; height: 100%; object-fit: contain; object-position: left bottom;
  pointer-events: none; user-select: none;
}
.arena-scene .arena-fighter-identity { grid-column: 2; position: relative; z-index: 1; min-width: 0; }
.arena-scene .arena-nameplate {
  position: relative; z-index: 1; margin: 0 -3px -2px -3px; padding: 8px 6px 9px 30px;
  border: var(--ui-border); border-radius: 8px 12px 6px 4px;
  background: linear-gradient(170deg, transparent 47%, #e78b34 48%, transparent 51%),
    linear-gradient(#d98a33 0 9%, #a34b1d 10% 16%, #c9792a 17% 50%, #af5a22 51% 88%, #773413 89%);
  box-shadow: inset 0 3px #f9b452, var(--ui-shadow);
  color: #fff5dc; text-align: center; font-size: var(--ui-text-headline);
  line-height: var(--ui-leading-title); overflow-wrap: anywhere;
}
.arena-scene .arena-fighter-stats { padding: 12px 8px 12px 30px; border-radius: 0 0 var(--ui-radius-panel) var(--ui-radius-panel); }
.arena-scene .arena-fighter-stats p {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; margin: 0;
  color: var(--ui-text); font: 800 var(--ui-text-body)/1.35 var(--ui-font-display);
}
.arena-scene .arena-fighter-stats p span { overflow-wrap: anywhere; }
.arena-scene .arena-xp { display: grid; gap: var(--ui-space-1); margin-top: var(--ui-space-2); }
.arena-scene .arena-xp .ui-progress { width: 100%; max-width: none; }
.arena-scene .arena-xp > span { text-align: center; color: var(--ui-muted); font-size: var(--ui-text-xs); overflow-wrap: anywhere; }
.arena-mode-choice { position: relative; min-width: 0; }
.arena-modes .arena-mode-button {
  width: 100%; min-width: 0; min-height: 96px; padding: var(--ui-space-3);
  display: grid; grid-template-columns: 28px 1fr; justify-items: start; gap: var(--ui-space-2);
}
.arena-mode-title { grid-column: 1 / -1; text-align: left; font-size: var(--ui-text-body); line-height: 1.35; }
.arena-modes .arena-mode-button > .ui-icon { width: 28px; height: 28px; }
.arena-modes .ui-selection { margin-right: var(--ui-touch); }
.arena-modes .ui-selection .ui-icon { width: 14px; height: 14px; }
.arena-help-toggle.ui-button {
  position: absolute; top: 0; right: 0; z-index: 1;
  width: var(--ui-touch); min-width: var(--ui-touch); height: var(--ui-touch);
  padding: 0; border-radius: var(--ui-radius-panel); font-size: var(--ui-text-title);
}
.arena-help-toggle[aria-expanded=true] { outline: 2px solid var(--ui-focus); outline-offset: -5px; }
.arena-mode-help.ui-panel { padding: var(--ui-space-3); margin-block: var(--ui-space-3); }
.arena-help-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--ui-space-2); }
.arena-help-heading .ui-title { font-size: var(--ui-text-action); }
.arena-help-heading .ui-button { flex: 0 0 var(--ui-touch); width: var(--ui-touch); padding: 0; }
.arena-mode-help > p { margin-top: var(--ui-space-3); color: var(--ui-muted); font-size: var(--ui-text-sm); line-height: var(--ui-leading-body); }
.arena-mode-help .arena-risk { margin-block: var(--ui-space-3); }
.arena-status { margin-block: var(--ui-space-4); }
.arena-status > p { margin-top: var(--ui-space-2); color: var(--ui-muted); font-size: var(--ui-text-sm); line-height: var(--ui-leading-body); }
.arena-home .stake-heading { align-items: baseline; }
.arena-home .stake-heading > .ui-title { font-size: var(--ui-text-action); line-height: var(--ui-leading-title); }
.arena-stakes { margin-bottom: var(--ui-space-4); }
.arena-setup .arena-stakes { margin-bottom: 0; }
.arena-stake-custom { margin-block: var(--ui-space-2); }
.arena-stake-amount, .arena-stake-bounds { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--ui-space-1) var(--ui-space-2); }
.arena-stake-amount { font-size: var(--ui-text-sm); color: var(--ui-muted); }
.arena-stake-amount output { display: inline-flex; align-items: center; gap: var(--ui-space-1); font: 900 var(--ui-text-action)/1.2 var(--ui-font-display); color: var(--ui-text); font-variant-numeric: tabular-nums; }
.arena-stake-amount output .ui-icon { width: 20px; height: 20px; }
.arena-stake-bounds { color: var(--ui-muted); font-size: var(--ui-text-sm); }
.arena-stake-range {
  display: block; width: 100%; min-width: 0; height: var(--ui-touch); margin: 0;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  appearance: none; -webkit-appearance: none; touch-action: pan-y;
}
.arena-stake-range::-webkit-slider-runnable-track {
  height: 12px; border: 2px solid var(--ui-ink); border-radius: var(--ui-radius-panel);
  background: linear-gradient(to right, var(--ui-gold) var(--stake-progress), var(--ui-panel) var(--stake-progress));
  box-shadow: inset 0 2px #031b42;
}
.arena-stake-range::-moz-range-track {
  height: 8px; border: 2px solid var(--ui-ink); border-radius: var(--ui-radius-panel);
  background: linear-gradient(to right, var(--ui-gold) var(--stake-progress), var(--ui-panel) var(--stake-progress));
  box-shadow: inset 0 2px #031b42;
}
.arena-stake-range::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px;
  border: var(--ui-border); border-radius: 50%; background: var(--ui-face-gold); box-shadow: var(--ui-bevel-gold);
}
.arena-stake-range::-moz-range-thumb {
  width: 24px; height: 24px; border: var(--ui-border); border-radius: 50%;
  background: var(--ui-face-gold); box-shadow: var(--ui-bevel-gold);
}
.arena-stake-range:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; border-radius: var(--ui-radius-panel); }
.arena-stake-range:disabled { cursor: default; opacity: .6; }
.arena-quote-status { margin-block: var(--ui-space-2); }
.arena-quote-status .ui-button { margin-top: var(--ui-space-2); }
.arena-risk.ui-panel { padding: var(--ui-space-2); }
.arena-risk > div { flex-wrap: wrap; gap: var(--ui-space-1) var(--ui-space-2); }
.arena-risk strong { margin-left: auto; }
.arena-risk p { margin-top: var(--ui-space-2); }
.arena-home .arena-fight { margin: var(--ui-space-3) 0 0; }
.arena-support > .ui-icon { width: 28px; height: 28px; margin-top: 2px; }
.arena-presence { color: var(--ui-muted); font-size: var(--ui-text-sm); }
.arena-presence .status-dot { background: var(--ui-success); box-shadow: none; }
.arena-section-title { flex-wrap: wrap; gap: var(--ui-space-2); }
.arena-section-title > .ui-title { font-size: var(--ui-text-title); }
.arena-section-title > small { color: var(--ui-muted); font-size: var(--ui-text-sm); }
.arena-home .help-card { margin-top: var(--ui-space-6); }
.arena-home .help-card summary {
  min-height: var(--ui-touch);
  padding-block: var(--ui-space-2);
  color: var(--ui-text);
  font: 800 var(--ui-text-lg)/1.4 var(--ui-font-display);
}
.help-card summary > .ui-icon { width: 22px; height: 22px; margin-inline: var(--ui-space-1) var(--ui-space-2); vertical-align: middle; }
.arena-home .help-card p { line-height: var(--ui-leading-body); }

/* The existing first-free action still precedes the scene on onboarding. */
.hero.arena-scene::before { content: none; }
.first-fight h2 { font-size: var(--ui-text-title); margin-block: var(--ui-space-3); }
.first-fight .eyebrow { color: var(--ui-muted); font-size: var(--ui-text-xs); }
.first-fight p { color: var(--ui-muted); }
.first-fight small { font-size: var(--ui-text-sm); }
.mode-card.online.ui-panel { background: var(--ui-face-panel); }
.mode-card.online > .arena-help-toggle { top: var(--ui-space-2); right: var(--ui-space-2); }
.mode-card h3 { font-size: var(--ui-text-title); }
.mode-card .mode-icon { background: none; width: 36px; height: 36px; font-size: 32px; }
.mode-card .mode-index { color: var(--ui-muted); opacity: .5; }
.wager-disclosure > span { flex-wrap: wrap; }
.wager-disclosure strong { margin-left: auto; }

.queue-card.ui-panel { padding: var(--ui-space-6); }
.queue-card .radar { width: 76px; height: 76px; margin-bottom: var(--ui-space-4); font-size: 40px; }
.queue-card .radar::before, .queue-card .radar::after { content: none; }
.queue-card p { font-size: var(--ui-text-body); line-height: var(--ui-leading-body); }
.queue-card .queue-time { font-size: var(--ui-text-lg); }
.arena-queue-heading .eyebrow { font-size: var(--ui-text-xs); }
.arena-history-empty { font-size: var(--ui-text-sm); }
.arena-history-empty > span { display: block; color: var(--ui-text); }
.history-list.ui-panel { padding: 0; }
.history-row { flex-wrap: wrap; padding: var(--ui-space-3); gap: var(--ui-space-2); background: none; border-color: var(--ui-ink); }
.history-row .history-mark { width: 32px; height: 32px; padding: var(--ui-space-1); display: grid; place-items: center; }
.history-row .history-mark .ui-icon { width: 22px; height: 22px; }
.history-detail { min-width: 80px; }
.history-detail strong { font-size: var(--ui-text-sm); }
.history-detail span, .arena-play .history-detail span { font-size: var(--ui-text-sm); }
.history-reward { margin-left: auto; font-size: var(--ui-text-sm); }

/* Preserve the existing short-screen setup density and its reachable action. */
:root[data-compact-arena="true"] .arena-home .arena-scene { min-height: 176px; padding-block: var(--ui-space-3); margin-bottom: var(--ui-space-2); }
:root[data-compact-arena="true"] .arena-scene .arena-nameplate { font-size: var(--ui-text-title); padding-block: 6px; }
:root[data-compact-arena="true"] .arena-scene .arena-fighter-stats { padding-block: var(--ui-space-2); }
:root[data-compact-arena="true"] .arena-setup .ui-section-title { padding-block: 0; font-size: var(--ui-text-action); }
:root[data-compact-arena="true"] .arena-modes { margin-top: var(--ui-space-1); }
:root[data-compact-arena="true"] .arena-risk.ui-panel { padding-block: 0; margin-block: var(--ui-space-1); }
:root[data-compact-arena="true"] .arena-returning .stake-heading { margin-block: var(--ui-space-1); }
:root[data-compact-arena="true"] .arena-returning .wallet { padding: 0 var(--ui-space-1); }
:root[data-compact-arena="true"] .arena-returning .currency-icon .ui-icon { width: 19px; height: 19px; }
@media (max-width: 370px) {
  .arena-modes .arena-mode-button { padding: var(--ui-space-2); }
  .arena-mode-title { font-size: var(--ui-text-sm); }
}
@media (max-width: 335px) {
  .arena-scene .arena-nameplate { font-size: var(--ui-text-title); padding-left: 24px; }
  .arena-scene .arena-fighter-stats { padding-left: 24px; }
}
