/* Site pages (SHELL lane): header, footer, cards, forms, lists. Colors only from tokens.css. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
[hidden] { display: none !important; }
a { color: inherit; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.route-loader {
  position: fixed; inset: 0; z-index: 4;
  display: grid; place-items: center; pointer-events: none;
  background: var(--bg); opacity: 0; visibility: hidden;
  transition: opacity .15s cubic-bezier(.4,0,.2,1), visibility 0s .15s;
}
.route-loader img { opacity: 0; }
.route-loader button { position: absolute; top: calc(50% + 38px); pointer-events: auto; }
.route-pending .route-loader { opacity: 1; visibility: visible; transition: none; }
.route-pending .route-loader img {
  animation: route-mark-in .18s ease-out .12s both, route-mark-pulse .85s ease-in-out .3s infinite alternate;
}
.route-pending main { min-height: calc(100vh - 60px); visibility: hidden; }
.route-pending :is(.foot, .game-support) { visibility: hidden; }
.route-leaving::after {
  content: ''; position: fixed; z-index: 70; inset: 0 auto auto 0; height: 3px; width: 100%;
  pointer-events: none; background: var(--info); transform-origin: left;
  animation: route-progress 1.8s cubic-bezier(.16,1,.3,1) .12s both;
}
@keyframes route-mark-in { from { opacity: 0; } to { opacity: .7; } }
@keyframes route-mark-pulse { from { opacity: .7; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes route-progress {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(.9); }
}
@media (prefers-reduced-motion: reduce) {
  .route-loader { transition: none; }
  .route-pending .route-loader img { animation: none; opacity: 1; }
  .route-leaving::after { animation: none; width: 25%; }
}
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 20px 36px; }
main.is-narrow { max-width: 440px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.section:first-child { margin-top: 0; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.head-row a { color: var(--muted); font-size: 14px; text-decoration: none; }
.head-row a:hover { color: var(--text); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-sm); white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bal { display: flex; align-items: center; gap: 8px; height: 38px; text-decoration: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px 0 10px; font: 700 16px var(--font-num); font-variant-numeric: tabular-nums; }
.top-wallet { min-height: 38px; }
.bal:hover { border-color: var(--muted); }
.who { color: var(--muted); font-size: 14px; text-decoration: none; padding: 8px; }
.who:hover { color: var(--text); }
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: 600 14px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.is-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.07); }
.btn.is-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.is-quiet:hover { color: var(--text); background: var(--surface-2); }
.btn.is-big { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn.is-wide { width: 100%; }

/* phone: one 56px header (mark + balance); the four links move to a fixed bar at the bottom */
@media (max-width: 760px) {
  main { padding: 16px 16px 24px; }
  .top-in { height: 56px; padding: 0 16px; gap: 0; }
  .top-mid { height: 56px; }
  body.signed-in .top-in .brand span { display: none; }
  .who { display: none; }
  .top .nav { display: none; }
  .top .btn { min-height: 36px; padding: 0 12px; }
  .bal { height: 36px; font-size: 15px; }
  body:not(.is-bare) { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
}
.tabbar { display: none; }
@media (max-width: 760px) {
  body { --bottom-nav-height: calc(52px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    height: var(--bottom-nav-height); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; color: var(--muted); text-decoration: none; font: 600 11px var(--font); }
  .tabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar a[aria-current="page"] svg { stroke: var(--accent); }
}

/* ---------- footer: four link columns, then brand + the play-coins line ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; background: var(--surface-2); margin-top: 24px; }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 28px 20px 24px; display: flex; flex-direction: column; gap: 24px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col h3 { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-base { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.foot-base .brand { color: var(--text); }
.foot-base p { max-width: 60ch; font-size: 13px; }
.foot-copy { opacity: .7; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; } .foot-in { padding: 22px 16px; } }
/* ---------- game cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s;
}
.card:hover { border-color: var(--muted); }
.card-art { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--tint, var(--surface-2)); }
.card-art svg { width: 62%; height: 62%; }
.card-text { padding: 9px 11px 10px; display: flex; flex-direction: column; gap: 1px; }
.card-name { font-weight: 600; font-size: 14px; }
.card-blurb { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-text { padding: 10px 12px 12px; }
  .card-blurb { display: none; }
}

/* ---------- panels, forms ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input {
  min-height: 46px; width: 100%; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: 16px var(--font); outline: none;
}
.input:focus { border-color: var(--focus); }
.input.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.err { color: var(--lose); font-size: 14px; }
.err:empty { display: none; }
.ok { color: var(--win); font-size: 14px; }
.ok:empty { display: none; }
.form-foot { font-size: 14px; color: var(--muted); text-align: center; }
.form-foot a { color: var(--text); }

/* ---------- lists (bets) ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.home .list:has(> table) { min-width: 0; max-width: 100%; overflow-x: auto; }
.list table { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.list tr:last-child td { border-bottom: 0; }
.list .r { text-align: right; }
.list a { text-decoration: none; }
.list tbody tr:hover { background: var(--surface-2); }
.list .won { color: var(--win); }
.empty { color: var(--muted); font-size: 14px; padding: 22px 16px; text-align: center; }
@media (max-width: 760px) { .list .hide-sm { display: none; } .list td, .list th { padding-left: 12px; padding-right: 12px; } }

/* ---------- key/value rows (wallet, fair play) ---------- */
.kv { display: flex; flex-direction: column; gap: 6px; }
.kv-label { font-size: 13px; color: var(--muted); }
.kv-value { font-family: var(--font-num); font-size: 13px; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- play page ---------- */
.play-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.play-head h1 { font-size: 18px; }
@media (max-width: 760px) { .play-head { margin-bottom: 10px; } .play-head h1 { font-size: 20px; } }

.big-bal { font: 700 30px var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.big-bal .ui-coin { width: 30px; height: 30px; font-size: 15px; }

/* ---------- game page: bar, panels, info tabs ---------- */
body.is-theatre main { max-width: 1680px; }
body.is-theatre .ui-stage { min-height: 560px; }
.game-bar { display: flex; align-items: center; gap: 2px; margin-top: 10px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
/* desktop: the bar is the bottom edge of the game block (controls + stage) */
@media (min-width: 761px) {
  #game:has(.ui-frame-in) + .game-bar { margin-top: -1px; border-radius: 0 0 8px 8px; }
  #game:has(+ .game-bar:not([hidden])) .ui-frame-in { border-radius: 8px 8px 0 0; }
  #game:has(+ .game-bar:not([hidden])) .ui-controls { border-bottom-left-radius: 0; }
  #game:has(+ .game-bar:not([hidden])) .ui-stage { border-bottom-right-radius: 0; }
}
.bar-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; min-width: 40px; justify-content: center; padding: 0 12px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); font: 500 14px var(--font); cursor: pointer;
}
.bar-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bar-btn:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.bar-btn[aria-expanded="true"], .bar-btn[aria-pressed="true"] { color: var(--text); background: var(--surface-3); }
.bar-btn.fav { margin-left: auto; }
.bar-btn.fav[aria-pressed="true"] { color: var(--accent); background: transparent; }
.bar-btn.fav[aria-pressed="true"] svg { fill: currentColor; }
.drawer { margin-top: 10px; }
.switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 24px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; }
.switch small { font-size: 12px; margin-left: 6px; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); background: var(--accent-ink); }
.info { gap: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; color: var(--muted); font: 500 14px var(--font); padding: 10px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-tools .ui-seg { max-width: 340px; }
.info-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.about { display: flex; flex-direction: column; gap: 10px; font-size: 15px; max-width: 760px; }
.about a { color: var(--text); }
#description { scroll-margin-top: 5rem; }
.stage-history-heading { display: none; }
@media (max-width: 767px), (orientation: landscape) and (max-width: 1000px) and (max-height: 520px), (hover: none) and (pointer: coarse) {
  .stage-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
}
@media (min-width: 761px) { .stage-history-heading { scroll-margin-top: 4.5rem; } }
.game-description-tags { display:flex; flex-wrap:wrap; gap:6px; list-style:none; margin:0 0 .25rem; padding:0; }
.game-description-tags li { padding:.2rem .65rem; border-radius:1rem; background:var(--edge); color:var(--text); font-size:.82rem; font-weight:600; }
.game-return-details { margin:.25rem 0; }
.game-return-details summary { cursor:pointer; font-weight:600; }
.game-return-details p { margin:.7rem 0; }
.game-return-details table { border-collapse:collapse; width:100%; font-variant-numeric:tabular-nums; }
.game-return-details caption { text-align:left; font-weight:700; margin:.8rem 0 .3rem; }
.game-return-details :is(td, th) { padding:.35rem .4rem; text-align:right; border-bottom:1px solid var(--edge); }
.game-return-details th:first-child { text-align:left; }
@media (max-width: 760px) {
  .only-wide { display: none !important; }
  .bar-btn { padding: 0; min-width: 44px; min-height: 44px; }
  .bar-btn:not(.fav) span { display: none; }
  .bar-btn.fav span { display: none; }
  .game-bar { justify-content: space-between; }
  .bar-btn.fav { margin-left: 0; }
  .info-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-tools .ui-seg { max-width: none; }
}
@media (pointer: coarse) { .only-keys { display: none !important; } }

/* ---------- header v2: balance in the middle, search + account on the right ---------- */
.top-in { max-width: none; }
/* balance + Wallet: one group, centred over the main content (not the whole window) */
.top-mid { position: absolute; top: 0; height: 60px; left: calc(var(--side-w, 0px) + (100% - var(--side-w, 0px)) / 2); transform: translateX(-50%); display: flex; justify-content: center; align-items: center; gap: 8px; }
.top-right { margin-left: auto; }
.top-search {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 500 14px var(--font); cursor: pointer;
}
.top-search:hover { color: var(--text); border-color: var(--muted); }
.top-search svg, .acct-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.top-search kbd { font: 500 11px var(--font); padding: 2px 6px; border-radius: 4px; background: var(--surface-3); color: var(--muted); }
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font: 500 14px var(--font); cursor: pointer; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; padding: 6px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.acct-menu a, .acct-menu button { text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font: 14px var(--font); background: none; border: 0; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface-2); }
.acct-menu button { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 4px; }

/* ---------- sidebar (761px and wider; Stake shows its 60px rail from tablet width up) ---------- */
.side { display: none; }
@media (min-width: 761px) {
  body.has-side { --side-w: 216px; }
  body.has-side.side-folded { --side-w: 60px; }   /* Stake measured: 60 */
  body.has-side .nav { display: none; }
  .page-body { padding-left: var(--side-w); display: flex; flex-direction: column; flex: 1; transition: padding-left .15s; }
  .side {
    display: flex; flex-direction: column; justify-content: space-between; position: fixed; z-index: 5; left: 0; top: 61px; bottom: 0; width: var(--side-w);
    padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg); overflow: hidden; transition: width .15s;
  }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav :is(a, button), .side-fold {
    display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
    color: var(--muted); text-decoration: none; font: 500 14px var(--font); white-space: nowrap; background: none; border: 0; cursor: pointer;
  }
  .side-nav :is(a, button):hover, .side-fold:hover { color: var(--text); background: var(--surface); }
  .side a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
  .side svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .side-folded .side span { display: none; }
  .side-folded .side-fold svg { transform: rotate(180deg); }
  .top-in .brand { min-width: calc(var(--side-w) - 20px); }
}
@media (max-width: 760px) { .page-body { display: flex; flex-direction: column; flex: 1; } }
@media (max-width: 1180px) { .top-search kbd { display: none; } }
@media (max-width: 760px) {
  .top-mid { justify-content: flex-end; }
  .top-wallet, .acct { display: none; }
  .top-search { min-height: 40px; width: 40px; padding: 0; justify-content: center; border: 0; background: none; }
  .top-search span, .top-search kbd { display: none; }
}

