/* ============================================================
   Royal Stake — home shell
   Background palette lifted from casinoplus.com
   ============================================================ */

:root {
  /* casinoplus gradient — painted on the phone frame only */
  --bg-top: #0A2C33;
  --bg-bottom: #0B1646;
  --frame-bg: linear-gradient(#0A2C33, #0A2C33 50%, #0B1646);
  /* the page around the frame */
  --page-bg: #05080A;

  /* surfaces tuned to the teal/navy ground */
  --surface: #0C333C;
  --surface-deep: #05161A;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(157, 213, 227, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);

  --gold: #F4C430;
  --gold-dim: rgba(244, 196, 48, 0.2);
  --text: #FBF8FF;
  --muted: #7E9BA6;
  --muted-dim: #5E7C88;

  --shell: 430px;
  --nav-h: 58px;
  --tab-h: 73px;
  --orb-lift: 18px;   /* how far the Home orb rises above the tab bar */

  --font-ui: "Poppins", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Any class that sets `display` outbeats the UA's [hidden] rule, so pin it
   down once here rather than per component. */
[hidden] { display: none !important; }

/* Reserve the scrollbar gutter at all times. Without this, filtering to a
   short category (or locking scroll for the auth overlay) removes the
   scrollbar and the centred frame jumps sideways by its width. */
html {
  background: var(--page-bg);
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  scrollbar-gutter: stable;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- shell ---------- */

/* the gradient lives here: clipped to the frame's width,
   mapped to the viewport so it reads the same at any scroll depth */
.shell::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  width: 100%;
  max-width: var(--shell);
  background: var(--frame-bg);
}

.shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--orb-lift) + 20px);
  overflow-x: hidden;
}

/* ---------- top navbar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: 100%;
  max-width: var(--shell);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* the auto margin must sit on the flex child (the link), not the image,
   or the action buttons stop being pushed to the right edge */
.topbar__brand {
  display: flex;
  align-items: center;
  flex: none;
  margin-right: auto;
}

.topbar__logo { height: 34px; width: auto; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  color: var(--gold);
  flex: none;
}

.icon-btn svg { width: 16px; height: 16px; }

