/* MTK Play — installable player app.

   One design system for every player screen: a red brand bar, white cards on
   a cool light background, one red accent for every action, and green/red only
   for win/loss meaning. Mobile first and one-thumb friendly: every control is
   at least 44px tall, primary actions sit at the bottom of the screen, and the
   balance is always in the top bar.

   Strict CSP forbids inline style attributes, so every variable-length element
   uses a stepped class (fill-0 … fill-100) instead of an inline width. */

:root {
  color-scheme: light;

  /* surfaces */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --line: #e3e8ef;
  --line-strong: #cfd7e3;

  /* text (all ≥ 4.5:1 on white) */
  --text: #142033;
  --text-2: #334155;
  --muted: #5b687c;

  /* brand: one red for every action */
  --brand: #d63a3f;
  --brand-dark: #b3262f;
  --brand-soft: #fdecec;
  --brand-ring: rgba(214, 58, 63, .28);
  --brand-ink: #ffffff;
  --bar-gradient: linear-gradient(180deg, #c93443 0%, #dc4b4b 60%, #e45f59 100%);

  /* meaning */
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --ok-line: #86efac;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --warn-line: #fcd34d;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --danger-line: #fca5a5;
  --info-soft: #eff6ff;
  --info-line: #bfdbfe;
  --rose: #dc2626;

  /* shape and rhythm (4/8 spacing), tightened for phones */
  --s1: 3px;
  --s2: 6px;
  --s3: 10px;
  --s4: 13px;
  --s5: 18px;
  --s6: 26px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --tap: 46px;
  --tap-min: 44px;
  --nav-height: 64px;
  --shell: 540px;
  --shadow: 0 6px 20px rgba(15, 23, 42, .08);
  --shadow-soft: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);

  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: 120ms;
  --base: 180ms;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--brand);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  white-space: nowrap;
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vertical-align: middle;
}

/* ======================================================================
   App shell
   ====================================================================== */

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--s4) var(--s3) var(--s6);
}

.has-app-nav .wrap {
  padding-bottom: calc(var(--nav-height) + var(--s6) + env(safe-area-inset-bottom));
}

/* ---- plain white bar (sign-in screens) ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-in {
  display: flex;
  max-width: var(--shell);
  min-height: 48px;
  margin: 0 auto;
  padding: 4px 8px;
  align-items: center;
  gap: 6px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.app-logo {
  display: block;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.wallet-chip {
  display: inline-flex;
  min-height: 34px;
  margin-left: auto;
  padding: 3px 7px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: .74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wallet-chip-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  color: var(--brand);
  vertical-align: middle;
}

.header-live-clock {
  display: inline-flex;
  min-height: 30px;
  padding: 3px 6px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.header-live-clock-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-topbar .header-live-clock {
  margin-left: auto;
}

.wallet-chip span {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: .85;
}

.install-button {
  min-height: 34px;
  padding: 3px 7px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
}

.install-button:hover {
  background: var(--brand-dark);
}

/* ---- red brand bar (every signed-in screen) --------------------------
   Two flavors share one look: the tab bar (Markets/Bets/Wallet/Profile) has
   a title and the balance; the drill-in bar adds a back arrow. */
.market-dashboard-page {
  background: var(--bg);
}

.market-dashboard-bar {
  border-bottom: 0;
  background: var(--bar-gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124, 23, 37, .22);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.market-dashboard-bar-in {
  display: grid;
  max-width: var(--shell);
  min-height: 48px;
  margin: 0 auto;
  padding: 4px 8px;
  align-items: center;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  column-gap: 3px;
}

.market-back {
  display: inline-flex;
  width: 34px;
  height: 34px;
  margin-left: -2px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  transition: background var(--fast) ease;
}

.market-back:hover,
.market-back:active {
  background: rgba(255, 255, 255, .16);
}

.market-back:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .85);
  outline-offset: 0;
}

.market-back-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.market-dashboard-bar .header-live-clock {
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.market-dashboard-title {
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-bar-in {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  column-gap: var(--s2);
  padding-left: var(--s4);
}

.tab-bar-in .market-dashboard-title {
  grid-column: 1;
  font-size: .96rem;
}

.tab-wallet-chip {
  border-color: var(--ok-line);
  background: var(--ok);
  color: #fff;
}

.tab-wallet-chip span {
  color: rgba(255, 255, 255, .94);
}

.tab-wallet-chip .wallet-chip-icon {
  color: #fff;
}

.tab-wallet-chip:hover {
  border-color: #4ade80;
  background: #166534;
}

.tab-wallet-chip:focus-visible,
.tab-install-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .85);
}

.tab-install-button {
  border-color: rgba(255, 255, 255, .5);
  background: #fff;
  color: var(--brand-dark);
}

.tab-install-button:hover {
  background: #fff5f5;
}