/* ---------- lobby: search, header card, live line on cards ---------- */
.lobby-top { margin-bottom: 14px; }
.search-box { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: text; }
.search-box:focus-within { border-color: var(--focus); }
.search-box svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: 16px var(--font); }
.search-box input::-webkit-search-cancel-button { filter: grayscale(1); }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.lobby-head p { margin-top: 2px; font-size: 13px; }
.lobby-head .sort { width: 220px; flex: none; }
.card-live { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.card-live.is-on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--win); }
@media (max-width: 760px) {
  .lobby-head { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .lobby-head .sort { width: 100%; }
  .card-live { display: none; }
}

/* ---------- home: straight to the games ---------- */
.intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 14px; }
@media (max-width: 760px) { .intro { flex-direction: column; align-items: stretch; } .intro .btn { width: 100%; } }

/* ---------- portrait game tiles (3:4) ---------- */
.cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; min-width: 0; }
.tile-art {
  position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  background: var(--tint, var(--surface-2)); transition: transform .15s;
}
.tile:hover .tile-art { transform: translateY(-3px); }
.tile-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-svg { position: absolute; left: 0; right: 0; top: 0; height: 67%; display: grid; place-items: center; }
.tile-svg svg { width: 66%; height: 66%; }
.tile-name {
  position: absolute; left: 0; right: 0; bottom: 0; height: 33%; display: flex; align-items: center; justify-content: center;
  padding: 0 8px; text-align: center; font-weight: 700; font-size: 15px; letter-spacing: .01em; color: var(--text);
  background: rgba(0, 0, 0, .28);
}
.tile-live { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; padding-left: 2px; }
.tile-live::before, .lobby #figures:not(:empty)::before {
  content: ""; display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--win);
}
.lobby #figures::before { margin-inline-end: 5px; vertical-align: middle; }
@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tile-name { font-size: 13px; }
  .tile-live { gap: 4px; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .tile-art { transition: none; } }

