:root {
  color-scheme: dark;
  --body: #0c0d12;
  --panel: #14151c;
  --line: #292b37;
  --text: #f4f4f8;
  --muted: #9699ad;
  --gold: #ffd35a;
  --blue: #55e2fa;
  --red: #ff6b96;
  --numbers: "Aptos Mono", "SFMono-Regular", Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--body);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: radial-gradient(ellipse at 35% 0%, #1c1a264f 0, transparent 57%), var(--body);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, p { margin: 0; }
.wrap { width: min(1200px, calc(100% - 88px)); margin-inline: auto; }
.topbar { background: #0e0f15e8; border-bottom: 1px solid #262631; }
.topbar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark, .header-actions, .wallet, .utility { display: flex; align-items: center; }
.wordmark { gap: 12px; flex: none; }
.wordmark strong { font-size: 1.06rem; line-height: 1.15; letter-spacing: .045em; text-transform: uppercase; }
.brand-mark {
  width: 38px;
  height: 38px;
  position: relative;
  flex: none;
  border-radius: 9px;
  color: #191408;
  background: var(--gold);
  box-shadow: inset 0 1px 0 #fff3bc, 0 3px 16px #ffd35a20;
}
.brand-mark i { position: absolute; top: 9px; left: 17px; width: 4px; height: 21px; border-radius: 4px; background: currentColor; transform: rotate(43deg); }
.brand-mark i:nth-child(2) { transform: rotate(-43deg); }
.brand-mark i::after { content: ""; position: absolute; width: 12px; height: 3px; left: -4px; bottom: 5px; border-radius: 3px; background: currentColor; }
.header-actions { gap: 9px; }
.utility {
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171821;
  color: #cbcede;
  font-size: .875rem;
  transition: background .16s, border-color .16s, color .16s;
}
.utility:hover { background: #242531; border-color: #495065; color: white; }
.question-mark { display: grid; place-items: center; border: 1px solid currentColor; width: 15px; height: 15px; border-radius: 50%; font: 700 .68rem/1 var(--numbers); }
.sound-button { width: 38px; padding: 0; }
.sound-button[aria-pressed="true"] { color: var(--gold); }
.sound-icon { position: relative; display: block; width: 18px; height: 18px; }
.sound-icon i { position: absolute; top: 3px; left: 1px; width: 11px; height: 12px; background: currentColor; clip-path: polygon(0 30%, 37% 30%, 84% 0, 84% 100%, 37% 70%, 0 70%); }
.sound-icon b { position: absolute; right: 0; width: 8px; height: 8px; top: 5px; }
.sound-icon b::before, .sound-icon b::after { content: ""; position: absolute; display: block; }
.sound-icon b::before { top: 4px; width: 8px; height: 1px; background: currentColor; transform: rotate(45deg); }
.sound-icon b::after { top: 4px; width: 8px; height: 1px; background: currentColor; transform: rotate(-45deg); }
.sound-button[aria-pressed="true"] .sound-icon b { border: 1px solid currentColor; border-left: 0; border-top-color: transparent; border-bottom-color: transparent; border-radius: 50%; right: 2px; top: 3px; height: 12px; }
.sound-button[aria-pressed="true"] .sound-icon b::before, .sound-button[aria-pressed="true"] .sound-icon b::after { display: none; }
.wallet-details { position: relative; }
.wallet {
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #584825;
  border-radius: 8px;
  color: var(--gold);
  background: #241e17;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.wallet::-webkit-details-marker { display: none; }
.wallet:hover, .wallet-details[open] .wallet { border-color: #907442; }
.wallet-breakdown { position: absolute; inset: calc(100% + 7px) 0 auto auto; z-index: 5; display: grid; gap: 5px; min-width: max-content; padding: 11px 13px; font-size: .82rem; color: #d8c59e; background: #201b18; border: 1px solid #645130; border-radius: 7px; box-shadow: 0 7px 22px #05050b91; }
.wallet-breakdown strong { color: var(--gold); font: 800 .93rem/1.25 var(--numbers); white-space: nowrap; }
.coin { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 1px solid #f7c85a; border-radius: 50%; font: 800 .72rem/1 var(--numbers); background: #61491b; }
.wallet strong { font: 800 1.06rem/1 var(--numbers); }
.wallet-unit { font-size: .78rem; color: #e9ca8a; }
.intro { padding-block: 29px 22px; }
.intro h1 { font-size: clamp(2.3rem, 4vw, 3.6rem); letter-spacing: -.075em; font-weight: 900; line-height: 1.13; }
.intro h1 span { color: var(--gold); }
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 376px;
  grid-template-areas: 'arena roster' 'arena bet';
  grid-template-rows: auto 1fr;
  gap: 12px 18px;
  align-items: start;
}
.arena-panel, .roster-panel, .bet-panel, .history-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 18px 47px #05050b47; min-width: 0; }
.arena-panel { grid-area: arena; overflow: hidden; }
.bet-panel { grid-area: bet; }
.roster-panel { grid-area: roster; padding: 12px; }
.opponent-preview { display: flex; align-items: center; gap: 8px; min-height: 49px; padding: 3px 9px 3px 3px; margin-bottom: 7px; border: 1px solid #503042; border-radius: 7px; background: linear-gradient(105deg, #321e30, #201927); }
#lineup-opponent-portrait { display: block; flex: none; width: 54px; height: 39px; }
.opponent-preview > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.opponent-caption { color: #c8aec0; font-size: .72rem; font-weight: 700; }
#lineup-opponent-name { color: #ffc2d3; font-size: .93rem; font-weight: 800; }
.fighter-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.fighter-option {
  position: relative;
  min-width: 0;
  min-height: 79px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: center;
  align-items: center;
  gap: 2px;
  padding: 3px 1px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: radial-gradient(ellipse at 50% 52%, #22273b, #181a25 76%);
  color: #e0e2ec;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.fighter-option:hover:not(:disabled) { color: white; border-color: #575e78; }
.fighter-option[aria-pressed="true"], .fighter-option[aria-pressed="true"]:hover { border-color: #b79349; background: radial-gradient(ellipse at 50% 52%, #42341d, #282215 80%); color: #ffe49a; }
.fighter-portrait { display: block; width: 100%; height: 43px; pointer-events: none; }
.fighter-option-name { align-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fighter-accent, currentColor); font-size: .68rem; line-height: 1.1; font-weight: 750; }
.fighter-option-odds { color: #f0eef6; font: 800 .87rem/1.15 var(--numbers); }
.fighter-option[aria-pressed="true"] .fighter-option-odds { color: var(--gold); }
.arena-heading, .arena-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-inline: 19px; }
.arena-heading { min-height: 54px; border-bottom: 1px solid #313245; }
.arena-heading > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.arena-heading h2, .history-heading h2 { font-size: 1rem; font-weight: 750; letter-spacing: .055em; }
.live-light { width: 8px; height: 8px; background: #48d7ed; border-radius: 50%; box-shadow: 0 0 12px #41dcef99; }
.round-label { font-size: .83rem; color: #adb1c8; }
.round-label b { color: var(--text); font: 700 .95rem/1 var(--numbers); }
.stage {
  aspect-ratio: 1.9;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 52% 50%, #262350, #111223 55%, #090a11);
}
#arena { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.fighter-hud {
  position: absolute;
  inset: 16px 19px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  pointer-events: none;
}
.fighter { min-width: 0; --fighter-color: var(--blue); }
.fighter.opponent { --fighter-color: var(--red); text-align: right; }
.fighter-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding-inline: 2px; }
.opponent .fighter-top { flex-direction: row-reverse; }
.fighter-name { font-weight: 850; color: var(--fighter-color); font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 8px #0a0a15; }
.fighter-hp { color: #f5f2fc; font: 700 .82rem/1 var(--numbers); }
.health-track { margin-block: 7px 5px; height: 8px; padding: 1px; background: #2b2b43; border-radius: 3px; border: 1px solid #60627777; display: flex; overflow: hidden; }
.health-track span { width: 100%; border-radius: 1px; background: var(--fighter-color); box-shadow: 0 0 12px var(--fighter-color); transition: width .18s ease; }
.opponent .health-track { justify-content: flex-end; }
.versus {
  align-self: start;
  display: grid;
  place-items: center;
  min-height: 37px;
  margin-top: 2px;
  background: #161522ed;
  color: var(--gold);
  border: 1px solid #5f4e32;
  border-radius: 5px;
  font: italic 900 1.13rem/1 var(--numbers);
}
.arena-footer { min-height: 43px; border-top: 1px solid #2b2d3b; }
.round-status { display: inline-flex; gap: 8px; align-items: center; color: #b5b8cb; font-size: .81rem; }
.round-status i { width: 6px; height: 6px; border-radius: 50%; background: #ffd35a; flex: none; }
.is-fighting .round-status i { box-shadow: 0 0 10px var(--gold); animation: blink .9s ease-in-out infinite alternate; }
@keyframes blink { to { opacity: .35; } }
.result-float {
  --result-accent: var(--gold);
  position: absolute;
  inset: auto 12px 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  width: max-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  padding: 7px 12px;
  text-align: center;
  background: #191824f5;
  border: 1px solid #816739;
  border-radius: 8px;
  box-shadow: 0 4px 18px #03040a8c;
  pointer-events: none;
  animation: result-rise .24s ease-out both;
}
.result-float[data-outcome="loss"] { --result-accent: var(--red); border-color: #8d4a61; }
#result-title { max-width: 100%; color: var(--result-accent); font: 850 clamp(1rem, 2.3vw, 1.35rem)/1.2 var(--numbers); overflow-wrap: anywhere; }
#result-detail { max-width: 100%; color: #ddd9e5; font-size: .82rem; line-height: 1.25; overflow-wrap: anywhere; }
@keyframes result-rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.result-float[data-outcome="win"] {
  --result-accent: #fff0b2;
  --reward-size: clamp(3.05rem, 8.6vw, 4.75rem);
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  justify-items: center;
  gap: 3px;
  width: min(88%, 30rem);
  margin: 0;
  padding: 8px 18px 10px;
  border-color: #f9d78cb0 transparent #f0b342a6;
  border-radius: 3px;
  background: linear-gradient(90deg, #33210f14, #3f2b15ee 18%, #21180df4 52%, #3f2b15ee 82%, #33210f14);
  box-shadow: inset 0 1px #ffebbb38, 0 0 38px #ffb94342;
  animation: reward-rise .48s cubic-bezier(.22,.65,.33,1) both;
}
.reward-banner-label, .reward-aura { display: none; }
.result-float[data-outcome="win"] .reward-banner-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffe29b;
  font: 900 .82rem/1 var(--numbers);
  letter-spacing: .27em;
  text-transform: uppercase;
}
.reward-banner-label::before, .reward-banner-label::after {
  content: '';
  width: 23px;
  height: 1px;
  background: #ffcf6b9c;
  box-shadow: 0 0 7px #ffbc4da1;
}
.result-float[data-outcome="win"] #result-title {
  font-size: var(--reward-size);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.06em;
  text-shadow: 0 2px 0 #a66520, 0 0 17px #ffcb59bd, 0 0 3px #fff6d8;
}
.result-float[data-outcome="win"] #result-title.long-reward { font-size: clamp(1rem, 2.6vw, 1.45rem); letter-spacing: -.01em; }
@supports (width: 1cqi) {
  .result-float[data-outcome="win"] #result-title,
  .result-float[data-outcome="win"] #result-title.long-reward {
    font-size: min(var(--reward-size), var(--reward-fit, var(--reward-size)));
    white-space: nowrap;
  }
}
.result-float[data-outcome="win"] #result-detail { color: #ffe5be; font-size: .82rem; }
.result-float[data-outcome="win"] .reward-aura { display: block; position: absolute; inset: 0; z-index: -1; }
.reward-aura::before, .reward-aura::after { content: ''; position: absolute; }
.reward-aura::before {
  inset: -44px -36px;
  background: repeating-conic-gradient(from 9deg, transparent 0deg 11deg, #ffcc6354 12deg 17deg, transparent 18deg 32deg);
  mask-image: radial-gradient(ellipse, transparent 19%, #000 42%, transparent 72%);
  animation: reward-flare .72s ease-out both;
}
.reward-aura::after {
  inset: -7px -15px;
  border: 1px solid #ffda81bf;
  border-radius: 50%;
  box-shadow: 0 0 16px #ffa63361, inset 0 0 12px #ffca6047;
  animation: reward-ring .66s cubic-bezier(.2,.64,.28,1) both;
}
.reward-burst { display: none; position: absolute; left: 50%; top: 48%; }
.result-float[data-outcome="win"] .reward-burst { display: block; }
.reward-burst i {
  --spark-x: 55cqi;
  --spark-y: -12px;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #ffe7a1;
  opacity: 0;
  box-shadow: 0 0 8px #ffba46;
  animation: reward-spark .78s cubic-bezier(.14,.66,.32,1) both;
}
.reward-burst i:nth-child(2) { --spark-x: -54cqi; --spark-y: -20px; animation-delay: .035s; }
.reward-burst i:nth-child(3) { --spark-x: 33cqi; --spark-y: -57px; width: 5px; height: 5px; animation-delay: .04s; }
.reward-burst i:nth-child(4) { --spark-x: -33cqi; --spark-y: -49px; width: 5px; height: 5px; }
.reward-burst i:nth-child(5) { --spark-x: 59cqi; --spark-y: 24px; width: 4px; height: 4px; animation-delay: .045s; }
.reward-burst i:nth-child(6) { --spark-x: -58cqi; --spark-y: 29px; width: 5px; height: 5px; animation-delay: .11s; }
.reward-burst i:nth-child(7) { --spark-x: 26cqi; --spark-y: 56px; width: 4px; height: 7px; animation-delay: .015s; }
.reward-burst i:nth-child(8) { --spark-x: -29cqi; --spark-y: 57px; width: 4px; height: 8px; animation-delay: .08s; }
.reward-burst i:nth-child(9) { --spark-x: 48cqi; --spark-y: -58px; width: 8px; height: 3px; animation-delay: .09s; }
.reward-burst i:nth-child(10) { --spark-x: -45cqi; --spark-y: -64px; width: 9px; height: 3px; animation-delay: .12s; }
@keyframes reward-rise {
  0% { transform: scale(.67); opacity: .48; }
  51% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes reward-ring {
  0% { transform: scale(.58); opacity: .15; }
  24% { opacity: .85; }
  100% { transform: scale(1.21); opacity: 0; }
}
@keyframes reward-flare {
  0% { transform: scale(.68); opacity: .15; }
  27% { opacity: .84; }
  100% { transform: scale(1.26); opacity: 0; }
}
@keyframes reward-spark {
  0% { transform: translate(calc(var(--spark-x) * .28), calc(var(--spark-y) * .28)) rotate(45deg) scale(.55); opacity: 0; }
  21% { opacity: 1; }
  100% { transform: translate(var(--spark-x), var(--spark-y)) rotate(105deg) scale(.24); opacity: 0; }
}
#reward-flight { position: fixed; inset: 0; z-index: 9; overflow: hidden; pointer-events: none; }
.reward-coin {
  position: absolute;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  translate: -50% -50%;
  border: 1px solid #fff0b4;
  border-radius: 50%;
  color: #4e3109;
  background: #ffdc71;
  box-shadow: inset 0 0 0 2px #b4822c, 0 0 11px #ffc354bf;
  font: 850 .68rem/1 var(--numbers);
}
.wallet.wallet-earned { animation: wallet-reward .48s ease-out both; }
@keyframes wallet-reward {
  25% { border-color: #ffe298; box-shadow: 0 0 0 3px #ffd35a30, 0 0 19px #ffd35a63; }
  100% { box-shadow: 0 0 0 6px #ffd35a00, 0 0 24px #ffd35a00; }
}
.bet-panel { padding: 18px; }
.bet-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.bet-heading h2 { font-size: 1.13rem; font-weight: 830; letter-spacing: .025em; }
.bet-multiplier { flex: none; margin-inline-start: auto; padding: 5px 8px; color: var(--gold); border: 1px solid #64512c; border-radius: 5px; background: #2f2618; font: 800 .89rem/1 var(--numbers); }
.ticket-icon { width: 19px; height: 15px; flex: none; position: relative; border: 1.5px solid var(--gold); border-radius: 3px; }
.ticket-icon::before { content: ""; position: absolute; width: 1px; height: 9px; left: 6px; top: 2px; border-left: 1px dashed var(--gold); }
.ticket-icon::after { content: ""; display: block; position: absolute; width: 4px; height: 4px; border: 1px solid var(--gold); transform: rotate(45deg); top: 4px; right: 2px; }
.stake-label { display: block; margin-block: 14px 7px; font-size: .875rem; color: #e7e8f1; font-weight: 680; }
.stake-field { display: flex; align-items: center; border: 1px solid #343544; background: #101118; border-radius: 8px; }
.stake-field:focus-within { border-color: #e0b94f; }
#stake { flex: 1; width: 1px; padding: 9px 11px; min-height: 38px; border: 0; background: transparent; color: var(--text); outline: 0; appearance: textfield; }
#stake::-webkit-inner-spin-button, #stake::-webkit-outer-spin-button { appearance: none; margin: 0; }
#stake::placeholder { color: #9396ab; font-size: .875rem; }
.stake-unit { padding-right: 11px; color: #9296ad; font-size: .81rem; }
.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.presets button { min-height: 29px; padding: 1px; border: 1px solid #303140; border-radius: 5px; background: #1c1d28; color: #d1d3e0; font-size: .82rem; font-weight: 650; transition: border-color .16s, color .16s, background .16s; }
.presets button:hover:not(:disabled), .presets button[aria-pressed="true"] { border-color: #8d723b; background: #2b251a; color: var(--gold); }
.repeat-control, .repeat-count-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.repeat-control { min-height: 34px; margin-top: 8px; }
.repeat-count-field { flex: 1; }
.repeat-count-field label { color: #e7e8f1; font-size: .875rem; font-weight: 680; }
.repeat-select { position: relative; }
.repeat-select::after { content: ''; position: absolute; top: calc(50% - 4px); right: 12px; width: 6px; height: 6px; border: solid #abb0c6; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
#repeat-count { appearance: none; min-height: 31px; min-width: 112px; padding: 4px 26px 4px 10px; border: 1px solid #383b4b; border-radius: 6px; background: #191b26; color: #e3e4ed; font-family: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; }
#repeat-count:hover:enabled { border-color: #8d723b; }
#repeat-status { color: #e8d3a1; font-size: .82rem; line-height: 1.25; }
#repeat-stop { min-height: 31px; padding: 4px 12px; border: 1px solid #79516a; border-radius: 6px; background: #2c2030; color: #ffd5e2; font-size: .82rem; font-weight: 740; }
#repeat-stop:hover:enabled { border-color: #b07492; background: #41283b; }
#repeat-stop:disabled { opacity: .65; }
.repeat-control:has(#repeat-stop:not([hidden])) .repeat-count-field { display: none; }
.stake-error { color: #ff9ab3; font-size: .82rem; margin-top: 7px; line-height: 1.5; }
.payout-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 8px; min-width: 0; margin-block: 12px 9px; color: #cbcede; font-size: .875rem; }
.payout-line small { font-size: .75rem; color: #9399af; margin-left: 3px; }
.payout-line strong { color: var(--gold); font: 800 1rem/1.3 var(--numbers); text-align: right; overflow-wrap: anywhere; }
#fight-button {
  min-height: 44px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px solid #ffdc76;
  border-radius: 8px;
  color: #1b1509;
  font-weight: 900;
  background: linear-gradient(180deg, #ffdc74, #f8c844);
  letter-spacing: .035em;
  box-shadow: 0 3px 0 #967022, 0 8px 20px #e9b94122;
  transition: filter .16s, transform .16s;
}
#fight-button:hover:not(:disabled) { filter: brightness(1.13); transform: translateY(-1px); }
#fight-button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #967022; }
#fight-button:disabled { filter: saturate(.55); opacity: .78; }
.fight-bolt { display: inline-block; width: 13px; height: 19px; background: currentColor; clip-path: polygon(54% 0, 100% 0, 60% 42%, 99% 42%, 28% 100%, 45% 55%, 7% 55%); }
.restart { border: 1px solid #67583c; border-radius: 7px; background: #292319; color: var(--gold); width: 100%; margin-top: 12px; min-height: 37px; font-size: .88rem; font-weight: 700; }
.restart:hover { background: #3b301d; }
.history-panel { margin-top: 17px; overflow: hidden; }
.history-heading { min-height: 50px; display: flex; align-items: center; gap: 9px; padding-inline: 19px; border-bottom: 1px solid var(--line); }
.history-icon { position: relative; width: 16px; height: 16px; border: 1px solid #c2c6d9; border-radius: 50%; }
.history-icon::before { content: ""; position: absolute; width: 5px; height: 5px; left: 6px; top: 3px; border-left: 1px solid #c2c6d9; border-bottom: 1px solid #c2c6d9; }
.history-empty { display: grid; grid-template-columns: 33px auto; grid-template-rows: auto auto; column-gap: 10px; justify-content: center; align-items: center; padding: 18px 15px; }
.empty-icon { grid-row: span 2; width: 33px; height: 33px; display: grid; place-items: center; color: #9297af; border: 1px solid #333746; background: #1b1d29; border-radius: 7px; }
.empty-icon span { width: 13px; height: 15px; border: 1px solid; border-radius: 2px; background: linear-gradient(currentColor, currentColor) center 5px / 6px 1px no-repeat, linear-gradient(currentColor, currentColor) center 8px / 6px 1px no-repeat; }
.history-empty p { font-size: .88rem; color: #d6d9e8; font-weight: 650; }
.history-empty > span { font-size: .79rem; color: var(--muted); margin-top: 3px; }
.history-columns, .history-row { display: grid; grid-template-columns: .8fr 1.35fr 1fr .8fr 1fr; align-items: center; gap: 7px; padding: 12px 19px; min-height: 44px; color: #c9cbd9; font-size: .875rem; }
.history-columns { color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--line); }
.history-columns:has(+ #history-list[hidden]) { display: none; }
.history-columns span:last-child { text-align: right; }
.history-row + .history-row { border-top: 1px solid var(--line); }
.history-row .history-net { text-align: right; font: 750 .91rem/1.2 var(--numbers); }
.history-mode { display: grid; gap: 2px; min-width: 0; }
.history-fighter { font-weight: 750; color: var(--text); white-space: nowrap; }
.history-row .win { color: var(--blue); }
.history-row .loss { color: #ff839e; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 15px 0 22px; color: #969ab0; font-size: .77rem; text-align: center; }
.site-footer .utility { height: 31px; font-size: .78rem; }
#rules-dialog { width: min(470px, calc(100% - 34px)); border: 1px solid #414356; border-radius: 14px; background: #191a25; color: var(--text); padding: 21px; box-shadow: 0 20px 60px #050509be; }
#rules-dialog::backdrop { background: #0a0a13b9; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-heading h2 { font-size: 1.28rem; }
.dialog-heading button { font-size: 1.5rem; }
#rules-dialog ol { margin-bottom: 0; padding-left: 1.4em; color: #d0d0df; }
#rules-dialog li { margin-top: .6em; padding-left: .2em; line-height: 1.65; }
#rules-dialog li::marker { color: var(--gold); font-weight: 700; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 54px); }
  .game-grid { grid-template-columns: minmax(0, 1fr) 346px; }
  .stage { aspect-ratio: 1.72; }
}
@media (max-width: 800px) {
  .wrap { width: min(560px, calc(100% - 32px)); }
  .game-grid { grid-template-columns: 1fr; grid-template-areas: 'roster' 'arena' 'bet'; grid-template-rows: auto; gap: 12px; }
  .intro { padding-block: 18px 14px; }
  .topbar-inner { min-height: 63px; }
  .stage { aspect-ratio: 1.85; }
  .history-panel { margin-top: 14px; }
}
@media (max-width: 440px) {
  .wrap { width: calc(100% - 24px); }
  .topbar-inner { min-height: 54px; gap: 8px; }
  .header-actions { gap: 5px; }
  .wordmark { gap: 7px; }
  .wordmark strong { font-size: .92rem; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark i { top: 5px; left: 14px; }
  .utility { height: 34px; }
  .sound-button { width: 34px; }
  .rules-button { padding-inline: 8px; gap: 4px; }
  .wallet { min-height: 34px; padding-inline: 7px; gap: 5px; }
  .wallet-unit { display: none; }
  .intro { padding-block: 13px 12px; }
  .intro h1 { font-size: 2rem; }
  .roster-panel { padding: 8px; }
  .opponent-preview { min-height: 39px; margin-bottom: 6px; }
  #lineup-opponent-portrait { width: 45px; height: 31px; }
  .fighter-option { min-height: 66px; }
  .fighter-portrait { height: 33px; }
  .arena-heading, .arena-footer { padding-inline: 13px; }
  .arena-heading { display: none; }
  .arena-footer { min-height: 31px; }
  .fighter-hud { inset: 10px 12px auto; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 7px; }
  .fighter-name { font-size: .83rem; }
  .fighter-hp { font-size: .73rem; }
  .versus { min-height: 29px; font-size: .84rem; }
  .result-float[data-outcome="win"] { top: 58%; gap: 2px; padding: 4px 10px 6px; }
  .result-float[data-outcome="win"] .reward-banner-label { font-size: .66rem; }
  .result-float[data-outcome="win"] #result-detail { font-size: .75rem; }
  .bet-panel { padding: 13px; }
  .bet-heading { margin-bottom: 9px; }
  .stake-label { margin-block: 10px 5px; }
  .presets button { min-height: 34px; }
  .payout-line { margin-block: 9px 7px; }
  .history-columns, .history-row { padding-inline: 11px; font-size: .76rem; }
  .history-row .history-net { font-size: .79rem; }
  .history-stake, .history-net { overflow-wrap: anywhere; }
}
@media (max-width: 335px) {
  .coin, .rules-button .question-mark { display: none; }
  .wordmark strong { font-size: .82rem; letter-spacing: .02em; }
  .wallet strong { font-size: .93rem; }
}
@media (max-width: 440px) and (max-height: 720px) {
  .topbar-inner { min-height: 48px; }
  main.wrap { padding-top: 8px; }
  .intro { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .stage { aspect-ratio: 2.29; }
  .game-grid { gap: 8px; }
  .arena-footer { min-height: 28px; }
  .bet-panel { padding: 10px; }
  .bet-heading { margin-bottom: 6px; }
  #bet-form { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  #bet-form > :not(.stake-label, .payout-line) { grid-column: 1 / -1; }
  .stake-label, .payout-line { grid-row: 1; margin-block: 8px 5px; }
  .stake-label { grid-column: 1; align-self: center; }
  .payout-line { grid-column: 2; justify-content: end; }
  #fight-button { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .result-float[data-outcome="win"] { animation: none; }
  .result-float[data-outcome="win"] .reward-aura, .result-float[data-outcome="win"] .reward-burst, #reward-flight { display: none; }
  .wallet.wallet-earned { border-color: #ffe298; box-shadow: 0 0 10px #ffd35a45; animation: none; }
}