.btn-ghost,
.btn-gold {
  /* these are links, not buttons, so centre the label explicitly —
     an anchor won't vertically centre its text inside a fixed height */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.btn-ghost {
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  background: rgba(244, 196, 48, 0.08);
}

.btn-gold {
  color: #14202b;
  background: linear-gradient(180deg, #F8D65C, #E0AC18);
  box-shadow: 0 4px 12px rgba(244, 196, 48, 0.22);
}

/* ---------- wallet balance (signed in) ---------- */

.icon-btn--danger {
  color: #FF8FB6;
  border-color: rgba(255, 93, 122, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 61, 129, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(4, 14, 20, 0.3);
}

.balance-pill {
  display: flex;
  align-items: center;
  flex: none;
  height: 34px;
  padding: 0 4px 0 6px;
  border-radius: 12px;
  border: 1px solid rgba(244, 196, 48, 0.22);
  color: #FFE18A;
  background:
    linear-gradient(135deg, rgba(244, 196, 48, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(4, 14, 20, 0.34);
  box-shadow: 0 8px 18px rgba(3, 2, 12, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.balance-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.balance-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 9px;
  color: var(--gold);
  background: linear-gradient(rgba(244, 196, 48, 0.22), rgba(244, 196, 48, 0.08));
}

.balance-icon svg { width: 15px; height: 15px; }

.balance-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.balance-heading {
  display: flex;
  align-items: center;
  gap: 4px;
}

.balance-label {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.bonus-badge {
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 900;
  white-space: nowrap;
  color: #84E5A4;
  background: rgba(80, 200, 120, 0.16);
}

.balance-amount {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  color: #FFF0A8;
}

.balance-refresh {
  display: grid;
  place-items: center;
  width: 22px;
  height: 26px;
  flex: none;
  color: #FFE18A;
}

.balance-refresh svg { width: 14px; height: 14px; }

.balance-refresh.is-busy svg { animation: spin 0.7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .balance-refresh.is-busy svg { animation-duration: 2s; }
}

.topbar-spacer { height: var(--nav-h); }

/* ---------- banner carousel ---------- */

.banner {
  margin: 6px 8px 0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--surface-deep);
}

.banner__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.banner__track::-webkit-scrollbar { display: none; }

.banner__slide { flex: 0 0 100%; scroll-snap-align: center; }
.banner__slide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }

.banner__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.banner__dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.25s, background 0.25s;
}

.banner__dots span.active { width: 14px; background: var(--gold); }

/* ---------- announcement ---------- */

.announce {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 8px 0;
  padding: 8px 10px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(244, 196, 48, 0.07), rgba(19, 43, 70, 0.35));
}

.announce__icon { color: var(--gold); flex: none; }
.announce__icon svg { width: 15px; height: 15px; }

.announce__viewport { flex: 1; overflow: hidden; }

.announce__text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #CBE4EC;
  animation: marquee 22s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

.announce-bell {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  color: var(--gold);
  transition: background 0.15s;
}

.announce-bell svg { width: 17px; height: 17px; }
.announce-bell:hover { background: rgba(244, 196, 48, 0.1); }

/* The unread count rides the bell rather than sitting beside it, so the
   announcement bar keeps its height whether or not there is anything new. */
.announce-bell { position: relative; }

.announce-bell__badge {
  position: absolute;
  top: -2px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #E5484D;
  font-size: 9px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  color: #fff;
}

/* ---------- notifications ---------- */

.notif-stack { display: grid; gap: 10px; }

.notif {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(4, 14, 20, 0.34);
  color: inherit;
}

.notif.is-new {
  border-color: rgba(244, 196, 48, 0.38);
  background: rgba(244, 196, 48, 0.07);
}

.notif__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
}

.notif__icon svg { width: 17px; height: 17px; }

/* Same three tones the history rows use, so a deposit reads as a deposit
   wherever the player meets it. */
.notif__icon--in   { background: rgba(80, 200, 120, 0.12);  color: #84E5A4; }
.notif__icon--out  { background: rgba(255, 145, 120, 0.12); color: #FFA890; }
.notif__icon--gold { background: rgba(244, 196, 48, 0.12);  color: var(--gold); }

.notif__copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.notif__title { font-size: 13px; font-weight: 800; }
.notif__body { font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.notif__time { font-size: 10px; color: var(--muted); }

.notif__dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- category strip ---------- */

.cats {
  display: flex;
  gap: 6px;
  margin: 6px 8px 0;
  padding: 6px;
  border-radius: 40px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(19, 43, 62, 0.32), rgba(5, 15, 25, 0.42)),
    rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow-x: auto;
}

.cat {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: #BCE8FF;
  background: linear-gradient(145deg, rgba(174, 225, 255, 0.14), rgba(39, 124, 209, 0.06));
  border: 1px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.cat img { width: 16px; height: 16px; object-fit: contain; }

.cat.active {
  color: #0F2A33;
  background: linear-gradient(180deg, #F8D65C, #E0AC18);
  border-color: rgba(244, 196, 48, 0.5);
  box-shadow: 0 3px 10px rgba(244, 196, 48, 0.25);
}

/* ---------- search ---------- */

.search {
  position: relative;
  margin: 8px 8px 0;
}

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 30px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
}

.search input::placeholder { color: var(--muted); font-weight: 500; }
.search input:focus { outline: none; border-color: var(--gold-dim); }

/* ---------- sections ---------- */

.section { margin: 14px 8px 0; }
.section.is-hidden { display: none; }

.section__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.section__head::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--gold);
}

.section__icon { width: 18px; height: 18px; object-fit: contain; }

.section__title {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
}

.section__more {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
}

.section__more svg { width: 11px; height: 11px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* ---------- game card ---------- */

.card { position: relative; }

/* The whole tile is the link; the favourite star sits above it so it stays
   clickable in its own right. */
.card__open { display: block; color: inherit; }

.card__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, #123241, #0A1B33);
}

.card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.card:hover .card__art img { transform: scale(1.05); }

.card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}

.card__fav {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(6, 20, 26, 0.55);
  color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(3px);
}

.card__fav svg { width: 11px; height: 11px; }
.card__fav.on { color: var(--gold); }

.card__tag {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #17222e;
  background: linear-gradient(180deg, #F8D65C, #E0AC18);
}

.card__name {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  color: #D6E6ED;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  padding: 26px 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.empty.is-hidden { display: none; }

/* ---------- bottom nav ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: 100%;
  max-width: var(--shell);
  height: var(--tab-h);
}

.tabbar__shell {
  display: flex;
  align-items: center;
  height: 100%;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: #6E8C97;
  transition: color 0.18s;
}

.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--gold); }

.tab--play {
  position: relative;
  align-self: stretch;
  justify-content: flex-end;
  padding-bottom: 12px;
  /* label colour follows .tab / .tab.active; the orb stays gold either way */
}

.tab--play .tab__orb {
  position: absolute;
  top: calc(var(--orb-lift) * -1);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #14202b;
  background: linear-gradient(180deg, #F8D65C, #E0AC18);
  border: 4px solid var(--surface);
  box-shadow: 0 6px 18px rgba(244, 196, 48, 0.35);
}

.tab--play .tab__orb svg { width: 24px; height: 24px; }

/* ============================================================
   Profile / account page
   ============================================================ */

.profile { padding: 12px 8px 0; }

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin-bottom: 12px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 0, rgba(244, 196, 48, 0.2), rgba(0, 0, 0, 0) 36%),
    linear-gradient(145deg, rgba(19, 58, 70, 0.64), rgba(5, 15, 25, 0.3));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.avatar-shell {
  flex: none;
  width: 82px;
  height: 82px;
  padding: 4px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(244, 196, 48, 0.82), rgba(39, 180, 209, 0.36));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: linear-gradient(160deg, #123241, #0A1B33);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.profile-copy { min-width: 0; }

.profile-kicker {
  display: inline-block;
  padding: 3px 10px;
  margin-bottom: 6px;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.22);
  background: rgba(244, 196, 48, 0.08);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F9D76C;
}

.profile-name {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-handle {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(246, 252, 255, 0.62);
  overflow-wrap: anywhere;
}

/* wallet strip */

.wallet-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  border: 1px solid rgba(244, 196, 48, 0.2);
  background:
    linear-gradient(135deg, rgba(244, 196, 48, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(4, 14, 20, 0.34);
}

.wallet-strip__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
}

.wallet-strip__label svg { width: 18px; height: 18px; }

.wallet-strip__value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #FFF0A8;
}

.wallet-strip__eye {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--muted);
}

.wallet-strip__eye svg { width: 17px; height: 17px; grid-area: 1 / 1; }
.wallet-strip__eye:hover { color: var(--gold); }

/* Open eye while the balance is on show, crossed-out eye once it is masked.
   aria-pressed already carries that state, so no extra class is needed. */
.wallet-strip__eye svg:last-child { display: none; }
.wallet-strip__eye[aria-pressed="true"] svg:first-child { display: none; }
.wallet-strip__eye[aria-pressed="true"] svg:last-child { display: block; }

/* The account's permanent handle, sat under the email on the profile. */

.profile-username {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.profile-username code {
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid rgba(244, 196, 48, 0.28);
  background: rgba(244, 196, 48, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.copy-button--sm { padding: 3px 9px; font-size: 10px; }

/* What of the balance above is actually the player's to take. Shown only when
   some of it is locked bonus, so the usual case stays a single figure. */

.wallet-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  margin: -6px 0 12px;
  font-size: 11px;
}

.wallet-split__part { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.wallet-split__label { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.wallet-split__label svg { width: 12px; height: 12px; }
.wallet-split__value { font-weight: 800; color: #C9DDE6; }
.wallet-split__part--locked .wallet-split__value { color: var(--gold); }

/* action rows */

.profile-links { display: grid; gap: 10px; margin-bottom: 14px; }

.profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
  transition: border-color 0.15s, transform 0.15s;
}

.profile-link:hover {
  border-color: rgba(244, 196, 48, 0.3);
  transform: translateY(-1px);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 16px;
  border: 1px solid rgba(244, 196, 48, 0.14);
  background: rgba(244, 196, 48, 0.08);
  color: var(--gold);
}

.link-icon svg { width: 21px; height: 21px; }

.link-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.link-title { font-size: 14px; font-weight: 700; }
.link-sub { font-size: 11px; font-weight: 500; color: var(--muted); }

.link-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
}

.link-arrow svg { width: 14px; height: 14px; }

.profile-link--danger {
  border-color: rgba(255, 86, 86, 0.2);
  color: #FF8A8A;
}

.profile-link--danger:hover { border-color: rgba(255, 86, 86, 0.42); }

.profile-link--danger .link-icon {
  border-color: rgba(255, 86, 86, 0.18);
  background: rgba(255, 86, 86, 0.1);
  color: #FF8A8A;
}

.profile-link--danger .link-sub { color: rgba(255, 138, 138, 0.62); }

/* ---------- account sub-page forms ---------- */

/* 28px is right for the form pages that drop the tab bar (reset-pin, transactions,
   change-pin, edit-profile). The ones that keep it — wallet, deposit, withdraw,
   partner — need the same clearance as any other page, or the last control ends up
   under the bar and the raised Home orb. */
.shell--form { padding-bottom: 28px; }
body:has(.tabbar) .shell--form { padding-bottom: calc(var(--tab-h) + var(--orb-lift) + 20px); }

.form-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 12px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.back-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 14px;
  border: 1px solid rgba(244, 196, 48, 0.24);
  background: rgba(8, 22, 27, 0.58);
  color: #F9D76C;
}

.back-button svg { width: 18px; height: 18px; }
.back-button:hover { border-color: rgba(244, 196, 48, 0.5); }

.eyebrow {
  display: inline-block;
  padding: 3px 10px;
  margin-bottom: 6px;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.22);
  background: rgba(244, 196, 48, 0.08);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F9D76C;
}

.form-hero__title { font-size: 20px; font-weight: 900; line-height: 1.25; }

.form-card {
  display: grid;
  /* minmax(0, …): a grid column otherwise grows to its widest content, and a
     select is as wide as its longest option — a long bank name pushed every
     field and the button past the card's edge. */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.input-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }

.input-label { font-size: 12px; font-weight: 700; color: #D6E6ED; }

.input-box {
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.07);
  transition: border-color 0.15s;
}

.input-box:focus-within { border-color: rgba(244, 196, 48, 0.45); }

/* leading icon inside an input row (has no intrinsic size of its own) */
.input-box > svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-left: 12px;
  color: var(--muted);
}

.input-box > svg + input { padding-left: 10px; }

.input-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
}

.input-box input:focus { outline: none; }
.input-box input::placeholder { color: var(--muted-dim); font-weight: 600; }

.input-box.is-locked { background: rgba(255, 255, 255, 0.035); }
.input-box.is-locked input { color: var(--muted); cursor: not-allowed; }

.input-eye {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  color: var(--muted);
}

.input-eye svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.input-eye:hover, .input-eye.is-shown { color: var(--gold); }

/* Two icons stacked: crossed-out eye while the PIN is hidden, open eye once
   it is revealed. `.is-shown` is set by the reveal handler. */
.input-eye svg:last-child { display: none; }
.input-eye.is-shown svg:first-child { display: none; }
.input-eye.is-shown svg:last-child { display: block; }

.input-hint { font-size: 11px; line-height: 1.5; color: var(--muted); }

.field__error--center { text-align: center; }

.submit-button {
  /* stretches on its own rather than relying on a grid parent */
  width: 100%;
  height: 52px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
  color: #102016;
  background: linear-gradient(135deg, #F9D76C, #D8A820);
  box-shadow: 0 8px 20px rgba(244, 196, 48, 0.22);
}

/* avatar picker */

.avatar-field {
  position: relative;
  justify-self: center;
  width: 108px;
  height: 108px;
}

.avatar-field .avatar-shell { width: 108px; height: 108px; border-radius: 32px; }
.avatar-field .avatar { border-radius: 28px; font-size: 34px; }

.avatar--photo { object-fit: cover; }

.avatar-pick {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  cursor: pointer;
  color: #102016;
  background: linear-gradient(135deg, #F9D76C, #D8A820);
  border: 3px solid #0A2C33;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.avatar-pick svg { width: 17px; height: 17px; }

/* ---------- transaction history ---------- */

.tab-card {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
}

.tab-button {
  flex: 1;
  /* four tabs have to fit a 375px screen: 4 x 72 + gaps + padding < 375 */
  min-width: 72px;
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0 8px;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  color: rgba(246, 252, 255, 0.62);
  transition: color 0.15s, background 0.15s;
}

.tab-button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.tab-button.active {
  color: #132318;
  background: linear-gradient(135deg, #F9D76C, #D8A820);
  box-shadow: 0 6px 16px rgba(244, 196, 48, 0.22);
}

.record-stack { display: grid; gap: 10px; }

.state-card {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
}

.record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
}

.record__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  border: 1px solid transparent;
}

.record__icon svg { width: 20px; height: 20px; }

.record__icon--in {
  border-color: rgba(80, 200, 120, 0.22);
  background: rgba(80, 200, 120, 0.12);
  color: #84E5A4;
}

.record__icon--out {
  border-color: rgba(255, 145, 120, 0.22);
  background: rgba(255, 145, 120, 0.12);
  color: #FFA890;
}

.record__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.record__title {
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.record__meta { font-size: 10px; font-weight: 500; color: var(--muted); }

.record__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: none;
}

.record__amount { font-size: 13px; font-weight: 900; white-space: nowrap; }
.record__amount--in { color: #84E5A4; }
.record__amount--out { color: #FFA890; }

.chip {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip--completed { color: #84E5A4; background: rgba(80, 200, 120, 0.16); }
.chip--pending   { color: #F9D76C; background: rgba(244, 196, 48, 0.16); }
.chip--failed    { color: #FF8A8A; background: rgba(255, 86, 86, 0.16); }

@media (max-width: 380px) {
  .record__title { font-size: 12px; }
  .record__amount { font-size: 12px; }
}

/* ---------- deposit / withdraw ---------- */

.hero-sub {
  margin: -6px 0 12px;
  padding: 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.step-card {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
}

.step-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.step-card__head > div { flex: 1; min-width: 0; }
.step-card__title { font-size: 15px; font-weight: 900; line-height: 1.3; }
.step-card__sub { margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--muted); }

.step-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  border: 1px solid rgba(244, 196, 48, 0.28);
  background: rgba(244, 196, 48, 0.1);
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.provider {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s, transform 0.15s;
}

.provider:hover { border-color: rgba(244, 196, 48, 0.4); transform: translateY(-1px); }
.provider--wide { grid-column: 1 / -1; }

.provider__logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.provider__logo img { width: 100%; height: 100%; object-fit: cover; }

.provider__logo--sm {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: none;
}

.provider__glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 26px;
  font-weight: 900;
  color: #0E2C1E;
  background: linear-gradient(160deg, #4FBF87, #2E9C68);
}

.provider__logo--sm .provider__glyph { font-size: 20px; }

.provider__name { font-size: 12px; font-weight: 700; text-align: center; }

/* payee / saved account rows */

.payee, .account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(244, 196, 48, 0.28);
  background: rgba(244, 196, 48, 0.05);
}

.payee__copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.payee__kicker { font-size: 9px; font-weight: 900; letter-spacing: 0.08em; color: var(--gold); }
.payee__holder { font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.payee__number { font-size: 12px; font-weight: 600; color: #CBE4EC; overflow-wrap: anywhere; }
.payee__note { font-size: 10px; color: var(--muted); }

.copy-button {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.35);
  background: rgba(244, 196, 48, 0.1);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
}

.copy-button.is-done { color: #84E5A4; border-color: rgba(80, 200, 120, 0.4); background: rgba(80, 200, 120, 0.12); }

.account-list { display: grid; gap: 10px; }

.account {
  cursor: pointer;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.account input { position: absolute; opacity: 0; pointer-events: none; }

.account__mark {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--muted);
}

.account:has(input:checked) {
  border-color: rgba(244, 196, 48, 0.45);
  background: rgba(244, 196, 48, 0.06);
}

.account:has(input:checked) .account__mark {
  border-color: var(--gold);
  background:
    radial-gradient(circle, var(--gold) 0 45%, transparent 46%);
}

.add-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(244, 196, 48, 0.35);
  background: rgba(244, 196, 48, 0.04);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.add-account:hover { border-color: rgba(244, 196, 48, 0.6); }

.add-account__plus {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 9px;
  background: rgba(244, 196, 48, 0.14);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

/* amount input extras */

.input-suffix {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.input-box select {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  appearance: none;
  /* A long option is cut with "…" rather than widening the field. */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.input-box select:focus { outline: none; }
.input-box select option { background: #0A2C33; color: var(--text); }

.input-range {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.input-group--spaced { margin-top: 14px; margin-bottom: 16px; }

.ghost-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 46px;
  border-radius: 16px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.ghost-button:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }

.link-icon--in { border-color: rgba(80, 200, 120, 0.22); background: rgba(80, 200, 120, 0.12); color: #84E5A4; }
.link-icon--out { border-color: rgba(255, 145, 120, 0.22); background: rgba(255, 145, 120, 0.12); color: #FFA890; }

.wallet-help {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.wallet-help a { color: var(--gold); font-weight: 700; text-decoration: underline; }

/* ---------- promotions ---------- */

.promo { padding: 14px 8px 0; }

.promo-header { text-align: center; margin-bottom: 14px; }

.promo-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.promo-title {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #FFF4BF;
}

.promo-announcement {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(244, 196, 48, 0.16);
  background: rgba(244, 196, 48, 0.07);
  font-size: 11px;
  line-height: 1.6;
  color: #C5D7D0;
}

.promo-list { display: grid; gap: 12px; }

.promo-card {
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(4, 14, 20, 0.34);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.promo-card__art {
  position: relative;
  background: linear-gradient(160deg, #123241, #0A1B33);
}

/* reserves the banner's aspect ratio so the card keeps its shape while the
   artwork loads, or if it never does. promo.php measures each image and sets
   --art-ratio; 52% is the house banner shape, used when it cannot. */
.promo-card__art::before {
  content: "";
  display: block;
  padding-top: var(--art-ratio, 52%);
}

.promo-card__art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card__body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.promo-card__copy { flex: 1; min-width: 0; }

.promo-card__title { font-size: 14px; font-weight: 800; }

.promo-card__caption {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.promo-card__cta {
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  color: #14202b;
  background: linear-gradient(135deg, #F9D76C, #D8A820);
  box-shadow: 0 6px 16px rgba(244, 196, 48, 0.22);
}

/* ---------- partner programme ---------- */

.partner-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.partner-head > div { flex: 1; min-width: 0; }

.partner-title {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.status-chip {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.status-chip--on  { color: #84E5A4; background: rgba(80, 200, 120, 0.16); }
.status-chip--off { color: var(--muted); background: rgba(255, 255, 255, 0.07); }

.invite-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid rgba(244, 196, 48, 0.22);
  background: rgba(244, 196, 48, 0.05);
}

.invite-box__copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.invite-box__label { font-size: 10px; font-weight: 700; color: var(--muted); }
.invite-box__link { font-size: 12px; font-weight: 800; color: var(--gold); overflow-wrap: anywhere; }
.invite-box__code { font-size: 10px; color: var(--muted); }

.share-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.share-tile {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 10px;
  font-weight: 700;
  color: #CBE4EC;
  transition: border-color 0.15s;
}

.share-tile:hover { border-color: rgba(244, 196, 48, 0.35); }

.share-tile__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
}

.share-tile__icon svg { width: 19px; height: 19px; }
.share-tile__glyph { font-size: 20px; font-weight: 900; line-height: 1; }

.share-tile__icon--share    { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.share-tile__icon--facebook { background: #1877F2; }
.share-tile__icon--telegram { background: #2AABEE; }
.share-tile__icon--whatsapp { background: #25D366; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.stat {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.stat__label { font-size: 10px; font-weight: 700; color: var(--muted); }
.stat__value { font-size: 18px; font-weight: 900; }

.progress-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.progress-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.progress-card__head strong { font-size: 13px; font-weight: 900; color: var(--gold); }

.progress {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #F9D76C, #D8A820);
  transition: width 0.3s;
}

.progress-card__note { margin-top: 8px; font-size: 10px; color: var(--muted); }

/* network diagram */

.tree { margin: 14px 0 12px; }

.tree__you, .tree__node {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.tree__you {
  max-width: 190px;
  margin-inline: auto;
  border-color: rgba(244, 196, 48, 0.35);
  background: rgba(244, 196, 48, 0.06);
}

.tree__avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(244, 196, 48, 0.28);
  background: rgba(244, 196, 48, 0.1);
  color: var(--gold);
}

.tree__avatar svg { width: 21px; height: 21px; }

.tree__avatar--sm {
  width: 34px;
  height: 34px;
  border-color: rgba(80, 200, 120, 0.3);
  background: rgba(80, 200, 120, 0.12);
  color: #84E5A4;
}

.tree__avatar--sm svg { width: 17px; height: 17px; }

.tree__name { font-size: 13px; font-weight: 800; }
.tree__role { font-size: 10px; color: var(--gold); }
.tree__kicker { font-size: 8px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: #84E5A4; }
.tree__note { font-size: 9px; line-height: 1.4; color: var(--muted); }

.tree__stem {
  width: 2px;
  height: 22px;
  margin-inline: auto;
  background: repeating-linear-gradient(to bottom, rgba(244, 196, 48, 0.6) 0 4px, transparent 4px 8px);
}

.tree__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.flow-bar {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(244, 196, 48, 0.25);
  background: rgba(244, 196, 48, 0.08);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  color: var(--gold);
}

.formula-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.formula-rate { font-size: 32px; font-weight: 900; line-height: 1; color: var(--gold); }

.formula {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

/* guide */

.rule-list { display: grid; gap: 10px; margin-bottom: 14px; list-style: none; }

.rule-list li {
  display: flex;
  gap: 9px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #CBE4EC;
}

.rule-tick {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(80, 200, 120, 0.16);
  color: #84E5A4;
}

.rule-tick svg { width: 11px; height: 11px; }

.faq-list { display: grid; gap: 8px; }

.faq {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq__mark {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  margin-left: auto;
  color: var(--gold);
}

.faq__mark::before,
.faq__mark::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translateY(-50%);
  transition: transform 0.2s;
}

.faq__mark::after { transform: translateY(-50%) rotate(90deg); }
.faq[open] .faq__mark::after { transform: translateY(-50%) rotate(0deg); }

.faq p {
  padding: 0 13px 13px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(244, 196, 48, 0.25);
  background: rgba(244, 196, 48, 0.06);
}

.cta-card > div { flex: 1; min-width: 0; }
.cta-card__title { margin-top: 3px; font-size: 14px; font-weight: 900; }

@media (max-width: 380px) {
  .share-row { gap: 6px; }
  .share-tile { font-size: 9px; }
}

/* ============================================================
   Auth overlay (register / login)
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.75);
  overflow-y: auto;
}

.auth {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  padding: 22px 16px 28px;
  border-radius: 24px;
  border: 1px solid var(--gold-dim);
  color: #fff;
  background: radial-gradient(circle at 50% -10%, #16404E 0, #0A2C33 35%, #06121F 72%);
}

.auth__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.auth__close svg { width: 14px; height: 14px; }

.auth__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 40px;
  margin-bottom: 16px;
}

.auth__logo { width: 62px; height: auto; flex: none; }
.auth__kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--gold); }

.auth__title {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.auth__sub { font-family: var(--font-ui); font-size: 11px; color: #9FBCC7; }

/* ---------- verification code ---------- */

.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 4px 0 12px;
}

.otp input {
  width: 100%;
  height: 54px;
  padding: 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  caret-color: var(--gold);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.otp input::-webkit-outer-spin-button,
.otp input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.otp input.is-filled {
  border-color: rgba(244, 196, 48, 0.45);
  background: rgba(244, 196, 48, 0.08);
}

.otp input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(244, 196, 48, 0.06);
  box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.16);
}

.otp.is-wrong { animation: otp-shake 0.4s; }

@keyframes otp-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .otp.is-wrong { animation: none; }
}

.auth__foot--muted { margin-top: 8px; }
.auth__foot--muted button { color: var(--muted); font-weight: 600; }

.auth__foot button[disabled] {
  color: var(--muted-dim);
  cursor: default;
}

@media (max-width: 380px) {
  .otp { gap: 6px; }
  .otp input { height: 48px; font-size: 19px; }
}

.field { margin-bottom: 12px; }

.field > label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: #D6E6ED;
}

.field__box {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s;
}

.field__box:focus-within { border-color: var(--gold-dim); }
.field__box > svg { width: 15px; height: 15px; margin: 0 8px 0 11px; color: var(--muted); flex: none; }

.field__box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 16px;
}

.field__box input:focus { outline: none; }
.field__box input::placeholder { color: var(--muted-dim); }

.field__toggle {
  padding: 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
}

/* "optional" beside a label, so the field reads as skippable at a glance
   rather than only in its placeholder. */
.field__optional {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.85;
}

.field__error {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: #FF8B7B;
}

.auth__hint {
  padding: 9px 11px;
  margin: 4px 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  line-height: 1.5;
  color: #A9C6D1;
}

.auth__forgot {
  margin: -6px 0 12px;
  text-align: right;
  font-size: 12px;
}

.auth__forgot a { color: var(--gold); font-weight: 700; }
.auth__forgot a:hover { text-decoration: underline; }

.auth__submit {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: #14202b;
  background: linear-gradient(180deg, #F8D65C, #E0AC18);
  box-shadow: 0 8px 20px rgba(244, 196, 48, 0.25);
}

.auth__foot {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #9FBCC7;
}

.auth__foot button { color: var(--gold); font-weight: 700; }

.alert {
  padding: 9px 11px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
}

.alert--ok  { border: 1px solid rgba(39, 209, 124, 0.35); background: rgba(39, 209, 124, 0.1); color: #7FE6B4; }
.alert--err { border: 1px solid rgba(255, 107, 90, 0.35);  background: rgba(255, 107, 90, 0.1);  color: #FF9B8B; }
.alert--info { border: 1px solid rgba(244, 196, 48, 0.3); background: rgba(244, 196, 48, 0.08); color: #F9D76C; }

@media (max-width: 380px) {
  .grid { gap: 6px; }
  .auth__title { font-size: 20px; }
}

/* ---------- payment screenshot upload ---------- */

.upload-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(244, 196, 48, 0.45);
  background: rgba(4, 14, 20, 0.34);
  overflow: hidden;
  cursor: pointer;
}

.upload-box:hover { border-color: var(--gold); background: rgba(244, 196, 48, 0.06); }

/* The input covers the whole box so the entire area is the drop/tap target,
   rather than a small default file button in the corner. */
.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-box__prompt {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  pointer-events: none;
}

.upload-box__prompt svg { width: 26px; height: 26px; color: var(--gold); }
.upload-box__prompt strong { font-size: 13px; font-weight: 800; color: var(--text); }
.upload-box__prompt small { font-size: 11px; color: var(--muted); }

.upload-box__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(2, 8, 12, 0.9);
  pointer-events: none;
}

.upload-box.has-file .upload-box__prompt { display: none; }

/* ---------- submit button busy state ----------
   A deposit or withdrawal takes a round trip, and without feedback people
   press again — which files the request twice. */

.submit-button {
  position: relative;
  transition: opacity 0.15s;
}

.submit-button[disabled] {
  cursor: not-allowed;
  opacity: 0.8;
}

.submit-button.is-busy::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(16, 32, 22, 0.3);
  border-top-color: #102016;
  border-radius: 50%;
  animation: submit-spin 0.6s linear infinite;
}

@keyframes submit-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .submit-button.is-busy::before { animation-duration: 2s; }
}

/* ---------- network warning ----------
   Sending on the wrong chain is unrecoverable, so this is the one note on the
   deposit page that must not read as small print. */

.network-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(244, 196, 48, 0.42);
  background: rgba(244, 196, 48, 0.09);
  font-size: 12.5px;
  line-height: 1.55;
  color: #E8CE8A;
}

.network-warning svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--gold);
}

.network-warning strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---------- no zoom-on-focus ----------
   iOS Safari zooms the whole page when a focused control is under 16px, and
   it does not zoom back out — the layout is left shifted. Every editable
   control is therefore at least 16px.

   Deliberately NOT using user-scalable=no in the viewport tag: that stops
   someone pinch-zooming to read anything at all, which is a real
   accessibility problem, and modern iOS ignores it anyway. */

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  font-size: max(16px, 1em);
}

/* ---------- withdrawal destination in the history list ----------
   Shown in full rather than truncated: the whole point is being able to check
   where the money went, and half an address cannot be checked. */

.record__address {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-all;
}

.record__address svg {
  width: 12px;
  height: 12px;
  flex: none;
  margin-top: 1px;
  color: var(--gold-dim, var(--gold));
}

/* ---------- tap a history row to copy its order number ---------- */

.record--copy {
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.record--copy:hover { border-color: rgba(244, 196, 48, 0.32); }

.record--copy:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}


/* ---------- toast ----------
   Bottom centre, and pointer-events:none so it cannot swallow a tap meant for
   whatever sits underneath it. */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 1200;
  max-width: min(86vw, 360px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.5);
  background: rgba(9, 24, 32, 0.97);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Clear the tab bar and the Home orb that rises out of it, on the pages that
   have one. The history and form pages do not, and would otherwise leave the
   notice floating in empty space. */
body:has(.tabbar) .toast {
  bottom: calc(var(--tab-h) + var(--orb-lift) + 14px);
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.22s ease; transform: translate(-50%, 0); }
}

/* ---------- VIP ---------- */

.vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.4);
  background: rgba(244, 196, 48, 0.12);
  font-size: 11px;
  font-weight: 900;
  color: var(--gold);
}

.vip-pill span {
  padding-left: 7px;
  border-left: 1px solid rgba(244, 196, 48, 0.35);
  font-weight: 700;
  color: #E8CE8A;
}

.vip-pill--crown { box-shadow: 0 4px 14px rgba(244, 196, 48, 0.18); }

.vip-card {
  padding: 20px 18px;
  margin-bottom: 12px;
  border-radius: 22px;
  border: 1px solid rgba(244, 196, 48, 0.28);
  background:
    linear-gradient(150deg, rgba(244, 196, 48, 0.14), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.34);
}

.vip-card__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.45);
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
}

.vip-card__rate { margin: 14px 0 0; font-size: 14px; color: #C9DDE6; }
.vip-card__rate strong { font-size: 28px; font-weight: 900; color: var(--gold); }

.vip-progress { margin-top: 20px; }

/* The two level names sit at the ends of the bar, so the bar reads as the
   journey between them rather than an abstract percentage. */
.vip-progress__ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
}

.vip-progress__ends .is-from { color: var(--gold); }
.vip-progress__ends .is-to { color: var(--muted); }

.vip-progress__bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.vip-progress__bar span {
  display: block;
  height: 100%;
  min-width: 10px;                 /* a sliver still reads as a bar, not an empty track */
  border-radius: inherit;
  background: linear-gradient(90deg, #F9D76C, #D8A820);
  box-shadow: 0 0 12px rgba(244, 196, 48, 0.4);
  transition: width 0.5s ease;
}

.vip-progress__foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}

.vip-progress__pct {
  flex: none;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
}

.vip-progress__left { line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .vip-progress__bar span { transition: none; }
}

.card-block {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(18, 46, 58, 0.66), rgba(5, 15, 25, 0.5)),
    rgba(4, 14, 20, 0.28);
}

.card-block__title { margin: 0 0 14px; font-size: 15px; font-weight: 900; }

.vip-table { display: grid; gap: 2px; }

.vip-table__head,
.vip-table__row {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 0.7fr;
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
}

.vip-table__head {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.vip-table__row {
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: #C9DDE6;
}

/* The player's own row has to be findable at a glance in a six-row ladder. */
.vip-table__row.is-current {
  border: 1px solid rgba(244, 196, 48, 0.45);
  background: rgba(244, 196, 48, 0.1);
  color: var(--text);
}

.vip-table__level { font-weight: 900; }

.vip-table__level em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--gold);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  color: #132318;
  text-transform: uppercase;
}

.vip-table__band { font-size: 11px; color: var(--muted); }
.vip-table__row.is-current .vip-table__band { color: #C9DDE6; }
.vip-table__rate { font-weight: 900; text-align: right; color: var(--gold); }

.vip-note {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- UPI payment (INR, demo-inr.php) ---------- */

/* The QR sits on white whatever the theme: a dark QR on a dark card scans
   poorly, and the quiet zone around it is part of what makes it readable. */
.upi-qr {
  width: min(232px, 100%);
  margin: 6px auto 4px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  aspect-ratio: 1;
}

.upi-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.upi-hint {
  margin: 8px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.upi-hint a { color: inherit; text-decoration: underline; }

.upi-apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 10px 0 2px;
}

.upi-apps .submit-button { text-align: center; }

.upi-pay .payee { margin: 12px 0; }

.upi-pay .network-warning { margin-bottom: 14px; }

/* Past its window the code still shows, faded, so a player who comes back
   sees what happened rather than an empty card. */
.upi-pay.is-expired .upi-qr,
.upi-pay.is-expired .upi-apps { opacity: 0.25; pointer-events: none; }

/* "Waiting for your payment" — a slow pulse, so the page reads as alive while
   it checks in the background, without pretending to measure progress. */
.upi-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; }

.upi-waiting__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #84E5A4;
  animation: upi-pulse 1.6s ease-in-out infinite;
}

@keyframes upi-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .upi-waiting__dot { animation: none; opacity: 0.8; }
}

.upi-pay.is-expired .upi-waiting { display: none; }

/* The outcome. */
.upi-done { text-align: center; }

.upi-done__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 4px auto 10px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 800;
}

.upi-done.is-paid .upi-done__mark   { color: #84E5A4; background: rgba(80, 200, 120, 0.14); border: 1px solid rgba(80, 200, 120, 0.4); }
.upi-done.is-failed .upi-done__mark { color: #FF8B7B; background: rgba(255, 139, 123, 0.12); border: 1px solid rgba(255, 139, 123, 0.4); }

/* The IFSC check under the code field (demo-inr-withdraw.php). */
.ifsc-result { min-height: 1em; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ifsc-result.is-ok   { color: #84E5A4; font-weight: 600; }
.ifsc-result.is-bad  { color: #FF8B7B; }
.ifsc-result.is-wait { color: var(--muted); }

/* Gold buttons that are links — Open Paytm, Open PhonePe, Show payment details.
   A <button> centres its own label; an <a> does not, so with the fixed height
   of .submit-button the words sat at the top. Done here for links only, so
   every real button on the site keeps exactly the look it had. */
a.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-align: center;
  text-decoration: none;
}

/* A row in the INR deposit and withdrawal lists. .state-card centres and
   shrinks what it holds, which left Check status only as wide as its words.
   These rows stretch instead, so their buttons span the card. */
.inr-row { place-items: stretch; gap: 10px; min-height: 0; text-align: center; }
.inr-row p { margin: 0; }
.inr-row form,
.inr-row .submit-button { width: 100%; }

/* The INR option on the withdraw page stands on its own between the notices
   and "Add a new payout account", rather than inside a card as on the deposit
   page, so it needs its own space above and below. */
.withdraw-inr { margin: 14px 0; }