/* ---------- home ---------- */
.home { display: flex; flex-direction: column; gap: 16px; }
.home > .section { margin-top: 12px; }
.welcome { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; padding: 28px; background: var(--surface); border-radius: var(--radius); }
.welcome h1 { font-size: 30px; line-height: 1.15; }
.welcome p { margin-top: 8px; font-size: 15px; }
.welcome-actions { display: flex; gap: 10px; margin-top: 18px; }
.welcome-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.welcome-art span { aspect-ratio: 3 / 4; border-radius: var(--radius); background: var(--tint); display: grid; place-items: center; }
.welcome-art span:nth-child(2) { transform: translateY(-12px); }
.welcome-art svg { width: 70%; height: 70%; }
.banners { position: relative; }
.banner-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 3); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner-track::-webkit-scrollbar { display: none; }
.banner { scroll-snap-align: start; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 168px; border-radius: var(--radius); overflow: hidden; background: var(--tint, var(--surface)); }
.banner-text { padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.banner-text h2 { font-size: 16px; }
.banner-text p { font-size: 13px; color: var(--text); opacity: .8; }
.banner-text .btn { margin-top: auto; min-height: 34px; padding: 0 12px; font-size: 13px; background: var(--text); color: var(--bg); border-color: var(--text); }
.banner-soon { margin-top: auto; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 4px; background: rgba(0, 0, 0, .25); }
.banner-art { position: relative; display: grid; place-items: center; }
.banner-art svg { width: 86%; height: 86%; }
.banner-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-dots { display: none; justify-content: center; gap: 6px; margin-top: 8px; }
.banner-dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: var(--surface-3); cursor: pointer; }
.banner-dots button[aria-current="true"] { background: var(--text); }
.home-search { margin: 0; }
.home-tabs { margin-top: -2px; }
.row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.row-tools { display: flex; align-items: center; gap: 6px; }
.row-all { border: 0; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer; padding: 6px 8px; }
.row-all:hover { color: var(--text); }
.row-arrow { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; }
.row-arrow:disabled { opacity: .4; cursor: default; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-top: 4px; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .tile { scroll-snap-align: start; }
@media (max-width: 1100px) { .banner-track { grid-auto-columns: calc((100% - 12px) / 2); } }
@media (max-width: 760px) {
  .home { gap: 12px; }
  .welcome { grid-template-columns: 1fr; padding: 18px; }
  .welcome h1 { font-size: 24px; }
  .welcome-art { display: none; }
  .welcome-actions .btn { flex: 1; }
  .banner-track { grid-auto-columns: 100%; }
  .banner { min-height: 150px; }
  .banner-dots { display: flex; }
  .row-arrow { display: none; }
  .row-track { grid-auto-columns: 31%; gap: 8px; }
}

/* banners with a picture: the picture fills the card (art on its right half), text sits on the left */
.banner { position: relative; }
.banner.has-img { grid-template-columns: 1fr; background: var(--surface-2); }
.banner.has-img .banner-text { position: relative; z-index: 1; max-width: 56%; }
.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.welcome-art span { position: relative; overflow: hidden; }
.welcome-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .banner.has-img .banner-text { max-width: 60%; } }

