/* Permanent game field. Selection and play controls never become a result menu. */
.sp-game {
  --sg-panel-height: 252px;
  --sg-accent: #ff7048;
  --sg-muted: #b8b1c0;
  --sg-green: #a7ebc3;
  --sg-red: #ffafa0;
  width: 100%;
  height: var(--game-panel-height, var(--sg-panel-height));
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid #534047;
  border-radius: 16px 16px 0 0;
  background: #171319;
  color: #faf4ee;
  font-size: 16px;
  line-height: 1.25;
}
.sp-game, .sp-game * { box-sizing: border-box; }
.sp-game [hidden] { display: none !important; }
.sp-game button { min-width: 44px; min-height: 44px; font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sp-game button:disabled { cursor: default; opacity: .38; }
.sp-game button:focus-visible { outline: 2px solid #ffe0b8; outline-offset: -3px; }
.sp-game h2, .sp-game h3, .sp-game p { margin: 0; }
.sp-game svg { width: 21px; height: 21px; flex-shrink: 0; pointer-events: none; }
.sp-game-header { height: 50px; min-height: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 3px 6px; }
.sp-game-picker { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.sp-game-tab { height: 44px; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; border: 1px solid transparent; border-radius: 10px; background: #29212b; color: #b6abba; }
.sp-game-tab svg { width: 20px; height: 20px; }
.sp-game-tab span { font-size: 14px; line-height: 1.1; font-weight: 650; }
.sp-game-tab[aria-selected="true"] { color: #ffddb9; border-color: #c6895c; background: linear-gradient(180deg,#59382c,#402a28); box-shadow: inset 0 1px 0 #ffe1b51a; }
.sp-game-tab:active:not(:disabled) { background: #654132; }
.sp-game-tab:disabled { opacity: .42; }
.sp-game-header-actions { display: flex; flex-shrink: 0; }
.sp-game-icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 10px; padding: 0; background: transparent; color: #c4b9c6; }
.sp-game-icon-button:active, .sp-game-icon-button[aria-expanded="true"] { background: #ffffff0b; color: #fff4e4; }
.sp-game-body { min-width: 0; min-height: 0; flex: 1; position: relative; display: flex; flex-direction: column; gap: 7px; padding: 3px 10px 9px; }
.sp-game-field { min-width: 0; min-height: 70px; flex: 1; position: relative; overflow: hidden; background: #0d0f17; border: 1px solid #302b39; border-radius: 12px; }
.sp-game-canvas { display: block; position: absolute; width: 100%; min-width: 0; min-height: 0; }
.sp-game-field-note { position: absolute; z-index: 1; font-size: 14px; line-height: 16px; color: #b9afc5; pointer-events: none; }
.sp-game-plinko-note { top: 28px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 8px; }
.sp-game-plinko-note > span { white-space: nowrap; }
.sp-game-rocket-note { top: 8px; left: 10px; }
.sp-game-btc-note { left: 8px; top: 47px; text-shadow: 0 1px 5px #0d0f17; }
.sp-game-field-line { position: absolute; z-index: 1; top: 4px; left: 8px; right: 8px; height: 22px; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--sg-muted); font-size: 14px; line-height: 1.2; font-variant-numeric: tabular-nums; pointer-events: none; }
.sp-game-field-line > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-game-field-line > b { flex-shrink: 0; font-size: 14px; font-weight: 650; color: #f6ddbb; white-space: nowrap; }
.sp-game-field-line > b:empty { display: none; }
.sp-game-field[data-tone="win"] .sp-game-field-line > b { color: var(--sg-green); }
.sp-game-field[data-tone="loss"] .sp-game-field-line > b { color: var(--sg-red); }
.sp-game-field-plinko { background: radial-gradient(ellipse at 50% 32%,#211b2e 0%,#11101a 70%); }
.sp-game-field-plinko .sp-game-canvas { top: 26px; bottom: 28px; height: calc(100% - 54px); }
.sp-game-bins { position: absolute; left: 0; right: 0; bottom: 4px; height: 24px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 0; }
.sp-game-bins > span { min-width: 0; height: 24px; margin: 0 2px; display: flex; align-items: center; justify-content: center; border: 1px solid #8b6ca64d; border-radius: 5px; background: #352840; color: #e8caf4; font-size: 14px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-game-bins > [data-level="medium"] { background: #61332d; color: #ffd6ba; border-color: #b77a5c66; }
.sp-game-bins > [data-level="high"] { background: #995139; color: #fff1c8; border-color: #e9a67470; }
.sp-game-bins > .is-hit { color: #2b170d; background: #ffe2a5; border-color: #fff3d0; box-shadow: 0 0 11px #ffba6740; }
.sp-game-field-crash { background: #11162b; border-color: #3c344d; }
.sp-game-field-crash .sp-game-canvas { inset: 0; height: 100%; }
.sp-game-flight-number { position: absolute; top: 29px; left: 51%; right: 10px; text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sp-game-flight-number small { color: #c8bdcc; font-size: 14px; line-height: 1.1; }
.sp-game-flight-number strong { color: #ffe3b6; font-size: 38px; line-height: 1; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px #060509; }
.sp-game-flight-result { top: auto; bottom: 4px; left: 8px; background: linear-gradient(90deg,#11152300,#111523bb 30%); text-shadow: 0 1px 4px #080b13; }
.sp-game-field-crash[data-tone="win"] .sp-game-flight-number strong { color: #b4f2d0; }
.sp-game-field-btc { background: linear-gradient(180deg,#171820,#0f1118); }
.sp-game-price-row { position: absolute; inset: 6px 8px auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 54px; gap: 6px; }
.sp-game-price-row > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-game-price-row small { font-size: 14px; line-height: 1.1; color: var(--sg-muted); }
.sp-game-price-row b { font-size: 15px; line-height: 1.1; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-game-price-row [data-direction="up"] { color: var(--sg-green); }
.sp-game-price-row [data-direction="down"] { color: var(--sg-red); }
.sp-game-clock { align-items: flex-end; }
.sp-game-clock strong { font-size: 20px; line-height: 1; font-weight: 700; color: #ffdab3; font-variant-numeric: tabular-nums; }
.sp-game-field-btc .sp-game-canvas { top: 46px; bottom: 25px; height: calc(100% - 71px); }
.sp-game-btc-result { top: auto; bottom: 3px; font-size: 14px; }
.sp-game-controls { min-width: 0; flex-shrink: 0; display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 8px; height: 48px; }
.sp-game-choices { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(44px,1fr)); gap: 4px; }
.sp-game-choice { min-width: 44px; height: 48px; min-height: 48px !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 3px 2px; border: 1px solid #44333e; border-radius: 9px; background: #29212b; color: #e7dce7; }
.sp-game-choice b { font-size: 16px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-game-choice small { font-size: 14px; line-height: 1.1; color: #c5b9c7; }
.sp-game-choice[aria-pressed="true"] { border-color: #ffb382; background: #573321; color: #fff2d4; box-shadow: inset 0 0 0 1px #ffac7040; }
.sp-game-choice[aria-pressed="true"] small { color: #ffe2bc; }
.sp-game-choice:active:not(:disabled) { background: #6c3b24; }
.sp-game-primary { min-width: 0; height: 48px; min-height: 48px !important; width: 100%; padding: 4px 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid #ffab78; border-radius: 10px; background: linear-gradient(180deg,#ff9464,#ff7048); color: #27130d; box-shadow: inset 0 1px 0 #ffd8a63d; }
.sp-game-primary b { max-width: 100%; font-size: 16px; line-height: 1.15; font-weight: 750; white-space: nowrap; }
.sp-game-primary small { font-size: 14px; line-height: 1.1; font-weight: 600; white-space: nowrap; }
.sp-game-primary:active:not(:disabled) { background: #ffaf79; }
.sp-game-primary[data-game-action="cashout"] { background: linear-gradient(180deg,#b4efc9,#80d6a9); border-color: #c7f8d7; color: #10271c; }
.sp-game-directions { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(44px,1fr)); gap: 4px; }
.sp-game-direction { min-width: 44px; height: 48px; min-height: 48px !important; padding: 4px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 1px solid #4b584e; border-radius: 9px; font-size: 16px; }
.sp-game-direction b { font-size: 16px; line-height: 1.1; font-weight: 700; }
.sp-game-direction small { font-size: 14px; line-height: 1.1; white-space: nowrap; }
.sp-game-up { background: #214433; border-color: #508567; color: #c8f4d8; }
.sp-game-down { background: #4d2b30; border-color: #97605e; color: #ffd4ca; }
.sp-game-direction[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; opacity: .7; }
.sp-game-message:not(.sp-game-sr) { position: absolute; z-index: 2; top: 47px; left: 16px; right: 16px; padding: 5px 7px; border: 1px solid #86664d; border-radius: 7px; background: #251c28f5; color: #ffddba; font-size: 14px; line-height: 1.15; box-shadow: 0 2px 8px #0005; }
.sp-game-help { position: absolute; z-index: 4; inset: 50px 0 0; padding: 10px 12px; overflow-y: auto; overscroll-behavior: contain; background: #211923; outline: none; }
.sp-game-help h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.sp-game-help p { font-size: 16px; line-height: 1.4; margin-bottom: 10px; color: #e8dde9; }
.sp-game-help .sp-game-help-note { font-size: 14px; color: var(--sg-muted); }
.sp-game-help > button { margin-top: 7px; }
.sp-game-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* The same games expand into a dedicated screen without changing their state. */
.sp-game[data-mode="standalone"] { height: 100%; flex: 1; border: 0; border-radius: 0; background: #151119; }
.sp-game[data-mode="standalone"] .sp-game-header { height: 64px; min-height: 64px; padding: 4px 10px; gap: 8px; }
.sp-game[data-mode="standalone"] .sp-game-picker { gap: 6px; }
.sp-game[data-mode="standalone"] .sp-game-tab { height: 56px; gap: 3px; border-radius: 12px; }
.sp-game[data-mode="standalone"] .sp-game-tab svg { width: 24px; height: 24px; }
.sp-game[data-mode="standalone"] .sp-game-tab span { font-size: 16px; }
.sp-game[data-mode="standalone"] .sp-game-body { gap: 12px; padding: 6px 12px 12px; }
.sp-game[data-mode="standalone"] .sp-game-field { border-radius: 18px; }
.sp-game[data-mode="standalone"] .sp-game-controls { height: 60px; grid-template-columns: 148px minmax(0,1fr); gap: 10px; }
.sp-game[data-mode="standalone"] .sp-game-choice,
.sp-game[data-mode="standalone"] .sp-game-primary,
.sp-game[data-mode="standalone"] .sp-game-direction { height: 60px; }
.sp-game[data-mode="standalone"] .sp-game-choice b { font-size: 20px; }
.sp-game[data-mode="standalone"] .sp-game-primary b { font-size: 18px; }
.sp-game[data-mode="standalone"] .sp-game-field-line { left: 12px; right: 12px; top: 12px; }
.sp-game[data-mode="standalone"] .sp-game-plinko-note { left: 12px; right: 12px; top: 40px; }
.sp-game[data-mode="standalone"] .sp-game-field-plinko .sp-game-canvas { top: 40px; bottom: 44px; height: calc(100% - 84px); }
.sp-game[data-mode="standalone"] .sp-game-bins { bottom: 8px; height: 32px; }
.sp-game[data-mode="standalone"] .sp-game-bins > span { height: 32px; }
.sp-game[data-mode="standalone"] .sp-game-rocket-note { top: 16px; left: 16px; }
.sp-game[data-mode="standalone"] .sp-game-flight-number { left: 12px; right: 12px; top: 48px; gap: 8px; }
.sp-game[data-mode="standalone"] .sp-game-flight-number strong { font-size: 60px; letter-spacing: -2px; }
.sp-game[data-mode="standalone"] .sp-game-flight-number small { font-size: 16px; }
.sp-game[data-mode="standalone"] .sp-game-flight-result,
.sp-game[data-mode="standalone"] .sp-game-btc-result { top: auto; bottom: 12px; }
.sp-game[data-mode="standalone"] .sp-game-price-row { inset: 14px 12px auto; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 60px; gap: 10px; }
.sp-game[data-mode="standalone"] .sp-game-price-row b { font-size: 16px; }
.sp-game[data-mode="standalone"] .sp-game-clock strong { font-size: 24px; }
.sp-game[data-mode="standalone"] .sp-game-btc-note { left: 12px; top: 64px; }
.sp-game[data-mode="standalone"] .sp-game-field-btc .sp-game-canvas { top: 88px; bottom: 44px; height: calc(100% - 132px); }
.sp-game[data-mode="standalone"] .sp-game-help { inset: 64px 0 0; padding: 20px; }

@media (max-height: 620px) {
  .sp-game { --sg-panel-height: 236px; }
  .sp-game-body { gap: 6px; padding-top: 2px; padding-bottom: 8px; }
  .sp-game-flight-number { top: 27px; }
  .sp-game-flight-number strong { font-size: 34px; }
  .sp-game[data-mode="standalone"] .sp-game-flight-number { top: 43px; gap: 5px; }
  .sp-game[data-mode="standalone"] .sp-game-flight-number strong { font-size: 48px; }
}
@media (max-width: 350px) {
  .sp-game-header { padding-left: 6px; gap: 3px; }
  .sp-game-picker { gap: 3px; }
  .sp-game-controls { gap: 6px; }
  .sp-game-primary b { font-size: 15px; }
  .sp-game-price-row { gap: 5px; }
  .sp-game-price-row b { font-size: 14px; }
  .sp-game-bins > span { margin-left: 1px; margin-right: 1px; }
  .sp-game-field-line { left: 6px; right: 6px; gap: 5px; }
  .sp-game[data-mode="standalone"] .sp-game-header { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .sp-game[data-mode="standalone"] .sp-game-tab span { font-size: 14px; }
  .sp-game[data-mode="standalone"] .sp-game-body { padding-left: 10px; padding-right: 10px; }
  .sp-game[data-mode="standalone"] .sp-game-controls { grid-template-columns: 140px minmax(0,1fr); gap: 6px; }
  .sp-game[data-mode="standalone"] .sp-game-primary b { font-size: 15px; }
  .sp-game[data-mode="standalone"] .sp-game-price-row { gap: 5px; }
  .sp-game[data-mode="standalone"] .sp-game-price-row b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-game *, .sp-game *::before, .sp-game *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* BTC facts stay readable in the dock as well as on the full Games screen. */
.sp-game[data-kind="btc"][data-mode="dock"] { height:360px; }
.sp-game-field-btc { display:flex;flex-direction:column;gap:4px;padding:8px;min-height:0; }
.sp-btc-meta { display:flex;justify-content:space-between;flex-wrap:wrap;gap:2px 8px;color:var(--sg-muted);font-size:12px;line-height:16px; }
.sp-btc-meta time { font-variant-numeric:tabular-nums; }
.sp-btc-quotes { display:flex;justify-content:space-between;gap:12px;align-items:center; }
.sp-btc-quotes > div { display:flex;flex-direction:column;gap:2px;min-width:0; }
.sp-btc-quotes small { font-size:14px;line-height:17px;color:var(--sg-muted); }
.sp-btc-quotes strong { font-size:24px;line-height:28px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.5px; }
.sp-btc-quotes [data-direction="up"] { color:var(--sg-green); }
.sp-btc-quotes [data-direction="down"] { color:var(--sg-red); }
.sp-game-clock[data-urgent="true"] strong { color:var(--sg-red); }
.sp-btc-reference { display:flex;justify-content:space-between;gap:8px;font-size:14px;line-height:18px;color:var(--sg-muted);font-variant-numeric:tabular-nums; }
.sp-btc-reference b { color:#eee3e9;font-weight:600; }
.sp-btc-chart { flex:1;min-height:16px;position:relative; }
.sp-game-field-btc .sp-btc-chart .sp-game-canvas { inset:0;height:100%; }
.sp-btc-summary { flex-shrink:0;display:grid;gap:3px; }
.sp-btc-summary > strong { font-size:16px;line-height:20px;font-weight:650;color:#ffdbb6; }
.sp-btc-summary > p { font-size:14px;line-height:17px;color:#e0d7e1;overflow-wrap:anywhere; }
.sp-btc-accounting { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:3px;padding-top:5px;border-top:1px solid #ffffff16; }
.sp-btc-accounting > div { display:flex;flex-direction:column;gap:1px;min-width:0; }
.sp-btc-accounting small { color:var(--sg-muted);font-size:14px;line-height:17px; }
.sp-btc-accounting b { font-size:16px;line-height:18px;font-variant-numeric:tabular-nums; }
.sp-game-field-btc[data-tone="win"] .sp-btc-summary > strong,
.sp-game-field-btc[data-tone="win"] [data-game-net] { color:var(--sg-green); }
.sp-game-field-btc[data-tone="loss"] .sp-btc-summary > strong,
.sp-game-field-btc[data-tone="loss"] [data-game-net] { color:var(--sg-red); }
.sp-game[data-kind="btc"][data-mode="standalone"] .sp-game-field-btc { padding:14px;gap:8px; }
.sp-game[data-kind="btc"][data-mode="standalone"] .sp-btc-quotes strong { font-size:28px;line-height:32px; }
@media (max-height:620px) {
  .sp-game[data-kind="btc"][data-mode="dock"] { height:340px; }
  .sp-game[data-kind="btc"][data-mode="dock"] .sp-game-field-btc { padding:6px;gap:3px; }
  .sp-game[data-kind="btc"][data-mode="dock"] .sp-btc-chart { min-height:8px; }
}