/* ---- bottom navigation ----------------------------------------------- */
.app-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 0 var(--s3) env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-nav-in {
  display: grid;
  max-width: var(--shell);
  height: var(--nav-height);
  margin: 0 auto;
  /* Auto columns so the bar fits however many tabs it is given. */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.app-nav-link {
  display: flex;
  min-height: var(--tap-min);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.app-nav-pill {
  display: inline-flex;
  width: 48px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background var(--base) var(--ease), color var(--base) var(--ease);
}

.app-nav-link:hover .app-nav-pill {
  background: var(--surface-2);
}

.app-nav-link.is-active {
  color: var(--brand);
}

.app-nav-link.is-active .app-nav-pill {
  background: var(--brand-soft);
}

.app-nav-link.is-active .app-nav-label {
  font-weight: 800;
}

.app-nav-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.footbar {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--s3) 96px;
}

.footlink {
  display: inline-flex;
  min-height: var(--tap-min);
  padding: 9px 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

/* ======================================================================
   Type and helpers
   ====================================================================== */

h1 {
  margin: var(--s1) 0 var(--s2);
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -.03em;
}

h2 {
  margin: var(--s5) 0 var(--s3);
  font-size: 1rem;
  letter-spacing: -.015em;
}

p {
  margin: 0 0 var(--s3);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .875rem;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.nums {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

.market-list-time,
.market-overview-time {
  flex-wrap: wrap;
  column-gap: 4px;
}

.lead {
  margin-bottom: var(--s4);
  color: var(--muted);
}

.section-label,
.market-section-label {
  display: flex;
  margin: var(--s5) 2px var(--s2);
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.section-label:first-child {
  margin-top: var(--s1);
}

.section-label .count {
  color: var(--text-2);
  letter-spacing: 0;
  text-transform: none;
}

.net-pos {
  color: var(--ok);
  font-weight: 800;
}

.net-neg {
  color: var(--danger);
  font-weight: 800;
}

/* ======================================================================
   Feedback
   ====================================================================== */

.flashes {
  display: grid;
  margin: 0 0 var(--s3);
  gap: var(--s2);
}

.flash {
  display: flex;
  margin: 0 0 var(--s3);
  padding: 10px 12px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: .925rem;
  line-height: 1.4;
}

.flashes .flash {
  margin: 0;
}

.flash-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.flash-success {
  border-color: var(--ok-line);
  background: var(--ok-soft);
  color: #14532d;
}

.flash-error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: #7f1d1d;
}

.flash-warn {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: #78350f;
}

.flash-info {
  border-color: var(--info-line);
  background: var(--info-soft);
  color: #1e3a8a;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--primary, #1d4ed8);
  font: inherit;
  font-weight: 700;
  padding: 8px;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
}

.dev-code {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 850;
  letter-spacing: .18em;
}

/* Empty states always say what to do next. */
.empty {
  padding: var(--s6) var(--s4);
  color: var(--muted);
  text-align: center;
}

.empty-state {
  display: flex;
  margin: var(--s4) 0;
  padding: var(--s6) var(--s4);
  align-items: center;
  flex-direction: column;
  gap: var(--s2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  margin-bottom: var(--s1);
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state strong {
  font-size: 1.05rem;
}

.empty-state p {
  max-width: 30ch;
  margin: 0 0 var(--s2);
  color: var(--muted);
}

.empty-state .btn {
  width: auto;
}

/* ======================================================================
   Surfaces
   ====================================================================== */

.card {
  margin: 0 0 var(--s3);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card> :last-child {
  margin-bottom: 0;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.stack {
  display: grid;
  gap: var(--s3);
}

.kv {
  display: flex;
  min-height: var(--tap-min);
  padding: 10px 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  border-bottom: 1px solid var(--line);
}

.kv:last-child {
  border-bottom: 0;
}

.kv .k {
  color: var(--muted);
}

.kv .v {
  text-align: right;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  padding: 2px 9px;
  align-items: center;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.tag.won,
.tag.approved,
.tag.open {
  background: var(--ok-soft);
  color: #166534;
}

.tag.lost,
.tag.rejected,
.tag.blocked {
  background: var(--danger-soft);
  color: #991b1b;
}

.tag.pending {
  background: var(--warn-soft);
  color: #92400e;
}

.tag.void {
  background: var(--surface-2);
  color: var(--text-2);
}

.badge-new {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .03em;
}

/* ======================================================================
   Forms and buttons
   ====================================================================== */

label {
  display: block;
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 750;
}

input[type=text],
input[type=tel],
input[type=number],
input[type=password],
input[type=search],
select {
  width: 100%;
  min-height: var(--tap);
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}

input::placeholder {
  color: #94a3b8;
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.num-big {
  font-size: 1.1rem !important;
  font-weight: 750;
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
}

.field {
  margin: 0 0 var(--s4);
}

.field-label-with-icon {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.2;
}

.field-label-with-icon .hint {
  margin: 0 0 0 auto;
  font-size: .74rem;
  font-weight: 600;
}

.field-label-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  color: var(--brand);
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.btn {
  display: inline-flex;
  width: 100%;
  min-height: var(--tap);
  padding: 9px 18px;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  cursor: pointer;
  font-size: .95rem;
  font-weight: 800;
  text-align: center;
  transition: background var(--fast) ease, border-color var(--fast) ease, transform var(--fast) ease;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.btn:active {
  transform: scale(.98);
}

.btn.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.btn.secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--brand);
}

.btn.ghost:hover {
  background: var(--brand-soft);
}

.btn.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn.danger-outline {
  border-color: var(--danger-line);
  background: var(--surface);
  color: var(--danger);
}

.btn.danger-outline:hover {
  background: var(--danger-soft);
}

.btn.light {
  border-color: #fff;
  background: #fff;
  color: var(--brand-dark);
}

.btn.light:hover {
  background: #fff5f5;
}

.btn.btn-deposit,
.btn-deposit {
  border-color: #059669;
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, .28);
}

.btn.btn-deposit:hover,
.btn-deposit:hover {
  border-color: #047857;
  background: #047857;
  color: #ffffff;
}

.btn.btn-deposit:active,
.btn-deposit:active {
  border-color: #065f46;
  background: #065f46;
}

.btn.btn-withdraw,
.btn-withdraw {
  border: 1.5px solid rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .15);
  color: #ffffff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.btn.btn-withdraw:hover,
.btn-withdraw:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, .26);
  color: #ffffff;
}

.btn.btn-withdraw:active,
.btn-withdraw:active {
  border-color: #ffffff;
  background: rgba(255, 255, 255, .36);
}

.btn.small {
  width: auto;
  min-height: 44px;
  padding: 6px 14px;
  font-size: .875rem;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.inline-form {
  display: inline;
}

.divider {
  display: flex;
  margin: var(--s4) 0;
  align-items: center;
  gap: var(--s3);
  color: var(--muted);
  font-size: .875rem;
}

.divider::before,
.divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

/* ======================================================================
   Sign-in screens
   ====================================================================== */

.auth-hero {
  padding: var(--s5) 0 var(--s4);
  text-align: center;
}

.auth-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--s3);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(214, 58, 63, .25);
}

.auth-hero h1 {
  margin-bottom: var(--s1);
}

.auth-hero p {
  max-width: 32ch;
  margin: 0 auto;
  color: var(--muted);
}

.auth-links {
  display: grid;
  margin-top: var(--s2);
  gap: var(--s1);
  text-align: center;
}

.auth-links a,
.auth-links .btn {
  font-size: .95rem;
}

.app-steps {
  margin: var(--s2) 0 0;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: .95rem;
}

.app-steps li {
  margin: var(--s1) 0;
}

.app-steps b {
  color: var(--text);
}

.store-badge {
  display: flex;
  width: 100%;
  min-height: 68px;
  padding: 10px 22px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #000;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
}

.store-badge:hover,
.store-badge:focus-visible {
  background: #1c1c1e;
}

.store-badge img {
  width: 34px;
  height: auto;
  flex-shrink: 0;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
  text-align: left;
}

.store-badge-text small {
  color: #d4d4d8;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.store-badge-text strong {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Mobile-first sign-in: clear branding and comfortable touch controls. */
.auth-tight .wrap {
  max-width: 480px;
  padding: 18px 16px 30px;
}

.auth-tight .auth-hero {
  margin-bottom: 14px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #fff5f3 100%);
}

.auth-tight .auth-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(214, 58, 63, .2);
}

.auth-tight .auth-hero h1 {
  margin: 0 0 5px;
  font-size: 1.4rem;
}

.auth-tight .auth-hero p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  max-width: 42ch;
}

.auth-tight .section-label {
  margin: 0 2px 8px;
}

.auth-tight .card {
  margin-bottom: 12px;
  padding: 16px;
}

.auth-tight .field {
  margin-bottom: 14px;
}

.auth-tight .field label {
  margin-bottom: 6px;
}

.auth-tight .field .hint {
  margin-top: 4px;
}

.auth-tight input[type=text],
.auth-tight input[type=tel],
.auth-tight input[type=password] {
  min-height: 46px;
  padding: 10px 12px;
}

.auth-tight .num-big {
  font-size: 1.04rem !important;
}

.auth-tight .btn {
  min-height: 48px;
  padding: 11px 16px;
}

.auth-tight .divider {
  margin: 13px 0;
  font-size: .82rem;
}

.auth-tight .store-badge {
  min-height: 56px;
  padding: 7px 14px;
  gap: 10px;
  border-radius: 12px;
}

.auth-tight .store-badge img {
  width: 28px;
}

.auth-tight .store-badge-text small {
  font-size: .6rem;
}

.auth-tight .store-badge-text strong {
  font-size: 1.15rem;
}

/* ======================================================================
   Results (panas and jodi)
   ====================================================================== */

.result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.result .cell {
  min-width: 2.2em;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: .06em;
}

.result .sep {
  color: #94a3b8;
  font-weight: 700;
}

.result.big .cell {
  font-size: 1.12rem;
}

/* ======================================================================
   Home: market list
   ====================================================================== */

.home-welcome {
  display: flex;
  margin: 0 0 7px;
  padding: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  background: linear-gradient(120deg, #fff 0%, #f8f7ff 56%, #fff5f4 100%);
  box-shadow: 0 5px 18px rgb(30 41 59 / 8%);
}

.home-welcome-copy {
  min-width: 0;
}

.home-welcome-label {
  color: #d63a3f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.home-welcome h2 {
  margin: 2px 0;
  color: var(--text);
  font-size: .98rem;
  font-weight: 850;
  letter-spacing: -.03em;
  line-height: 1.25;
}

.home-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}

.home-welcome-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #fee2e2 0%, #ede9fe 100%);
  color: #d63a3f;
}

.home-welcome-side {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}

.home-welcome .app-language-picker {
  min-height: 27px;
  margin: 0;
  padding: 2px 5px;
  gap: 4px;
  border: 1px solid #d7dcef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 9px rgb(79 70 229 / 10%);
}

.home-welcome .app-language-picker label span {
  display: none;
}

.home-welcome .app-language-picker label .icon {
  width: 13px;
  height: 13px;
  color: #4f46e5;
}

.home-welcome .app-language-picker select {
  min-height: 22px;
  max-width: 82px;
  padding: 0 16px 0 3px;
  border: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.home-welcome-icon .icon {
  width: 18px;
  height: 18px;
}

.market-list-grid {
  display: grid;
  gap: var(--s3);
}

.market-list-tile {
  position: relative;
  display: block;
  padding: var(--s4);
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .16);
  isolation: isolate;
  transition: transform var(--fast) ease, box-shadow var(--base) ease;
}

.market-list-tile::after {
  position: absolute;
  right: -40px;
  bottom: -56px;
  z-index: -1;
  width: 140px;
  height: 140px;
  border: 26px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
}

.market-list-tile:hover {
  box-shadow: 0 10px 22px rgba(15, 23, 42, .22);
}

.market-list-tile:active {
  transform: scale(.99);
}

.market-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-list-name {
  font-size: 1rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(15, 23, 42, .25);
}

.market-list-time {
  display: flex;
  margin-top: 2px;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .92);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.market-list-time .icon {
  width: 14px;
  height: 14px;
}

.market-list-result {
  display: flex;
  width: 100%;
  margin: var(--s3) 0;
  padding: 8px 6px;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, .1);
}

.market-list-result .cell {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(15, 23, 42, .18);
  color: #fff;
}

.market-list-result .sep {
  color: rgba(255, 255, 255, .7);
}

.market-list-result .cell {
  min-width: 2.5em;
  padding: 6px 8px;
  background: rgba(15, 23, 42, .2);
  font-size: 1.02rem;
}

.market-list-foot {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.market-list-foot .market-window-row {
  flex: 1;
}

.market-list-go {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

/* Doubled class: must beat the later .market-window.is-open / .is-shut. */
.market-window.market-list-window {
  min-height: 44px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(15, 23, 42, .16);
  color: rgba(255, 255, 255, .85);
}

.market-window.market-list-window.is-open {
  border-color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.market-live-badge {
  display: inline-flex;
  padding: 2px 8px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.market-live-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.market-live-badge.is-live {
  background: #dcfce7;
  color: #15803d;
}

.market-live-badge.is-closed {
  background: #f1f5f9;
  color: #475569;
}

/* Tone gradients: identity colors for markets and games. */
.market-game-tile.tile-blue,
.market-list-tile.tile-blue {
  background: linear-gradient(145deg, #4f9bf8 0%, #2672e3 56%, #1f5bc9 100%);
}

.market-game-tile.tile-purple,
.market-list-tile.tile-purple {
  background: linear-gradient(145deg, #5a63b8 0%, #6d4fb0 52%, #8e3a96 100%);
}

.market-game-tile.tile-teal,
.market-list-tile.tile-teal {
  background: linear-gradient(145deg, #1fb3a4 0%, #139591 53%, #0a7483 100%);
}

@media (min-width: 768px) {
  .home-page .wrap {
    max-width: 1000px;
  }

  .home-page .market-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* ======================================================================
   Market dashboard: summary + game tiles
   ====================================================================== */

.market-overview {
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.market-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.market-overview-name {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
}

.market-overview-time {
  display: flex;
  margin-top: 2px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

.market-overview-time .icon {
  width: 16px;
  height: 16px;
}

.market-result {
  display: flex;
  margin: var(--s3) 0;
  justify-content: center;
}

.market-window-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.market-window {
  display: flex;
  min-width: 0;
  min-height: 44px;
  padding: 5px 4px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1.2;
}

.market-window>span {
  font-size: .8rem;
  font-weight: 800;
}

.market-window small {
  overflow: hidden;
  max-width: 100%;
  margin-top: 1px;
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-window.is-open {
  border-color: var(--ok-line);
  background: #f0fdf4;
  color: #166534;
}

.market-window.is-shut {
  color: #64748b;
}

.market-game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.market-game-tile {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 126px;
  padding: 14px;
  overflow: hidden;
  flex-direction: column;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .16);
  isolation: isolate;
  transition: transform var(--fast) ease, box-shadow var(--base) ease;
}

.market-game-tile::after {
  position: absolute;
  right: -32px;
  bottom: -48px;
  z-index: -1;
  width: 118px;
  height: 118px;
  border: 22px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
}

.market-game-tile:hover {
  box-shadow: 0 8px 18px rgba(15, 23, 42, .22);
}

.market-game-tile:active {
  transform: scale(.98);
}

.market-game-tile:last-child:nth-child(odd) {
  width: calc(50% - 5px);
  justify-self: center;
  grid-column: 1 / -1;
}

.market-game-tile.is-disabled {
  cursor: not-allowed;
  filter: grayscale(.5) saturate(.6);
  opacity: .7;
  box-shadow: none;
}

.market-game-tile.is-disabled:active {
  transform: none;
}

.market-tile-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .2);
}

.market-tile-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.market-tile-mult {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .2);
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.market-tile-copy {
  display: flex;
  min-width: 0;
  margin-top: auto;
  flex-direction: column;
}

.market-tile-copy strong {
  overflow: hidden;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-tile-copy small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: rgba(255, 255, 255, .9);
  font-size: .78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
}

/* ======================================================================
   Play screen
   ====================================================================== */

.play-picked-summary {
  position: sticky;
  top: calc(56px + env(safe-area-inset-top));
  z-index: 20;
  display: flex;
  min-width: 0;
  margin: 0 0 4px;
  padding: 4px 7px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.play-picked-title {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.play-picked-title .icon {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.play-picked-numbers {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  padding: 1px 0;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.play-picked-numbers::-webkit-scrollbar {
  display: none;
}

.play-picked-number {
  display: inline-flex;
  min-width: 22px;
  height: 20px;
  padding: 0 4px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ok-line);
  border-radius: 5px;
  background: var(--ok-soft);
  color: #166534;
  font-size: 8px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.play-meta {
  display: flex;
  margin: 0 0 var(--s2);
  flex-wrap: wrap;
  gap: 2px;
}

.meta-chip {
  display: inline-flex;
  min-height: 26px;
  padding: 2px 9px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.meta-chip .icon {
  width: 14px;
  height: 14px;
}

.meta-chip.is-mult {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 850;
}

.play-add-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 6px;
}

.play-add-card > .field,
.play-add-card > .quick {
  min-width: 0;
}

.play-add-card > .quick {
  grid-column: 1 / -1;
}

.play-add-card .field {
  margin: 0;
}

.play-add-card .field-label-icon {
  width: 14px;
  height: 14px;
}

.play-add-card .hint {
  font-size: .64rem;
  line-height: 1.2;
}

.play-add-card label {
  display: flex;
  margin-bottom: 4px;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: .76rem;
}

.play-add-card label .hint {
  margin: 0;
  font-size: .64rem;
  font-weight: 600;
}

/* The number the player types is the one thing they read back at arm's length,
   so it is set well above the 16px iOS Safari will not zoom for.
   The element is part of the selector: input[type=text] above has an attribute
   in it, so a bare class would lose the font-size fight and the field would
   render at 15.2px — small enough for iOS to zoom in and stay zoomed. */
input.num-readout {
  min-height: 44px;
  padding: 6px 9px;
  font-size: 1.2rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.play-amount-box {
  margin-top: 0 !important;
}

.play-amount-box .num-readout {
  min-height: 44px;
  font-size: 1rem;
  letter-spacing: .06em;
  text-align: right;
  padding-right: 42px;
}

.play-amount-box .affix {
  font-size: .66rem;
}

.step-label {
  display: flex;
  margin: 0 0 var(--s2);
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  font-size: .925rem;
  font-weight: 800;
}

.step-label .hint {
  margin: 0 0 0 auto;
  font-weight: 600;
}

.step-n {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .75rem;
  font-weight: 850;
}

.step+.step {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px dashed var(--line);
}

.input-affix {
  position: relative;
}

.input-affix input {
  padding-right: 52px;
}

.input-affix .affix {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 750;
  pointer-events: none;
  transform: translateY(-50%);
}

.quick {
  display: grid;
  margin: 3px 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(58px, auto);
  gap: 2px;
}

.quick button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: background var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}

.quick .play-add-submit {
  display: inline-flex;
  min-width: 48px;
  padding: 5px 7px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-color: #15803d;
  border-radius: var(--radius-sm);
  background: #15803d;
  color: #fff;
  font-size: .68rem;
  font-weight: 850;
}

.quick .play-add-submit .icon {
  width: 13px;
  height: 13px;
}

.quick .play-add-submit:hover {
  border-color: #166534;
  background: #166534;
  color: #fff;
}

.quick button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.quick button.is-active {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(21, 128, 61, .18);
}

/* legacy single-column number+button row (kept for any other caller) */
.play-num {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2);
}

.play-num .field {
  margin: 0;
}

.play-num .btn {
  width: auto;
  padding: 10px 18px;
}

.play-list-head {
  display: flex;
  margin: 5px 2px 3px;
  align-items: center;
  justify-content: space-between;
}

.play-list-head .section-label {
  margin: 0;
  font-size: 10px;
}

.picked {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 3px;
  list-style: none;
}

.picked li {
  display: flex;
  min-height: 36px;
  padding: 3px 4px 3px 5px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.picked .p-num {
  min-width: 2.2em;
  padding: 2px 5px;
  border: 1px solid var(--ok-line);
  border-radius: var(--radius-xs);
  background: var(--ok-soft);
  color: #166534;
  text-align: center;
  font-size: 8px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.play-dialog-backdrop {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: flex;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(3px);
}

.play-dialog-backdrop[hidden] {
  display: none;
}

.play-dialog {
  width: min(100%, 390px);
  padding: 24px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
  text-align: center;
}

.play-dialog-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--warn-line);
  border-radius: 17px;
  background: var(--warn-soft);
  color: var(--warn);
}

.play-dialog-icon .icon {
  width: 26px;
  height: 26px;
}

.play-dialog h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 850;
}

.play-dialog p {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.5;
}

.play-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.play-dialog-actions .btn {
  min-height: 48px;
  padding: 8px 10px;
  font-size: .88rem;
}

body.play-dialog-open {
  overflow: hidden;
}

@media (max-width: 360px) {
  .play-dialog-actions {
    grid-template-columns: 1fr;
  }
}

/* Editable points on a picked number: looks like text until touched, then a
   clear field. Stays 44px tall for thumbs. */
.picked .p-edit {
  margin-left: auto;
}

.picked .p-amt {
  display: block;
  width: 82px;
}

.picked .p-amt-input {
  min-height: 32px;
  padding: 3px 27px 3px 6px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
  text-align: right;
  font-size: 10px;
  font-weight: 800;
  touch-action: manipulation;
}

.picked .p-amt-input:hover {
  border-color: var(--line-strong);
}

.picked .p-amt-input:focus {
  background: var(--surface);
}

.picked .p-amt .affix {
  right: 6px;
  font-size: 8px;
}

.picked .p-x {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.picked .p-x:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.picked .p-x .icon {
  width: 14px;
  height: 14px;
}

.play-clear-form .btn {
  min-height: 30px;
  padding: 3px 7px;
  font-size: 10px;
}

.play-empty {
  margin-top: var(--s4);
  padding: var(--s5) var(--s4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: .925rem;
}

.sticky-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 45;
  padding: 10px var(--s3) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
}

.has-app-nav .sticky-bar {
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding-bottom: 10px;
}

/* The play screen scrolls clear of both fixed layers. */
.has-sticky .wrap {
  padding-bottom: calc(var(--nav-height) + 96px + env(safe-area-inset-bottom));
}

.sticky-in {
  display: flex;
  max-width: var(--shell);
  margin: 0 auto;
  align-items: center;
  gap: var(--s3);
}

.sticky-in .totals {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

/* The region the slip fetch swaps in: totals and submit travel together, so
   the server stays the one that decides whether there is anything to submit. */
.sticky-live {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: var(--s3);
}

.sticky-in .totals .t-count {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.sticky-in .totals .t-total {
  overflow: hidden;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-in .btn {
  width: auto;
  min-width: 132px;
  margin-left: auto;
  letter-spacing: .04em;
}

/* Red player screens: the fixed layers line up with the 540px shell minus
   its 12px gutters, so nothing spreads wider than the content on desktop. */
.market-dashboard-page .sticky-bar,
.market-dashboard-page .app-nav {
  padding-right: 12px;
  padding-left: 12px;
}

.market-dashboard-page .sticky-in,
.market-dashboard-page .app-nav-in {
  max-width: 516px;
}

/* legacy multi-input grid (kept for any page still using it) */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

/* ======================================================================
   Lists: bets, wallet history, requests
   ====================================================================== */

.summary-row {
  display: grid;
  margin: 0 0 var(--s3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
}

.summary-chip {
  display: flex;
  padding: 10px 8px;
  align-items: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}

.summary-chip:hover,
.summary-chip.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.summary-chip b {
  font-size: 1.12rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.summary-chip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.summary-chip.is-pending b {
  color: var(--warn);
}

.summary-chip.is-won b {
  color: var(--ok);
}

.list {
  margin: 0 0 var(--s3);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
}

.list-row {
  display: flex;
  min-height: 56px;
  padding: 9px 12px;
  align-items: center;
  gap: var(--s3);
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.3;
}

.list-main strong {
  overflow: hidden;
  font-size: .95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-main small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-side {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 3px;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.list-side strong {
  font-size: .95rem;
}

.list-side small {
  color: var(--muted);
  font-size: .78rem;
}

.bet-num {
  display: inline-flex;
  min-width: 42px;
  height: 40px;
  padding: 0 8px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.bet-row.is-won .bet-num {
  background: var(--ok-soft);
  color: #166534;
}

.bet-row.is-lost .bet-num {
  color: var(--muted);
}

.bet-row.is-pending .bet-num {
  background: var(--warn-soft);
  color: #92400e;
}

.bet-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tx-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.tx-icon.in {
  background: var(--ok-soft);
  color: var(--ok);
}

.tx-icon.out {
  background: var(--danger-soft);
  color: var(--danger);
}

.tx-icon .icon {
  width: 18px;
  height: 18px;
}

.pager {
  display: flex;
  margin: var(--s4) 0;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}

.pager a,
.pager span {
  display: inline-flex;
  min-height: var(--tap-min);
  padding: 8px 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 700;
}

/* Fallback tables (kept for any legacy page). */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: .9rem;
}

th {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
}

/* Results history chart: dates down the side, markets across the top. */
.result-chart td,
.result-chart th {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-chart th[scope="row"] {
  text-align: left;
  text-transform: none;
  font-size: .82rem;
  color: var(--text);
}

.result-chart .j {
  font-weight: 800;
}

.result-chart .dim {
  color: var(--muted);
}

/* ======================================================================
   Wallet
   ====================================================================== */

.balance-hero {
  position: relative;
  margin: 0 0 var(--s3);
  padding: var(--s5) var(--s4) var(--s4);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bar-gradient);
  color: #fff;
  box-shadow: 0 8px 22px rgba(179, 38, 47, .25);
  isolation: isolate;
  text-align: center;
}

.balance-hero::after {
  position: absolute;
  top: -60px;
  right: -50px;
  z-index: -1;
  width: 180px;
  height: 180px;
  border: 30px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
}

.balance-label {
  color: rgba(255, 255, 255, .9);
  font-size: .8rem;
  font-weight: 700;
}

.balance-value {
  margin: 2px 0 var(--s4);
  font-size: 1.8rem;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.balance-value span {
  margin-left: 4px;
  font-size: .8rem;
  font-weight: 700;
  opacity: .9;
}

.balance-actions {
  display: grid;
  gap: var(--s2);
}

.balance-actions .btn {
  font-size: .82rem;
}

/* ======================================================================
   Profile
   ====================================================================== */

.profile-head {
  display: flex;
  margin: 0 0 var(--s3);
  align-items: center;
  gap: 14px;
}

.avatar {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bar-gradient);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 850;
}

.profile-name {
  display: block;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-sub {
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.profile-save-button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.profile-save-button.is-saved {
  display: none !important;
  border-color: #15803d;
  background: #15803d;
}

.profile-save-button.is-saved:hover {
  border-color: #166534;
  background: #166534;
}

.stat-grid {
  display: grid;
  margin: 0 0 var(--s3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
}

.stat-tile {
  display: flex;
  padding: 12px 8px;
  align-items: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  line-height: 1.2;
}

.stat-tile b {
  font-size: 1.15rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.stat-tile span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.meter-row {
  display: flex;
  margin-top: var(--s2);
  align-items: center;
  gap: var(--s2);
  color: var(--muted);
  font-size: .8rem;
}

.meter-row .meter {
  flex: 1;
}

/* ---- CSP-safe stepped bars ------------------------------------------ */
.meter {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.meter>i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.meter.ok>i {
  background: var(--ok);
}

.meter.rose>i {
  background: var(--rose);
}

.fill-0>i {
  width: 0;
}

.fill-10>i {
  width: 10%;
}

.fill-20>i {
  width: 20%;
}

.fill-30>i {
  width: 30%;
}

.fill-40>i {
  width: 40%;
}

.fill-50>i {
  width: 50%;
}

.fill-60>i {
  width: 60%;
}

.fill-70>i {
  width: 70%;
}

.fill-80>i {
  width: 80%;
}

.fill-90>i {
  width: 90%;
}

.fill-100>i {
  width: 100%;
}

progress {
  width: 100%;
  height: 10px;
}

/* ======================================================================
   Local-only UPI simulator
   These controls imitate payment-flow states visually; they are plain HTML
   forms with no UPI URI, provider SDK, or external network code.
   ====================================================================== */

.upi-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-style: dashed;
  border-color: #c4b5fd;
  background: #faf5ff;
}

.upi-entry-card h2 {
  margin: 6px 0 2px;
  font-size: 1rem;
}

.upi-entry-card p {
  margin: 0;
}

.upi-entry-button {
  width: auto;
  min-width: 126px;
  flex: 0 0 auto;
}

.upi-test-badge {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .07em;
}

.upi-live-badge {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid var(--ok-line);
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .07em;
}

.upi-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.upi-sim-link {
  min-height: 28px;
  padding: 2px 8px;
  font-size: .75rem;
}

.upi-live-link {
  margin-left: auto;
}

.upi-safety-banner {
  display: flex;
  margin-bottom: 12px;
  padding: 11px 12px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #78350f;
}

.upi-safety-banner .upi-test-badge {
  flex: 0 0 auto;
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.upi-safety-banner strong {
  display: block;
  font-size: .9rem;
}

.upi-safety-banner p {
  margin: 2px 0 0;
  font-size: .8rem;
  line-height: 1.4;
}

.upi-test-card {
  padding: 14px;
}

.upi-fieldset {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.upi-fieldset legend {
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 800;
}

.upi-amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.upi-choice {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.upi-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upi-choice>span {
  display: flex;
  min-height: var(--tap-min);
  padding: 7px 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 800;
  transition: border-color var(--fast) ease, background var(--fast) ease;
}

.upi-choice input:focus-visible+span {
  outline: 3px solid var(--brand-ring);
  outline-offset: 1px;
}

.upi-choice input:checked+span {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.upi-custom-label {
  margin-top: 10px;
  font-size: .8rem;
}

.upi-custom-amount {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.upi-custom-amount:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.upi-custom-amount>span {
  padding-left: 12px;
  color: var(--text-2);
  font-weight: 800;
}

.upi-custom-amount input[type=text] {
  border: 0;
  box-shadow: none;
}

.upi-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.upi-provider-choice>span {
  min-height: 82px;
  flex-direction: column;
  gap: 7px;
}

.upi-provider-choice em {
  font-size: .8rem;
  font-style: normal;
  font-weight: 800;
}

.upi-provider-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  font-size: .76rem;
  font-weight: 900;
}

.provider-phonepe {
  background: linear-gradient(145deg, #7c3aed, #5b21b6);
}

.provider-gpay {
  background: linear-gradient(145deg, #4285f4, #34a853);
}

.provider-paytm {
  background: linear-gradient(145deg, #0ea5e9, #172554);
}

.provider-upi-any {
  background: linear-gradient(145deg, #059669, #047857);
}

.provider-bank {
  background: linear-gradient(145deg, #1e3a8a, #0f172a);
}

.upi-provider-mark-large {
  width: 56px;
  height: 56px;
  margin: 0 auto 4px;
  border-radius: 16px;
  font-size: 1rem;
}

.upi-handoff-card,
.upi-result-card {
  text-align: center;
}

.upi-handoff-card h2,
.upi-result-card h2 {
  margin: 3px 0 8px;
}

.upi-handoff-card>p,
.upi-result-card>p {
  margin: 4px 0 14px;
}

.upi-test-amount {
  margin: 10px 0;
  font-size: 1.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.upi-outcome-form {
  display: grid;
  gap: 8px;
}

.upi-success-button {
  border-color: var(--ok);
  background: var(--ok);
}

.upi-success-button:hover {
  border-color: #166534;
  background: #166534;
}

.upi-result-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  margin-bottom: 5px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 900;
}

.result-success .upi-result-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.result-failure .upi-result-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.result-cancelled .upi-result-icon {
  background: var(--surface-2);
  color: var(--muted);
}

.result-pending .upi-result-icon {
  background: #fff8e1;
  color: #f59e0b;
}

.upi-result-details {
  margin: 12px 0 16px;
  text-align: left;
}

.upi-result-card>.btn+.btn {
  margin-top: 8px;
}

/* Deposit history table on step 1 */
.deposit-history-card {
  margin-top: 20px;
}

.deposit-history-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.deposit-page .deposit-card {
  max-width: 720px;
  margin-inline: auto;
}

.deposit-secure-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #176b45;
  font-size: .76rem;
  font-weight: 800;
}

.deposit-secure-label .icon {
  width: 15px;
  height: 15px;
}

.deposit-header h2 {
  font-size: clamp(1.25rem, 4vw, 1.55rem);
}

.deposit-header p {
  max-width: 54ch;
  margin: 6px 0 0;
  line-height: 1.5;
}

.deposit-amount-fieldset:disabled {
  opacity: .55;
}

.deposit-amount-choice>span {
  min-height: 66px;
  flex-direction: column;
  gap: 3px;
}

.deposit-amount-choice strong {
  font-size: 1rem;
  color: inherit;
}

.deposit-amount-choice small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}

.deposit-limits {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.deposit-preview {
  display: block;
  margin: 14px 0 2px;
  padding: 12px 14px;
  border: 1px solid #d7eee2;
  border-radius: var(--radius-sm);
  background: #f2fbf6;
  color: #176b45;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.45;
}

.deposit-submit-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.deposit-payment-note {
  margin: 10px 0 0;
  text-align: center;
  line-height: 1.45;
}

.deposit-unavailable {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f3d1ad;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  color: #8a4614;
}

.deposit-unavailable p {
  margin: 4px 0 0;
  font-size: .86rem;
}

.deposit-history-card {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 18px;
}

.deposit-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.deposit-history-heading p {
  margin: 3px 0 0;
}

.deposit-history-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.deposit-history-icon .icon {
  width: 19px;
  height: 19px;
}

.deposit-history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deposit-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}

.deposit-history-main,
.deposit-history-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.deposit-history-amount {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.deposit-history-points,
.deposit-history-date,
.deposit-history-reference {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
}

.deposit-history-points {
  color: var(--text-2);
  font-weight: 650;
}

.deposit-history-meta {
  justify-items: end;
  text-align: right;
}

.deposit-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}

.deposit-status.approved { background: #e8f7ef; color: #176b45; }
.deposit-status.pending { background: #fff4d6; color: #8a5b08; }
.deposit-status.rejected { background: #fdecec; color: #a12626; }

.deposit-history-reference {
  max-width: 42vw;
  overflow-wrap: anywhere;
}

.deposit-history-empty {
  margin: 0;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: .9rem;
}

.wallet-deposit-note {
  margin: -4px 0 var(--s3);
  color: var(--muted);
  font-size: .76rem;
  text-align: center;
}

.balance-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.balance-label-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
}

.balance-label-icon .icon {
  width: 14px;
  height: 14px;
}

.wallet-status-note {
  display: flex;
  margin: 0 0 var(--s5);
  padding: 10px 12px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--info-line);
  border-radius: var(--radius-sm);
  background: var(--info-soft);
  color: #1e3a8a;
}

.wallet-status-note.is-warn {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: #78350f;
}

.wallet-status-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding-top: 1px;
}

.wallet-status-icon .icon {
  width: 17px;
  height: 17px;
}

.wallet-status-note p {
  margin: 0;
  font-size: .74rem;
  line-height: 1.4;
}

.wallet-history-section {
  margin-top: var(--s3);
}

.wallet-ledger {
  margin-bottom: var(--s3);
}

.wallet-ledger-row {
  display: grid;
  min-height: 72px;
  padding: 11px 12px;
  grid-template-columns: 40px minmax(0, 1fr) 116px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  transition: background var(--fast) ease;
}

.wallet-ledger-row:last-child {
  border-bottom: 0;
}

.wallet-ledger-row:hover {
  background: #fafbfc;
}

.wallet-date-divider {
  display: flex;
  padding: 9px 12px 5px;
  align-items: center;
  gap: 9px;
  background: #fafbfc;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .035em;
}

.wallet-date-line {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.wallet-tx-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.wallet-tx-icon.in {
  background: var(--ok-soft);
  color: var(--ok);
}

.wallet-tx-icon.out {
  background: var(--danger-soft);
  color: var(--danger);
}

.wallet-tx-icon .icon {
  width: 19px;
  height: 19px;
}

.wallet-tx-main {
  display: grid;
  min-width: 0;
  gap: 3px;
  line-height: 1.3;
}

.wallet-tx-main > strong {
  overflow: hidden;
  color: var(--text);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-tx-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: var(--muted);
  font-size: .66rem;
}

.wallet-tx-meta time {
  font-variant-numeric: tabular-nums;
}

.wallet-tx-note {
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-tx-side {
  width: 116px;
  min-width: 116px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wallet-tx-flow {
  display: inline-flex;
  min-height: 18px;
  margin: 0 0 3px auto;
  padding: 2px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .045em;
  line-height: 1.1;
  text-transform: uppercase;
}

.wallet-tx-flow.is-credit {
  background: var(--ok-soft);
  color: var(--ok);
}

.wallet-tx-flow.is-debit {
  background: var(--danger-soft);
  color: var(--danger);
}

.wallet-tx-amount {
  display: block;
  font-size: .82rem;
  font-weight: 850;
  white-space: nowrap;
}

.wallet-tx-amount.is-positive {
  color: var(--ok);
}

.wallet-tx-amount.is-negative {
  color: var(--danger);
}

.wallet-tx-side small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .6rem;
  white-space: nowrap;
}

.wallet-tx-side small b {
  color: var(--text-2);
  font-weight: 750;
}

.wallet-empty-state {
  margin-top: 0;
}

@media (max-width: 360px) {
  .wallet-ledger-row {
    padding: 10px 8px;
    grid-template-columns: 34px minmax(0, 1fr) 96px;
    gap: 7px;
  }

  .wallet-tx-icon {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }

  .wallet-tx-side {
    width: 96px;
    min-width: 96px;
  }

  .wallet-tx-amount {
    font-size: .76rem;
  }

  .wallet-tx-side small {
    font-size: .56rem;
  }
}

@media (max-width: 480px) {
  .balance-hero {
    margin-bottom: 6px;
    padding: 9px 8px 8px;
    border-radius: 12px;
  }

  .balance-label {
    font-size: 10px;
  }

  .balance-value {
    margin: 1px 0 7px;
    font-size: 1.3rem;
  }

  .balance-value span {
    font-size: 10px;
  }

  .balance-actions {
    gap: 3px;
  }

  .balance-actions .btn {
    min-height: 36px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .wallet-hold-summary,
  .wallet-status-note {
    margin-bottom: 6px;
    padding: 6px;
    gap: 5px;
    border-radius: 9px;
  }

  .wallet-status-note p,
  .wallet-hold-copy p {
    font-size: 9px;
    line-height: 1.25;
  }

  .wallet-hold-copy > small,
  .wallet-hold-copy > strong {
    font-size: 10px;
  }

  .wallet-history-header,
  .withdraw-history-titlebar {
    margin-bottom: 5px;
    gap: 5px;
  }

  .wallet-history-header h2,
  .withdraw-history-titlebar h2 {
    font-size: 12px;
  }

  .wallet-history-header p,
  .withdraw-history-titlebar p {
    font-size: 9px;
  }

  .wallet-history-header > span,
  .withdraw-history-count {
    padding: 3px 5px;
    font-size: 8px;
  }

  .wallet-ledger-row {
    min-height: 42px;
    padding: 5px;
    grid-template-columns: 28px minmax(0, 1fr) 86px;
    gap: 4px;
  }

  .wallet-date-divider {
    padding: 4px 5px 2px;
    gap: 5px;
    font-size: 8px;
  }

  .wallet-tx-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .wallet-tx-icon .icon {
    width: 14px;
    height: 14px;
  }

  .wallet-tx-main {
    gap: 1px;
  }

  .wallet-tx-main > strong {
    font-size: 10px;
  }

  .wallet-tx-meta {
    gap: 1px;
    font-size: 8px;
  }

  .wallet-tx-side {
    width: 86px;
    min-width: 86px;
  }

  .wallet-tx-flow {
    min-height: 15px;
    margin-bottom: 1px;
    padding: 1px 4px;
    font-size: 8px;
  }

  .wallet-tx-amount {
    font-size: 10px;
  }

  .wallet-tx-side small {
    margin-top: 1px;
    font-size: 8px;
  }
}

@media (min-width: 420px) and (max-width: 599px) {
  .balance-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .balance-actions .btn {
    padding-right: 8px;
    padding-left: 8px;
    font-size: .78rem;
  }
}

/* ======================================================================
   Deposit flow: Amount, QR, deep links, UTR verify
   ====================================================================== */

.deposit-card,
.deposit-pay-card {
  padding: var(--s4);
}

.deposit-header {
  margin-bottom: var(--s3);
}

.deposit-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.deposit-submit-btn {
  width: 100%;
  min-height: 48px;
  margin-top: var(--s3);
  font-size: 1rem;
}

.deposit-pay-header {
  text-align: center;
  padding-bottom: var(--s3);
  border-bottom: 1px dashed var(--line);
}

.deposit-pay-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text);
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
}

.deposit-pts-hint {
  font-size: .85rem;
  color: var(--ok);
  font-weight: 750;
}

.upi-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: var(--s4) 0;
}

.upi-qr-frame {
  width: 220px;
  height: 220px;
  padding: 12px;
  background: #fff;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upi-qr-frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.upi-qr-caption {
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
  max-width: 240px;
}

.upi-mobile-actions {
  display: grid;
  gap: 8px;
  margin: var(--s3) 0;
}

.upi-app-button {
  min-height: 44px;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upi-id-box {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin: var(--s3) 0;
}

.upi-id-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.upi-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upi-id-text {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  word-break: break-all;
}

.btn-copy {
  min-height: 32px;
  padding: 4px 12px;
  font-size: .8rem;
  flex: 0 0 auto;
}

.bank-deposit-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: var(--s3) 0;
}

.bank-deposit-box h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.bank-deposit-box>p {
  margin: 0 0 12px;
}

.bank-deposit-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bank-deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 8px;
}

.bank-deposit-row:last-child {
  border-bottom: none;
}

.bank-deposit-k {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

.bank-deposit-v {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bank-deposit-v code {
  font-size: .95rem;
  font-weight: 750;
}

.bank-deposit-preview {
  margin: var(--s3) 0;
  padding: var(--s3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bank-deposit-preview-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bank-deposit-preview-badge strong {
  display: block;
  font-size: .95rem;
  color: var(--text);
}

.bank-deposit-preview-badge p {
  margin: 2px 0 0;
}

.upi-verify-section {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 2px solid var(--line);
}

.upi-verify-section h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.upi-verify-form {
  margin-top: var(--s3);
}

.upi-verify-form .field {
  margin-bottom: var(--s3);
}

.verify-btn {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
}

.deposit-cancel-row {
  margin-top: var(--s3);
  text-align: center;
}

/* ======================================================================
   Withdrawal payout details (UPI / Bank)
   ====================================================================== */

.payout-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: var(--s1);
}

.payout-method-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.payout-method-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.payout-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s4) var(--s2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color var(--fast) ease, background var(--fast) ease, box-shadow var(--fast) ease;
}

.payout-method-card strong {
  font-size: .95rem;
  color: var(--text);
  margin-top: 6px;
}

.payout-method-card small {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 2px;
}

.payout-method-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}

.payout-method-option input:checked+.payout-method-card {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 4px 14px var(--brand-ring);
}

.payout-method-option input:checked+.payout-method-card .payout-method-icon {
  background: var(--brand-soft);
  color: var(--brand);
}

.payout-method-option input:focus-visible+.payout-method-card {
  outline: 3px solid var(--brand-ring);
  outline-offset: 1px;
}

.payout-panel {
  display: none;
}

.payout-panel.is-active {
  display: block;
}

.withdraw-form:has(#method_bank:checked) #panel_bank {
  display: block;
}

.withdraw-form:has(#method_bank:checked) #panel_upi {
  display: none;
}

.withdraw-form:has(#method_upi:checked) #panel_upi {
  display: block;
}

.withdraw-form:has(#method_upi:checked) #panel_bank {
  display: none;
}

.withdraw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.uppercase-input {
  text-transform: uppercase;
  letter-spacing: .05em;
}

.payout-details-hint {
  color: var(--text-2);
  font-weight: 600;
}

.withdraw-intro {
  display: flex;
  margin: 0 0 var(--s3);
  padding: 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff 0%, #fff8f8 100%);
  box-shadow: var(--shadow-soft);
}

.withdraw-intro-icon,
.payout-empty-icon,
.payout-form-heading-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}

.withdraw-intro-icon .icon,
.payout-empty-icon .icon,
.payout-form-heading-icon .icon {
  width: 22px;
  height: 22px;
}

.withdraw-intro strong,
.payout-form-heading strong {
  display: block;
  color: var(--text);
  font-size: .98rem;
  font-weight: 850;
}

.withdraw-intro p,
.payout-form-heading small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.withdraw-request-form {
  padding: 16px;
}

.withdraw-field-label,
.withdraw-field-heading,
.manage-payout-link {
  display: flex;
  align-items: center;
}

.withdraw-field-label {
  margin-bottom: 8px;
  gap: 8px;
  color: var(--text-2);
  font-weight: 800;
}

.withdraw-field-label .icon,
.manage-payout-link .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.withdraw-field-heading {
  margin-bottom: 9px;
  justify-content: space-between;
  gap: 8px;
}

.withdraw-field-heading .withdraw-field-label {
  margin: 0;
}

.manage-payout-link {
  min-height: var(--tap-min);
  padding: 0 8px;
  gap: 5px;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 800;
}

.manage-payout-link:hover {
  background: var(--brand-soft);
}

.payout-choice-list {
  display: grid;
  gap: 9px;
}

.payout-choice {
  position: relative;
  display: flex;
  min-height: 72px;
  margin: 0;
  padding: 10px 12px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease, background var(--fast) ease;
}

.payout-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.payout-choice:has(input:checked) {
  border-color: var(--brand);
  background: #fffafa;
  box-shadow: 0 0 0 2px var(--brand-ring);
}

.payout-choice:focus-within {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
}

.payout-choice-icon,
.payout-choice-check,
.payout-saved-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-2);
}

.payout-choice-icon {
  width: 42px;
  height: 42px;
}

.payout-choice-icon .icon {
  width: 21px;
  height: 21px;
}

.payout-choice:has(input:checked) .payout-choice-icon {
  background: var(--brand-soft);
  color: var(--brand);
}

.payout-choice-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
  line-height: 1.3;
}

.payout-choice-copy strong,
.payout-choice-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout-choice-copy strong {
  color: var(--text);
  font-size: .9rem;
}

.payout-choice-copy small {
  color: var(--muted);
  font-size: .78rem;
}

.payout-choice-check {
  width: 24px;
  height: 24px;
  background: var(--ok-soft);
  color: var(--ok);
  opacity: 0;
  transform: scale(.85);
  transition: opacity var(--fast) ease, transform var(--fast) ease;
}

.payout-choice-check .icon {
  width: 15px;
  height: 15px;
}

.payout-choice:has(input:checked) .payout-choice-check {
  opacity: 1;
  transform: scale(1);
}

.payout-empty {
  display: flex;
  padding: 12px;
  align-items: center;
  gap: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.payout-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.payout-empty strong,
.payout-empty small {
  display: block;
}

.payout-empty strong {
  font-size: .88rem;
}

.payout-empty small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
}

.withdraw-history-heading {
  justify-content: flex-start;
  gap: 7px;
}

.withdraw-history-heading .icon,
.payout-saved-heading .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.payout-saved-heading {
  justify-content: flex-start;
  gap: 7px;
}

.payout-saved-icon {
  width: 40px;
  height: 40px;
  background: var(--brand-soft);
  color: var(--brand);
}

.payout-saved-icon .icon {
  width: 20px;
  height: 20px;
}

.payout-delete-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.payout-delete-button .icon {
  width: 15px;
  height: 15px;
}

.payout-form-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  gap: 11px;
}

.payout-form-heading-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.payout-form-heading-icon .icon {
  width: 19px;
  height: 19px;
}

.payout-method-card .payout-method-icon .icon {
  width: 21px;
  height: 21px;
}

.payout-save-hint {
  display: flex;
  margin: 4px 0 12px;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.payout-save-hint .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--brand);
}

/* ======================================================================
   Responsive, installed mode, motion
   ====================================================================== */

@media (max-width: 360px) {
  .wrap {
    padding-right: 10px;
    padding-left: 10px;
  }

  .market-dashboard-title {
    font-size: .88rem;
  }

  .tab-bar-in .market-dashboard-title {
    font-size: .94rem;
  }

  .tab-bar-in .tab-install-button {
    display: none;
  }

  .wallet-chip {
    padding: 3px 6px;
    font-size: .72rem;
  }

  .install-button {
    padding: 3px 6px;
    font-size: .64rem;
  }

  .result .cell {
    min-width: 2.1em;
    padding: 5px 6px;
    font-size: 1.05rem;
  }

  .market-game-tile {
    min-height: 124px;
    padding: 12px;
  }

  .market-tile-copy strong {
    font-size: .95rem;
  }

  /* Let the tile subtitle wrap to two lines instead of cutting the time. */
  .market-tile-copy small {
    white-space: normal;
  }

  .play-meta {
    gap: 4px;
  }

  .meta-chip {
    min-height: 28px;
    padding: 2px 8px;
    font-size: .75rem;
  }

  .meta-chip .icon {
    display: none;
  }

  input.num-readout {
    font-size: 1.35rem;
  }

  .sticky-in .btn {
    min-width: 108px;
    padding: 10px 14px;
  }

  .balance-value {
    font-size: 1.8rem;
  }
}

@media (max-width: 420px) {
  .upi-entry-card {
    align-items: stretch;
    flex-direction: column;
  }

  .upi-entry-button {
    width: 100%;
  }

  .upi-amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deposit-card,
  .deposit-history-card {
    padding: 16px;
  }

  .deposit-history-item {
    flex-direction: column;
    gap: 9px;
  }

  .deposit-history-meta {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    width: 100%;
    text-align: left;
  }

  .deposit-history-reference {
    max-width: none;
    text-align: left;
  }
}

@media (min-width: 600px) {
  .balance-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Installed mode: respect the status-bar safe area and remove the install
   affordance, since this window already is the installed app. */
@media (display-mode: standalone) {
  .topbar {
    padding-top: env(safe-area-inset-top);
  }

  .install-button {
    display: none !important;
  }

  body {
    overscroll-behavior-y: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }

  .btn:active,
  .market-game-tile:active,
  .market-list-tile:active {
    transform: none;
  }
}


/* ========================================
   RESULTS PAGE - BEAUTIFUL REDESIGN
   ======================================== */

.results-header {
  margin-bottom: var(--s3);
  text-align: center;
}

.results-header h2 {
  margin: 0 0 var(--s2) 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.results-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

/* Results Container */
.results-container {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

/* Day Section */
.results-day {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.results-day-header {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px 0;
  border-bottom: 1px solid var(--brand);
}

.results-day-label {
  font-weight: 700;
  font-size: 11px;
  color: var(--brand);
  min-width: 90px;
}

.results-day-date {
  font-size: 10px;
  color: var(--muted);
}

/* Markets Grid */
.results-markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

@media (max-width: 640px) {
  .results-markets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Result Card */
.result-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  transition: all var(--base) var(--ease);
}

.result-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring), var(--shadow);
  transform: translateY(-2px);
}

.result-card--empty {
  background: var(--surface-2);
  opacity: 0.6;
}

.result-market-name {
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Result Value Display */
.result-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.result-value--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 9px;
}

.result-placeholder {
  font-style: italic;
  color: var(--line-strong);
}

/* Triple Display: Open - Jodi - Close */
.result-triple {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  gap: 2px;
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.result-label {
  font-size: 8px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.result-number {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Jodi Special Styling */
.result-jodi .result-number {
  font-size: 10px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 5px;
  border-radius: var(--radius-xs);
  min-width: 34px;
  text-align: center;
}

.result-jodi-num {
  color: var(--brand) !important;
}

.legend-jodi {
  font-weight: 700;
  color: var(--brand);
}

/* Results Legend */
.results-legend {
  text-align: center;
  margin-top: var(--s4);
  padding: 7px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 9px;
  color: var(--muted);
}

/* Responsive - Tablet */
@media (min-width: 768px) {
  .results-markets-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .result-number {
    font-size: 10px;
  }
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
  .results-markets-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .results-day-header {
    padding: 7px 0;
  }
}

/* Animation on Load */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card {
  animation: slideUp var(--base) var(--ease) both;
}

.result-card:nth-child(1) {
  animation-delay: 0ms;
}

.result-card:nth-child(2) {
  animation-delay: 50ms;
}

.result-card:nth-child(3) {
  animation-delay: 100ms;
}

.result-card:nth-child(n+4) {
  animation-delay: 150ms;
}


/* ========================================
   INDEX PAGE (MARKETS) - BEAUTIFUL REDESIGN
   ======================================== */

/* Alert Styling */
.alert {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
  margin-bottom: var(--s5);
  border-radius: var(--radius-sm);
  font-size: 13px;
  animation: slideDown var(--base) var(--ease);
}

.alert-warning {
  background: var(--warn-soft);
  border-left: 4px solid var(--warn);
  color: var(--text);
}

.alert-icon {
  color: var(--warn);
  flex-shrink: 0;
  font-size: 18px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Markets Header */
.markets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 2px solid var(--brand);
}

.markets-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.markets-live-badge {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Market Cards Grid */
.market-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s5);
  margin-bottom: var(--s6);
}

@media (max-width: 640px) {
  .market-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Market Card */
.market-card {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s5);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: all var(--base) var(--ease);
  cursor: pointer;
}

.market-card:active {
  transform: scale(0.98);
}

.market-card--live {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-ring), var(--shadow);
}

.market-card--live:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring), var(--shadow);
  transform: translateY(-4px);
}

.market-card--closed {
  opacity: 0.7;
}

.market-card--closed:hover {
  opacity: 1;
  border-color: var(--line-strong);
}

/* Card Header */
.market-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s3);
}

.market-card-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.market-card-status {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  flex-shrink: 0;
}

.status-live {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-closed {
  background: var(--surface-2);
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.status-live .status-dot {
  animation: pulse 2s ease-in-out infinite;
}

/* Card Timing */
.market-card-timing {
  display: flex;
  gap: var(--s3);
  padding: var(--s3);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted);
}

.market-card-timing svg {
  color: var(--brand);
  flex-shrink: 0;
}

.timing-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timing-range {
  font-weight: 600;
  color: var(--text);
}

.timing-date {
  font-size: 11px;
}

/* Result Display */
.market-card-result {
  display: flex;
  justify-content: center;
  padding: var(--s4);
  background: linear-gradient(135deg, var(--brand-soft) 0%, rgba(253, 236, 236, 0.5) 100%);
  border-radius: var(--radius-sm);
  min-height: 80px;
}

.result-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  gap: var(--s3);
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  flex: 1;
}

.result-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.result-value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--text);
  letter-spacing: 1px;
}

.result-item.result-jodi .result-value {
  font-size: 22px;
  color: var(--brand);
  background: var(--surface);
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-xs);
  min-width: 56px;
  text-align: center;
}

/* Windows Badges */
.market-card-windows {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}

.window-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex: 1;
  min-width: 70px;
}

.window-open {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-line);
}

.window-closed {
  background: var(--surface-2);
  color: var(--muted);
}

.window-label {
  font-weight: 700;
}

.window-status {
  font-size: 9px;
  opacity: 0.8;
}

/* Card Footer */
.market-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s2);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}

.click-text {
  opacity: 0;
  animation: fadeInText var(--base) var(--ease) forwards 200ms;
}

@keyframes fadeInText {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.market-card-footer svg {
  transition: transform var(--base) var(--ease);
}

.market-card:hover .market-card-footer svg {
  transform: translateX(4px);
}

/* Responsive */
@media (min-width: 768px) {
  .market-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (min-width: 1024px) {
  .market-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

/* Animation on Load */
.market-card {
  animation: fadeInCard var(--base) var(--ease) both;
}

.market-card:nth-child(1) {
  animation-delay: 0ms;
}

.market-card:nth-child(2) {
  animation-delay: 100ms;
}

.market-card:nth-child(3) {
  animation-delay: 200ms;
}

.market-card:nth-child(n+4) {
  animation-delay: 300ms;
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── PayU Gateway deposit styles ───────────────────────────────────── */
.badge-instant {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  background: #10b981;
  color: #fff;
  padding: .1rem .35rem;
  border-radius: 4px;
  letter-spacing: .04em;
  vertical-align: middle;
  margin-left: .3rem;
  text-transform: uppercase;
}

.btn-gateway {
  background: linear-gradient(135deg, #6366f1, #10b981);
  border-color: transparent;
}

.btn-gateway:hover {
  opacity: .9;
}

.gateway-entry-card {
  border-left: 3px solid #10b981;
}

/* History page: per-market result history with a market picker. */
.history-picker {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: var(--s2) 0 var(--s3);
  flex-wrap: wrap;
}

.history-picker label {
  font-weight: 700;
  color: var(--text-2);
}

.history-picker select {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: inherit;
  font: inherit;
}

/* "View result history" link on the market dashboard. */
.history-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: var(--s2) 0 var(--s1);
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.history-link:active {
  transform: scale(.98);
}

.history-link-icon {
  width: 18px;
  height: 18px;
}

/* ======================================================================
   Panel chart: classic matka panel grid, matching the reference look.
   ====================================================================== */

/* --- yellow LIVE result card ----------------------------------------- */
.pc-live-card {
  position: relative;
  margin: 0 0 var(--s3, 12px);
  padding: 14px 16px 16px;
  background: #ffe600;
  border: 3px solid #ff8c00;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.pc-live-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #111;
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
}

.pc-live-badge::first-letter {
  color: #ff3b3b;
}

.pc-live-name {
  font-size: 11px;
  font-weight: 900;
  color: #1414ff;
  letter-spacing: .02em;
  line-height: 1.1;
}

.pc-live-result {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 900;
  color: #111;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.pc-refresh {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 18px;
  background: #7a1f1f;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}

.pc-refresh:hover {
  background: #611616;
}

/* --- the grid -------------------------------------------------------- */
.pc-scroll {
  overflow-x: auto;
  border: 2px solid #2a2aff;
  border-radius: 6px;
  background: #fff;
}

.panel-chart {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  background: #fff;
}

.panel-chart th,
.panel-chart td {
  border: 1px solid #d9d9e2;
  text-align: center;
  padding: 5px 3px;
  vertical-align: middle;
}

.panel-chart thead th {
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #1a1a6e;
  padding: 8px 3px;
  border-bottom: 2px solid #2a2aff;
}

.panel-chart thead .pc-date-head {
  color: #222;
}

/* Date range column, stuck to the left on scroll. */
.panel-chart .pc-date {
  text-align: center;
  text-transform: none;
  font-size: 8px;
  font-weight: 800;
  font-style: italic;
  color: #111;
  white-space: nowrap;
  padding: 4px 6px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  line-height: 1.25;
}

.pc-cell {
  min-width: 3rem;
}

/* The three-part day result: open panna, jodi, close panna in a row so the
   two stacked pannas flank the bold jodi. */
.pc-triple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1;
}

/* A panna as three stacked digits, the classic panel column. */
.pc-pana {
  display: inline-block;
  font-size: 10px;
  line-height: 1.2;
  color: #111;
  font-weight: 700;
}

/* The jodi, large and bold, is what the eye reads first. */
.pc-jodi {
  font-size: 12px;
  font-weight: 900;
  color: #111;
  padding: 0 1px;
}

/* Red "same ank" day: both the pannas and the jodi turn red, as on the
   reference chart. */
.pc-red .pc-pana,
.pc-red .pc-jodi {
  color: #ff0000;
}

.pc-dim {
  color: #c7c7c7;
  font-weight: 400;
}

.chart-link-row {
  margin: 0 0 var(--s3, 12px);
}

/* ======================================================================
   Play page: session picker (Open / Close tabs)
   ====================================================================== */

.play-session-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin: 0 0 5px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(135deg, #eef2ff 0%, #fdf2f8 100%);
  box-shadow: 0 6px 18px rgb(79 70 229 / 12%);
}

.session-picker-label {
  grid-column: 1 / -1;
  padding: 0 3px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.session-tab {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  text-align: left;
  transition: transform .15s, background .15s, color .15s, border-color .15s, box-shadow .15s;
  color: var(--text);
  background: var(--surface, #fff);
  cursor: pointer;
}

.session-tab-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--brand-soft, #fce8e8);
  color: var(--brand, #d84444);
}

.session-tab-icon .icon {
  width: 13px;
  height: 13px;
}

.session-tab-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
}

.session-tab-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-tab-copy small {
  color: var(--muted);
  font-size: .6rem;
  font-weight: 700;
}

.session-tab.is-active {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  cursor: default;
  box-shadow: 0 6px 14px rgb(79 70 229 / 28%);
}

.session-tab.is-active .session-tab-icon {
  background: rgb(255 255 255 / 18%);
  color: #fff;
}

.session-tab.is-active .session-tab-copy small {
  color: rgb(255 255 255 / 78%);
}

.session-tab.is-open .session-tab-icon {
  background: var(--ok-soft, #eaf8ef);
  color: var(--ok, #15803d);
}

.session-tab.is-open:not(.is-active) {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  color: #166534;
}

.session-tab:not(.is-active):not(.is-shut):hover {
  border-color: var(--brand, #d84444);
  background: var(--brand-soft, #fce8e8);
  box-shadow: 0 4px 10px rgb(15 23 42 / 8%);
  transform: translateY(-1px);
}

.session-tab.is-shut {
  color: var(--muted, #aaa);
  cursor: not-allowed;
  border-color: #fcd34d;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

.session-tab.is-shut .session-tab-icon {
  background: var(--line);
  color: var(--muted);
}

.session-tab.is-shut .session-tab-copy small {
  color: var(--muted);
}

/* Full-width button (login page signup link). */
.btn.full-width {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: var(--s3, 12px);
}

/* ======================================================================
   Bets page: mobile-friendly compact layout
   ====================================================================== */

@media (max-width: 480px) {
  .summary-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }

  .summary-chip {
    padding: 5px 2px;
    border-radius: 8px;
  }

  .summary-chip b {
    font-size: 12px;
  }

  .summary-chip span {
    font-size: .65rem;
  }

  .list-row {
    min-height: 44px;
    padding: 7px 8px;
    gap: 8px;
  }

  .bet-num {
    min-width: 34px;
    height: 34px;
    padding: 0 5px;
    font-size: .88rem;
    border-radius: 6px;
  }

  .list-main strong {
    font-size: .78rem;
  }

  .list-main small {
    font-size: .68rem;
    margin-top: 1px;
  }

  .list-side strong {
    font-size: .78rem;
  }

  .list-side small {
    font-size: .65rem;
  }

  .list-side {
    gap: 2px;
  }

  .tag {
    font-size: .6rem;
    padding: 2px 5px;
  }

  .badge-new {
    font-size: .55rem;
    padding: 1px 4px;
  }

  .bet-status {
    gap: 3px;
  }
}

/* Danger ghost button (cancel withdrawal). */
.btn.ghost.danger {
  border-color: var(--danger-line, #fca5a5);
  background: var(--surface, #fff);
  color: var(--danger, #dc2626);
}

.btn.ghost.danger:hover {
  border-color: var(--danger, #dc2626);
  background: var(--danger-soft, #fef2f2);
  color: #991b1b;
}

/* ======================================================================
   Bets table: 2-column Stake / Win-Loss layout
   ====================================================================== */

.bets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.bets-table thead th {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 6px;
  border-bottom: 2px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.bets-table thead th:nth-child(2),
.bets-table thead th:nth-child(4) {
  text-align: right;
}

.bt-row td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.bt-num {
  font-size: .95rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-width: 32px;
  white-space: nowrap;
}

.bt-row.is-won .bt-num {
  color: var(--ok, #16a34a);
}

.bt-row.is-lost .bt-num {
  color: var(--danger, #dc2626);
}

.bt-row.is-pending .bt-num {
  color: var(--warn, #d97706);
}

.bt-info {
  line-height: 1.3;
}

.bt-info strong {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bt-info small {
  display: block;
  font-size: .65rem;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bt-stake {
  text-align: right;
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
}

.bt-result {
  text-align: right;
  font-weight: 800;
  font-size: .82rem;
  white-space: nowrap;
}

.bt-won {
  color: var(--ok, #16a34a);
}

.bt-lost {
  color: var(--danger, #dc2626);
}

.bt-void {
  color: var(--muted);
  font-weight: 600;
}

.bt-pending {
  color: var(--warn, #d97706);
  font-weight: 600;
}

@media (max-width: 480px) {
  .bets-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .bets-table,
  .bets-table tbody {
    display: block;
    width: 100%;
  }

  .bets-table thead {
    display: none;
  }

  .bets-table tbody {
    display: grid;
    padding: 1px 0;
    gap: 3px;
  }

  .bets-table .bt-row {
    display: grid;
    padding: 5px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas:
      "num info result"
      "num stake result";
    align-items: center;
    gap: 1px 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .bets-table .bt-row td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .bets-table .bt-num {
    display: inline-flex;
    width: 28px;
    min-width: 28px;
    height: 28px;
    grid-area: num;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 850;
  }

  .bets-table .bt-row.is-won .bt-num {
    background: var(--ok-soft);
    color: #166534;
  }

  .bets-table .bt-row.is-lost .bt-num {
    background: var(--danger-soft);
    color: #991b1b;
  }

  .bets-table .bt-row.is-pending .bt-num {
    background: var(--warn-soft);
    color: #92400e;
  }

  .bets-table .bt-info {
    grid-area: info;
  }

  .bets-table .bt-info strong {
    font-size: 10px;
  }

  .bets-table .bt-info small {
    margin-top: 0;
    font-size: 8px;
    line-height: 1.2;
    white-space: normal;
  }

  .bets-table .bt-stake {
    grid-area: stake;
    font-size: 9px;
    text-align: left;
  }

  .bets-table .bt-stake::before {
    color: var(--muted);
    content: "Stake · ";
    font-size: 8px;
    font-weight: 600;
  }

  .bets-table .bt-result {
    display: flex;
    grid-area: result;
    align-items: flex-end;
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
  }
}

/* ======================================================================
   Market tile countdown timer — small inline text in the time row
   ====================================================================== */

.mkt-cd {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ok, #16a34a);
  white-space: nowrap;
}

.mkt-cd.mkt-cd-off {
  color: inherit;
  opacity: 0.65;
  font-weight: 600;
}

.mkt-cd.is-urgent {
  color: var(--danger, #dc2626);
  animation: blink-urgency 1s ease-in-out infinite;
}

.mkt-cd[data-countdown] {
  display: inline-flex;
  padding: 3px 8px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
  color: #166534;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.2;
}

.mkt-cd[data-countdown].is-urgent {
  background: #fff1f2;
  color: #b91c1c;
}

@keyframes blink-urgency {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .55;
  }
}

/* remove old block below if present */
.market-countdown {
  display: none;
}

/* ── Bet outcome card tints ─────────────────────────────────────────────── */
.bets-table .bt-row.is-won {
  background: var(--ok-soft);
  border-color: #86efac;
}

.bets-table .bt-row.is-lost {
  background: var(--danger-soft);
  border-color: #fca5a5;
}

.bets-table .bt-row.is-pending {
  background: var(--warn-soft);
  border-color: #fcd34d;
}

/* ── Wallet and withdrawal guidance ───────────────────────────────────── */
.wallet-hold-summary {
  display: grid;
  margin: 0 0 var(--s3);
  padding: 8px 9px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #fde68a;
  border-radius: 11px;
  background: linear-gradient(135deg, #fffbeb, #fff7d6);
}

.wallet-hold-summary.is-clear {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #e8f9ee);
}

.wallet-hold-icon,
.withdraw-overview-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #fef3c7;
  color: #92400e;
}

.wallet-hold-summary.is-clear .wallet-hold-icon {
  background: #dcfce7;
  color: #166534;
}

.wallet-hold-icon .icon,
.withdraw-overview-icon .icon {
  width: 15px;
  height: 15px;
}

.wallet-hold-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.wallet-hold-copy > small,
.withdraw-overview-card small {
  color: var(--muted);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wallet-hold-copy > strong {
  display: inline-flex;
  width: max-content;
  padding: 1px 5px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.wallet-hold-copy > strong span {
  color: var(--muted);
  font-size: .56rem;
}

.wallet-hold-copy p {
  margin: 1px 0 0;
  color: var(--text-2);
  font-size: .6rem;
  line-height: 1.25;
}

.wallet-hold-summary > a {
  display: inline-flex;
  min-height: 28px;
  padding: 0 6px;
  align-items: center;
  gap: 3px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgb(22 101 52 / 10%);
  color: #166534;
  font-size: .62rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}

.wallet-hold-summary > a:hover {
  border-color: #22c55e;
  background: #f0fdf4;
  transform: translateY(-1px);
}

.wallet-hold-summary > a .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 480px) {
  .wallet-hold-summary {
    margin-bottom: 6px;
    padding: 6px;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 5px;
    border-radius: 9px;
  }

  .wallet-hold-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .wallet-hold-icon .icon {
    width: 13px;
    height: 13px;
  }

  .wallet-hold-copy {
    gap: 0;
  }

  .wallet-hold-copy > small {
    font-size: 8px;
  }

  .wallet-hold-copy > strong {
    padding: 1px 4px;
    border-radius: 5px;
    font-size: 10px;
  }

  .wallet-hold-copy > strong span {
    font-size: 8px;
  }

  .wallet-hold-copy p {
    font-size: 8px;
    line-height: 1.2;
  }

  .wallet-hold-summary > a {
    min-height: 26px;
    padding: 0 5px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgb(22 101 52 / 10%);
    font-size: 8px;
  }

  .wallet-hold-summary > a .icon {
    width: 12px;
    height: 12px;
  }
}

.wallet-history-header,
.withdraw-history-titlebar {
  display: flex;
  margin: 0 0 9px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-history-header h2,
.withdraw-history-titlebar h2 {
  margin: 0;
  color: var(--text);
  font-size: .98rem;
  font-weight: 850;
}

.wallet-history-header p,
.withdraw-history-titlebar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.4;
}

.wallet-history-header > span,
.withdraw-history-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .62rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.withdraw-overview {
  display: grid;
  margin: 0 0 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.withdraw-overview-card {
  display: flex;
  min-width: 0;
  min-height: 70px;
  padding: 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.withdraw-overview-card.is-hold {
  border-color: #fde68a;
  background: #fffbeb;
}

.withdraw-overview-card.is-clear {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.withdraw-overview-card.is-limits {
  grid-column: 1 / -1;
  min-height: 58px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
}

.withdraw-overview-card.is-hold .withdraw-overview-icon {
  background: #fef3c7;
  color: #92400e;
}

.withdraw-overview-card.is-clear .withdraw-overview-icon {
  background: #dcfce7;
  color: #166534;
}

.withdraw-overview-card > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.withdraw-overview-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.withdraw-overview-card strong span {
  color: var(--muted);
  font-size: .62rem;
}

.withdraw-process {
  display: grid;
  margin: 0 0 12px;
  padding: 9px 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.withdraw-process li {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.withdraw-process li span,
.withdraw-step-number,
.withdraw-step-heading > span {
  display: inline-flex;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .66rem;
  font-weight: 900;
}

.withdraw-process li:first-child {
  color: var(--brand-dark);
}

.withdraw-process li:first-child span {
  background: var(--brand);
  color: #fff;
}

.withdraw-process li strong {
  font-size: .62rem;
  font-weight: 750;
}

.withdraw-step-heading {
  display: flex;
  margin: 0 0 11px;
  align-items: center;
  gap: 8px;
}

.withdraw-step-heading > span {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.withdraw-step-heading > div {
  display: grid;
  gap: 1px;
}

.withdraw-step-heading strong {
  color: var(--text);
  font-size: .88rem;
}

.withdraw-step-heading small {
  color: var(--muted);
  font-size: .68rem;
}

.withdraw-field-label .withdraw-step-number {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  border-radius: 7px;
  font-size: .6rem;
}

.withdraw-hold-note {
  display: flex;
  margin: 4px 0 10px;
  padding: 9px 10px;
  align-items: flex-start;
  gap: 7px;
  border: 1px solid var(--info-line);
  border-radius: 11px;
  background: var(--info-soft);
  color: #1e3a8a;
}

.withdraw-hold-note > span {
  display: inline-flex;
  flex: 0 0 auto;
  padding-top: 1px;
}

.withdraw-hold-note .icon {
  width: 15px;
  height: 15px;
}

.withdraw-hold-note p {
  margin: 0;
  font-size: .68rem;
  line-height: 1.4;
}

.withdraw-history-section {
  margin-top: 18px;
}

.withdraw-history-titlebar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.withdraw-history-titlebar > div > span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.withdraw-history-titlebar .icon {
  width: 17px;
  height: 17px;
}

.withdrawal-request-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.withdrawal-request-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.withdrawal-request-card.is-pending {
  border-left-color: #d97706;
  background: linear-gradient(135deg, #fff, #fffbeb);
}

.withdrawal-request-card.is-approved {
  border-left-color: #16a34a;
  background: linear-gradient(135deg, #fff, #f0fdf4);
}

.withdrawal-request-card.is-rejected,
.withdrawal-request-card.is-cancelled {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fff, #fff5f5);
}

.withdrawal-request-head {
  display: grid;
  min-width: 0;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.withdrawal-request-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-2);
}

.is-pending .withdrawal-request-icon {
  background: #fef3c7;
  color: #92400e;
}

.is-approved .withdrawal-request-icon {
  background: #dcfce7;
  color: #166534;
}

.is-rejected .withdrawal-request-icon,
.is-cancelled .withdrawal-request-icon {
  background: #fee2e2;
  color: #991b1b;
}

.withdrawal-request-icon .icon {
  width: 17px;
  height: 17px;
}

.withdrawal-request-amount {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.withdrawal-request-amount strong {
  color: var(--text);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.withdrawal-request-amount strong span {
  color: var(--muted);
  font-size: .64rem;
}

.withdrawal-request-amount small {
  color: var(--muted);
  font-size: .62rem;
}

.withdrawal-status-pill {
  max-width: 135px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .58rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.is-pending .withdrawal-status-pill {
  background: #fef3c7;
  color: #92400e;
}

.is-approved .withdrawal-status-pill {
  background: #dcfce7;
  color: #166534;
}

.is-rejected .withdrawal-status-pill,
.is-cancelled .withdrawal-status-pill {
  background: #fee2e2;
  color: #991b1b;
}

.withdrawal-progress {
  display: grid;
  margin: 10px 0 7px;
  padding: 8px 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  list-style: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, .7);
}

.withdrawal-progress li {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  text-align: center;
}

.withdrawal-progress li > span {
  display: inline-flex;
  width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: .58rem;
  font-weight: 850;
}

.withdrawal-progress li > span .icon {
  width: 12px;
  height: 12px;
}

.withdrawal-progress li small {
  font-size: .57rem;
  line-height: 1.2;
}

.withdrawal-progress li.is-done > span,
.withdrawal-progress li.is-complete > span {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.withdrawal-progress li.is-current > span {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.withdrawal-progress li.is-returned > span {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.withdrawal-request-details {
  padding: 7px 8px;
  border-top: 1px solid var(--line);
}

.withdrawal-request-details summary {
  color: var(--text-2);
  cursor: pointer;
  font-size: .65rem;
  font-weight: 750;
}

.withdrawal-request-details p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.4;
}

.withdrawal-request-details p strong {
  color: var(--text-2);
}

.withdrawal-pending-actions {
  display: flex;
  margin-top: 7px;
  padding-top: 7px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.withdrawal-pending-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #92400e;
  font-size: .63rem;
  font-weight: 700;
}

.withdrawal-pending-actions > span .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

@media (max-width: 380px) {
  .wallet-hold-summary {
    padding: 6px;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 5px;
  }

  .wallet-hold-summary > a {
    grid-column: auto;
    justify-self: auto;
    min-height: 26px;
  }

  .wallet-hold-icon {
    width: 24px;
    height: 24px;
  }

  .withdrawal-request-card {
    padding: 9px;
  }

  .withdrawal-request-head {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .withdrawal-request-icon {
    width: 30px;
    height: 30px;
  }

  .withdrawal-status-pill {
    max-width: 105px;
    padding: 4px 6px;
    font-size: .55rem;
  }

  .withdrawal-pending-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Plain language, easier reading on the withdrawal page */
.app-language-picker {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 40px;
  margin: 0 0 10px auto;
  padding: 3px 8px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.app-language-picker label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 750;
}

.app-language-picker label .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.app-language-picker select {
  max-width: min(58vw, 190px);
  min-height: 32px;
  padding: 3px 22px 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
}

.app-language-picker:focus-within {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
}

/* The home screen keeps language access visible but out of the way. */
.home-page .app-language-picker {
  min-height: 28px;
  margin: 0 0 4px auto;
  padding: 2px 5px;
  gap: 3px;
  border-radius: 8px;
  box-shadow: none;
}

.home-page .app-language-picker label {
  gap: 3px;
  font-size: 10px;
}

.home-page .app-language-picker label .icon {
  width: 13px;
  height: 13px;
}

.home-page .app-language-picker select {
  min-height: 23px;
  padding: 1px 17px 1px 5px;
  border-radius: 6px;
  font-size: 10px;
}

.withdraw-overview-card small {
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.withdraw-overview-card strong {
  font-size: .94rem;
}

.withdraw-overview-card strong span {
  font-size: .7rem;
}

.withdraw-step-heading strong {
  font-size: .98rem;
}

.withdraw-step-heading small {
  font-size: .78rem;
}

.withdraw-field-label {
  font-size: .94rem;
}

.withdraw-request-form .hint {
  color: var(--text-2);
  font-size: .8rem;
  line-height: 1.45;
}

.withdraw-history-titlebar h2 {
  font-size: 1.06rem;
}

.withdraw-history-titlebar p {
  font-size: .76rem;
}

.withdraw-history-count {
  font-size: .68rem;
}

.withdrawal-status-pill {
  max-width: 145px;
  font-size: .66rem;
}

.withdrawal-request-amount small {
  font-size: .7rem;
}

.withdrawal-progress li small {
  font-size: .66rem;
}

.withdrawal-request-details summary,
.withdrawal-request-details p,
.withdrawal-pending-actions > span {
  font-size: .72rem;
}

/* Keep the withdrawal flow compact, especially on phones. */
.withdraw-page .wrap {
  padding-top: 8px;
}

.withdraw-page .app-language-picker {
  min-height: 34px;
  margin-bottom: 6px;
  padding: 2px 7px;
  gap: 5px;
}

.withdraw-page .app-language-picker select {
  min-height: 32px;
}

.withdraw-page .withdraw-intro {
  margin-bottom: 8px;
  padding: 8px 10px;
  gap: 8px;
}

.withdraw-page .withdraw-intro-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.withdraw-page .withdraw-intro-icon .icon {
  width: 18px;
  height: 18px;
}

.withdraw-page .withdraw-intro strong {
  font-size: .9rem;
}

.withdraw-page .withdraw-intro p {
  margin-top: 1px;
  font-size: .74rem;
  line-height: 1.25;
}

.withdraw-page .withdraw-request-form {
  margin-bottom: 0;
  padding: 10px;
}

.withdraw-page .withdraw-step-heading {
  margin-bottom: 6px;
  gap: 6px;
}

.withdraw-page .withdraw-step-heading > span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.withdraw-page .withdraw-request-form > .field {
  margin-bottom: 8px;
}

.withdraw-page .withdraw-field-label {
  margin-bottom: 4px;
  gap: 6px;
  font-size: .86rem;
}

.withdraw-page .withdraw-field-label .icon {
  width: 16px;
  height: 16px;
}

.withdraw-page .withdraw-request-form .hint {
  margin-top: 3px;
  font-size: .72rem;
  line-height: 1.3;
}

.withdraw-page .withdraw-field-heading {
  margin-bottom: 5px;
  gap: 6px;
}

.withdraw-page .manage-payout-link {
  min-height: var(--tap-min);
  padding-right: 6px;
  padding-left: 6px;
  gap: 4px;
  font-size: .74rem;
}

.withdraw-page .payout-choice-list {
  gap: 5px;
}

.withdraw-page .payout-choice {
  min-height: 56px;
  padding: 6px 8px;
  gap: 7px;
}

.withdraw-page .payout-choice-icon {
  width: 34px;
  height: 34px;
}

.withdraw-page .payout-choice-icon .icon {
  width: 18px;
  height: 18px;
}

.withdraw-page .payout-choice-copy {
  gap: 1px;
}

.withdraw-page .payout-choice-copy strong {
  font-size: .82rem;
}

.withdraw-page .payout-choice-copy small {
  font-size: .7rem;
}

.withdraw-page .payout-choice-check {
  width: 21px;
  height: 21px;
}

.withdraw-page .payout-empty {
  padding: 8px;
  gap: 8px;
}

.withdraw-page .payout-empty-icon {
  width: 32px;
  height: 32px;
}

.withdraw-page .payout-empty-icon .icon {
  width: 17px;
  height: 17px;
}

.withdraw-page .withdraw-hold-note {
  margin: 0 0 6px;
  padding: 6px 8px;
  gap: 5px;
}

.withdraw-page .withdraw-actions {
  margin-top: 0;
  gap: 6px;
}

.withdraw-page .withdraw-actions .btn {
  min-height: 44px;
  padding: 7px 12px;
}

.withdraw-page .withdraw-history-section {
  margin-top: 10px;
}

.withdraw-page .withdraw-history-titlebar {
  margin-bottom: 6px;
  gap: 6px;
}

.withdraw-page .withdraw-history-titlebar > div {
  gap: 6px;
}

.withdraw-page .withdraw-history-titlebar > div > span {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.withdraw-page .withdraw-history-titlebar h2 {
  font-size: .94rem;
}

.withdraw-page .withdraw-history-titlebar p {
  line-height: 1.25;
}

.withdraw-page .withdraw-history-count {
  padding: 4px 7px;
}

.withdraw-page .withdraw-empty-state {
  margin: 6px 0;
  padding: 18px 12px;
  gap: 5px;
}

.withdraw-page .withdraw-empty-state .empty-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0;
}

.withdraw-page .withdraw-empty-state .empty-icon .icon {
  width: 18px;
  height: 18px;
}

.withdraw-page .withdraw-empty-state strong {
  font-size: .9rem;
}

.withdraw-page .withdraw-empty-state p {
  margin: 0;
  font-size: .72rem;
}

.withdraw-page .withdrawal-request-list {
  gap: 6px;
}

.withdraw-page .withdrawal-request-card {
  padding: 8px;
  border-left-width: 3px;
}

.withdraw-page .withdrawal-request-head {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 6px;
}

.withdraw-page .withdrawal-request-icon {
  width: 29px;
  height: 29px;
}

.withdraw-page .withdrawal-request-icon .icon {
  width: 15px;
  height: 15px;
}

.withdraw-page .withdrawal-request-amount strong {
  font-size: .84rem;
}

.withdraw-page .withdrawal-progress {
  margin: 6px 0 4px;
  padding: 5px 3px;
  gap: 2px;
}

.withdraw-page .withdrawal-progress li {
  gap: 2px;
}

.withdraw-page .withdrawal-progress li > span {
  width: 19px;
  height: 19px;
}

.withdraw-page .withdrawal-progress li small {
  font-size: .61rem;
}

.withdraw-page .withdrawal-request-details {
  padding: 5px 6px;
}

.withdraw-page .withdrawal-pending-actions {
  margin-top: 5px;
  padding-top: 5px;
  gap: 6px;
}

/* Support links and chat-style conversations. */
.support-contact-link {
  display: flex;
  min-height: 56px;
  margin: 8px 0 14px;
  padding: 9px 11px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-soft);
}

.support-contact-link > .icon:first-child {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--brand);
}

.support-contact-link > .icon:last-child {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

.support-contact-link > span {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.support-contact-link strong {
  color: var(--text);
  font-size: .82rem;
}

.support-contact-link small {
  color: var(--muted);
  font-size: .7rem;
}

.support-intro {
  display: flex;
  margin-bottom: 10px;
  padding: 11px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #f8faff);
  box-shadow: var(--shadow-soft);
}

.support-intro-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}

.support-intro-icon .icon {
  width: 19px;
  height: 19px;
}

.support-intro h2,
.support-intro p {
  margin: 0;
}

.support-intro h2 {
  color: var(--text);
  font-size: .94rem;
}

.support-intro p {
  margin-top: 2px;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.3;
}

.support-thread-heading,
.support-requests > header {
  display: flex;
  margin: 8px 0 6px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.support-thread-heading > div {
  display: grid;
  gap: 2px;
}

.support-thread-heading strong,
.support-requests h2 {
  margin: 0;
  color: var(--text);
  font-size: .9rem;
}

.support-thread-heading small {
  color: var(--muted);
  font-size: .68rem;
}

.support-thread {
  display: grid;
  margin-bottom: 8px;
  gap: 7px;
}

.support-message {
  max-width: 94%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.support-message.from-player {
  justify-self: end;
  border-color: #cfe1ff;
  background: #f4f8ff;
}

.support-message header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.support-message header strong {
  color: var(--text-2);
  font-size: .7rem;
}

.support-message time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .62rem;
}

.support-message p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: .78rem;
  line-height: 1.4;
}

.support-attachment-note {
  display: inline-flex;
  margin-top: 6px;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: .66rem;
}

.support-attachment-note .icon {
  width: 14px;
  height: 14px;
}

.support-form {
  display: grid;
  margin-bottom: 12px;
  padding: 11px;
  gap: 8px;
}

.support-form > label:not(.support-attachment-field) {
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 800;
}

.support-form textarea {
  width: 100%;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .8rem;
  line-height: 1.4;
  resize: vertical;
}

.support-topic-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.support-topic-fieldset legend {
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 800;
}

.support-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.support-topic-choice {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.support-topic-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.support-topic-choice > span {
  display: flex;
  min-height: 46px;
  padding: 6px 5px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .69rem;
  font-weight: 750;
  text-align: center;
}

.support-topic-choice > span .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--brand);
}

.support-topic-choice input:checked + span {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.support-topic-choice input:focus-visible + span {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
}

.support-attachment-field {
  display: none;
  padding: 8px;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .74rem;
  font-weight: 750;
}

.support-attachment-field.is-visible {
  display: grid;
}

.support-form:has(input[name="topic"][value="deposit"]:checked) .support-attachment-field {
  display: grid;
}

.support-attachment-field small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 500;
}

.support-attachment-field input[type="file"] {
  width: 100%;
  min-height: 38px;
  font-size: .7rem;
}

.support-privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.3;
}

.support-form .btn {
  min-height: 44px;
}

.support-requests {
  margin-top: 12px;
}

.support-requests > header {
  margin-bottom: 6px;
}

.support-requests > header > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
}

.support-requests ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 5px;
  list-style: none;
}

.support-requests li > a {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 7px 8px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-2);
}

.support-requests li > a.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.support-request-icon {
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--brand);
}

.support-request-icon .icon {
  width: 15px;
  height: 15px;
}

.support-request-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.support-request-copy strong,
.support-request-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-request-copy strong {
  color: var(--text);
  font-size: .72rem;
}

.support-request-copy small {
  color: var(--muted);
  font-size: .65rem;
}

.support-status {
  padding: 3px 6px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: .6rem;
  font-weight: 800;
}

.support-status.is-closed {
  background: var(--surface-2);
  color: var(--muted);
}

.support-requests time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .62rem;
}

@media (max-width: 480px) {
  .withdraw-page .wrap {
    padding-top: 4px;
  }

  .withdraw-page .withdraw-intro {
    margin-bottom: 5px;
    padding: 6px 7px;
    gap: 5px;
    border-radius: 9px;
  }

  .withdraw-page .withdraw-intro-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .withdraw-page .withdraw-intro-icon .icon {
    width: 14px;
    height: 14px;
  }

  .withdraw-page .withdraw-intro strong {
    font-size: 10px;
  }

  .withdraw-page .withdraw-intro p,
  .withdraw-page .withdraw-request-form .hint {
    font-size: 8px;
  }

  .withdraw-page .withdraw-request-form {
    padding: 6px;
    border-radius: 10px;
  }

  .withdraw-page .withdraw-step-heading {
    margin-bottom: 4px;
    gap: 4px;
    font-size: 10px;
  }

  .withdraw-page .withdraw-step-heading > span {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 9px;
  }

  .withdraw-page .withdraw-request-form > .field {
    margin-bottom: 5px;
  }

  .withdraw-page .withdraw-field-label {
    margin-bottom: 2px;
    gap: 4px;
    font-size: 10px;
  }

  .withdraw-page .withdraw-field-label .icon {
    width: 13px;
    height: 13px;
  }

  .withdraw-page .payout-choice {
    min-height: 42px;
    padding: 4px 5px;
    gap: 5px;
  }

  .withdraw-page .payout-choice-icon {
    width: 26px;
    height: 26px;
  }

  .withdraw-page .payout-choice-icon .icon {
    width: 14px;
    height: 14px;
  }

  .withdraw-page .payout-choice-copy strong {
    font-size: 10px;
  }

  .withdraw-page .payout-choice-copy small {
    font-size: 8px;
  }

  .withdraw-page .withdraw-actions {
    gap: 3px;
  }

  .withdraw-page .withdraw-actions .btn {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .withdraw-page .withdraw-history-titlebar h2 {
    font-size: 11px;
  }

  .withdraw-page .withdraw-history-titlebar p,
  .withdraw-page .withdraw-history-count {
    font-size: 8px;
  }

  .withdraw-page .withdraw-request-form .num-big {
    min-height: 36px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .withdraw-page .withdraw-request-form .payout-choice-list {
    display: grid;
    gap: 3px;
  }

  .withdraw-page .withdraw-request-form .payout-choice {
    min-height: 38px;
    padding: 4px 5px;
    gap: 5px;
    border-radius: 8px;
  }

  .withdraw-page .withdrawal-request-list {
    gap: 4px;
  }

  .withdraw-page .withdrawal-request-card {
    padding: 7px;
    border-left-width: 3px;
    border-radius: 10px;
  }

  .withdraw-page .withdrawal-request-head {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 5px;
  }

  .withdraw-page .withdrawal-request-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .withdraw-page .withdrawal-request-icon .icon {
    width: 13px;
    height: 13px;
  }

  .withdraw-page .withdrawal-request-amount strong {
    font-size: 11px;
  }

  .withdraw-page .withdrawal-request-amount strong span,
  .withdraw-page .withdrawal-request-amount small {
    font-size: 8px;
  }

  .withdraw-page .withdrawal-status-pill {
    padding: 3px 5px;
    font-size: 8px;
  }

  .withdraw-page .withdrawal-progress {
    margin: 5px 0 4px;
    padding: 5px 3px;
    gap: 2px;
    border-radius: 8px;
  }

  .withdraw-page .withdrawal-progress li {
    gap: 2px;
  }

  .withdraw-page .withdrawal-progress li > span {
    width: 17px;
    height: 17px;
    font-size: 8px;
  }

  .withdraw-page .withdrawal-progress li small {
    font-size: 8px;
  }

  .withdraw-page .withdrawal-request-details {
    padding: 5px 6px;
  }

  .withdraw-page .withdrawal-request-details summary,
  .withdraw-page .withdrawal-request-details p {
    font-size: 8px;
  }

  .withdraw-page .withdrawal-pending-actions {
    margin-top: 5px;
    padding-top: 5px;
    gap: 5px;
  }

  .withdraw-page .withdrawal-pending-actions > span {
    font-size: 8px;
  }

  .withdraw-page .withdrawal-pending-actions .btn {
    min-height: 28px;
    padding: 3px 6px;
    font-size: 8px;
  }

}

\n