/* pop-out game window */
body.is-bare main { padding: 10px; max-width: none; }
body.is-bare .play-head { margin-bottom: 8px; }
body.is-bare .play-head h1 { font-size: 16px; }
.mini-bal { margin-left: auto; padding: 4px 10px 4px 6px; font-size: 14px; }

/* ---------- plain text pages (help, about) ---------- */
.doc { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.doc section { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 80px; }
.doc p { color: var(--muted); font-size: 15px; }
.doc a { color: var(--text); }

/* Nothing inside the content column (a game's canvas, a chart with overflow: visible ...) may make the page
   wider than the window: that pushed the layout under the sidebar in full-page captures (G3's report). */
.page-body { overflow-x: clip; min-width: 0; }

.hist-row { cursor: pointer; }
.drawer .list { max-height: 360px; overflow-y: auto; }

/* sidebar groups: main links · Originals (each game) · Fair play + Help */
@media (min-width: 761px) {
  .side { overflow-y: auto; scrollbar-width: none; overscroll-behavior-y: contain; }
  .side::-webkit-scrollbar { display: none; }
  #side-originals-list { display: contents; }
  .side [hidden] { display: none !important; }
  .side-more.is-complete svg { transform: rotate(180deg); }
  .side .side-nav { display: flex; flex-direction: column; gap: 10px; }
  .side-group { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .side-group:last-child { border-bottom: 0; }
  .side a.side-head { color: var(--text); font-weight: 600; }
  .side-pic { width: 16px; height: 21px; border-radius: 3px; object-fit: cover; flex: none; display: grid; place-items: center; overflow: hidden; }
  .side-pic svg { width: 16px; height: 16px; }
  .side-fold { margin-top: 8px; flex: none; }
}
@media (max-width: 760px) { .top-mid { height: 56px; } }

/* ---------- review-1: home + lobby ---------- */
/* Home 1: two big destinations */
.home-tabs { gap: 6px; border-bottom: 0; }
.home-tabs .category-link { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 0 18px; border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font: 600 14px var(--font); text-decoration: none; }
.home-tabs .category-link:hover, .home-tabs .category-link[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.lobby .home-tabs { margin-bottom: 16px; }
.gi-brand a.gi-who, a.row-all { text-decoration: none; }
.gi-brand a.gi-who:hover > b { text-decoration: underline; }
/* Home 3: equal banners, 168 high, 16 inset, 16/700 titles, actions on one bottom line */
.banner { height: 168px; min-height: 0; }
.banner-text { padding: 16px; }
.banner-text h2 { font: 700 16px var(--font); }
.banner-text .btn, .banner-soon { margin-top: auto; height: 34px; min-height: 34px; display: inline-flex; align-items: center; }
.banner-soon { padding: 0 12px; border-radius: var(--radius-sm); font-size: 13px; }
/* Home 4: section heading 16/700, 10px to the covers, 24px from the last row to the bets tabs */
.row { gap: 10px; margin-bottom: 20px; }
.row:last-child { margin-bottom: 0; }
.row-head { margin-bottom: 0; }
.row-head h2 { font: 700 16px var(--font); }
#content + .section { margin-top: 24px; }
@media (max-width: 760px) {
  /* Home 1 (phone 44px) + Home 2: smaller promo so the first covers start high */
  .home { gap: 12px; }
  .home-tabs .category-link { min-height: 44px; flex: 1; }
  .banner { height: 136px; }
  .banner-text p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .banner-dots { margin-top: 12px; }
}

/* Lobby 1-2: compact toolbar instead of the boxed summary */
.lobby-head { min-height: 56px; padding: 0; margin-bottom: 16px; background: none; border: 0; }
.lobby-head h1 { font: 700 16px var(--font); }
.lobby-head p { font-size: 12px; margin-top: 2px; }
.lobby-head .sort { width: 176px; padding: 2px; }
.lobby-head .sort button { min-height: 30px; }
.fx2 .lobby-head .sort button, .fx2 #range .ui-seg button { flex: 1 1 auto; min-width: 0; padding-inline: 8px; }
@media (max-width: 760px) {
  .lobby-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 40px; margin-bottom: 12px; }
  .lobby-head > div:first-child { display: contents; }
  .lobby-head #figures { grid-column: 1 / -1; }
  .lobby-head .sort { grid-column: 2; grid-row: 1; width: 144px; }
  .lobby-head .sort button { min-height: 34px; }
}
/* Lobby 3: covers 150x200 on desktop, three equal columns with 8px gutters on phones */
.tile { gap: 4px; }
@media (min-width: 761px) { .cards { grid-template-columns: repeat(auto-fill, 150px); gap: 12px 10px; } }
.banner-text { height: 100%; box-sizing: border-box; }
.banner-text p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .banner-text p { -webkit-line-clamp: 2; } }

/* bet rows open the bet details window */
.bet-row { cursor: pointer; }
.bet-row:hover td { background: var(--surface-2); }
.bet-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* review-2 phone spacing on /play: 16 under the header, 10 title->stage; focus/scroll never lands under the bottom bar */
@media (max-width: 760px) {
  html { scroll-padding-top: 64px; scroll-padding-bottom: calc(52px + env(safe-area-inset-bottom) + 8px); }
  .play-head { margin-bottom: 10px; }
  .play-head h1 { font-size: 18px; line-height: 24px; }
}

/* ---------- overlay window (modal.js): wallet, search ---------- */
html.mdl-open { overflow: hidden; }
.mdl-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 24px 16px; }
.mdl-wrap.is-top { place-items: start center; padding-top: 72px; }
.mdl { width: min(var(--mdl-w), 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.mdl-wrap.is-top .mdl { max-height: calc(100vh - 96px); }
.mdl-wrap.has-short-viewport {
  inset-block: var(--mdl-visible-top) auto; height: var(--mdl-visible-height);
  grid-template-rows: minmax(0, 1fr); padding-block: 8px;
}
.mdl-wrap.has-short-viewport > .mdl[role="dialog"] { min-height: 0; max-height: 100%; }
.mdl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.mdl-title { font: 700 16px var(--font); }
.mdl-x { width: 40px; height: 40px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.mdl-x:hover { color: var(--text); background: var(--surface-2); }
.mdl-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 600px) {
  .mdl-wrap, .mdl-wrap.is-top { padding: 0; place-items: stretch; }
  .mdl, .mdl-wrap.is-top .mdl { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .mdl-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* wallet window */
.wal-tabs .ui-seg button { min-height: 36px; font-weight: 600; }
.wal-pane { display: flex; flex-direction: column; gap: 14px; }
.wal-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.wal-label { font: 600 14px var(--font); color: var(--muted); }
.wal-bal { display: flex; align-items: center; gap: 10px; font: 700 26px var(--font-num); font-variant-numeric: tabular-nums; }
.wal-bal .ui-coin { width: 24px; height: 24px; font-size: 12px; }
.wal-note, .wal-rule { color: var(--muted); font-size: 14px; }
.wal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wal-now { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.wal-now .num { color: var(--text); font-weight: 600; }
.wal-ok { color: var(--win); font-size: 14px; min-height: 1px; }

/* search window */
.srch-box { flex: none; }
.srch-out { display: flex; flex-direction: column; gap: 12px; }
.srch-head { display: flex; align-items: center; justify-content: space-between; }
.srch-head h3 { font: 700 14px var(--font); }
.srch-clear { border: 0; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer; padding: 6px; }
.srch-clear:hover { color: var(--text); }
.srch-recent { display: flex; flex-direction: column; gap: 8px; }
.srch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.srch-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 500 14px var(--font); cursor: pointer; }
.srch-chip:hover { background: var(--surface-3); }
.srch-cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; gap: 10px !important; }
.srch-cards .tile-live { display: none; }
@media (max-width: 600px) { .srch-cards { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; } }

/* ---------- My casino (/me) ---------- */
.me-head { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border-radius: 8px; }
.me-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font: 700 22px var(--font); }
.me-who { min-width: 0; flex: 1; }
.me-who h1 { font: 700 18px var(--font); overflow: hidden; text-overflow: ellipsis; }
.me-who p { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.me-actions { display: flex; gap: 8px; }
.me .head-row { align-items: center; }
@media (min-width: 761px) {
  .me .section[id] { scroll-margin-top: 68px; }
}
.me-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.me-stats .ui-stat-value.is-win { color: var(--win); }
.me-stats .ui-stat-value.is-lose { color: var(--lose); }
#range .ui-seg { width: 240px; }
#range .ui-seg button { min-height: 32px; }
.me-filter { width: 180px; }
.me-filter .ui-box { min-height: 40px; }
#more { align-self: center; }
@media (max-width: 760px) {
  .me-head { flex-wrap: wrap; }
  .me-actions { width: 100%; }
  .me-actions .btn { flex: 1; }
  .me-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .me .head-row { flex-wrap: wrap; }
  #range .ui-seg { width: 210px; }
  .me-filter { width: 150px; }
}

/* ---------- Fair play (/fair) + seeds panel ---------- */
.fair { max-width: 760px; display: flex; flex-direction: column; gap: 16px; margin-left: 0; }
.fair-tabs .ui-seg { max-width: 420px; }
.fair-tabs .ui-seg button { min-height: 36px; font-weight: 600; }
.seeds-h { font: 700 15px var(--font); }
.seed-row { display: flex; gap: 8px; }
.seed-row .input { flex: 1; min-width: 0; min-height: 44px; }
.seed-row .btn { min-height: 44px; flex: none; }
.seeds-hint { font-size: 12px; color: var(--muted); }
.seeds-link { align-self: flex-start; }
.fair-how p { color: var(--muted); font-size: 14px; }
.fair-how .num { color: var(--text); }
@media (max-width: 760px) { .fair-tabs .ui-seg { max-width: none; } }

/* ---------- review 2b: spacing ---------- */
/* one card spacing scale: 10px between covers on desktop, 8px on phones (home rows, lobby, /me, search) */
.cards, .row-track { gap: 10px; }
@media (min-width: 761px) { .cards { gap: 10px; } }
@media (max-width: 760px) { .cards, .row-track { gap: 8px; } .srch-cards { gap: 8px !important; } }
/* home: 10px from the tabs to the first row, 24px from the last row to the bets tabs (.home gap is 16) */
.home-tabs + #content { margin-top: -6px; }
#content + .section { margin-top: 8px; }
/* lobby: grid 16 / 12 under the toolbar; 40px from the last "N playing" line to the footer */
.lobby .lobby-head { margin-bottom: 16px; }
.lobby .lobby-head + .section { margin-top: 0; }
main.lobby { padding-bottom: 16px; }
@media (max-width: 760px) { .lobby .lobby-head { margin-bottom: 12px; } main.lobby { padding-bottom: 16px; } }
@media (max-width: 760px) { .home-tabs + #content { margin-top: -2px; } #content + .section { margin-top: 12px; } }

/* sidebar game icons (square art, 20px) */
@media (min-width: 761px) { .side img.side-pic, .fx2 .side img.side-pic { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; } }

/* ---------- review 2c ---------- */
/* Home 1: Continue playing is a compact shelf */
.row[data-row="continue"] .row-track { grid-auto-columns: 105px; }
@media (max-width: 760px) { .row[data-row="continue"] .row-track { grid-auto-columns: 84px; } }
/* Home 2: one shelf rule: 10px heading -> covers (4px of it is hover room), 20px to the next shelf, 24px to the bets tabs */
.row { gap: 6px; margin-bottom: 20px; }
.row-track { padding-top: 4px; }
/* Home 3: "Coming soon" is quiet text on the action line */
.banner-soon, .fx2 .banner-soon { margin-top: auto; height: 34px; display: inline-flex; align-items: center; padding: 0; background: none; border-radius: 0; font: 600 12px var(--font); color: var(--muted); }
/* Lobby 1: 16 / 12 from the toolbar to the first VISIBLE section (Favorites may be hidden), 24 between visible sections */
.lobby .lobby-head ~ .section { margin-top: 0; }
.lobby .section:not([hidden]) ~ .section:not([hidden]) { margin-top: 24px; }
/* S1: balance + Wallet as one joined control (fx2 has its own in header-v2.css) */
body:not(.fx2) .top-mid { gap: 0; }
body:not(.fx2) .bal { height: 38px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); border-right: 0; }
body:not(.fx2) .top-wallet { height: 38px; min-height: 38px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-3); border: 1px solid var(--line); border-left: 0; }
/* S2: search fields: 46px, 8px radius, --surface fill, --line border, muted placeholder and icon */
.search-box { min-height: 46px; border-radius: 8px; }
body:not(.fx2) .search-box { background: var(--surface); border: 1px solid var(--line); }
.search-box svg { stroke: var(--muted); }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
@media (max-width: 760px) { body:not(.fx2) .bal { border-right: 1px solid var(--line); border-radius: var(--radius-sm); } }

/* ---------- profile menu (both looks): dropdown on desktop, bottom sheet on phones ---------- */
.acct-menu { min-width: 220px; padding: 6px; gap: 0; background: var(--surface-2); border: 0; border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.acct-who { padding: 8px 12px 10px; font: 700 14px var(--font); color: var(--text); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); font: 600 14px var(--font); color: var(--text); margin: 0; }
.acct-menu svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: var(--surface-3); outline: none; }
.acct-menu a:hover svg, .acct-menu button:hover svg, .acct-menu :focus-visible svg { stroke: var(--text); }
.acct-menu button[data-out] { border-top: 0; margin-top: 4px; box-shadow: inset 0 1px 0 var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); color: var(--text); }
.acct-veil { display: none; }
@media (min-width: 761px) {
  .acct-menu { max-height: calc(100dvh - 70px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 760px) {
  .acct { display: block !important; }
  .acct-btn { width: 40px; min-height: 40px; padding: 0; justify-content: center; }
  .acct-btn span { display: none; }
  .acct-veil { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); }
  .acct-veil[hidden] { display: none !important; }
  .acct-menu { position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 41; min-width: 0; border-radius: 12px 12px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto; }
  .acct-menu a, .acct-menu button { min-height: 48px; }
  html.acct-open { overflow: hidden; }
}

/* ---------- /settings ---------- */
.settings { gap: 16px; }
.settings section { gap: 12px; }
.set-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settings .switch small { display: block; margin: 2px 0 0; }
.settings .switches { grid-template-columns: 1fr; gap: 6px; }
.set-note { font-size: 13px; }
/* the sheet lives inside the sticky header: lift it over the bottom bar while open (phones only; on wide screens the
   header must stay under the left rail, z-index 12, or it covers the rail's top while the menu is open) */
@media (max-width: 760px) { html.acct-open .top { z-index: 45; } }
@media (min-width: 761px) { html.acct-open .top { z-index: 11; } }

/* review 3 S2: end-of-page room on phones = the bar + safe area + 8px; focus clears it by 8px too */
@media (max-width: 760px) { body:not(.is-bare) { padding-bottom: calc(52px + env(safe-area-inset-bottom) + 8px); } }
/* review 3 Home 3: the copy column is 52% (desktop) / 54% (phone) of the banner, 13px descriptions */
.banner.has-img .banner-text { max-width: 52%; }
.banner-text p { font-size: 13px; }
@media (max-width: 760px) { .banner.has-img .banner-text { max-width: 54%; } }

/* ---------- pop-out mini window ---------- */
body.is-bare .play-head { display: flex; align-items: center; gap: 10px; }
.mini-mark { display: none; }
body.is-bare .mini-mark { display: inline-flex; }
body.is-bare .mini-mark .brand-mark { width: 22px; height: 22px; }
body.is-bare .play-head h1 { font: 700 16px var(--font); }
.mini-bal { cursor: default; }
.game-bar.is-mini { display: flex !important; justify-content: space-between; min-height: 0; padding: 2px 4px; margin-top: 8px; }
.game-bar.is-mini .bar-mid { display: none; }
.game-bar.is-mini .bar-btn { width: 40px; min-width: 40px; padding: 0; }
.game-bar.is-mini .bar-btn span { display: none; }
.game-bar.is-mini .bar-left, .game-bar.is-mini .bar-right { display: contents; }
.game-bar.is-mini #fav, .game-bar.is-mini .bar-btn:not([data-panel=settings]):not([data-panel=fair]) { display: none !important; }
/* mini: the balance stands alone (no Wallet next to it), so it gets its full border back; the bar shows icons only */
body.is-bare .bal.mini-bal { border-right: 2px solid var(--surface-3); border-radius: var(--radius-sm); height: 36px; font-size: 14px; }
body:not(.fx2).is-bare .bal.mini-bal { border: 1px solid var(--line); }
body.is-bare .bal.mini-bal:active { transform: none; }
.game-bar.is-mini .bar-btn span { display: none !important; }
.game-bar.is-mini .bar-btn { width: 40px !important; padding: 0 !important; }
/* keyboard focus in search fields: a clear 2px ring (both looks) */
.search-box:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--focus); }
.input:focus-visible { box-shadow: 0 0 0 2px var(--focus); outline: none; }

