:root {
  color-scheme: dark;
  --reel-back: #121714;
  --reel-screen: #0a0d0b;
  --reel-panel: #202621;
  --reel-control: #303a32;
  --reel-ink: #f3f6f2;
  --reel-muted: #a5b1a8;
  --reel-green: #c0ed9b;
  --reel-depth: #161d17;
  --reel-radius: 12px;
  --reel-width: min(calc(100vw - 168px), 460px, 59dvh);
  --reel-height: calc(100dvh - 36px);
  --reel-frame-radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: var(--reel-back); color: var(--reel-ink); }
button, a { -webkit-tap-highlight-color: transparent; }
:is(button, a):focus-visible { outline: 2px solid var(--reel-green); outline-offset: 4px; }

.reel-layout { height: 100dvh; display: grid; place-items: center; position: relative; }
.reel-phone {
  position: relative; width: var(--reel-width); height: var(--reel-height);
  background: var(--reel-screen); overflow: hidden; border-radius: var(--reel-frame-radius);
  box-shadow: 0 0 0 1px #fff2, 0 20px 80px #0008; isolation: isolate;
}
.reel-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.reel-deck, .reel-slide, .reel-cover, .reel-start { position: absolute; inset: 0; }
.reel-deck { will-change: transform; }
.reel-slide { transform: translate3d(0, var(--reel-offset, 0%), 0); }
.reel-deck[data-settling] :is(.reel-frame, .reel-poster-details button) { pointer-events: none; }
.reel-slide:not([data-active]) { pointer-events: none; }
.reel-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.reel-slide:not([data-state="ready"]) .reel-frame { pointer-events: none; }
.reel-cover {
  display: grid; place-items: center; z-index: 1; pointer-events: none;
  opacity: 1; background: var(--reel-screen);
  transition: opacity 240ms ease, visibility 240ms;
}
.reel-poster { position: relative; width: min(240px, calc(100% - 32px), 45dvh); }
.reel-poster .game-art { border-radius: var(--ui-button-radius); background: var(--reel-panel); font-weight: 700; }
.reel-poster .game-art > span:not(.poster-viewport) { padding: 12px; }
.reel-poster-details { position: absolute; inset: calc(100% + 12px) 0 auto; text-align: center; }
.reel-poster-details p { color: var(--reel-muted); margin: 0; font-size: 13px; }
.reel-poster-details button { pointer-events: auto; margin-top: 10px; padding-inline: 14px; }
.reel-slide:not([data-active]) .reel-cover { transition: none; }
.reel-slide[data-state="ready"] .reel-cover { opacity: 0; visibility: hidden; }
.reel-start { display: grid; gap: 12px; place-content: center; text-align: center; color: var(--reel-muted); padding: 18px; }
.reel-announcement { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
.reel-button {
  cursor: pointer; border: 0; border-radius: var(--reel-radius); min-height: 40px; background: var(--reel-control);
  color: var(--reel-ink); padding: 0 11px; font: inherit; font-weight: 700;
  box-shadow: 0 3px 0 var(--reel-depth); touch-action: manipulation;
}
.reel-button:hover:not(:disabled) { background-color: var(--reel-control-hover, #3e4b40); }
.reel-button[data-button-pressed] { box-shadow: 0 0 0 var(--reel-depth); }
.reel-button:disabled { opacity: .45; cursor: default; }
.reel-connect {
  position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-transform: uppercase; font-size: 12.1px;
  min-height: 38px; border: 0; border-radius: 100px; padding-inline: 17px; background: #69ae55; color: #101810;
  font-weight: 700; line-height: 1.3; white-space: nowrap;
  --reel-control-hover: #79bc64;
  --reel-depth: #416e36; box-shadow: 0 3px 0 var(--reel-depth), 0 6px 14px #00000033;
}
.reel-connect[data-button-pressed] { box-shadow: 0 1px 0 var(--reel-depth); }
.reel-connect img { width: 17px; height: 17px; filter: brightness(0); opacity: .9; }
.reel-controls { position: absolute; left: calc(50% + min(calc((100vw - 168px) / 2), 230px, 29.5dvh) + 18px); display: flex; flex-direction: column; gap: 12px; }
.reel-controls button, .reel-wallet-header button, .reel-library-actions button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.reel-layout svg, .reel-wallet-dialog svg, .reel-library svg { width: 22px; height: 22px; fill: currentColor; display: block; }
#reel-previous svg { transform: rotate(180deg); }

.reel-library {
  position: fixed; inset: 0; width: var(--reel-width); height: var(--reel-height); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0; border-radius: var(--reel-frame-radius); overflow: hidden;
  background: rgb(0 0 0 / 0); color: var(--reel-ink);
  transition: background-color 240ms ease;
}
.reel-library[data-state="open"] { background: rgb(0 0 0 / 54%); }
.reel-library::backdrop { background: transparent; }
.reel-library-panel {
  display: flex; flex-direction: column; width: 90%; height: 100%; margin-inline-end: auto;
  background: var(--reel-panel); box-shadow: 8px 0 30px #0007;
  transform: translate3d(-100%, 0, 0); will-change: transform;
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1);
}
.reel-library[data-state="open"] .reel-library-panel { transform: translate3d(0, 0, 0); }

.reel-next-sheet {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: stretch; justify-content: flex-end;
  pointer-events: none;
}
.reel-next-backdrop {
  position: absolute; inset: 0; background: rgb(0 0 0 / 54%);
  opacity: 0; transition: opacity 220ms ease; pointer-events: auto;
}
.reel-next-card {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  width: min(240px, 76%); height: 100%;
  padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) 20px;
  border-radius: 22px 0 0 22px; background: rgb(18 23 20 / 95%);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid rgb(255 255 255 / 12%); box-shadow: -16px 0 48px #000b;
  transform: translate3d(100%, 0, 0); will-change: transform;
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: auto; touch-action: none;
}
.reel-next-sheet[data-state="open"] .reel-next-backdrop { opacity: 1; }
.reel-next-sheet[data-state="open"] .reel-next-card { transform: translate3d(0, 0, 0); }
.reel-next-handle {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 38px; border-radius: 99px; background: rgb(255 255 255 / 26%);
}
.reel-next-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--reel-green); }
.reel-next-poster-btn {
  width: 160px; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: var(--reel-panel); box-shadow: 0 10px 28px #0008, 0 0 0 1px rgb(255 255 255 / 12%); cursor: pointer;
}
.reel-next-poster-btn .game-art { border-radius: inherit; }
.reel-next-progress { width: 160px; display: grid; gap: 6px; text-align: center; }
.reel-next-bar { height: 4px; border-radius: 99px; background: rgb(255 255 255 / 14%); overflow: hidden; }
#reel-next-bar-fill { display: block; height: 100%; width: 0%; border-radius: inherit; background: #69ae55; transition: width 180ms ease; }
.reel-next-status { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--reel-ink); }
.reel-next-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--reel-muted); transition: background-color 180ms ease, box-shadow 180ms ease; }
.reel-next-progress[data-ready] .reel-next-dot { background: #69ae55; box-shadow: 0 0 8px #69ae55; }
.reel-next-progress[data-ready] .reel-next-status { color: var(--reel-green); }
.reel-next-browse {
  margin-top: 2px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--reel-muted); font: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: .01em; cursor: pointer;
}
.reel-next-browse:is(:hover, :active) { color: var(--reel-ink); background: rgb(255 255 255 / 8%); }
.reel-library-header {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px 12px;
}
.reel-library-header h2 { margin: 0; font-size: 19px; text-transform: uppercase; }
.reel-library-actions { display: flex; align-items: center; gap: 8px; }
.reel-library-actions button { width: 36px; height: 36px; min-height: 36px; }
#reel-library-search-toggle[aria-pressed="true"],
#reel-library-filter-toggle[aria-pressed="true"] {
  translate: 0 3px;
  box-shadow: 0 0 0 var(--reel-depth), inset 0 2px 5px #0006;
  background: #222c24;
  color: var(--reel-green);
}
#reel-library-filter-toggle[aria-pressed="true"] { color: #f2c749; }
#reel-library-search-toggle[aria-pressed="true"]:hover,
#reel-library-filter-toggle[aria-pressed="true"]:hover { background: #28352a; }
.reel-library-filter-wrap {
  grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 220ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}
