/* ============ Lobby ============ */
.lobby { padding: 16px 14px 28px; }

/* ── Hero ── */
.lobby-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r);
  background:
    radial-gradient(ellipse 80% 120% at 100% 50%, rgba(240,185,11,.09), transparent 65%),
    radial-gradient(ellipse 60% 100% at 0% 60%,  rgba(240,185,11,.13), transparent 60%),
    linear-gradient(140deg, #141a22 0%, #0d1016 100%);
  border: 1px solid rgba(240,185,11,.18);
  padding: 22px 20px 20px; margin-bottom: 22px;
}
/* Gold accent line along the top edge */
.lobby-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(240,185,11,.55) 35%, rgba(240,185,11,.55) 65%, transparent 100%);
}
.lobby-hero-eyebrow {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); opacity: .7; margin-bottom: 8px;
}
.lobby-hero h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.lobby-hero p  { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Feature chips row */
.lobby-feat { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.lobby-feat-chip {
  font-size: 10px; font-weight: 600; letter-spacing: .2px;
  background: rgba(240,185,11,.07); border: 1px solid rgba(240,185,11,.2);
  color: rgba(240,185,11,.75); border-radius: 999px; padding: 4px 11px;
}

/* ── Section headers ── */
.lobby-section-hd {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 12px;
}
.lobby-section-hd::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.lobby-section-title {
  font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; flex-shrink: 0; white-space: nowrap;
}
.game-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.game-card {
  /* Per-game accent pair (overridden per game below). */
  --c1: #f0b90b; --c2: #ff7a1a;
  position: relative; text-align: left;
  border: 1px solid color-mix(in srgb, var(--c1) 30%, var(--line));
  border-radius: var(--r); padding: 14px; min-height: 130px; display: flex; flex-direction: column;
  justify-content: flex-end; overflow: hidden; color: var(--text);
  transition: transform .12s ease, border-color .18s ease, box-shadow .18s ease;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c1) 10%, #0e1218), #0a0c10 78%);
}
/* Illustration scene fills the card; scrim darkens the lower-left for text legibility. */
.game-art { position: absolute; inset: 0; z-index: 0; }
.game-art svg { width: 100%; height: 100%; display: block; }
.game-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, transparent 28%, rgba(7,9,13,.62) 72%, rgba(7,9,13,.9));
}
.game-card:active { transform: scale(.98); }
.game-card.live { cursor: pointer; }
.game-card.live:hover { transform: translateY(-3px); box-shadow: 0 14px 34px color-mix(in srgb, var(--c1) 30%, transparent); border-color: color-mix(in srgb, var(--c1) 60%, transparent); }
.game-card.soon { opacity: .78; cursor: default; }