/* Stake stacks the game (stage on top, controls under, a 400px column, centred) when the room for the frame is under
   ~800px (measured 2026-11-20: frame 773 stacked, 842 side by side). #game is that room; the 400px .ui-frame then
   switches to the kit's stacked layout by itself (its 680px container rule). */
#game { container: game / inline-size; }
@container game (max-width: 799px) { #game > .ui-frame, #game .ui-frame { max-width: 400px; margin-left: auto; margin-right: auto; } }
/* review 5: phone shelves = 111 × 148 covers (recent 84 × 112) with a 6px gap; the track runs 2px past the inset so ~8px of the 4th cover peeks */
@media (max-width: 760px) {
  .row-track { grid-auto-columns: 111px; gap: 6px; margin-right: -2px; }
  .row[data-row="continue"] .row-track { gap: 6px; }
}
@media (min-width: 761px) { body.fx2:not(.is-bare) main.lobby { padding-bottom: 40px; } }   /* review 5: ~64px from the last tile to the footer on desktop */
/* /fair on the shared 1200 column: the column is centred like every page; its text keeps a readable 760 width at the column's left edge */
@media (min-width: 761px) { body.fx2:not(.is-bare) main.fair { margin-left: auto; margin-right: auto; } body.fx2 main.fair > * { max-width: 760px; } }
/* review 6: on phones, keyboard focus and scrolling stop 8px above the bottom bar (scroll-padding) */
@media (max-width: 760px) { html { scroll-padding-bottom: calc(52px + env(safe-area-inset-bottom) + 8px); } }
/* review 6: the lobby's footer follows the catalogue (~64px under the last cover) even on a tall screen */
@media (min-width: 761px) { main.lobby { flex: none; } }
/* review 6: the VISIBLE gap from a shelf's "N playing" line to the next heading is 20. The boxes sit 10 apart; the
   text's own line space (~4 under the activity line, ~6 above the heading inside the 32px head row) makes up the rest. */
@media (min-width: 761px) { .row { margin-bottom: 10px; } }
/* review 6: a focused element on a phone stops 8px above the bottom bar (scroll-margin works where scroll-padding isn't used for focus) */
@media (max-width: 760px) { main a, main button, main input, main select, main [tabindex] { scroll-margin-bottom: calc(52px + env(safe-area-inset-bottom) + 8px); } }

/* ---------- ROLLERT logo (public/img/brand/wordmark.svg) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.brand-word { display: block; height: 24px; width: auto; aspect-ratio: 147 / 32; flex: none; }
/* Both drawings scale together. The dot fits below the final T's crossbar. */
.top .top-in .brand > .brand-word-game, #bar .brand-word-game {
  display: inline-flex;
  align-items: center;
  flex: none;
  font-size: var(--game-logo-height, 15px);
  line-height: 0;
}
.brand-word-game > svg:is(.brand-word,.brand-mark,.brand-domain) { height: 1em; width: auto; flex: none; }
.brand-word-game > .brand-domain {
  display: block;
  width: 1.5em;
  margin-inline-start: var(--suffix-kern, -.25em);
  color: color-mix(in srgb, var(--text-2) 75%, var(--label));
}
.brand-word-game > .brand-mark + .brand-domain { margin-inline-start: 0; }
.top-in { --game-logo-height: 24px; }
@media (max-width: 700px) {
  .top-in { --game-logo-height: 18px; }
}
.brand.has-word { gap: 0; }
.brand-word { --accent: var(--win); }
body.signed-in .top-in .brand.has-word .brand-word { display: block; }
.foot-base .brand-word { height: 20px; }
@media (max-width: 700px) { .top-in .brand-word { height: 18px; } }

/* The same currency artwork is used on bets, current game controls and settled receipts. */
rollert-game-coin.ui-coin, .fx2 rollert-game-coin.ui-coin {
  display: inline-flex; width: 18px; height: 18px; align-items: center;
  flex: none; vertical-align: -.18em; background: transparent !important; box-shadow: none;
}
rollert-game-coin.ui-coin > img { width: 100%; height: 100%; display: block; }
.bet-currency-coin { width: 16px; height: 16px; vertical-align: -.19em; margin-inline-start: .24em; }
/* The site controls and feed share a fixed coin box. Studio HUDs scale with their readout text. */
:root rollert-game-coin.ui-coin:has(> img[src="/img/wallet/gold-coin.svg"]):not(:where(.slot-info *, .slot-round-result *, .slot-line-badge *)),
.bet-currency-coin[src="/img/wallet/gold-coin.svg"] {
  width: var(--gc-icon-size); height: var(--gc-icon-size);
}
