:root {
  --bg: #0c0c16;
  --surface: #161626;
  --surface-2: #1f1f35;
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #b4bcc8;
  --gold: #facc15;
  --purple: #8b5cf6;
  --purple-dark: #7c3aed;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --rose: #f43f5e;
  --cream: #fef7e6;
  --font-main: "Rosemary", "Delius", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 5%, rgba(139, 92, 246, 0.16), transparent 35%),
    radial-gradient(circle at 85% 20%, rgba(250, 204, 21, 0.1), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  min-height: 100vh;
}

body { padding-bottom: 92px; }

.hidden { display: none !important; }
.muted { color: var(--muted); margin: 3px 0; }
.tiny { font-size: 12px; }
button { cursor: pointer; font: inherit; }

/* TOPBAR */
.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1.5px solid var(--line);
  background: rgba(12, 12, 22, 0.96);
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 6px;
}

.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid #18181b;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.brand b { font-size: 14px; font-weight: 700; display: block; line-height: 1.1; color: #fff; }
.sync-row { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); display: inline-block; }

.top-actions { display: flex; align-items: center; gap: 5px; min-width: 0; }

.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1b1a28;
  border: 1.5px solid rgba(250, 204, 21, 0.55);
  color: #fef08a;
  padding: 3px 5px 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.coin-chip small { font-size: 9px; color: #fde047; }
.coin-plus {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--gold);
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.uid-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #151726;
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.app { width: min(560px, 94vw); margin: 12px auto; }

/* HERO DOODLE BANNER */
.hero-doodle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 6px 18px;
  margin-bottom: 10px;
}
.doodle-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-cards-art {
  position: relative;
  width: 132px;
  height: 110px;
  flex-shrink: 0;
}
.crown-svg {
  position: absolute;
  top: -6px;
  left: 20px;
  width: 34px;
  height: 24px;
  transform: rotate(-12deg);
  z-index: 4;
  animation: floatGentle 3.2s ease-in-out infinite;
}
.fan-card {
  position: absolute;
  width: 52px;
  height: 74px;
  background: #fff;
  color: #111827;
  border-radius: 9px 7px 10px 8px;
  border: 2px solid #18181b;
  padding: 4px 5px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.fan-card span { font-size: 13px; line-height: 1; }
.fan-card b { font-size: 23px; align-self: center; margin-bottom: 6px; }
.fan-card.red { color: #e11d48; }
.fc1 { left: 4px; top: 20px; transform: rotate(-14deg); z-index: 1; }
.fc2 { left: 34px; top: 14px; transform: rotate(-2deg); z-index: 2; }
.fc3 { left: 64px; top: 20px; transform: rotate(12deg); z-index: 3; }

.hero-timer-side { flex: 1; text-align: center; position: relative; z-index: 2; }
.brush-badge {
  display: inline-block;
  background: var(--gold);
  color: #111827;
  font-weight: 700;
  font-size: 17px;
  padding: 4px 18px;
  border-radius: 16px 6px 18px 8px;
  transform: rotate(-1.5deg);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.4);
  margin-bottom: 8px;
}
.dashed-timer {
  border: 2px dashed rgba(255, 255, 255, 0.65);
  border-radius: 18px 14px 20px 15px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 22, 38, 0.75);
}
.timer-clock { font-size: 18px; }
.countdown-timer {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown-sub {
  margin: 5px 0 1px;
  font-size: 12px;
  font-weight: 500;
  color: #e5e7eb;
}
.sched-mini { font-size: 11px; color: var(--gold); font-weight: 700; }

/* WINNING CARD SHOWCASE */
.winner-showcase {
  background: linear-gradient(155deg, #1c1b30, #131322);
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px 18px 22px 20px;
  padding: 14px 15px 16px;
  margin-top: 14px;
  margin-bottom: 14px;
  position: relative;
}
.winner-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -26px;
  margin-bottom: 10px;
}
.trophy-wrap { display: inline-flex; align-items: center; gap: 4px; }
.trophy-pill {
  background: var(--gold);
  color: #111827;
  font-weight: 700;
  font-size: 14px;
  padding: 5px 14px;
  border-radius: 14px 8px 16px 10px;
  border: 2px solid #18181b;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.45);
}
.burst-svg { width: 24px; height: 22px; }
.round-purple-pill {
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.winner-doodles {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 115px;
  height: 84px;
  pointer-events: none;
}
.winner-body { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.winner-dashed-frame {
  border: 2px dashed rgba(250, 204, 21, 0.8);
  border-radius: 16px 12px 15px 13px;
  padding: 6px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.25);
}
.winner-dashed-frame .playing-card { width: 64px; height: 90px; cursor: default; }
.winner-placeholder {
  width: 64px;
  height: 90px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
}
.winner-info h3 {
  margin: 0 0 3px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
}
.match-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.match-badge.won {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
}

/* CREAM BANNER */
.cream-banner {
  background: var(--cream);
  color: #18181b;
  border-radius: 22px 18px 24px 19px;
  border: 2px solid #18181b;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.cream-top { display: flex; align-items: center; gap: 10px; }
.target-svg { width: 52px; height: 52px; flex-shrink: 0; }
.cream-text { flex: 1; }
.cream-text h2 {
  margin: 0 0 3px;
  font-size: 19px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}
.cream-text p { margin: 0; font-size: 12px; color: #27272a; line-height: 1.35; font-weight: 500; }
.cream-text mark { background: var(--gold); color: #111827; padding: 1px 5px; border-radius: 5px; font-weight: 700; }
.purple-link { color: var(--purple-dark); font-weight: 700; }
.owned-dashed-pill {
  border: 1.5px dashed var(--purple);
  color: var(--purple-dark);
  background: rgba(139, 92, 246, 0.1);
  padding: 5px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cream-stats-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1.5px dashed rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 600;
  color: #18181b;
}

/* PANELS & FILTERS */
.panel {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 20px 17px 22px 18px;
  padding: 16px;
  margin-bottom: 14px;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2, .section-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.counter.soft {
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #fde047;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.filter-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; }
.filter {
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: #d1d5db;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.filter.active { background: var(--gold); color: #111827; border-color: var(--gold); font-weight: 700; }

/* CARD GRID & COLORFUL ADD BUTTONS */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); } }

.card-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.playing-card {
  width: 100%;
  height: 100px;
  background: linear-gradient(165deg, #ffffff, #f3f4f6);
  color: #111827;
  border-radius: 11px 9px 12px 10px;
  position: relative;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
  padding: 6px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #18181b;
  user-select: none;
}
.playing-card.red { color: #e11d48; }

.playing-card.collected { border-color: var(--gold); }

.card-price-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--gold);
  color: #111827;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  z-index: 2;
}
.card-corner { font-size: 12px; line-height: 11px; position: absolute; top: 5px; left: 5px; font-weight: 700; }
.card-center { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; opacity: 0.92; }
.card-corner.bottom { top: auto; left: auto; bottom: 5px; right: 5px; transform: rotate(180deg); }

.owned-pill {
  position: absolute;
  top: -6px;
  left: -3px;
  background: var(--purple-dark);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  z-index: 3;
}

.card-stepper { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; }
.step-btn {
  width: 26px;
  height: 27px;
  border-radius: 9px;
  border: 0;
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}
/* Vibrant Emerald-Teal Add & Plus buttons */
.step-btn.plus {
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #111827;
  border: 1.5px solid #18181b;
  box-shadow: 0 3px 8px rgba(250, 204, 21, 0.25);
}
.step-btn.plus.wide {
  width: 100%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.step-btn.minus {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(244, 63, 94, 0.3);
}
.step-qty { font-weight: 700; font-size: 13px; color: var(--gold); min-width: 16px; text-align: center; }

/* MY CARDS */
.my-cards-section { margin-top: 20px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.my-cards { display: flex; flex-wrap: wrap; gap: 10px; min-height: 80px; padding: 4px 0; }
.my-card-item { position: relative; width: 68px; }
.my-card-item .playing-card { height: 92px; cursor: default; }
.my-card-item .card-center { font-size: 24px; }
.my-card-qty {
  position: absolute;
  bottom: 18px;
  right: -5px;
  background: var(--purple-dark);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}
.my-card-round { display: block; text-align: center; font-size: 10px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* STATS 3 GRID */
.stats-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stat {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}
.mini-stat small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; }
.mini-stat b { display: block; font-size: 16px; margin-top: 3px; color: #fff; font-weight: 700; }
.mini-stat.gold b { color: var(--gold); }
.mini-stat.green b { color: #6ee7b7; }
.mini-stat.purple b { color: #c4b5fd; }

/* CHECKOUT BAR */
.checkout-bar {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: min(540px, 94vw);
  background: #18182b;
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}
.checkout-info b { display: block; font-size: 13px; color: #fff; }
.checkout-info span { font-size: 12px; color: var(--gold); font-weight: 700; }
.checkout-actions { display: flex; gap: 8px; align-items: center; }

/* THEMED ROCK-SOLID FIXED BOTTOM NAVIGATION BAR */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #131322;
  border-top: 2px solid rgba(250, 204, 21, 0.28);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 50;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
  touch-action: manipulation;
}
.bnav-btn {
  background: transparent;
  border: 0;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  padding: 6px 4px;
  margin: 0 4px;
  border-radius: 14px;
  height: 50px;
  flex-shrink: 0;
}
.bnav-ico { font-size: 18px; line-height: 1; position: relative; }
.bnav-lbl { font-size: 11px; font-weight: 600; line-height: 1; }
.bnav-btn.active {
  background: rgba(250, 204, 21, 0.16);
  color: var(--gold);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
}
.bnav-btn.active .bnav-lbl { font-weight: 700; }
.bnav-dot {
  width: 7px;
  height: 7px;
  background: var(--rose);
  border-radius: 50%;
  position: absolute;
  top: -2px;
  right: -5px;
}

/* FORMS & BUTTONS */
.primary-cta {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-weight: 700;
  padding: 9px 16px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}
.ghost {
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 600;
}
.small-btn { padding: 6px 10px; font-size: 12px; }

.auth-card { max-width: 440px; margin: 5vh auto; padding: 24px; }
.auth-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; }
.auth-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.auth-submit { margin-top: 10px; width: 100%; padding: 12px; }
.eyebrow { color: var(--gold); font-size: 11px; letter-spacing: 2px; font-weight: 700; margin: 0 0 6px; }

.profile-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.profile-strip span { display: block; }
.profile-strip b { font-size: 13px; word-break: break-all; color: #fff; }

.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip-btn {
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  background: var(--surface-2);
  color: var(--gold);
  padding: 6px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.field-label { display: block; margin: 8px 0 6px; color: #f3f4f6; font-weight: 600; font-size: 13px; }
.inline-form, .chat-compose { display: flex; gap: 8px; }
input {
  min-width: 0;
  flex: 1;
  background: #0c0c16;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  color: #fff;
  outline: none;
  font: inherit;
}
input:focus { border-color: var(--purple); }

.notice { min-height: 18px; color: var(--emerald); font-size: 13px; margin: 8px 0; font-weight: 600; }
.notice.error { color: var(--rose); }
.subhead { font-size: 16px; font-weight: 700; margin: 16px 0 8px; color: #fff; }

.round-list, .result-list, .request-list { display: grid; gap: 9px; }
.round-card, .request-item, .message {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.round-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.result-card { display: flex; align-items: center; gap: 14px; }
.result-card .playing-card { width: 54px; min-width: 54px; height: 78px; cursor: default; }

.status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  text-transform: capitalize;
}
.status.locked { background: rgba(139, 92, 246, 0.25); color: #ddd6fe; }
.status.published { background: rgba(250, 204, 21, 0.22); color: var(--gold); }
.status.waiting { background: rgba(244, 63, 94, 0.22); color: #fda4af; }

.log-credit { color: #6ee7b7; font-weight: 700; }
.log-debit { color: #fda4af; font-weight: 700; }

/* CHAT & LIGHTBOX */
.chat-messages {
  height: 280px;
  overflow: auto;
  background: #0c0c16;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.message { max-width: 85%; align-self: flex-start; }
.message.mine { align-self: flex-end; background: rgba(139, 92, 246, 0.28); border-color: rgba(139, 92, 246, 0.5); }
.message small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.message img { max-width: 180px; max-height: 140px; border-radius: 9px; margin-top: 7px; cursor: zoom-in; }
.attach {
  display: grid;
  place-items: center;
  width: 42px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  background: var(--surface-2);
}
.image-preview img { max-width: 120px; max-height: 90px; margin-top: 8px; border-radius: 8px; }

.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.img-modal img { max-width: 94vw; max-height: 86vh; border-radius: 12px; }
.img-modal-close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: #fff;
  font-size: 18px;
}

/* ANIMATIONS */
@keyframes tabEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes barSlideUp {
  from { opacity: 0; transform: translate3d(-50%, 16px, 0); }
  to { opacity: 1; transform: translate3d(-50%, 0, 0); }
}
@keyframes floatGentle {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50% { transform: translateY(-3px) rotate(-8deg); }
}

.tab-panel:not(.hidden) { animation: tabEnter 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
.checkout-bar:not(.hidden) { animation: barSlideUp 0.22s cubic-bezier(0.22, 1, 0.36, 1); }

button, .playing-card {
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, opacity 0.15s ease;
}
.primary-cta:active, .step-btn:active, .coin-chip:active, .uid-chip:active,
.filter:active, .chip-btn:active, .ghost:active, .icon-btn:active {
  transform: scale(0.93);
}
.playing-card:active { transform: scale(0.94) rotate(-1deg); }
.bnav-btn:active .bnav-ico { transform: scale(1.18) translateY(-2px); transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* POLISHED HERO TIMER & SCHEDULE AREA */
.hero-doodle {
  background: linear-gradient(145deg, #18172b, #11111e);
  border: 1.5px solid rgba(250, 204, 21, 0.3);
  border-radius: 22px 18px 24px 19px;
  padding: 16px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}
.hero-timer-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.brush-badge {
  margin-bottom: 0;
  font-size: 16px;
  padding: 4px 16px;
}
.dashed-timer {
  border: 2px dashed rgba(250, 204, 21, 0.75);
  background: rgba(12, 12, 22, 0.85);
  padding: 8px 16px;
  border-radius: 16px;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.14);
}
.countdown-timer {
  font-size: 30px;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: none;
}
.sched-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #e9d5ff;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.countdown-sub {
  margin: 0;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.3;
}

.center-underline-svg {
  display: block;
  width: 110px;
  height: 10px;
  margin: 2px auto 0;
}

/* LOGOUT CONFIRMATION MODAL */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
  z-index: 110;
  padding: 20px;
}
.confirm-box {
  width: min(340px, 92vw);
  text-align: center;
  border: 2px solid rgba(250, 204, 21, 0.45);
  animation: tabEnter 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.confirm-box h3 { margin: 0 0 6px; font-size: 20px; }
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.danger-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  font-weight: 700;
  padding: 9px 18px;
}

/* DASHED GOLD PADDED FRAME FOR SELECTED CARDS (Matches Winning Card) */
.card-frame {
  width: 100%;
  padding: 4px;
  border-radius: 14px;
  border: 2px dashed transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.card-wrap.is-selected .card-frame {
  border-color: rgba(250, 204, 21, 0.9);
  background: rgba(250, 204, 21, 0.08);
}

/* LOGIN HERO BRANDING */
.auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 14px;
  gap: 6px;
}
.auth-matka-svg {
  width: 96px;
  height: 96px;
  background: var(--cream);
  border-radius: 50%;
  padding: 12px;
  border: 2.5px solid #18181b;
  box-shadow: 0 8px 22px rgba(250, 204, 21, 0.22);
}
.auth-brand-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.auth-card h2 {
  margin: 4px 0 4px;
  font-size: 18px;
  text-align: center;
}

/* TERMS & PRIVACY LINKS & MODAL */
.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
.link-btn {
  background: transparent;
  border: 0;
  color: #fde047;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  padding: 2px 4px;
}
.legal-box {
  width: min(480px, 94vw);
  max-height: 82vh;
  overflow: auto;
  text-align: left;
}
.legal-body {
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.55;
}
.legal-body h4 {
  margin: 12px 0 4px;
  color: var(--gold);
  font-size: 14px;
}
.legal-body p {
  margin: 0 0 8px;
}

/* KEEP CHECKOUT BUTTON IDENTICAL FOR 1 OR MULTIPLE CARDS */
.checkout-info { min-width: 0; flex: 1; }
.checkout-info b, .checkout-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkout-actions { flex-shrink: 0; }
#buy-cards-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* FULL-VIEWPORT NON-SCROLLABLE LOGIN SCREEN (Matches Mockup) */
body.auth-locked {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}
body.auth-locked .app {
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-screen {
  position: relative;
  width: min(420px, 94vw);
  max-height: 98dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
}

.auth-bg-doodles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.auth-brand-hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}
.auth-pot-wrap {
  position: relative;
  width: 78px;
  height: 70px;
  display: grid;
  place-items: center;
}
.auth-crown {
  position: absolute;
  top: -12px;
  width: 30px;
  height: 22px;
  z-index: 3;
}
.auth-pot {
  width: 64px;
  height: 64px;
  background: var(--cream);
  border-radius: 50%;
  padding: 8px;
  border: 2px solid #18181b;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.25);
}
.brush-title-box {
  background: var(--cream);
  padding: 4px 20px;
  border-radius: 18px 8px 20px 10px;
  border: 2px solid #18181b;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: -6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.mk-dark { color: #111827; }
.mk-purple { color: #6d28d9; }
.gold-ribbon {
  background: var(--gold);
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 999px;
  border: 1.5px solid #18181b;
  margin-top: -4px;
  transform: rotate(-1.5deg);
}

.signin-divider {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 90%;
  margin: 4px 0 8px;
}
.signin-divider span {
  flex: 1;
  height: 2px;
  background: rgba(250, 204, 21, 0.65);
  border-radius: 2px;
}
.signin-divider b {
  font-size: 15px;
  color: #ffffff;
  white-space: nowrap;
}

.auth-glass-card {
  position: relative;
  z-index: 2;
  width: 100%;
  background: rgba(22, 22, 38, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #f3f4f6;
  margin-bottom: 4px;
}
.auth-field label small { color: var(--muted); font-weight: 500; }
.auth-field input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
}
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-wrap input { padding-right: 38px; }
.pass-eye {
  position: absolute;
  right: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 15px;
  padding: 4px;
}

.auth-cta-btn {
  position: relative;
  z-index: 3;
  width: 84%;
  margin-top: -14px;
  padding: 12px 18px;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.5);
}
.auth-legal {
  position: relative;
  z-index: 2;
  margin-top: 10px;
}

.google-pill-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--cream);
  color: #111827;
  border: 2px solid #18181b;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}
.or-divider span {
  flex: 1;
  height: 1.5px;
  background: rgba(139, 92, 246, 0.45);
}
.or-divider b {
  background: var(--purple-dark);
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
}

.auth-hero-img {
  width: 100%;
  max-width: 300px;
  max-height: 155px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

body.auth-locked .app {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-screen {
  margin: 0 auto;
}

/* ANIMATED SPLASH SCREEN */
.splash-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, #1f1638 0%, #0c0c16 70%);
  display: grid;
  place-items: center;
  z-index: 200;
  overflow: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.25), rgba(139, 92, 246, 0.18), transparent 70%);
  animation: pulseGlow 2s ease-in-out infinite;
}
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
}
.splash-logo {
  width: min(300px, 80vw);
  height: auto;
  animation: splashPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.6));
}
.splash-loader {
  width: 160px;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.splash-loader span {
  display: block;
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, #facc15, #a855f7, #facc15);
  border-radius: 999px;
  animation: loadSweep 1s ease-in-out infinite;
}
.splash-txt {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fde047;
  letter-spacing: 0.5px;
}
.splash-sparkles .sp {
  position: absolute;
  font-size: 20px;
  opacity: 0.75;
  animation: floatSpark 2.6s ease-in-out infinite;
}
.sp.s1 { top: 18%; left: 16%; animation-delay: 0s; }
.sp.s2 { top: 22%; right: 18%; animation-delay: 0.4s; }
.sp.s3 { bottom: 26%; left: 14%; color: #facc15; animation-delay: 0.8s; }
.sp.s4 { bottom: 22%; right: 16%; animation-delay: 0.2s; }
.sp.s5 { top: 12%; left: 48%; animation-delay: 0.6s; }
.sp.s6 { bottom: 14%; left: 48%; color: #a855f7; animation-delay: 1s; }

@keyframes splashPop {
  0% { opacity: 0; transform: scale(0.7) translateY(18px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes loadSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(240%); }
}
@keyframes floatSpark {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.65; }
  50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

/* KEEP ROUND BADGE ALWAYS 1 LINE */
.brush-badge {
  white-space: nowrap;
}

/* GROUPED MY CARDS BY ROUND */
#my-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.my-round-group {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.my-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.my-round-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.my-card-win-tag {
  position: absolute;
  top: -6px;
  left: -4px;
  background: var(--gold);
  color: #111827;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #18181b;
}

/* MY CARDS DATE & ROUND FILTER BAR */
.my-cards-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
}
.mc-filter-field {
  flex: 1 1 130px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mc-filter-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.mc-filter-field input[type="date"],
.mc-filter-field select {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  color-scheme: dark;
}
.mc-filter-field input[type="date"]:focus,
.mc-filter-field select:focus {
  border-color: var(--purple);
}
.mc-reset-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  flex-shrink: 0;
}
.mc-history-note {
  margin: 4px 0 10px;
  font-size: 11px;
}

/* WALLET NOTIFICATIONS & REQUEST CHATS */
.wallet-notifs {
  background: rgba(139, 92, 246, 0.14);
  border: 1.5px solid var(--purple);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.wallet-notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.wallet-notif-item {
  font-size: 12px;
  padding: 5px 0;
  border-top: 1px dashed var(--line);
}
.wallet-notif-item:first-child { border-top: none; }
.req-chat-box {
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--cream);
  color: #18181b;
  border: 2px solid #18181b;
  border-radius: 20px 16px 22px 17px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
.req-chat-box .muted {
  color: #52525b;
}
.req-chat-box .req-chat-msgs {
  background: #fffdf7;
  border: 1.5px solid rgba(24, 24, 27, 0.18);
  color: #18181b;
}
.req-chat-box .message {
  background: #f3ede0;
  color: #18181b;
  border: 1px solid rgba(24, 24, 27, 0.12);
}
.req-chat-box .message.mine {
  background: var(--purple);
  color: #ffffff;
  border-color: transparent;
}
.req-chat-box .chat-compose input {
  background: #ffffff;
  color: #18181b;
  border: 1.5px solid rgba(24, 24, 27, 0.25);
}
.req-chat-box .chat-compose input::placeholder {
  color: #71717a;
}
.req-chat-box .chat-compose .attach {
  background: #ffffff;
  color: #18181b;
  border: 1.5px solid rgba(24, 24, 27, 0.25);
}
.req-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.req-chat-msgs {
  max-height: 220px;
  min-height: 90px;
  margin-bottom: 8px;
}