/* Icon sits in a colored tile for premium pop. */
.game-card .icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  color: var(--c1); position: relative; z-index: 1;
  background: color-mix(in srgb, var(--c1) 18%, rgba(0,0,0,.35));
  border: 1px solid color-mix(in srgb, var(--c1) 36%, transparent);
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--c1) 22%, transparent);
  backdrop-filter: blur(2px);
}
.game-card .icon .ic { width: 26px; height: 26px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c1) 65%, transparent)); }
.game-card .title { font-weight: 700; font-size: 15px; margin-top: 8px; position: relative; z-index: 1; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.game-card .sub { font-size: 10px; color: #c4cbd6; margin-top: 1px; position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,.7); }

/* PLAY badge hidden — tag badge takes the top-right corner instead */
.badge { display: none; }
.badge.soon { display: block; position: absolute; top: 10px; right: 10px; font-size: 8px; font-weight: 800; letter-spacing: .6px; padding: 3px 7px; border-radius: 999px; z-index: 2; background: rgba(255,255,255,.08); color: var(--muted); }

/* ── Game indicator tag — absolute top-right (replaces PLAY badge) ── */
.game-tag { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 8.5px; font-weight: 800; letter-spacing: .6px; pointer-events: none; box-shadow: 0 1px 8px rgba(0,0,0,.3); backdrop-filter: blur(4px); }
.game-tag .gt-icon { display: flex; align-items: center; }
.gt-hot      { background: #c8290e; color: #fff; border: 1px solid #e03010; box-shadow: 0 2px 10px rgba(200,40,14,.55); }
.gt-popular  { background: #1d4ed8; color: #fff; border: 1px solid #2563eb; box-shadow: 0 2px 10px rgba(29,78,216,.55); }
.gt-trending { background: #0e7a4a; color: #fff; border: 1px solid #11a360; box-shadow: 0 2px 10px rgba(14,122,74,.5); }
.gt-new      { background: #b38600; color: #fff; border: 1px solid #d4a000; box-shadow: 0 2px 10px rgba(179,134,0,.5); }

/* ── Payout row — plain inline, part of card content (no separate box) ── */
.card-payout { display: flex; align-items: center; gap: 6px; margin-top: 6px; position: relative; z-index: 1; }
.cp-label { font-size: 8px; color: var(--muted); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.cp-sep { font-size: 8px; color: var(--muted); opacity: .5; }
.cp-value { font-size: 11px; font-weight: 800; color: color-mix(in srgb, var(--c1) 90%, #fff); font-variant-numeric: tabular-nums; letter-spacing: -.2px; }

/* ── Per-game color identities ── */
.gc-crash    { --c1: #f0b90b; --c2: #ff7a1a; }  /* gold → orange  */
.gc-dice     { --c1: #8b5cff; --c2: #c06bff; }  /* violet         */
.gc-coinflip { --c1: #0ecb81; --c2: #06b6d4; }  /* emerald → cyan */
.gc-lucky    { --c1: #ff5d8f; --c2: #ff9d5d; }  /* pink → coral   */
.gc-wheel    { --c1: #3b82f6; --c2: #22d3ee; }  /* blue → cyan    */
.gc-balloon  { --c1: #ff8c42; --c2: #e65000; }  /* orange → burnt  */
.gc-minefield{ --c1: #ff5a3c; --c2: #b3121b; }  /* fiery red       */

/* ============ History strip ============ */
.history-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
.history-strip::-webkit-scrollbar { display: none; }
.hist-pill { flex: 0 0 auto; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--line); }
.hist-pill.low  { color: #9aa7bd; }
.hist-pill.mid  { color: var(--accent); }
.hist-pill.high { color: var(--accent-2); }
.hist-pill.bust { color: var(--lose); }

/* ============ Growth pills (shared) ============ */
.growth-pills { display: flex; gap: 8px; }
.growth-pill { flex: 1; min-height: 34px; border-radius: 8px; font-weight: 600; font-size: 12px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.growth-pill.active { color: #1a1300; background: var(--accent); border-color: transparent; }

/* ============ Bet slot ============ */
.bets { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }

.slot { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.slot.armed { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.slot-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 999px; padding: 3px; align-self: flex-start; }
.slot-tab { font-size: 11px; padding: 5px 14px; border-radius: 999px; color: var(--muted); background: none; font-weight: 600; }
.slot-tab.active { background: var(--panel-2); color: var(--text); }

.slot-stake-row { display: flex; align-items: center; gap: 8px; }
.slot-stake { flex: 1; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 42px; padding: 0 4px; }
.slot-stake input { flex: 1; width: 100%; min-width: 0; background: none; border: none; color: var(--text); font-size: 17px; font-weight: 600; text-align: center; outline: none; font-variant-numeric: tabular-nums; }
.stake-step { width: 32px; min-width: 32px; height: 32px; border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 20px; display: grid; place-items: center; font-weight: 600; }
.slot-chips { display: flex; gap: 6px; }
.slot-chips .chip { flex: 1; min-height: 30px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 600; }
.slot-chips .chip-x2 { color: var(--gold); border-color: rgba(240,185,11,.35); }

.slot-auto { display: none; flex-direction: column; gap: 10px; }
.slot.auto-mode .slot-auto { display: flex; }
.auto-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.auto-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auto-text > span { color: var(--text); font-weight: 600; font-size: 12px; }
.auto-hint { font-size: 10px; color: var(--muted); }
.auto-val { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; min-height: 32px; }
.auto-val input { width: 52px; background: none; border: none; color: var(--text); text-align: right; font-weight: 600; outline: none; font-variant-numeric: tabular-nums; }

.switch { position: relative; width: 40px; height: 22px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; inset: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; transition: .2s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + .track { background: rgba(240,185,11,.25); border-color: var(--accent); }
.switch input:checked + .track .thumb { left: 21px; background: var(--accent); }

.launch-btn {
  width: 100%; min-height: 56px; border-radius: var(--r); font-size: 17px; font-weight: 700; letter-spacing: .3px;
  color: #04130d; background: linear-gradient(180deg, #16d98e, #07b977);
  box-shadow: 0 6px 18px rgba(14,203,129,.28); transition: transform .06s ease, filter .15s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.launch-btn:active { transform: scale(.98); }
.launch-btn .sub { font-size: 12px; font-weight: 500; opacity: .85; }
.launch-btn.cashout { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a1300; box-shadow: 0 6px 18px rgba(240,185,11,.32); animation: pulse 1s ease-in-out infinite; }
.launch-btn.waiting { background: var(--panel-2); color: var(--muted); box-shadow: none; border: 1px solid var(--lose); }
.launch-btn.disabled, .launch-btn:disabled { filter: grayscale(.3) brightness(.85); opacity: .7; pointer-events: none; }
@keyframes pulse { 50% { filter: brightness(1.12); } }

/* My-bets list */
.mybets { padding: 4px 14px 10px; }
.mybets--empty { display: none; }
.mybets-list { max-height: 224px; overflow-y: auto; }
.mybets h4 { margin: 6px 0; font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.mybet { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mybet .at { color: var(--muted); font-size: 12px; }
.mybet .pnl.win { color: var(--win); font-weight: 600; }
.mybet .pnl.lose { color: var(--lose); font-weight: 600; }

@media (min-width: 480px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Lobby footer disclaimer ── */
.lobby-footer {
  border-top: 1px solid var(--line);
  padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
  margin-top: auto;
}
.lobby-disclaimer {
  margin: 0; font-size: 9px; color: var(--muted); line-height: 1.6;
  opacity: .45; font-weight: 400; letter-spacing: .1px; text-align: center;
}

/* ── Mobile lobby card compact ── */
@media (max-width: 479px) {
  .lobby { padding: 12px 10px 22px; }
  .lobby-hero { padding: 16px 14px 16px; margin-bottom: 16px; }
  .lobby-hero h1 { font-size: 19px; }
  .lobby-hero p  { font-size: 12px; }
  .lobby-feat { gap: 5px; margin-top: 12px; }
  .lobby-feat-chip { font-size: 9px; padding: 3px 9px; }
  .lobby-section-hd { margin: 12px 0 10px; }
  .game-grid { gap: 8px; }
  .game-card { min-height: 108px; padding: 11px; }
  .game-card .icon { width: 40px; height: 40px; border-radius: 10px; }
  .game-card .icon .ic { width: 22px; height: 22px; }
  .game-card .title { font-size: 13px; margin-top: 6px; }
  .game-card .sub   { font-size: 9px; }
  .card-payout { gap: 4px; margin-top: 4px; }
  .cp-label, .cp-sep { font-size: 7px; }
  .cp-value { font-size: 10px; }
  .game-tag { font-size: 7.5px; padding: 2px 6px; top: 8px; right: 8px; }
}

/* ============ Game loading (first-visit lazy load) — reuses splash-inner styles ============ */
.game-loading {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 60vh;
}

/* ============ Game mode badge — shared by all games ============ */
.crash-badge {
  margin: 10px 14px 0; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  padding: 5px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line);
}
.crash-badge.practice { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1a1300; border: none; }
.crash-badge.real     { background: linear-gradient(90deg, var(--win), #0aa869); color: #04130d; border: none; }

/* ============ Mobile bottom tab bar — shared by all games ============ */
.mnav { display: none; }
@media (max-width: 879px) {
  .mnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    display: flex; gap: 4px; padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(11,14,17,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .mnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 4px; background: none; color: var(--muted);
    font-size: 10px; font-weight: 600; letter-spacing: .4px; border-radius: 10px;
    transition: color .15s ease;
  }
  .mnav button.active { color: var(--accent); }
  .mnav button .ic { width: 18px; height: 18px; }
}

/* ===== Icons ===== */
.ic { display: block; }
.ic-wrap { display: inline-flex; align-items: center; justify-content: center; }
.icon-btn .ic { width: 20px; height: 20px; }
.brand-mark { display: inline-flex; }
.brand-mark .ic { width: 22px; height: 22px; }
.crash-header .title { display: inline-flex; align-items: center; gap: 6px; }
.crash-header .title .ic { width: 18px; height: 18px; }
.btn-ghost .ic { width: 16px; height: 16px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; }

/* ===== Result popup (non-blocking, animated) ===== */
.popup-host { position: fixed; left: 0; right: 0; top: 20%; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; z-index: 70; padding: 0 14px; }
.result-pop {
  position: relative;
  display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-radius: 16px; min-width: 210px;
  background: linear-gradient(180deg, rgba(30,37,48,.98), rgba(17,21,28,.98));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: rp-in .42s cubic-bezier(.18,1.5,.4,1) both;
}
.result-pop.out { animation: rp-out .3s ease forwards !important; }
.result-pop.win {
  border-color: rgba(240,185,11,.55);
  animation: rp-in-win .55s cubic-bezier(.16,1.6,.35,1) both, rp-glow 1.6s ease .2s;
  box-shadow: 0 14px 44px rgba(240,185,11,.3);
}
.result-pop.lose { border-color: rgba(246,70,93,.5); box-shadow: 0 14px 44px rgba(246,70,93,.28); }
@keyframes rp-in-win {
  0%   { opacity: 0; transform: translateY(28px) scale(.5); }
  60%  { opacity: 1; transform: translateY(-5px) scale(1.07); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rp-glow {
  0%, 100% { box-shadow: 0 14px 44px rgba(240,185,11,.3); }
  40%      { box-shadow: 0 14px 70px rgba(240,185,11,.65); }
}
.rp-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; }
.result-pop.win .rp-icon { color: var(--accent); background: rgba(240,185,11,.14); animation: pop-bounce-rot .7s ease 1; }
.result-pop.lose .rp-icon { color: var(--lose); background: rgba(246,70,93,.14); }
@keyframes pop-bounce-rot {
  0%, 100% { transform: scale(1) rotate(0deg); }
  35%      { transform: scale(1.28) rotate(-9deg); }
  65%      { transform: scale(1.12) rotate(7deg); }
}

/* ===== Login / register prompt ===== */
.login-prompt-card {
  max-width: 360px !important; text-align: left !important; padding: 28px 24px 20px !important;
  background: var(--panel) !important;
}
.login-prompt-hd {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px;
}
.login-prompt-hd h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.login-prompt-x {
  background: none; color: var(--muted); padding: 2px; border-radius: 6px; flex-shrink: 0;
  transition: color .15s; margin-left: 8px;
}
.login-prompt-x:hover { color: var(--text); }
.login-prompt-x .ic { width: 18px; height: 18px; }
.login-prompt-sub { margin: 0 0 22px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.login-prompt-create {
  display: block; width: 100%; padding: 14px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1a1300 !important;
  border: none; border-radius: 999px; font-size: 15px; font-weight: 700; text-align: center;
  text-decoration: none; cursor: pointer; transition: filter .15s ease;
}
.login-prompt-create:hover { filter: brightness(1.1); }
.login-prompt-login {
  display: block; width: 100%; padding: 13px;
  background: none; color: var(--text); border: 1.5px solid var(--line);
  border-radius: 999px; font-size: 15px; font-weight: 600; transition: border-color .15s ease;
}
.login-prompt-login:hover { border-color: rgba(255,255,255,.25); }

/* Win celebration layers */
.rp-ring {
  position: absolute; left: 50%; top: 50%; width: 240px; height: 240px; pointer-events: none;
  border: 2px solid rgba(240,185,11,.8); border-radius: 50%;
  transform: translate(-50%,-50%) scale(.12); opacity: 1;
  animation: rp-ring .7s ease-out .05s forwards;
}
@keyframes rp-ring { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }
.rp-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.rp-shine::after {
  content: ''; position: absolute; inset: -20%;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
  transform: translateX(-130%); animation: rp-shine 1s ease .18s forwards;
}
@keyframes rp-shine { to { transform: translateX(130%); } }
.rp-conf {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 2px;
  background: var(--c, var(--gold)); opacity: 0; pointer-events: none;
  animation: rp-conf .9s ease-out forwards;
}
@keyframes rp-conf {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.55) rotate(var(--rot)); }
}
.rp-title { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.rp-big { font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.rp-amt { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-pop.win .rp-amt { color: var(--win); }
.result-pop.lose .rp-amt { color: var(--lose); }
@keyframes rp-in { 0% { opacity: 0; transform: translateY(18px) scale(.8); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rp-out { to { opacity: 0; transform: translateY(-10px) scale(.96); } }
@keyframes pop-bounce { 0%,100% { transform: scale(1); } 40% { transform: scale(1.18); } }

/* ===== Blocking dialog ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(5,7,10,.62); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; }
.modal-overlay.show { opacity: 1; }
.modal-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px; text-align: center; box-shadow: var(--shadow); transform: translateY(14px) scale(.94); opacity: 0; transition: transform .25s cubic-bezier(.18,1.4,.4,1), opacity .2s ease; }
.modal-overlay.show .modal-card { transform: translateY(0) scale(1); opacity: 1; }
.modal-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--accent); background: rgba(240,185,11,.14); margin-bottom: 12px; }
.modal-icon .ic { width: 26px; height: 26px; }
.modal-title { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.modal-msg { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-ok { width: 100%; }

/* ===== Skeleton loader ===== */
@keyframes skeleton-wave {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--panel-2) 25%, rgba(255,255,255,.06) 50%, var(--panel-2) 75%);
  background-size: 800px 100%;
  animation: skeleton-wave 1.4s ease-in-out infinite;
  border-radius: 8px;
}
/* Structured account-card skeleton (mirrors the real card layout). */
.acct-card-skel { pointer-events: none; cursor: default; }
.acct-card-skel:hover { border-color: var(--line); background: var(--panel-2); }
.skel-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.skel-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.skel-line { height: 10px; border-radius: 5px; }
.skel-badge { width: 46px; height: 12px; }
.skel-id   { width: 72%; }
.skel-bal  { width: 40%; height: 16px; margin-top: 2px; }

/* Balance chip skeleton (while connecting / switching account) */
.balance.loading .balance-mode,
.balance.loading .balance-amount {
  display: block; color: transparent !important;
  background: linear-gradient(90deg, var(--panel-2) 25%, rgba(255,255,255,.08) 50%, var(--panel-2) 75%);
  background-size: 800px 100%; animation: skeleton-wave 1.4s ease-in-out infinite; border-radius: 5px;
}
.balance.loading .balance-mode   { width: 36px; height: 8px; margin-bottom: 5px; }
.balance.loading .balance-amount { width: 64px; height: 14px; }

/* ===== Account picker (pro) ===== */
.acct-picker-card {
  padding: 0 !important; text-align: left !important; overflow: hidden;
  max-width: 400px !important;
}
.acct-picker-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 16px; border-bottom: 1px solid var(--line);
}
.acct-picker-hd .modal-icon { margin: 0; width: 38px; height: 38px; flex-shrink: 0; }
.acct-picker-hd h3 { margin: 0; font-size: 16px; font-weight: 600; }
.acct-picker-hd p  { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.acct-list { display: flex; flex-direction: column; gap: 8px; padding: 14px; }

.acct-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
}
.acct-card:hover  { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.03); }
.acct-card:active { transform: scale(.985); }
.acct-card.active.demo { border-color: rgba(240,185,11,.55); background: rgba(240,185,11,.06); }
.acct-card.active.real { border-color: rgba(14,203,129,.55); background: rgba(14,203,129,.05); }

.acct-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
}
.acct-avatar.demo { background: rgba(240,185,11,.15); color: var(--gold); }
.acct-avatar.real { background: rgba(14,203,129,.15); color: var(--win); }

.acct-info { flex: 1; min-width: 0; }
.acct-badge {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  padding: 2px 7px; border-radius: 999px; margin-bottom: 4px;
}
.acct-badge.demo { background: rgba(240,185,11,.15); color: var(--gold); }
.acct-badge.real { background: rgba(14,203,129,.15); color: var(--win); }
.acct-id  { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-bal { font-size: 20px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }

.acct-check { flex-shrink: 0; display: flex; color: var(--accent); }
.acct-check.real { color: var(--win); }

.acct-cancel {
  width: 100%; border-radius: 0 !important; border-top: 1px solid var(--line) !important;
  background: transparent !important; color: var(--muted) !important;
  min-height: 50px; font-size: 14px; font-weight: 500;
  border: none !important; transition: background .15s ease, color .15s ease;
}
.acct-cancel:hover { background: rgba(255,255,255,.04) !important; color: var(--text) !important; }

/* Balance chip — clickable when logged in */
.balance.can-switch { cursor: pointer; transition: border-color .15s ease, transform .08s ease; }
.balance.can-switch:hover  { border-color: rgba(240,185,11,.35); }
.balance.can-switch:active { transform: scale(.96); }