.reel-library-filter-wrap[data-open="true"] { grid-template-rows: 1fr; opacity: 1; }
.reel-library-filter-inner { min-height: 0; overflow: hidden; }
.reel-sort-tags {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 5px;
  transform: translateY(-6px);
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.reel-library-filter-wrap[data-open="true"] .reel-sort-tags { transform: translateY(0); }
.reel-sort-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto; min-height: 34px; padding: 6px 13px;
  border: 0; border-radius: 999px; background: var(--reel-control); color: var(--reel-ink);
  font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.2;
  cursor: pointer; white-space: nowrap; touch-action: manipulation;
  box-shadow: 0 3px 0 var(--reel-depth);
}
.reel-sort-tag:hover { color: #f3c851; background: #38443b; }
.reel-sort-tag[aria-pressed="true"] { background: #f2c749; color: #101810; box-shadow: 0 3px 0 #9f8228; }
.reel-sort-tag[aria-pressed="true"]:hover { background: #f5cf5e; color: #101810; }
.reel-sort-tag[data-button-pressed] { box-shadow: 0 0 0 var(--reel-depth); }
.reel-sort-tag:focus:not(:focus-visible) { outline: none; }
.reel-library-search-wrap {
  grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 220ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}
.reel-library-search-wrap[data-open="true"] { grid-template-rows: 1fr; opacity: 1; }
.reel-library-search-inner { min-height: 0; overflow: hidden; padding: 0; }
.reel-library-search {
  margin-top: 12px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-radius: var(--reel-radius); background: var(--reel-control); color: var(--reel-muted);
  box-shadow: inset 0 0 0 2px transparent;
  transform: translateY(-6px);
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1), box-shadow 160ms ease;
}
.reel-library-search-wrap[data-open="true"] .reel-library-search { transform: translateY(0); }
.reel-library-search:focus-within { outline: none; box-shadow: inset 0 0 0 2px var(--reel-green); }
.reel-library-search svg { width: 18px; }
.reel-library-search input {
  width: 100%; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; color: var(--reel-ink); font-size: 16px;
}
.reel-library-search input::placeholder { color: var(--reel-muted); }
.reel-library-scroll {
  min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 2px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) 12px;
}
.reel-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.reel-library-game {
  display: flex; flex-direction: column; align-items: stretch; text-align: left;
  min-width: 0; padding: 0; border: 0; border-radius: var(--reel-radius); background: transparent;
  color: var(--reel-ink); font-weight: 700; cursor: pointer;
  content-visibility: auto; contain-intrinsic-size: 100px 140px;
}
.reel-library-game .game-art { border-radius: var(--reel-radius); background: var(--reel-screen); }
.reel-library-game-title {
  display: none; padding: 6px 3px 2px; font-size: 11px; line-height: 1.25; font-weight: 400;
  color: var(--reel-ink); overflow: hidden;
  display: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.reel-library[data-search-open="true"] .reel-library-game-title { display: -webkit-box; }
.reel-library[data-searching="true"] .reel-library-game-title { color: var(--reel-muted); }
.reel-search-match { background: transparent; color: #7ae570; font-weight: 800; }
.reel-library-game-metric {
  display: none; padding: 4px 3px 2px; font-size: 10.5px; line-height: 1.2; font-weight: 700;
  color: var(--reel-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reel-library[data-filter-open="true"] .reel-library-game-metric,
.reel-library[data-custom-sort="true"] .reel-library-game-metric { display: block; }
.reel-library-game[aria-current="true"] { box-shadow: 0 0 0 2px var(--reel-green); }
.reel-library-game:disabled { opacity: .5; cursor: default; }
.reel-library-empty { text-align: center; color: var(--reel-muted); }

.reel-wallet-dialog {
  color-scheme: light;
  --reel-ink: #192119;
  --reel-muted: #526056;
  --reel-green: #397342;
  --reel-control: #eff2ed;
  --reel-control-hover: #e4eae2;
  --reel-depth: #d3dcd0;
  width: min(392px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto;
  padding: 18px; border: 1px solid #dfe6dc; border-radius: 20px; color: var(--reel-ink); background: #fff;
  font-family: var(--font-ui);
  box-shadow: 0 24px 80px #0009;
}
.reel-wallet-dialog::backdrop { background: #030604ba; backdrop-filter: blur(7px); }
.reel-wallet-dialog :is(h2, p) { margin-block: 0; }
.reel-wallet-header { display: flex; justify-content: space-between; align-items: start; gap: 8px; margin-bottom: 17px; }
.reel-wallet-header h2 { font-size: 21px; text-transform: uppercase; }
.reel-wallet-header p { font-size: 13px; color: var(--reel-muted); margin-top: 4px; }
.reel-wallet-header button { width: 38px; min-height: 38px; height: 38px; }
.reel-wallet-options { display: grid; gap: 8px; }
.reel-wallet-options .reel-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; text-decoration: none; }
.reel-wallet-options small, .reel-top-up :is(p, span), .reel-wallet-account span { color: var(--reel-muted); font-size: 12px; }
.reel-wallet-account, .reel-top-up { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reel-wallet-account span { display: block; margin-top: 4px; }
.reel-top-up { padding: 13px 11px; margin-top: 17px; border-radius: var(--reel-radius); background: #f5f7f4; }
.reel-top-up p { margin-top: 4px; }
.reel-top-up span { flex: none; }
.reel-top-up button { flex: none; }
.reel-cashier, .reel-cashier-fields { display: grid; gap: 9px; }
.reel-cashier { margin-top: 16px; }
.reel-cashier-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.reel-cashier-heading span, .reel-cashier-fields p, #reel-cashier-message { font-size: 13px; color: var(--reel-muted); }
.reel-cashier-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reel-play-switch { margin-bottom: 16px; }
.reel-cashier-switch [aria-pressed=true] { background: #d9ead4; color: #23492a; }
.reel-cashier label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.reel-cashier :is(input, select, textarea) { min-width: 0; width: 100%; border: 1px solid #d3dcd0; border-radius: 9px; padding: 8px; font-size: 16px; }
#reel-withdraw-address { resize: none; line-height: 1.35; word-break: break-all; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; padding: 9px 10px; }
.reel-cashier :is(code, p) { overflow-wrap: anywhere; }
.reel-cashier code { font-size: 13px; user-select: all; }
.reel-cashier-history { margin: 2px 0 0; padding-inline-start: 16px; color: var(--reel-muted); font-size: 13px; }
.reel-wallet-dialog .reel-wallet-status { margin-top: 12px; font-size: 13px; color: #79502b; }

@media (max-width: 600px) and (orientation: portrait) {
  :root { --reel-width: 100vw; }
}
@media (max-width: 600px) and (orientation: portrait), (hover: none) and (pointer: coarse) {
  :root { --reel-height: 100dvh; --reel-frame-radius: 0px; }
  .reel-phone { box-shadow: none; }
  .reel-controls { display: none; }
  .reel-library { width: 100vw; }
  .reel-wallet-dialog { margin: auto auto max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .reel-cover, .reel-library, .reel-library-panel, .reel-next-backdrop, .reel-next-card, .reel-library-search-wrap, .reel-library-search, .reel-library-filter-wrap, .reel-sort-tags { transition: none; }
}

.reel-library:focus, .reel-wallet-dialog:focus, .reel-library-actions button:focus, .reel-wallet-header button:focus { outline: none; }

/* Direct Wallet Connect Gate (from /welcome?wallet=solflare|phantom|metamask) */
.reel-connect-gate {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; padding: 20px;
  background: rgb(11 16 12 / 86%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.reel-connect-gate[hidden] { display: none; }
.reel-connect-gate-card {
  width: min(330px, 100%); padding: 24px 20px;
  border-radius: 20px; text-align: center; display: grid; gap: 12px; justify-items: center;
  background: #171f19; border: 1px solid rgb(255 255 255 / 12%);
  box-shadow: 0 24px 60px #000a; color: #f1f5f0;
}
.reel-connect-gate-card h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.reel-connect-gate-card p { margin: 0; font-size: 13px; color: #a7b6aa; line-height: 1.4; }
.reel-connect-gate-cta {
  width: 100%; min-height: 44px; margin-top: 4px;
  --reel-control: #69ae55; --reel-control-hover: #74ba5f; --reel-depth: #416e36; --reel-ink: #101810;
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.reel-connect-gate-status { font-size: 12px; color: #f2c749; }

/* Connected Wallet Dialog Header & Disconnect Popover */
.reel-wallet-header { align-items: center; gap: 10px; margin-bottom: 14px; position: relative; }
.reel-wallet-heading { min-width: 0; }
.reel-wallet-title--addr { text-transform: none !important; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.reel-wallet-header-actions { display: flex; align-items: center; gap: 8px; flex: none; position: relative; }
.reel-disconnect-wrap { position: relative; }
.reel-wallet-header .reel-disconnect-trigger {
  width: auto; height: 34px; min-height: 34px; padding: 0 11px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  --reel-control: #f8ecea; --reel-control-hover: #f3dcd8; --reel-depth: #e2c2bc; --reel-ink: #8f2d21;
}
.reel-disconnect-confirm {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  width: 248px; padding: 13px; border-radius: 14px;
  background: #ffffff; border: 1px solid #dfe6dc;
  box-shadow: 0 14px 36px rgb(0 0 0 / 22%);
  display: grid; gap: 10px; text-align: left;
}
.reel-disconnect-confirm[hidden] { display: none; }
.reel-disconnect-confirm p { font-size: 13px; color: #192119; line-height: 1.35; font-weight: 600; }
.reel-disconnect-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reel-wallet-header .reel-disconnect-cancel,
.reel-wallet-header .reel-disconnect-yes {
  width: 100%; height: 34px; min-height: 34px; padding: 0 10px; font-size: 12px; font-weight: 700;
}
.reel-wallet-header .reel-disconnect-yes {
  --reel-control: #d64538; --reel-control-hover: #c3392c; --reel-depth: #96291f; --reel-ink: #fff;
}

/* Proper Sliding DEMO PLAY / REAL PLAY Toggle */
.reel-connected-body { display: grid; gap: 12px; }
.reel-connected-body[hidden] { display: none; }
.reel-mode-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  padding: 4px; border-radius: 999px; background: #e8eee6; border: 1px solid #d3dcd0;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 7%);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.reel-mode-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: #192119;
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1), background-color 200ms ease;
}
.reel-mode-toggle[data-mode="real"] .reel-mode-thumb {
  transform: translateX(100%);
  background: #397342;
}
.reel-mode-opt {
  position: relative; z-index: 1; text-align: center; padding: 9px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #526056; transition: color 180ms ease;
}
.reel-mode-toggle:not([data-mode="real"]) .reel-mode-opt--demo { color: #ffffff; }
.reel-mode-toggle[data-mode="real"] .reel-mode-opt--real { color: #ffffff; }
.reel-mode-hint { font-size: 12px; color: #397342; text-align: center; font-weight: 600; margin-top: -4px; }

/* Balances Card */
.reel-balances-card {
  display: grid; gap: 7px; padding: 12px 13px; border-radius: 13px;
  background: #f5f7f4; border: 1px solid #e1e8de;
}
.reel-balance-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.reel-balance-label { font-size: 12px; color: #526056; font-weight: 600; }
.reel-balance-val { font-size: 13px; color: #192119; font-variant-numeric: tabular-nums; }
.reel-balance-row--deposited { padding-top: 6px; border-top: 1px dashed #d7e0d4; }
#reel-avail-row[hidden] + .reel-balance-row--deposited,
body[data-app-mode="play"] .reel-balance-row--deposited { padding-top: 0; border-top: 0; }
.reel-balance-val--usd { font-size: 16px; color: #23492a; }

/* Token pills, Quick Deposit Amounts, Active Unique Deposit & Withdraw */
.reel-cashier { margin-top: 2px; gap: 10px; }
.reel-token-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reel-token-pill {
  padding: 7px 10px; border-radius: 9px; border: 1px solid #d3dcd0;
  background: #f5f7f4; color: #526056; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.reel-token-pill[aria-pressed="true"] {
  background: #e2f1dc; border-color: #69ae55; color: #1f4525;
}
.reel-quick-amounts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.reel-quick-btn {
  padding: 8px 2px; border-radius: 9px; border: 1px solid #d3dcd0;
  background: #eff2ed; color: #192119; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.reel-quick-btn:hover { background: #e4eae2; }
.reel-quick-btn[aria-pressed="true"] { background: #69ae55; border-color: #4d8a3d; color: #101810; }
.reel-amount-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px;
}
.reel-amount-prefix { font-size: 15px; font-weight: 700; color: #526056; padding-inline: 2px; }
.reel-primary-btn {
  --reel-control: #69ae55; --reel-control-hover: #74ba5f; --reel-depth: #416e36; --reel-ink: #101810;
  font-weight: 700; padding-inline: 14px;
}
.reel-ghost-btn {
  --reel-control: #f5f7f4; --reel-control-hover: #eaefe8; --reel-depth: #d3dcd0; --reel-ink: #526056;
}
.reel-deposit-active {
  display: grid; gap: 10px; padding: 12px; border-radius: 13px;
  background: #f2f8ef; border: 1px solid #b9dab0;
}
.reel-deposit-active[hidden] { display: none; }
.reel-deposit-badge {
  display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #23492a;
}
.reel-pulse-dot {
  width: 8px; height: 8px; border-radius: 99px; background: #4ca338; flex: none;
  box-shadow: 0 0 0 3px rgb(76 163 56 / 24%);
}
.reel-deposit-field { display: grid; gap: 4px; }
.reel-deposit-field small { font-size: 11px; color: #526056; font-weight: 600; }
.reel-copy-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 9px; border-radius: 9px; background: #fff; border: 1px solid #d5e2d0;
}
.reel-deposit-exact { font-size: 17px; color: #192119; font-variant-numeric: tabular-nums; }
.reel-copy-row code { font-size: 11px; color: #192119; word-break: break-all; }
.reel-copy-btn {
  flex: none; padding: 5px 10px; border-radius: 7px; border: 1px solid #cbd7c7;
  background: #eff2ed; color: #192119; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.reel-copy-btn:hover { background: #e2eae0; }
.reel-deposit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#reel-deposit-send-wallet { grid-column: 1 / -1; }
.reel-withdraw-note {
  font-size: 12px; color: #23492a; background: #edf6ea; border: 1px solid #cde4c6;
  padding: 8px 10px; border-radius: 9px;
}
.reel-field-label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: #192119; }
.reel-cashier-message { font-size: 12px; font-weight: 600; padding: 7px 10px; border-radius: 9px; background: #f5f7f4; color: #526056; }
.reel-cashier-message[data-kind="ok"] { background: #e3f4df; color: #1d4a23; }
.reel-cashier-message[data-kind="err"] { background: #fdecea; color: #94261c; }
.reel-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Reusable Sliding Segmented Toggle (Deposit/Withdraw, USDC/USDT) */
.reel-wallet-screen { display: grid; gap: 12px; }
.reel-wallet-screen[hidden] { display: none; }
.reel-seg-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  padding: 4px; border-radius: 999px; background: #e8eee6; border: 1px solid #d3dcd0;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 7%);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.reel-seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: #192119;
  box-shadow: 0 2px 8px rgb(0 0 0 / 16%);
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1), background-color 200ms ease;
}
.reel-seg-toggle[data-side="right"] .reel-seg-thumb { transform: translateX(100%); }
.reel-seg-toggle--compact .reel-seg-thumb { background: #397342; }
.reel-seg-opt {
  position: relative; z-index: 1; text-align: center; padding: 8px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #526056; transition: color 180ms ease;
}
.reel-seg-toggle--compact .reel-seg-opt { padding: 7px 10px; font-size: 12px; }
.reel-seg-toggle[data-side="left"] .reel-seg-opt--left,
.reel-seg-toggle[data-side="right"] .reel-seg-opt--right { color: #ffffff; }

/* Focused Pay Screen & Manual Send Screen */
.reel-deposit-pay-view { padding: 10px 0 4px; gap: 14px; text-align: center; }
.reel-deposit-badge--center { justify-content: center; }
.reel-pay-hero-btn {
  width: 100%; min-height: 48px; font-size: 16px; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.reel-pay-links { display: grid; gap: 10px; justify-items: center; margin-top: 2px; }
.reel-text-link {
  padding: 4px 8px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: #2b6634;
  text-decoration: underline; text-underline-offset: 3px;
}
.reel-text-link:hover { color: #194520; }
.reel-text-link--muted { color: #526056; text-decoration: none; margin-top: 4px; }
.reel-text-link--muted:hover { color: #192119; text-decoration: underline; }
.reel-back-link {
  justify-self: start; padding: 4px 2px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: #526056;
}
.reel-back-link:hover { color: #192119; }

/* Small Check Network Now Popup inside wallet dialog */
.reel-wallet-dialog { position: relative; }
.reel-netcheck-overlay {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center; padding: 18px;
  background: rgb(16 24 18 / 52%); backdrop-filter: blur(4px);
  border-radius: inherit;
}
.reel-netcheck-overlay[hidden] { display: none; }
.reel-netcheck-card {
  width: min(300px, 100%); padding: 16px; border-radius: 16px;
  background: #ffffff; border: 1px solid #d5e0d2;
  box-shadow: 0 18px 44px rgb(0 0 0 / 28%);
  display: grid; gap: 11px; text-align: left;
}
.reel-netcheck-head { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #192119; }
.reel-netcheck-card p { font-size: 13px; color: #526056; line-height: 1.4; }
.reel-netcheck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }

.reel-connect[hidden] { display: none; }
.reel-connect { overflow: visible; }
.reel-connect-label { display: inline-block; transition: transform 140ms ease; }
.reel-connect:has(.reel-demo-badge:not([hidden])) .reel-connect-label { transform: translateY(-2.5px); }
.reel-demo-badge {
  position: absolute; z-index: 3;
  left: 50%; top: calc(100% - 12px); transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 26%);
  background: #141c16; color: #e8f3ea;
  box-shadow: 0 2px 6px rgb(0 0 0 / 42%);
  font: inherit; font-size: 9.4px; font-weight: 800; letter-spacing: .11em; line-height: 1.1;
  text-transform: uppercase; pointer-events: none; white-space: nowrap;
}
.reel-demo-badge[hidden] { display: none; }

/* Session ID Copy & Logout Warning inside Wallet Dialog */
.reel-wallet-sub-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.reel-wallet-sub-row p { margin-top: 0; }
.reel-sid-copy-inline { padding: 3px 8px; font-size: 11px; }
.reel-logout-sid-box {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 9px; border-radius: 9px; background: #f5f7f4; border: 1px solid #d5e0d2;
}
.reel-logout-sid-box[hidden] { display: none; }
.reel-logout-sid-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; font-weight: 700; color: #192119; user-select: all; word-break: break-all;
}
.reel-session-opt { margin-top: 4px; border-style: dashed; }

/* Browse Card wrapper + Desktop "+ Mini" quick launch button */
.reel-library-card { position: relative; display: flex; flex-direction: column; }
.reel-library-card[hidden] { display: none; }
.reel-library-mini-btn { display: none; }

/* Default mobile hides desktop-only corner controls */
.reel-browse-corner { display: none; }
.reel-display-controls { display: none; }
.reel-desktop-slots { display: none; }

/* ==================== DESKTOP FULL WORKSPACE ==================== */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  html { background: #0e120f; color-scheme: dark; }
  body { overflow: hidden; background: #0e120f; }

  /* Two-column push workspace: Left Browse Push-Sidebar (0px <-> 320px) + Right Game Stage */
  .reel-layout {
    display: grid;
    grid-template-columns: 0px minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    width: 100vw;
    height: 100dvh;
    padding: 0;
    transition: grid-template-columns 260ms cubic-bezier(.22, 1, .36, 1);
  }
  .reel-layout[data-sidebar="open"] {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  /* Docked Left Push-Sidebar (NOT an overlay — pushes & shrinks game container!) */
  .reel-library {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    background: var(--reel-panel);
    border-right: 1px solid rgb(255 255 255 / 10%);
    overflow: hidden;
    display: block;
    min-width: 0;
    pointer-events: none;
    visibility: hidden;
  }
  .reel-layout[data-sidebar="open"] .reel-library {
    pointer-events: auto;
    visibility: visible;
  }
  .reel-library::backdrop { display: none; }
  .reel-library-panel {
    width: 320px;
    height: 100%;
    margin: 0;
    box-shadow: none;
    transform: none !important;
  }
  .reel-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Desktop "+ Mini" quick-launch pill on Browse posters */
  .reel-library-mini-btn {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 6px; right: 6px; z-index: 2;
    padding: 4px 8px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 22%);
    background: rgb(16 22 18 / 86%); backdrop-filter: blur(8px);
    color: #eef5ef; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
    opacity: 0; transform: translateY(-2px);
    transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease;
  }
  .reel-library-card:hover .reel-library-mini-btn,
  .reel-library-mini-btn:focus-visible {
    opacity: 1; transform: translateY(0);
  }
  .reel-library-mini-btn:hover { background: #69ae55; color: #101810; border-color: #69ae55; }

  /* Full-size Game Container */
  .reel-phone {
    position: relative;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    background: #111111;
    overflow: hidden;
  }
  .reel-stage { width: 100%; height: 100%; }

  /* Top-Left Browse Games Button */
  .reel-browse-corner {
    display: inline-flex; align-items: center; gap: 8px;
    position: absolute; top: 14px; left: 16px; z-index: 12;
    min-height: 36px; padding: 0 14px; border-radius: 10px;
    --reel-control: rgb(26 32 28 / 90%); --reel-control-hover: rgb(38 48 40 / 95%);
    --reel-depth: rgb(0 0 0 / 55%); --reel-ink: #f1f5f0;
    backdrop-filter: blur(12px);
    font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  }
  .reel-layout[data-sidebar="open"] .reel-browse-corner { display: none; }
  .reel-browse-corner svg { width: 17px; height: 17px; }
  .reel-layout[data-sidebar="open"] .reel-browse-corner {
    --reel-control: #233326; --reel-ink: #8fe078;
  }

  /* Top-Center $0.00 Balance / My Balance Button on Desktop (+10% size) */
  .reel-connect {
    left: 50%;
    right: auto;
    top: 14px;
    transform: translateX(-50%);
    z-index: 12;
    min-height: 42px;
    padding-inline: 19px;
    font-size: 13.4px;
    gap: 9px;
  }
  .reel-demo-badge {
    left: 50%;
    right: auto;
    top: calc(100% - 13px);
    transform: translateX(-50%);
    font-size: 9.9px;
    padding: 2.5px 9px;
    z-index: 13;
  }

  /* Bottom-Right Hacksaw Display & Mini-Player Controls */
  .reel-display-controls {
    display: flex; align-items: center; gap: 8px;
    position: absolute; right: 14px; bottom: 14px; z-index: 15;
  }
  .reel-display-controls[hidden] { display: none; }
  .reel-display-pill {
    height: 38px; padding: 0 13px; border-radius: 999px;
    border: 1px solid rgb(255 255 255 / 14%);
    background: rgb(32 36 33 / 90%); backdrop-filter: blur(12px);
    color: #eef5ef; font: inherit; font-size: 12px; font-weight: 700;
    box-shadow: 0 4px 16px #0006; cursor: pointer;
  }
  .reel-display-pill:hover { background: rgb(46 56 48 / 96%); color: #8fe078; }
  .reel-display-pill[hidden] { display: none; }
  .reel-display-icon {
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 14%);
    background: rgb(32 36 33 / 92%); backdrop-filter: blur(12px);
    color: #ffffff; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px #0006; cursor: pointer;
  }
  .reel-display-icon:hover, .reel-display-icon[aria-expanded="true"] { color: #69ae55; }
  .reel-display-icon svg { width: 22px; height: 22px; fill: currentColor; }
  .reel-display-menu {
    position: absolute; bottom: calc(100% + 10px); right: 0; width: 236px;
    padding: 8px; border-radius: 10px; background: #ffffff; color: #171717;
    box-shadow: 0 16px 48px #0008; display: grid; gap: 2px;
  }
  .reel-display-menu[hidden] { display: none; }
  .reel-display-menu > button {
    width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 13px; border: 0; border-radius: 7px; background: transparent;
    color: #262626; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: 0.05em;
    text-transform: uppercase; text-align: left; cursor: pointer;
  }
  .reel-dmode-main { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
  .reel-dmode-ico { width: 18px; height: 18px; flex: none; opacity: 0.82; }
  .reel-display-menu > button:hover,
  .reel-display-menu > button:focus-visible,
  .reel-display-menu > button[aria-checked="true"] { color: #30683a; background: #eef3ec; }
  .reel-display-menu > button:hover .reel-dmode-ico,
  .reel-display-menu > button[aria-checked="true"] .reel-dmode-ico { opacity: 1; }
  .reel-display-menu > button:disabled { opacity: .4; cursor: default; }
  .reel-dmode-check { color: #397743; font-weight: 800; flex: none; }
  .reel-display-sep { width: 100%; border: 0; border-top: 1px solid #e5eae3; margin: 4px 0; }

  /* Single-Parent Zero-Reload Multi-Game Desktop Slots */
  .reel-desktop-slots {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    background: #111111;
    overflow: hidden;
  }
  .reel-desktop-slots[hidden] { display: none; }

  .reel-game-slot {
    display: flex; flex-direction: column; overflow: hidden;
    background: #111111;
  }
  .reel-slot-frame-wrap { position: relative; flex: 1; min-height: 0; width: 100%; height: 100%; background: #111111; }
  .reel-slot-frame {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
    background: #111111; color-scheme: dark;
    opacity: 0; transition: opacity 180ms ease;
  }
  .reel-game-slot[data-ready="true"] .reel-slot-frame { opacity: 1; }
  .reel-slot-curtain {
    position: absolute; inset: 0; z-index: 2;
    display: grid; place-items: center;
    background: radial-gradient(circle at 50% 45%, #1c221d 0%, #111111 72%);
    transition: opacity 220ms ease;
  }
  .reel-game-slot[data-ready="true"] .reel-slot-curtain { opacity: 0; pointer-events: none; }
  .reel-slot-curtain-inner { position: relative; display: grid; place-items: center; gap: 16px; }
  .reel-slot-curtain-poster {
    width: clamp(96px, 18%, 168px); aspect-ratio: 3 / 4; object-fit: cover;
    border-radius: 12px; box-shadow: 0 14px 36px rgb(0 0 0 / 60%);
    opacity: 0.92;
  }
  .reel-game-slot[data-role="mini"] .reel-slot-curtain-poster { width: 72px; border-radius: 8px; }
  .reel-slot-curtain-spinner {
    width: 26px; height: 26px; border-radius: 50%;
    border: 2.5px solid rgb(255 255 255 / 16%);
    border-top-color: #69ae55;
    animation: reelSpin 700ms linear infinite;
  }
  @keyframes reelSpin { to { transform: rotate(360deg); } }

  /* Main Stage Sizing Modes (exact fitGameViewport px dimensions from desktop-stage.js) */
  .reel-desktop-slots[data-layout="stage"] .reel-game-slot[data-role="main"] {
    position: relative; z-index: 1;
    flex: none;
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px #000a;
  }
  .reel-desktop-slots[data-layout="stage"][data-display-mode="fill"] .reel-game-slot[data-role="main"],
  .reel-desktop-slots[data-layout="stage"][data-display-mode="fullscreen"] .reel-game-slot[data-role="main"] {
    border-radius: 0; box-shadow: none;
  }
  .reel-desktop-slots[data-layout="stage"] .reel-game-slot[data-role="main"] .reel-mini-bar {
    display: none;
  }

  /* Floating Draggable Mini-Players */
  .reel-desktop-slots[data-layout="stage"] .reel-game-slot[data-role="mini"] {
    position: absolute; z-index: 6;
    width: 360px; height: 236px;
    border-radius: 12px;
    border: 1px solid rgb(255 255 255 / 18%);
    box-shadow: 0 18px 48px rgb(0 0 0 / 72%);
  }

  /* Multi-Table Simultaneous Split Grid ("Tile All") */
  .reel-desktop-slots[data-layout="grid"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 10px;
    padding: 58px 14px 58px;
    align-items: stretch;
    justify-items: stretch;
  }
  .reel-desktop-slots[data-layout="grid"] .reel-game-slot {
    position: relative !important;
    left: auto !important; top: auto !important;
    width: 100% !important; height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 10px;
    border: 1px solid rgb(255 255 255 / 12%);
    box-shadow: 0 10px 30px #0008;
  }
  .reel-desktop-slots[data-layout="grid"] .reel-mini-bar { display: flex; cursor: default; }

  /* Compact Title Bar on Mini-Players & Grid Tiles */
  .reel-mini-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    height: 32px; padding: 0 8px 0 11px; flex: none;
    background: #1a211c; border-bottom: 1px solid rgb(255 255 255 / 10%);
    color: #eef5ef; cursor: grab; user-select: none;
  }
  .reel-mini-bar:active { cursor: grabbing; }
  .reel-mini-title {
    font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .reel-mini-actions { display: flex; align-items: center; gap: 4px; flex: none; }
  .reel-mini-btn {
    width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px;
    background: rgb(255 255 255 / 8%); color: #eef5ef; font-size: 12px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .reel-mini-btn:hover { background: rgb(255 255 255 / 20%); }
  .reel-mini-close:hover { background: #c83e32; color: #fff; }
  .reel-drag-shield { position: absolute; inset: 0; z-index: 9; cursor: grabbing; }
  .reel-drag-shield[hidden] { display: none; }
}

/* Session-Only Auth Popup (/play — My Balance) */
.reel-session-auth { display: grid; gap: 10px; }
.reel-session-auth[hidden] { display: none; }
.reel-sa-view { display: grid; gap: 10px; }
.reel-sa-view[hidden] { display: none; }
.reel-sa-btn-primary {
  width: 100%; min-height: 46px; border-radius: 12px;
  --reel-control: #69ae55; --reel-control-hover: #74ba5f; --reel-depth: #416e36; --reel-ink: #101810;
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
}
.reel-sa-btn-secondary {
  width: 100%; min-height: 46px; border-radius: 12px;
  --reel-control: #eef3ec; --reel-control-hover: #e2ebe0; --reel-depth: #cfd9cc; --reel-ink: #1f2b21;
  font-size: 14px; font-weight: 700;
}
.reel-sa-eyebrow {
  margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #397743;
}
.reel-sa-code-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 12px; border-radius: 12px; background: #f4f7f3; border: 1.5px solid #cfe0cb;
}
.reel-sa-code-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 800; letter-spacing: .04em; color: #162118;
  word-break: break-all; user-select: all;
}
.reel-sa-warn {
  margin: 0; padding: 9px 11px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f0d799;
  color: #6b4e09; font-size: 12px; line-height: 1.4; font-weight: 600;
}
.reel-sa-back {
  justify-self: start; border: 0; background: transparent; padding: 2px 0;
  color: #397743; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.reel-sa-back:hover { text-decoration: underline; }
.reel-sa-label { font-size: 13px; font-weight: 700; color: #243026; }
.reel-sa-input-wrap {
  position: relative; display: flex; align-items: center;
}
.reel-sa-input {
  width: 100%; min-height: 46px; padding: 10px 60px 10px 13px;
  border-radius: 11px; border: 1.5px solid #c9d8c5; background: #fafcfa;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .04em; color: #162118;
}
.reel-sa-input:focus { outline: none; border-color: #69ae55; background: #fff; }
.reel-sa-count {
  position: absolute; right: 12px; font-size: 11px; font-weight: 700;
  color: #6b7b6e; font-variant-numeric: tabular-nums; pointer-events: none;
}
.reel-sa-error {
  margin: 0; padding: 8px 10px; border-radius: 9px;
  background: #fdecec; border: 1px solid #f2bcbc;
  color: #9e2222; font-size: 12.5px; font-weight: 600;
}
.reel-sa-error[hidden] { display: none; }

/* Clickable ID header dropdown with Copy ID */
.reel-id-wrap { position: relative; display: inline-block; max-width: 100%; }
.reel-wallet-title--clickable {
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; border-radius: 8px; padding: 2px 6px; margin: -2px -6px;
  transition: background-color 140ms ease;
  user-select: none;
}
.reel-wallet-title--clickable:hover,
.reel-wallet-title--clickable:focus-visible { background: #eef3ec; outline: none; }
.reel-id-caret { font-size: 13px; color: #526056; transition: transform 150ms ease; line-height: 1; }
.reel-wallet-title--clickable[aria-expanded="true"] .reel-id-caret { transform: rotate(180deg); color: #2b5a33; }
.reel-id-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 18;
  min-width: 248px; padding: 10px 11px; border-radius: 12px;
  background: #ffffff; border: 1px solid #d5e0d2;
  box-shadow: 0 14px 34px rgb(0 0 0 / 20%);
  display: grid; gap: 8px;
}
.reel-id-dropdown[hidden] { display: none; }
.reel-id-dropdown-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; font-weight: 800; letter-spacing: .03em; color: #192119;
  background: #f4f7f3; border: 1px solid #dde6da; border-radius: 8px;
  padding: 7px 9px; text-align: center; white-space: nowrap; user-select: all;
}
.reel-wallet-header .reel-id-dropdown-copy {
  width: 100%; height: auto; min-height: 34px; padding: 7px 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; border-radius: 8px;
}
.reel-logout-sid-box code { white-space: nowrap; font-size: 11px; }

/* Demo Balance Low-Balance Popups (<50 Switch to Real Play, <1.00 Reset to 500) */
.reel-demo-prompt {
  color-scheme: light;
  width: min(332px, calc(100vw - 28px));
  margin: auto;
  padding: 20px 18px 18px;
  border: 1px solid #dfe6dc;
  border-radius: 18px;
  background: #ffffff;
  color: #192119;
  font-family: var(--font-ui);
  box-shadow: 0 24px 70px rgb(0 0 0 / 55%);
  text-align: center;
}
.reel-demo-prompt::backdrop { background: rgb(0 0 0 / 55%); backdrop-filter: blur(4px); }
.reel-demo-prompt h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: #162118; }
.reel-demo-prompt-sub { margin: 0 0 14px; font-size: 13px; color: #526056; font-weight: 600; }
.reel-demo-prompt-err { margin: 0 0 12px; font-size: 12px; color: #9e2222; font-weight: 600; }
.reel-demo-prompt-err[hidden] { display: none; }
.reel-demo-prompt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reel-demo-prompt-no {
  min-height: 44px; border-radius: 11px;
  --reel-control: #eef3ec; --reel-control-hover: #e2ebe0; --reel-depth: #cfd9cc; --reel-ink: #1f2b21;
  font-size: 14px; font-weight: 700;
}
.reel-demo-prompt-yes {
  min-height: 44px; border-radius: 11px;
  --reel-control: #69ae55; --reel-control-hover: #74ba5f; --reel-depth: #416e36; --reel-ink: #101810;
  font-size: 14px; font-weight: 800;
}

/* Real Play Low Balance Popup (replaces old native dialog) */
.reel-low-balance {
  color-scheme: light;
  width: min(332px, calc(100vw - 28px));
  margin: auto;
  padding: 18px 18px 18px;
  border: 1px solid #dfe6dc;
  border-radius: 18px;
  background: #ffffff;
  color: #192119;
  font-family: var(--font-ui);
  box-shadow: 0 24px 70px rgb(0 0 0 / 55%);
}
.reel-low-balance::backdrop { background: rgb(0 0 0 / 55%); backdrop-filter: blur(4px); }
.reel-low-balance-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.reel-low-balance-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: #162118; }
.reel-low-balance-close {
  width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 10px;
  display: grid; place-items: center;
  --reel-control: #eef3ec; --reel-control-hover: #e2ebe0; --reel-depth: #cfd9cc; --reel-ink: #1f2b21;
}
.reel-low-balance-close svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.reel-low-balance-cta {
  width: 100%; min-height: 46px; border-radius: 12px;
  --reel-control: #69ae55; --reel-control-hover: #74ba5f; --reel-depth: #416e36; --reel-ink: #101810;
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
}

.reel-sa-tagline {
  margin: 4px 0 0; text-align: center;
  font-size: 11.5px; line-height: 1.45; font-weight: 600; color: #647367;
}


/* Wallet Settings Gear & Drawer */
.reel-wallet-header .reel-settings-trigger {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  --reel-control: #eff2ed;
  --reel-control-hover: #e3e9e0;
  --reel-depth: #cfd8cb;
  --reel-ink: #2b382d;
}
.reel-wallet-header .reel-settings-trigger[hidden] { display: none; }
.reel-wallet-header .reel-settings-trigger[aria-pressed="true"] {
  --reel-control: #e5f3e7;
  --reel-control-hover: #d7ecd9;
  --reel-depth: #9ec8a4;
  --reel-ink: #245b2c;
}
.reel-wallet-dialog .reel-gear-ico {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.reel-wallet-header .reel-settings-trigger:hover .reel-gear-ico,
.reel-wallet-header .reel-settings-trigger[aria-pressed="true"] .reel-gear-ico {
  transform: rotate(35deg);
}

.reel-settings-view {
  display: grid;
  gap: 11px;
}
.reel-settings-view[hidden] { display: none; }

.reel-set-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reel-set-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #526056;
}

.reel-set-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: #f1f4ef;
  border: 1px solid #e1e8de;
}
.reel-set-tabs [role="tab"] {
  appearance: none;
  border: 0;
  background: transparent;
  color: #526056;
  border-radius: 9px;
  padding: 7px 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.reel-set-tabs [role="tab"]:hover {
  color: #192119;
  background: rgb(255 255 255 / 55%);
}
.reel-set-tabs [role="tab"][aria-selected="true"] {
  background: #ffffff;
  color: #1c4c23;
  box-shadow: 0 2px 6px rgb(18 32 20 / 9%);
}
.reel-wallet-dialog .reel-set-tabs svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reel-set-panel {
  display: grid;
  gap: 9px;
}
.reel-set-panel[hidden] { display: none; }

.reel-set-card {
  display: grid;
  border-radius: 14px;
  background: #f7f9f6;
  border: 1px solid #e1e8de;
  overflow: hidden;
}
.reel-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  cursor: pointer;
  user-select: none;
  transition: background-color 120ms ease;
}
.reel-pref-row + .reel-pref-row {
  border-top: 1px solid #e6ece3;
}
.reel-pref-row:hover {
  background: #eff4ed;
}
.reel-pref-copy {
  display: grid;
  gap: 1px;
}
.reel-pref-copy strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #192119;
  line-height: 1.25;
}
.reel-pref-copy small {
  font-size: 11.5px;
  color: #5c6b60;
  line-height: 1.25;
}

/* iOS-style tactile toggle switch */
.reel-switch {
  position: relative;
  width: 44px;
  height: 25px;
  flex: none;
  display: inline-block;
}
.reel-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.reel-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cdd6ca;
  transition: background-color 180ms ease;
}
.reel-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 24%);
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1);
}
.reel-switch input:checked + .reel-switch-track {
  background: #397342;
}
.reel-switch input:checked + .reel-switch-track::after {
  transform: translateX(19px);
}
.reel-switch input:focus-visible + .reel-switch-track {
  outline: 2px solid #397342;
  outline-offset: 2px;
}

.reel-set-hint {
  font-size: 11.5px;
  color: #5c6b60;
  text-align: center;
}

.reel-set-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reel-set-sublabel {
  font-size: 12px;
  font-weight: 700;
  color: #526056;
}
.reel-set-filter {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 9px;
  background: #f1f4ef;
  border: 1px solid #e1e8de;
}
.reel-set-filter button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #526056;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.reel-set-filter button[aria-pressed="true"] {
  background: #ffffff;
  color: #1c4c23;
  box-shadow: 0 1px 4px rgb(0 0 0 / 9%);
}

.reel-set-list {
  display: grid;
  gap: 6px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
}
.reel-set-empty {
  padding: 20px 14px;
  border-radius: 12px;
  background: #f7f9f6;
  border: 1px dashed #d7e0d4;
  font-size: 12.5px;
  color: #5c6b60;
  text-align: center;
  line-height: 1.4;
}
.reel-set-row {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #f7f9f6;
  border: 1px solid #e4ebe1;
}
.reel-set-row-top,
.reel-set-row-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reel-set-game {
  font-size: 12.5px;
  font-weight: 700;
  color: #192119;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-set-row-mid {
  font-size: 11.5px;
  color: #526056;
  font-variant-numeric: tabular-nums;
}
.reel-set-row-mid b {
  color: #192119;
  font-weight: 700;
}
.reel-set-win,
.reel-set-win b {
  color: #246830 !important;
}
.reel-set-amt {
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #192119;
}
.reel-set-time {
  font-size: 10.5px;
  color: #6a796e;
  margin-left: auto;
  white-space: nowrap;
}
.reel-set-mult {
  display: inline-block;
  padding: 1px 5px;
  margin-left: 3px;
  border-radius: 999px;
  background: #e1f4e4;
  color: #1f642a;
  font-size: 10px;
  font-weight: 800;
}
.reel-set-pill {
  flex: none;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.reel-set-pill--real,
.reel-set-pill--deposit {
  background: #e2f3e5;
  color: #1f642a;
}
.reel-set-pill--demo {
  background: #ecefe9;
  color: #526056;
}
.reel-set-pill--withdraw {
  background: #fcebe8;
  color: #9e3124;
}
.reel-set-txlink {
  color: #246830;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.reel-set-txlink:hover { text-decoration: underline; }

/* Provably Fair */
.reel-fair-box {
  display: grid;
  gap: 8px;
}
.reel-fair-badge {
  padding: 7px 10px;
  border-radius: 10px;
  background: #e8f5ea;
  border: 1px solid #c6e2cb;
  color: #1f5c29;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
.reel-fair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.reel-fair-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f9f6;
  border: 1px solid #e4ebe1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.reel-fair-item span,
.reel-fair-kv > span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5c6b60;
}
.reel-fair-item strong {
  font-size: 12px;
  color: #192119;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-fair-kv {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f9f6;
  border: 1px solid #e4ebe1;
  display: grid;
  gap: 4px;
}
.reel-fair-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.reel-fair-code-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #192119;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-fair-note {
  font-size: 11px;
  line-height: 1.4;
  color: #5c6b60;
}
.reel-fair-seed-card {
  padding: 10px;
  border-radius: 12px;
  background: #f7f9f6;
  border: 1px solid #e1e8de;
  display: grid;
  gap: 6px;
}
.reel-fair-seed-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #526056;
}
.reel-fair-seed-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.reel-fair-seed-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid #cfd8cb;
  background: #ffffff;
  color: #192119;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
}
.reel-copy-btn--green {
  background: #397342 !important;
  color: #ffffff !important;
  border-color: #2d5f35 !important;
}
.reel-fair-status {
  font-size: 11px;
  font-weight: 600;
  color: #246830;
}
.reel-fair-status[hidden] { display: none; }

/* Language Grid */
.reel-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 264px;
  overflow-y: auto;
  padding-right: 2px;
}
.reel-lang-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #e1e8de;
  background: #f7f9f6;
  color: #192119;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.reel-lang-opt:hover {
  background: #edf3eb;
}
.reel-lang-opt[aria-pressed="true"] {
  background: #e6f4e8;
  border-color: #8bc093;
  color: #1b5023;
}
.reel-lang-code {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 5px;
  background: #e5ebe2;
  color: #465549;
}
.reel-lang-opt[aria-pressed="true"] .reel-lang-code {
  background: #397342;
  color: #ffffff;
}
.reel-lang-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-lang-chk {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: #246830;
}
.reel-lang-chk[hidden] { display: none; }


/* Clickable Bet History & Bet Slip */
.reel-bets-list-view { display: grid; gap: 9px; }
.reel-bets-list-view[hidden] { display: none; }
.reel-bet-slip-view { display: grid; gap: 8px; }
.reel-bet-slip-view[hidden] { display: none; }
.reel-slip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reel-set-row--clickable {
  width: 100%;
  appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 100ms ease;
}
.reel-set-row--clickable:hover {
  background: #edf3eb;
  border-color: #c5d6c1;
}
.reel-set-row--clickable:active {
  transform: scale(.992);
}
.reel-set-row-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.reel-set-fair-mark {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #397342;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
}
.reel-set-chev {
  color: #7c8b80;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.reel-slip-body {
  display: grid;
  gap: 7px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}
.reel-slip-summary {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f7f9f6;
  border: 1px solid #e1e8de;
}
.reel-slip-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.reel-slip-stats > div {
  display: grid;
  gap: 2px;
}
.reel-slip-stats span {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5c6b60;
}
.reel-slip-stats strong {
  font-size: 12px;
  color: #192119;
  font-variant-numeric: tabular-nums;
}
.reel-slip-demo-note {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-radius: 12px;
  background: #f7f9f6;
  border: 1px dashed #cfd9cc;
  text-align: center;
}
.reel-wallet-dialog .reel-slip-demo-note svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #526056;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reel-slip-demo-note p {
  font-size: 12.5px;
  font-weight: 600;
  color: #425045;
  line-height: 1.4;
}
.reel-slip-copy-all {
  width: 100%;
  justify-content: center;
  padding: 7px 10px;
  font-size: 11.5px;
}
