:root {
  color-scheme: dark;
  --bg: #111925;
  --bg-soft: #162235;
  --surface: #1b2a3e;
  --surface-2: #22354c;
  --surface-3: #293e55;
  --inset: #121e2c;
  --line: #3b536c;
  --line-strong: #607c92;
  --text: #f3f4ef;
  --muted: #aab8c7;
  --muted-2: #788da2;
  --ember: #e76545;
  --ember-light: #ff9470;
  --gold: #ffd06f;
  --teal: #55d1c1;
  --blue: #79a8ed;
  --rose: #ee7890;
  --good: #a5d9a3;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: auto; }
body {
  min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--text);
  background: radial-gradient(ellipse at 50% -18%, #263e58 0%, transparent 48%), var(--bg);
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }

.topbar {
  min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px max(14px, calc((100vw - 1180px)/2));
  background: #18263a; border-bottom: 1px solid #3b526a; box-shadow: 0 3px 14px rgba(0,0,0,.22);
}
.brand-area, .brand { display: flex; align-items: center; }
.brand-area { gap: 10px; min-width: 0; }
.back-button {
  width: 40px; height: 40px; flex: 0 0 40px; color: #f4f5ef; background: #293c53;
  border: 1px solid #5d7891; border-radius: 8px; font-size: 26px; line-height: 1;
}
.back-button:hover { background: #354e69; border-color: var(--teal); }
.brand { gap: 5px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  border: 1px solid #9b8657;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #43503c, #273429 72%, #202c24);
  box-shadow: inset 0 1px 4px rgba(255,255,255,.09);
}
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-copy { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-copy strong { font-size: 14px; font-weight: 950; letter-spacing: .2em; }
.brand-copy small { color: #ffb18e; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.wallet {
  min-width: 162px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 9px;
  padding: 7px 11px; background: #24364c; border: 1px solid #5e7992; border-radius: 7px;
  font-variant-numeric: tabular-nums;
}
.wallet-caption { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.wallet strong { grid-column: 1; grid-row: 2; font-size: 17px; font-weight: 900; }
.wallet small { grid-column: 2; grid-row: 2; color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .05em; }

.utility-bar {
  width: min(1180px, calc(100% - 28px)); min-height: 44px; margin: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(117,145,170,.25);
}
.utility-label { display: flex; align-items: center; gap: 8px; min-width: 0; color: #b7c4d0; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.utility-led { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(85,209,193,.10); }
#modeBadge[data-mode="offline"] { color: #ff9a84; }
#modeBadge[data-mode="account"] { color: var(--teal); }
.utility-label:has(#modeBadge[data-mode="offline"]) .utility-led { background: var(--ember); }
.utility-actions { display: flex; align-items: center; gap: 7px; }
.utility-button {
  min-width: 88px; min-height: 36px; padding: 0 10px; color: #e0e8ed; background: #293d54;
  border: 1px solid #58728b; border-radius: 7px; font-size: 9px; font-weight: 900; letter-spacing: .07em;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.utility-button:hover { background: #354d67; border-color: var(--teal); }
.utility-button:active { transform: translateY(1px); }
.utility-button.square { min-width: 40px; width: 40px; min-height: 36px; padding: 0; font-size: 18px; }
.utility-button.is-active { color: #fff0d0; border-color: #d49b64; background: #493a39; }

.app-shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 11px 0 20px; }
.game-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 1px 8px; }
.eyebrow { color: var(--gold); font-size: 8px; font-weight: 950; letter-spacing: .2em; }
h1 { margin: 3px 0 0; color: #f7f4ed; font-size: clamp(19px, 2.7vw, 26px); font-weight: 950; letter-spacing: .12em; }
h1 span { color: var(--ember-light); font-size: .72em; }
.field-meta { display: flex; align-items: center; gap: 8px; color: #bdcbd6; font-size: 8px; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.field-meta b { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.game-card {
  padding: 8px; background: #1a2a3c; border: 1px solid #637e95; border-radius: 10px;
  box-shadow: 0 9px 25px rgba(0,0,0,.27), inset 0 1px rgba(255,255,255,.06);
}
.board-topline, .board-footline {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 4px 7px; color: #b8c9d8; font-size: 8px; font-weight: 900; letter-spacing: .14em;
}
.board-footline { padding: 7px 4px 1px; color: #88a0b5; font-size: 7px; letter-spacing: .1em; }
.board-live { display: flex; align-items: center; gap: 6px; color: var(--teal); }
.board-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.board-frame {
  width: 100%; overflow: hidden; border: 1px solid #55718a; border-radius: 7px;
  background-color: #152337;
  background-image: linear-gradient(rgba(178,204,224,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178,204,224,.03) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 10%, #263e55 0%, #17283b 65%, #142235 100%);
  background-size: 18px 18px, 18px 18px, auto;
  box-shadow: inset 0 0 0 4px rgba(6,14,25,.24);
}
.board-svg { width: 100%; height: clamp(360px, 54vh, 590px); display: block; overflow: hidden; }
.svg-frame { fill: none; stroke: rgba(162,194,211,.3); stroke-width: 1; }
.svg-rail { fill: none; stroke: #ffad69; stroke-width: 1.5; opacity: .8; }
.entry-outer { fill: #101c2b; stroke: #e58c5f; stroke-width: 3; }
.entry-inner { fill: #080e19; stroke: #6b8297; stroke-width: 2; }
.peg-dot { fill: url(#pegMetal); stroke: #c9f1e7; stroke-width: .8; filter: drop-shadow(0 1px 2px rgba(0,0,0,.65)); }
.slot-cell { stroke-width: 1.1; }
.slot-low { fill: #344f79; stroke: #7395c8; }
.slot-mid { fill: #236d70; stroke: #63c7b8; }
.slot-high { fill: #80552e; stroke: #e6b45e; }
.slot-jackpot { fill: #873c4a; stroke: #f08c75; }
.slot-edge { stroke-width: 1.5; }
.slot-center { stroke-width: 2; }
.slot-cell.slot-win { fill: #ffe08d; stroke: #fff4d1; stroke-width: 2; filter: drop-shadow(0 0 7px rgba(255,207,111,.28)); }
.slot-label { fill: #f4f1e7; font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; font-weight: 950; letter-spacing: -.3px; pointer-events: none; }
.path-trace { fill: none; stroke: #ffd16f; stroke-width: 2.2; opacity: .76; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.moving-ball-glow { fill: #ff9b57; opacity: 0; filter: url(#ballShadow); pointer-events: none; }
.moving-ball { fill: url(#ballCore); stroke: #fff1cb; stroke-width: 1.1; opacity: 0; filter: drop-shadow(0 2px 5px rgba(0,0,0,.5)); pointer-events: none; }

.control-stack { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; margin-top: 8px; }
.bet-panel { padding: 10px 11px; background: #1d2d40; border: 1px solid #536e85; border-radius: 8px; }
.bet-main-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,.52fr); align-items: stretch; gap: 9px; }
.bet-field { min-width: 0; min-height: 53px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; background: #121f30; border: 1px solid #5c7891; border-radius: 6px; }
.field-label { color: var(--gold); font-size: 8px; font-weight: 950; letter-spacing: .13em; white-space: nowrap; }
.bet-entry { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.bet-entry input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: #fff8e9; background: transparent; text-align: right; font-size: 23px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bet-entry small { color: var(--teal); font-size: 8px; font-weight: 900; white-space: nowrap; }
.drop-button {
  min-height: 53px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 13px;
  color: #fff8ed; background: #d9573d; border: 1px solid #ff9871; border-radius: 6px;
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 3px 0 #792f2e;
  text-align: left; transition: background .13s ease, transform .1s ease;
}
.drop-button:hover:not(:disabled) { background: #ed6b48; border-color: #ffc09b; }
.drop-button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.drop-button:disabled { color: #a6b0b8; background: #36475a; border-color: #5a6c7d; box-shadow: none; }
.drop-icon { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border: 1px solid rgba(255,245,225,.55); border-radius: 50%; }
.drop-icon i { width: 0; height: 0; margin-left: 2px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid #fff5e6; }
.drop-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.drop-copy strong { font-size: 10px; font-weight: 950; letter-spacing: .08em; white-space: nowrap; }
.drop-copy small { color: rgba(255,245,231,.78); font-size: 7px; font-weight: 850; letter-spacing: .1em; white-space: nowrap; }
.drop-arrow { margin-left: auto; color: rgba(255,245,231,.85); font-size: 23px; line-height: 1; }
.bet-bottom-row { min-height: 31px; display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.quick-label, .bet-limits { color: #94a7b8; font-size: 7px; font-weight: 900; letter-spacing: .1em; white-space: nowrap; }
.quick-bets { display: flex; align-items: center; gap: 5px; }
.quick-bets button { min-width: 42px; height: 27px; padding: 0 9px; color: #edf4f0; background: #2c465b; border: 1px solid #5f8299; border-radius: 5px; font-size: 9px; font-weight: 900; }
.quick-bets button:hover:not(:disabled) { background: #365c70; border-color: var(--teal); }
.bet-limits { margin-left: auto; }
.bet-limits b { color: var(--gold); }

.config-panel { padding: 7px 10px; background: #18283b; border: 1px solid #455f77; border-radius: 7px; }
.config-row { display: grid; grid-template-columns: 100px minmax(0,1fr); align-items: center; gap: 10px; min-height: 37px; }
.config-divider { height: 1px; margin: 4px 0; background: rgba(147,177,199,.18); }
.config-label { display: flex; align-items: center; gap: 8px; }
.config-label span { color: #f0a66e; font-size: 8px; font-weight: 950; }
.config-label strong { color: #d3e0e8; font-size: 9px; letter-spacing: .1em; }
.config-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; min-width: 0; }
.config-options button { min-width: 0; height: 32px; padding: 0 6px; color: #dce8ed; background: #2b4054; border: 1px solid #58748a; border-radius: 5px; font-size: 9px; font-weight: 900; white-space: nowrap; }
.config-options button:hover:not(:disabled) { border-color: var(--teal); background: #35536a; }
.config-options button.is-active { color: #10232c; background: var(--teal); border-color: #a0f0e2; box-shadow: inset 0 1px rgba(255,255,255,.35); }
.config-options button:disabled, .quick-bets button:disabled { opacity: .55; }

.round-status { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 57px; padding: 9px 12px; background: #152338; border: 1px solid #3e5871; border-radius: 7px; }
.status-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.status-indicator { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #8ca9be; }
.round-status[data-tone="error"] .status-indicator { background: var(--ember-light); }
.round-status[data-tone="win"] .status-indicator { background: var(--teal); }
.round-status[data-tone="active"] .status-indicator { background: var(--gold); }
#statusText { display: block; color: #f0cf83; font-size: 9px; font-weight: 950; letter-spacing: .1em; }
#statusDetail { margin: 3px 0 0; color: #b1c0cb; font-size: 9px; line-height: 1.35; }
#statusText[data-tone="error"] { color: #ff9e89; }
.round-result { display: flex; flex-direction: column; align-items: end; gap: 3px; text-align: right; }
.round-result strong { color: var(--gold); font-size: 19px; font-weight: 950; }
.round-result span { color: #8fa4b5; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.retry-button { grid-column: 1 / -1; min-height: 36px; color: #fff0e8; background: #8e3d3d; border: 1px solid #d17a6a; border-radius: 5px; font-size: 9px; font-weight: 950; letter-spacing: .08em; }

.lower-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 8px; margin-top: 9px; }
.info-panel, .history-panel { min-width: 0; padding: 11px; background: #1a293c; border: 1px solid #405b73; border-radius: 7px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(139,171,194,.2); color: #f0cf83; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.panel-heading small { color: #8ba1b5; font-size: 7px; letter-spacing: .06em; }
.info-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 8px; padding: 11px 0 7px; }
.info-values div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.info-values span { color: #91a5b7; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.info-values strong { color: #e8edf0; font-size: 12px; font-weight: 900; }
.history-list { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; }
.history-empty { padding: 12px 4px; color: #9bafbd; font-size: 9px; line-height: 1.45; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px; background: #263b50; border: 1px solid #425f78; border-radius: 5px; font-size: 8px; }
.history-result { color: #c1d2dc; }
.history-row strong { color: #ff9d83; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-row strong.is-positive { color: #71dfc9; }

.settings-dialog { width: min(420px, calc(100% - 28px)); padding: 18px; color: var(--text); background: #1d2d42; border: 1px solid #718da1; border-radius: 9px; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.settings-dialog::backdrop { background: rgba(4,8,15,.74); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dialog-head h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: .1em; }
.dialog-head button { width: 36px; height: 36px; color: #f2f4ed; background: #344b62; border: 1px solid #71889b; border-radius: 5px; font-size: 22px; }
.sound-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #40576b; border-bottom: 1px solid #40576b; }
.sound-setting span { display: flex; flex-direction: column; gap: 5px; }
.sound-setting strong { font-size: 11px; }
.sound-setting small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.sound-setting input { width: 20px; height: 20px; accent-color: var(--teal); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(420px, calc(100% - 28px)); padding: 11px 14px; color: #f5f3eb; background: #263a50; border: 1px solid #7590a5; border-radius: 6px; box-shadow: 0 8px 25px rgba(0,0,0,.35); font-size: 10px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .16s ease, transform .16s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { border-color: #d87863; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (min-width: 900px) {
  .app-shell { padding-top: 16px; }
  .game-card { padding: 10px; }
  .board-svg { height: min(62vh, 640px); }
}
@media (max-width: 700px) {
  .topbar { min-height: 58px; padding: 7px 10px; gap: 8px; }
  .brand-area { gap: 8px; }
  .back-button { width: 34px; height: 34px; flex-basis: 34px; font-size: 23px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 7px; }
  .wallet { min-width: 132px; padding: 6px 8px; gap: 1px 6px; }
  .wallet strong { font-size: 14px; }
  .wallet small { font-size: 7px; }
  .utility-bar { width: calc(100% - 20px); min-height: 39px; }
  .utility-actions { gap: 5px; }
  .utility-button { min-width: 75px; min-height: 32px; padding: 0 7px; font-size: 8px; }
  .utility-button.square { min-width: 36px; width: 36px; min-height: 32px; font-size: 16px; }
  .app-shell { width: calc(100% - 14px); padding-top: 7px; }
  .game-heading { margin-bottom: 6px; }
  .eyebrow { font-size: 7px; }
  h1 { font-size: 19px; }
  .field-meta { gap: 5px; font-size: 7px; letter-spacing: .025em; }
  .game-card { padding: 5px; }
  .board-svg { height: clamp(360px, 50svh, 445px); }
  .board-topline { padding-bottom: 5px; }
  .board-footline { padding-top: 5px; }
  .control-stack { margin-top: 6px; gap: 5px; }
  .bet-panel { padding: 8px; }
  .bet-main-row { grid-template-columns: minmax(0,1fr) minmax(142px,.82fr); gap: 6px; }
  .bet-field { min-height: 47px; padding: 6px 8px; gap: 4px; }
  .field-label { font-size: 7px; letter-spacing: .06em; }
  .bet-entry { gap: 4px; }
  .bet-entry input { font-size: 19px; }
  .bet-entry small { font-size: 7px; }
  .drop-button { min-height: 47px; gap: 7px; padding: 0 7px; }
  .drop-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .drop-copy strong { font-size: 9px; letter-spacing: .025em; }
  .drop-copy small { font-size: 6px; letter-spacing: .03em; }
  .drop-arrow { font-size: 18px; }
  .bet-bottom-row { min-height: 28px; gap: 7px; padding-top: 6px; }
  .quick-label, .bet-limits { font-size: 6px; letter-spacing: .04em; }
  .quick-bets { gap: 4px; }
  .quick-bets button { min-width: 36px; height: 26px; padding: 0 6px; font-size: 8px; }
  .config-panel { padding: 5px 8px; }
  .config-row { grid-template-columns: 70px minmax(0,1fr); gap: 6px; min-height: 33px; }
  .config-label { gap: 5px; }
  .config-label span { font-size: 7px; }
  .config-label strong { font-size: 8px; letter-spacing: .04em; }
  .config-options { gap: 4px; }
  .config-options button { height: 29px; padding: 0 3px; font-size: 8px; }
  .round-status { min-height: 50px; padding: 7px 9px; }
  #statusText { font-size: 8px; }
  #statusDetail { font-size: 8px; }
  .round-result strong { font-size: 16px; }
  .lower-grid { grid-template-columns: 1fr; gap: 6px; margin-top: 7px; }
  .info-panel, .history-panel { padding: 9px; }
}
@media (max-width: 370px) {
  .wallet { min-width: 120px; }
  .brand-copy strong { font-size: 11px; }
  .utility-button { min-width: 68px; }
  .bet-main-row { grid-template-columns: minmax(0,1fr) minmax(128px,.82fr); }
  .drop-copy strong { font-size: 8px; }
  .config-row { grid-template-columns: 62px minmax(0,1fr); gap: 4px; }
  .config-options button { font-size: 7px; padding: 0 1px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* PHOENIX FORGE 1.1.1 — matte mechanical cabinet finish */
.board-frame {
  background: #10191f;
  background-image: none;
  border-color: #77684e;
  box-shadow:
    inset 0 0 0 1px rgba(224, 195, 139, .055),
    inset 0 14px 28px rgba(0, 0, 0, .24);
}
.svg-frame {
  stroke: rgba(190, 167, 124, .24);
}
.svg-rail {
  stroke: #b99460;
  opacity: .72;
}
.entry-housing {
  fill: #1b282d;
  stroke: #b18a53;
  stroke-width: 1.8;
}
.entry-aperture {
  fill: #070d11;
  stroke: #d3ad70;
  stroke-width: 1.3;
}
.entry-fastener {
  fill: #c7a36b;
  stroke: #493b29;
  stroke-width: .7;
}
.entry-outer {
  fill: #141f23;
  stroke: #c29b61;
  stroke-width: 2.6;
}
.entry-inner {
  fill: #070e12;
  stroke: #806743;
  stroke-width: 1.8;
}
.slot-label {
  fill: #fff3db;
  font-weight: 900;
  letter-spacing: -.45px;
}
@media (max-width: 700px) {
  .slot-label { letter-spacing: -.55px; }
  .board-frame { border-radius: 8px; }
}

    
/* PHOENIX FORGE BRAND ICON */
.brand-logo-icon {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 34px;
}

@media(max-width:700px) {
  .brand-logo-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }
}

/* PHOENIX FORGE — refined brand icon sizing */
.brand-logo-icon {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px !important;
  object-fit: contain;
  display: block;
  margin: 0;
}

.brand {
  gap: 11px;
  min-width: 0;
}

@media (max-width: 700px) {
  .brand-logo-icon {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
  }
}

@media (max-width: 370px) {
  .brand-logo-icon {
    width: 33px !important;
    height: 33px !important;
    flex-basis: 33px !important;
  }
}

/* PHOENIX ARCADE PLINKO — BRAND LOCKUP V2 */

.brand {
  gap: 6px !important;
}

.brand-mark {
  width: 37px !important;
  height: 37px !important;
  flex: 0 0 37px !important;
}

.brand-copy {
  gap: 1px !important;
  line-height: 1.05 !important;
}

.brand-copy strong {
  font-size: 17px !important;
  letter-spacing: .17em !important;
  line-height: 1.05 !important;
}

.brand-copy small {
  font-size: 10px !important;
  letter-spacing: .15em !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

@media(max-width:700px) {
  .brand {
    gap: 5px !important;
  }

  .brand-mark {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }

  .brand-copy strong {
    font-size: 15px !important;
  }

  .brand-copy small {
    font-size: 9px !important;
    letter-spacing: .11em !important;
  }
}

@media(max-width:360px) {
  .brand-copy strong {
    font-size: 13px !important;
  }

  .brand-copy small {
    font-size: 8px !important;
  }
}

/* PHOENIX BRAND ICON — ENLARGED */
.brand-mark {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  flex: 0 0 46px !important;
  padding: 7px !important;
  gap: 3px !important;
  border-radius: 6px !important;
}

.brand-mark i {
  width: 7px !important;
}

.brand-mark i:nth-child(1) { height: 14px !important; }
.brand-mark i:nth-child(2) { height: 27px !important; }
.brand-mark i:nth-child(3) { height: 19px !important; }

@media(max-width:700px) {
  .brand-mark {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    flex-basis: 42px !important;
    padding: 6px !important;
  }
}

/* PHOENIX BRAND ICON — ENLARGED */
.brand-mark {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  flex: 0 0 46px !important;
  padding: 7px !important;
  gap: 3px !important;
  border-radius: 6px !important;
}

.brand-mark i {
  width: 7px !important;
}

.brand-mark i:nth-child(1) { height: 14px !important; }
.brand-mark i:nth-child(2) { height: 27px !important; }
.brand-mark i:nth-child(3) { height: 19px !important; }

@media(max-width:700px) {
  .brand-mark {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    flex-basis: 42px !important;
    padding: 6px !important;
  }
}

/* PHOENIX ICON — FINAL SIZE */
.brand-area .brand-mark {
  width: 51px !important;
  height: 51px !important;
  min-width: 51px !important;
  flex: 0 0 51px !important;
  padding: 7px !important;
  gap: 4px !important;
}

.brand-area .brand-mark i {
  width: 8px !important;
}

.brand-area .brand-mark i:nth-child(1) { height: 17px !important; }
.brand-area .brand-mark i:nth-child(2) { height: 32px !important; }
.brand-area .brand-mark i:nth-child(3) { height: 23px !important; }

@media(max-width:700px) {
  .brand-area .brand-mark {
    width: 47px !important;
    height: 47px !important;
    min-width: 47px !important;
    flex-basis: 47px !important;
  }
}

/* PHOENIX HEADER ICON — LARGER */
.brand-mark {
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
  padding: 5px !important;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media(max-width:700px) {
  .brand-mark {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
  }
}

/* PHOENIX BRAND ICON — XL */
.brand-mark {
  width: 68px !important;
  height: 68px !important;
  flex: 0 0 68px !important;
  padding: 4px !important;
  border-radius: 8px !important;
}

.brand-mark img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.brand-area {
  gap: 14px !important;
}

@media(max-width:700px) {
  .brand-mark {
    width: 60px !important;
    height: 60px !important;
    flex-basis: 60px !important;
  }
}

/* ACTUAL PHOENIX ICON SIZE FIX */
.brand-mark {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  flex: 0 0 76px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 7px !important;
  overflow: visible !important;
}

.brand-mark i {
  display: block !important;
  width: 11px !important;
  flex: 0 0 11px !important;
  border-radius: 3px 3px 1px 1px !important;
}

.brand-mark i:nth-child(1) {
  height: 25px !important;
}

.brand-mark i:nth-child(2) {
  height: 51px !important;
}

.brand-mark i:nth-child(3) {
  height: 37px !important;
}

@media(max-width:700px) {
  .brand-mark {
    width: 66px !important;
    height: 66px !important;
    min-width: 66px !important;
    flex-basis: 66px !important;
  }

  .brand-mark i {
    width: 10px !important;
    flex-basis: 10px !important;
  }
}

/* PHOENIX ICON — BIGGER */
.brand-mark {
  width: 100px !important;
  height: 100px !important;
  min-width: 100px !important;
  flex: 0 0 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 5px !important;
}

.brand-mark i {
  display: block !important;
  width: 17px !important;
  min-width: 17px !important;
  flex: 0 0 17px !important;
  border-radius: 4px 4px 2px 2px !important;
}

.brand-mark i:nth-child(1) {
  height: 40px !important;
}

.brand-mark i:nth-child(2) {
  height: 76px !important;
}

.brand-mark i:nth-child(3) {
  height: 56px !important;
}

@media(max-width:700px) {
  .brand-mark {
    width: 82px !important;
    height: 82px !important;
    min-width: 82px !important;
    flex-basis: 82px !important;
  }

  .brand-mark i {
    width: 14px !important;
    min-width: 14px !important;
    flex-basis: 14px !important;
  }

  .brand-mark i:nth-child(1) { height: 33px !important; }
  .brand-mark i:nth-child(2) { height: 62px !important; }
  .brand-mark i:nth-child(3) { height: 46px !important; }
}

/* PHOENIX ICON — BIGGER */
.brand-mark {
  width: 100px !important;
  height: 100px !important;
  min-width: 100px !important;
  flex: 0 0 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 5px !important;
}

.brand-mark i {
  display: block !important;
  width: 17px !important;
  min-width: 17px !important;
  flex: 0 0 17px !important;
  border-radius: 4px 4px 2px 2px !important;
}

.brand-mark i:nth-child(1) {
  height: 40px !important;
}

.brand-mark i:nth-child(2) {
  height: 76px !important;
}

.brand-mark i:nth-child(3) {
  height: 56px !important;
}

@media(max-width:700px) {
  .brand-mark {
    width: 82px !important;
    height: 82px !important;
    min-width: 82px !important;
    flex-basis: 82px !important;
  }

  .brand-mark i {
    width: 14px !important;
    min-width: 14px !important;
    flex-basis: 14px !important;
  }

  .brand-mark i:nth-child(1) { height: 33px !important; }
  .brand-mark i:nth-child(2) { height: 62px !important; }
  .brand-mark i:nth-child(3) { height: 46px !important; }
}


/* PHOENIX LOGO — LARGE SIZE */
.brand-mark,
.brand-area img,
.brand img,
.brand-mark img {
  width: 100px !important;
  height: 100px !important;
  min-width: 100px !important;
  flex: 0 0 100px !important;
  object-fit: contain !important;
  max-width: none !important;
  max-height: none !important;
}

@media(max-width:700px) {
  .brand-mark,
  .brand-area img,
  .brand img,
  .brand-mark img {
    width: 84px !important;
    height: 84px !important;
    min-width: 84px !important;
    flex-basis: 84px !important;
  }
}

/* PHOENIX LOGO — FINAL SIZE */
.brand-mark,
.brand-area img,
.brand img,
.brand-mark img {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  flex: 0 0 80px !important;
  object-fit: contain !important;
  max-width: 80px !important;
  max-height: 80px !important;
}

@media(max-width:700px) {
  .brand-mark,
  .brand-area img,
  .brand img,
  .brand-mark img {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    flex-basis: 68px !important;
    max-width: 68px !important;
    max-height: 68px !important;
  }
}


/* PHOENIX LOGO — COMPACT BRAND SPACING */
.brand {
    gap: 2px !important;
    column-gap: 2px !important;
}

.brand .brand-copy {
    margin-left: -9px !important;
}

.brand-area {
    gap: 8px !important;
}

.brand-wrap {
    gap: 8px !important;
}

@media (max-width: 700px) {
    .brand {
        gap: 0 !important;
    }

    .brand .brand-copy {
        margin-left: -8px !important;
    }
}


/* PHOENIX FORGE — CLEAN BOARD HEADER */

.game-heading {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    min-height: 20px !important;
    margin-top: 0 !important;
    margin-bottom: 5px !important;
}

/* Убираем второй заголовок без иконки */
.game-heading > div:first-child {
    display: none !important;
}

/* Ряды и риск остаются справа на одной линии */
.game-heading .field-meta {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: clamp(7px, 1.8vw, 9px) !important;
    overflow: visible !important;
}

/* Немного увеличиваем игровое поле */
@media (min-width: 701px) {
    .board-svg {
        height: min(66vh, 675px) !important;
    }
}

@media (max-width: 700px) {
    .game-heading {
        padding: 0 2px !important;
        margin-bottom: 5px !important;
    }

    .game-heading .field-meta {
        gap: 6px !important;
        font-size: clamp(7px, 1.8vw, 8px) !important;
        letter-spacing: .03em !important;
    }

    .board-svg {
        height: clamp(410px, 58svh, 495px) !important;
    }
}

@media (max-width: 360px) {
    .game-heading .field-meta {
        font-size: 7px !important;
        gap: 4px !important;
    }
}


/* PHOENIX FORGE — CLEAN FOOTER + SLOT LANDING FX v2 */
/* Remove the two low-value captions below the board and the page. */
.board-footline,
.page-footer {
  display: none !important;
}

/* A crisp, short landing cue — no permanent glow or particle clutter. */
.slot-cell {
  transition: fill .18s ease, stroke .18s ease;
}
.slot-cell.slot-win {
  animation: phoenixForgeSlotWinner .86s cubic-bezier(.2,.72,.25,1) both;
}
@keyframes phoenixForgeSlotWinner {
  0%   { fill: #2a3830; stroke: #657366; stroke-width: 1; }
  22%  { fill: #806d49; stroke: #ead5a5; stroke-width: 2.1; }
  55%  { fill: #594d36; stroke: #cfb77e; stroke-width: 1.7; }
  100% { fill: #2f4035; stroke: #8f9b7d; stroke-width: 1.2; }
}
.slot-impact-ring {
  fill: none;
  stroke: #dfc58f;
  stroke-width: 1.8;
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: phoenixForgeSlotRipple .72s cubic-bezier(.12,.62,.28,1) both;
}
@keyframes phoenixForgeSlotRipple {
  0%   { opacity: .88; transform: scale(.45); }
  65%  { opacity: .42; }
  100% { opacity: 0; transform: scale(3.8); }
}
.payout-pop {
  transform-box: border-box;
  transform-origin: center;
  animation: phoenixForgePayoutPop .7s cubic-bezier(.18,.8,.25,1) both;
}
@keyframes phoenixForgePayoutPop {
  0%   { transform: translateY(5px) scale(.88); opacity: .45; }
  55%  { transform: translateY(-2px) scale(1.13); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .slot-cell.slot-win, .slot-impact-ring, .payout-pop { animation: none !important; }
}


/* PHOENIX FORGE — EPIC PHOENIX LANDING FX v3 */
/* Remove the earlier simple ripple treatment, if present. */
.slot-impact-ring { display: none !important; }

/* Epic, short-form landing sequence: ignition, expanding shockwave, phoenix wings and sparks. */
.forge-impact { pointer-events: none; overflow: visible; }
.forge-impact-flash {
  fill: #fff0c0; opacity: 0;
  animation: forgeIgnitionFlash .38s ease-out both;
}
.forge-impact-core {
  fill: #e6b96e; opacity: 0;
  animation: forgeCoreBloom .58s cubic-bezier(.14,.78,.22,1) both;
}
.forge-shockwave {
  fill: none; stroke: #e5c486; stroke-width: 1.7; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: forgeHeavyShockwave .78s cubic-bezier(.08,.62,.2,1) both;
}
.forge-phoenix-wing, .forge-feather {
  fill: none; stroke: #e3bd7e; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; stroke-dasharray: var(--wing-length); stroke-dashoffset: var(--wing-length);
  animation: forgeWingDraw .72s cubic-bezier(.16,.72,.2,1) both;
}
.forge-feather { stroke: #c69a60; stroke-width: 1.35; animation-duration: .62s; }
.forge-spark {
  fill: #f4d9a1; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: forgeSparkLaunch .78s cubic-bezier(.12,.68,.2,1) both;
}
.forge-ember {
  fill: #d77b48; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: forgeEmberLift .92s ease-out both;
}

@keyframes forgeIgnitionFlash {
  0% { opacity: .96; transform: scale(.2); }
  38% { opacity: .9; }
  100% { opacity: 0; transform: scale(4.2); }
}
@keyframes forgeCoreBloom {
  0% { opacity: 0; transform: scale(.25); }
  28% { opacity: .95; }
  100% { opacity: 0; transform: scale(3.4); }
}
@keyframes forgeHeavyShockwave {
  0% { opacity: .92; transform: scale(.24); stroke-width: 2.5; }
  65% { opacity: .55; }
  100% { opacity: 0; transform: scale(4.7); stroke-width: .7; }
}
@keyframes forgeWingDraw {
  0% { opacity: 0; stroke-dashoffset: var(--wing-length); }
  22% { opacity: .98; }
  72% { opacity: .82; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes forgeSparkLaunch {
  0% { opacity: 0; transform: translate(0,0) scale(.3); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--spark-x),var(--spark-y)) scale(.08); }
}
@keyframes forgeEmberLift {
  0% { opacity: 0; transform: translateY(0) scale(.5); }
  25% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-34px) scale(.12); }
}

.slot-cell.slot-win { animation: forgeSlotCharge .95s cubic-bezier(.15,.72,.2,1) both !important; }
.slot-cell.slot-win--rare { animation: forgeSlotRare .95s cubic-bezier(.15,.72,.2,1) both !important; }
.slot-cell.slot-win--phoenix { animation: forgeSlotPhoenix 1.12s cubic-bezier(.15,.72,.2,1) both !important; }
@keyframes forgeSlotCharge {
  0% { fill: #2a3830; stroke: #657366; }
  30% { fill: #9a8153; stroke: #f1d7a5; stroke-width: 2.2; }
  100% { fill: #405343; stroke: #a99a72; stroke-width: 1.15; }
}
@keyframes forgeSlotRare {
  0% { fill: #2a3830; stroke: #657366; }
  28% { fill: #bb8c4b; stroke: #ffe1a6; stroke-width: 2.6; }
  100% { fill: #655137; stroke: #d7b778; stroke-width: 1.5; }
}
@keyframes forgeSlotPhoenix {
  0% { fill: #2a3830; stroke: #657366; }
  24% { fill: #d18a4c; stroke: #fff0bf; stroke-width: 3; }
  58% { fill: #a44e37; stroke: #f0c17d; stroke-width: 2.2; }
  100% { fill: #644335; stroke: #d6a56c; stroke-width: 1.5; }
}
.forge-label-impact { animation: forgeLabelStrike .72s cubic-bezier(.15,.8,.2,1) both; }
@keyframes forgeLabelStrike {
  0% { opacity: .55; transform: scale(.82); }
  42% { opacity: 1; transform: scale(1.23); }
  100% { opacity: 1; transform: scale(1); }
}
.forge-result-reveal { animation: forgeMultiplierReveal .78s cubic-bezier(.16,.84,.2,1) both; }
.forge-result-reveal--rare { color: #e8bd78 !important; }
.forge-result-reveal--phoenix { color: #f0a06b !important; }
@keyframes forgeMultiplierReveal {
  0% { opacity: .25; transform: translateY(10px) scale(.76); filter: brightness(.7); }
  58% { opacity: 1; transform: translateY(-2px) scale(1.16); filter: brightness(1.35); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .forge-impact *, .slot-cell.slot-win, .forge-label-impact, .forge-result-reveal { animation: none !important; }
}
