:root {
  --orange: #F0710C;
  --orange-dark: #D9640A;
  --purple: #4B36B8;
  --purple-dark: #3D2B9E;
  --cream: #F7F3E3;
  --ink: #2B2620;
  --muted: #7A7570;
  --border: #ECE7DC;
  --green: #3E9B5C;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #FDFDFD;
  color: var(--ink);
  padding-bottom: 84px; /* space for fixed bottom nav */
}

a { text-decoration: none; color: inherit; }
h1, h2, h3 { margin: 0 0 6px; }
p { margin: 0 0 8px; }
.accent { color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: relative;
}

.logo { display: flex; align-items: center; gap: 10px; }

.logo-badge {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1E1B1E;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-badge .crown {
  width: 18px;
  height: 18px;
  position: absolute;
  top: -8px;
}
.logo-badge-num {
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.logo-title { font-size: 22px; font-weight: 800; display: block; letter-spacing: -0.3px; }
.logo-tagline { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); font-weight: 600; }

.header-actions { display: flex; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: #F4F4F4;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; color: var(--ink); }

.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 68px; right: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  z-index: 20;
  min-width: 160px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 18px; font-weight: 600; }
.mobile-menu a.active { color: var(--orange); }
.mobile-menu a:hover { background: #FAFAFA; }

/* ---------- Hero ---------- */
.hero {
  background: var(--cream);
  line-height: 0; /* avoid inline-image gap */
}
.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: #fff; color: var(--orange); border-color: var(--orange); }
.btn-outline:hover { background: #FFF6EE; }
.btn-purple { color: var(--purple); border-color: var(--purple); }
.btn-purple:hover { background: #F3F1FC; }
.btn-disabled { background: #ccc; color: #888; cursor: not-allowed; opacity: .7; }
.host-only-msg { margin: 4px 0 0; font-size: 13px; color: var(--orange-dark, #c05200); }
.full-width { width: 100%; }


.cta-row {
  display: flex;
  gap: 12px;
  padding: 18px 20px 0;
}
.cta-row .btn { flex: 1; }

/* ---------- Wallet card ---------- */
.wallet-card {
  margin: 18px 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.wallet-card.standalone { margin: 0 0 18px; }
.wallet-info { display: flex; align-items: center; gap: 14px; }
.wallet-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #EFEBFB;
  color: var(--purple);
  display: flex; align-items: center; justify-content: center;
}
.wallet-icon svg { width: 26px; height: 26px; }
.wallet-label { font-size: 13px; color: var(--muted); }
.wallet-amount { font-size: 24px; font-weight: 800; }
.wallet-amount span { font-size: 15px; color: var(--purple); font-weight: 700; }
.wallet-rate { font-size: 12px; color: var(--muted); }

/* ---------- Trust row ---------- */
.trust-row {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px 6px;
  margin: 0;
  color: var(--purple);
  font-weight: 600;
  font-size: 14px;
}
.trust-row li { display: flex; align-items: center; gap: 6px; }
.trust-row svg { width: 18px; height: 18px; }
.trust-row .dot { color: var(--muted); }

/* ---------- Panels ---------- */
.panel {
  margin: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel.narrow { max-width: 480px; margin: 18px auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel h2 { font-size: 19px; }
.panel h2.center { text-align: center; margin-bottom: 18px; }
.learn-more { color: var(--orange); font-weight: 700; font-size: 13px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  text-align: center;
}
.step-icon {
  position: relative;
  width: 56px; height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #FDE9D8;
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.step-icon svg { width: 24px; height: 24px; }
.step-num {
  position: absolute;
  bottom: -6px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 14px; }
.step p { font-size: 12px; color: var(--muted); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}
.why-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
}
.why-icon svg { width: 22px; height: 22px; }
.why-purple { background: #EFEBFB; color: var(--purple); }
.why-green { background: #E5F5E9; color: var(--green); }
.why-orange { background: #FDE9D8; color: var(--orange); }
.why-item h3 { font-size: 14px; }
.why-item p { font-size: 12px; color: var(--muted); }

/* ---------- Forms / lists (wallet, host, my games) ---------- */
.deposit-form { display: flex; flex-direction: column; gap: 8px; }
.deposit-form label { font-weight: 700; font-size: 13px; }
.deposit-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
}
.fine-print { font-size: 12px; color: var(--muted); }
.notice { background: #EFEBFB; color: var(--purple-dark); padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.notice-error { background: #FDECEC; color: #A6332B; }

.game-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.game-item {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.game-name { font-weight: 700; font-size: 14px; }
.game-meta { font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge-upcoming { background: #FDE9D8; color: var(--orange-dark); }
.badge-completed { background: #E5F5E9; color: var(--green); }

/* ---------- My Games: page header ---------- */
.back-btn { margin-right: 4px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 22px 20px 0;
}
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 14px; }
.btn-sm { padding: 10px 16px; font-size: 13px; white-space: nowrap; }

/* ---------- My Games: filter tabs ---------- */
.filter-tabs {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 18px 20px 14px;
  margin: 16px 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  flex-shrink: 0;
}
.filter-tab svg { width: 17px; height: 17px; }
.filter-tab.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ---------- My Games: game cards ---------- */
.game-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px 0;
}
.empty-state { color: var(--muted); text-align: center; padding: 30px 0; }

.hosted-game-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.hosted-game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.hosted-game-id {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.icon-btn-ghost {
  width: 26px; height: 26px;
  background: transparent;
  color: var(--muted);
}
.icon-btn-ghost svg { width: 16px; height: 16px; }

.hosted-game-name { font-size: 18px; font-weight: 800; margin-bottom: 10px; }

.hosted-game-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
}
.hosted-game-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hosted-game-meta svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.hosted-game-meta .divider { color: var(--border); }
.hosted-game-meta strong { font-weight: 800; }

.btn-status { width: 100%; margin-top: 10px; justify-content: space-between; padding: 12px 16px; }
.btn-status svg { width: 16px; height: 16px; }

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: 20px;
}
.status-badge-upcoming  { background: #EFEBFB; color: var(--purple); }
.status-badge-live      { background: #E5F5E9; color: var(--green); }
.status-badge-completed { background: #EFEBFB; color: var(--purple); }
.status-badge-cancelled { background: #FDECEC; color: #C22B2B; }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

/* Status-colored "View Details" buttons */
.status-upcoming  .btn-status { color: var(--purple); border-color: var(--purple); }
.status-live      .btn-status { color: var(--green);  border-color: var(--green); }
.status-completed .btn-status { color: var(--purple); border-color: var(--purple); }
.status-cancelled .btn-status { color: #C22B2B;        border-color: #C22B2B; }
.status-upcoming  .btn-status:hover { background: #F3F1FC; }
.status-live      .btn-status:hover { background: #EEF9F1; }
.status-completed .btn-status:hover { background: #F3F1FC; }
.status-cancelled .btn-status:hover { background: #FDF2F2; }

/* ---------- My Games: promo banner ---------- */
.promo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: #EFEBFB;
  border-radius: var(--radius);
  padding: 18px;
  margin: 20px 20px 18px;
}
.promo-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #E0DAF7;
  color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.promo-icon svg { width: 22px; height: 22px; }
.promo-copy { flex: 1; min-width: 180px; }
.promo-copy h3 { font-size: 15px; }
.promo-copy p { font-size: 13px; color: var(--muted); margin: 0; }
.btn-filled-purple { background: var(--purple); color: #fff; }
.btn-filled-purple:hover { background: var(--purple-dark); }

@media (max-width: 480px) {
  .promo-banner { flex-direction: column; align-items: flex-start; }
  .btn-filled-purple { width: 100%; }
}

/* ---------- Host a Game: form ---------- */
.host-form { display: flex; flex-direction: column; gap: 16px; }
.form-section { display: flex; flex-direction: column; gap: 10px; }
.form-section-title { font-size: 15px; font-weight: 800; }
.form-section label { font-weight: 700; font-size: 13px; }
.form-section input[type="text"],
.form-section input[type="number"],
.form-section input[type="date"],
.form-section input[type="time"],
.form-section textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}
.form-section textarea { resize: vertical; }
.optional { font-weight: 400; color: var(--muted); }
.unit { font-weight: 400; color: var(--muted); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Segmented game-type toggle */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.type-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.type-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.type-toggle label svg { width: 20px; height: 20px; }
.type-toggle input:checked + label {
  border-color: var(--orange);
  color: var(--orange);
  background: #FFF6EE;
}
.type-toggle input:focus-visible + label { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Winning-pattern checkbox pills */
.pattern-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pattern-grid input { position: absolute; opacity: 0; pointer-events: none; }
.pattern-grid label {
  padding: 9px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.pattern-grid input:checked + label {
  border-color: var(--purple);
  color: var(--purple);
  background: #EFEBFB;
}
.pattern-grid input:focus-visible + label { outline: 2px solid var(--purple); outline-offset: 2px; }

/* Cost summary + submit */
.cost-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--cream);
  border-color: transparent;
}
.cost-amount { font-size: 26px; font-weight: 800; color: var(--ink); }
.btn-lg { padding: 16px 24px; font-size: 16px; flex-shrink: 0; }

@media (max-width: 480px) {
  .cost-summary { flex-direction: column; align-items: stretch; text-align: center; }
  .btn-lg { width: 100%; }
}

/* ---------- Profile ---------- */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px 0;
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.profile-avatar {
  width: 76px; height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #7A63D6);
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.profile-name {
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.verified-tick { width: 18px; height: 18px; flex-shrink: 0; }

.profile-details {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.profile-details li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.profile-details svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); }

.profile-joined { font-size: 12px; color: var(--muted); margin: 12px 0 16px; }

.profile-card .btn svg { width: 17px; height: 17px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 18px; font-weight: 800; }
.stat-label { font-size: 11px; color: var(--muted); }

/* Grouped settings menu */
.profile-menu-col { display: flex; flex-direction: column; gap: 16px; }

.menu-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.menu-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 16px 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border-top: 1px solid var(--border);
}
.menu-section .menu-item:first-of-type { border-top: none; }
.menu-item:hover { background: #FAFAFA; }
.menu-item-left { display: flex; align-items: center; gap: 12px; }

.menu-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #F4F4F4;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.menu-icon svg { width: 17px; height: 17px; }
.menu-icon-purple { background: #EFEBFB; color: var(--purple); }
.menu-icon-orange { background: #FDE9D8; color: var(--orange); }
.menu-icon-green { background: #E5F5E9; color: var(--green); }

.chevron { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }

.menu-item-danger {
  justify-content: center;
  gap: 8px;
  color: #C22B2B;
  border: 1px solid #FBD5D5;
  border-radius: var(--radius);
}
.menu-item-danger svg { width: 18px; height: 18px; }
.menu-item-danger:hover { background: #FDF2F2; }

@media (min-width: 860px) {
  .profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    align-items: start;
    margin: 0 28px;
    padding: 20px 0 0;
  }
  .profile-card { position: sticky; top: 20px; }
}

/* ---------- Ticket buyers: tap-to-expand + table ---------- */
.tickets-disclosure {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tickets-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.tickets-summary::-webkit-details-marker { display: none; }
.tickets-disclosure[open] .tickets-summary { border-bottom: 1px solid var(--border); }

.tickets-summary-empty {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.tickets-summary-label { font-weight: 700; font-size: 14px; }
.tickets-summary-right { display: flex; align-items: center; gap: 8px; }
.tickets-summary-value { font-size: 14px; color: var(--ink); }
.tickets-chevron { width: 16px; height: 16px; color: var(--muted); transition: transform 0.15s; flex-shrink: 0; }
.tickets-disclosure[open] .tickets-chevron { transform: rotate(90deg); }

.tickets-panel { padding: 16px 14px; }

.payment-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.payment-summary-item {
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.payment-summary-item.is-paid { background: #E5F5E9; }
.payment-summary-item.is-pending { background: #FDE9D8; }
.payment-summary-value { display: block; font-size: 20px; font-weight: 800; }
.payment-summary-item.is-paid .payment-summary-value { color: var(--green); }
.payment-summary-item.is-pending .payment-summary-value { color: var(--orange-dark); }
.payment-summary-label { font-size: 11px; color: var(--muted); font-weight: 600; }

/* Real <table> on wide screens; each row becomes a labelled card on phones. */
.buyer-table { width: 100%; border-collapse: collapse; }
.buyer-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  padding: 0 8px 8px;
}
.buyer-table td { padding: 10px 8px; border-top: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.buyer-table tr:first-child td { border-top: none; }

.buyer-cell { display: flex; align-items: center; gap: 10px; }
.buyer-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.buyer-cell-text { display: flex; flex-direction: column; }
.buyer-name { font-weight: 700; font-size: 13px; }
.buyer-phone { font-size: 11px; color: var(--muted); }

.ticket-chips { display: flex; flex-direction: column; gap: 6px; }

.ticket-disclosure summary.ticket-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #F4F4F4;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.ticket-disclosure summary.ticket-chip::-webkit-details-marker { display: none; }
.ticket-disclosure summary.ticket-chip::after {
  content: '\25BE';
  font-size: 9px;
  color: var(--muted);
  transition: transform 0.15s;
}
.ticket-disclosure[open] summary.ticket-chip::after { transform: rotate(180deg); }
.ticket-disclosure[open] summary.ticket-chip { background: #EFEBFB; color: var(--purple); }

.ticket-mini-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 6px 0 2px;
  padding: 8px;
  background: #FAFAF7;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ticket-mini-row { display: flex; gap: 3px; }
.ticket-mini-row span {
  flex: 1;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 0;
  font-size: 11px;
  font-weight: 700;
}

.buyer-amount { font-weight: 800; }

.pay-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.pay-badge-paid { background: #E5F5E9; color: var(--green); }
.pay-badge-pending { background: #FDE9D8; color: var(--orange-dark); }

.winner-pattern {
  display: inline-block;
  background: #EFEBFB;
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.btn-toggle-pay {
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1.5px solid;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.btn-toggle-pay.is-pending { border-color: var(--green); color: var(--green); }
.btn-toggle-pay.is-pending:hover { background: #E5F5E9; }
.btn-toggle-pay.is-paid { border-color: var(--border); color: var(--muted); }
.btn-toggle-pay.is-paid:hover { background: #F4F4F4; }

.btn-cancel-ticket {
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1.5px solid #F3C6C6;
  background: transparent;
  color: #C22B2B;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.btn-cancel-ticket:hover { background: #FDF2F2; border-color: #C22B2B; }

.action-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* --- Phone layout: each <tr> becomes a bordered card, cells stack --- */
@media (max-width: 640px) {
  .buyer-table thead { display: none; }
  .buyer-table, .buyer-table tbody, .buyer-table tr, .buyer-table td { display: block; width: 100%; }
  .buyer-table tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .buyer-table tr:first-child td { border-top: none; }
  .buyer-table td {
    border-top: none;
    padding: 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .buyer-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
  }
  .buyer-table td.buyer-cell {
    justify-content: flex-start;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px dashed var(--border);
  }
  .buyer-table td.buyer-cell::before { content: none; }
  .buyer-table td[data-label="Tickets"] {
    flex-direction: column;
    align-items: flex-start;
  }
  .buyer-table td[data-label="Tickets"]::before { margin-bottom: 6px; }
  .buyer-table td[data-label="Tickets"] .ticket-chips { width: 100%; }
  .buyer-table td[data-label="Tickets"] .ticket-disclosure,
  .buyer-table td[data-label="Tickets"] summary.ticket-chip { width: 100%; }
  .buyer-table td.action-cell {
    padding-top: 10px;
    flex-direction: row;
    align-items: stretch;
  }
  .buyer-table td.action-cell form { width: 100%; flex: 1; }
  .btn-toggle-pay, .btn-cancel-ticket { width: 100%; padding: 10px 8px; }
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--orange); }

/* ---------- Bundle toggle (host form) ---------- */
.bundle-toggle { grid-template-columns: repeat(3, 1fr); }
.bundle-toggle label { flex-direction: column; gap: 2px; padding: 12px 6px; }
.bundle-sub { font-size: 11px; font-weight: 500; color: var(--muted); }
.bundle-toggle input:checked + label .bundle-sub { color: var(--orange); opacity: 0.85; }

/* ---------- Share link ---------- */
.share-row { display: flex; gap: 8px; margin-top: 10px; }
.share-row .btn { flex: 1; }
.btn-share { color: var(--purple); border-color: var(--purple); }
.btn-share:hover { background: #F3F1FC; }
.btn-share.is-copied { color: var(--green); border-color: var(--green); background: #E5F5E9; }
.share-link-box {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px dashed var(--border); border-radius: 10px;
  padding: 10px 12px; margin-top: 10px; background: #FAFAFA;
}
.share-link-box input {
  flex: 1; border: none; background: transparent; font-size: 12px;
  color: var(--muted); outline: none; min-width: 0;
}
.share-link-box .icon-btn { flex-shrink: 0; }

/* ---------- Player home (join.php) ---------- */
.wallet-card .btn-sm-wallet { padding: 10px 16px; font-size: 13px; }
.quick-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 16px 0;
}
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border-radius: 12px; font-size: 11.5px; font-weight: 600;
  color: var(--ink); text-align: center;
}
.quick-action:hover { background: #FAFAFA; }
.quick-action-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #EFEBFB; color: var(--purple);
}
.quick-action-icon svg { width: 19px; height: 19px; }

.promo-hero {
  background: linear-gradient(135deg, #EFEBFB, #F3F1FC);
  border-radius: var(--radius); padding: 20px; margin: 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
}
.promo-hero-copy { flex: 1; min-width: 200px; }
.promo-hero-eyebrow { font-size: 12px; font-weight: 700; color: var(--purple); margin-bottom: 4px; }
.promo-hero h2 { font-size: 20px; margin-bottom: 12px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.section-head h2 { font-size: 17px; }
.section-head a { color: var(--purple); font-weight: 700; font-size: 13px; }

.upcoming-game-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; display: flex; gap: 14px;
}
.upcoming-game-card.is-featured { border-color: var(--orange); background: #FFFBF6; }
.date-chip {
  flex-shrink: 0; width: 58px; text-align: center;
  background: #EFEBFB; border-radius: 10px; padding: 8px 4px;
}
.date-chip .date-month { display: block; font-size: 10px; font-weight: 700; color: var(--purple); }
.date-chip .date-day { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.date-chip .date-dow { display: block; font-size: 9px; font-weight: 600; color: var(--muted); }
.upcoming-game-body { flex: 1; min-width: 0; }
.upcoming-game-body h3 { font-size: 15px; margin-bottom: 4px; }
.upcoming-game-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.upcoming-game-meta span { display: inline-flex; align-items: center; gap: 4px; }
.upcoming-game-meta svg { width: 13px; height: 13px; }
.upcoming-game-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prize-pool-tag { font-size: 12px; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: 4px; }
.prize-pool-tag svg { width: 14px; height: 14px; }

.join-room-box {
  background: #EFEBFB; border-radius: var(--radius); padding: 18px;
  margin: 18px 0;
}
.join-room-box h3 { font-size: 15px; }
.join-room-box p { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.join-room-form { display: flex; gap: 8px; }
.join-room-form input {
  flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 14px; background: #fff;
}

/* ---------- Buy tickets ---------- */
.buy-game-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; display: flex; gap: 14px; }
.bundle-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.bundle-select-grid input { position: absolute; opacity: 0; pointer-events: none; }
.bundle-select-grid label {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 8px; border: 2px solid var(--border); border-radius: 12px;
  font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; text-align: center;
  position: relative;
}
.bundle-select-grid label .bundle-select-price { font-size: 12px; font-weight: 600; color: var(--muted); }
.bundle-select-grid input:checked + label {
  border-color: var(--purple); background: #EFEBFB; color: var(--purple);
}
.bundle-select-grid input:checked + label::after {
  content: ''; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--purple);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4 10-10' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
.bundle-select-grid input:disabled + label { opacity: 0.4; cursor: not-allowed; }

.qty-stepper { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 12px; padding: 6px; margin: 12px 0; }
.qty-stepper .icon-btn { border: 1px solid var(--border); }
.qty-stepper-label { font-weight: 700; font-size: 15px; }

.payment-methods { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.payment-method {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer;
}
.payment-method.is-selected { border-color: var(--purple); background: #EFEBFB; }
.payment-method.is-disabled { cursor: not-allowed; opacity: 0.55; }
.payment-method input { margin-left: auto; accent-color: var(--purple); width: 18px; height: 18px; }
.payment-method-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple); color: #fff;
}
.payment-method-icon svg { width: 17px; height: 17px; }
.payment-method-text strong { display: block; font-size: 13.5px; }
.payment-method-text span { font-size: 11.5px; color: var(--muted); }

.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 15px; }
.secure-strip {
  background: #E5F5E9; color: var(--green); font-size: 12.5px; font-weight: 700;
  text-align: center; padding: 8px; border-radius: 10px; margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.secure-strip svg { width: 15px; height: 15px; }

.sticky-pay-bar {
  position: sticky; bottom: 84px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.05);
}
.sticky-pay-bar .payable-label { font-size: 11px; color: var(--muted); }
.sticky-pay-bar .payable-amount { font-size: 18px; font-weight: 800; }

/* ---------- Ticket confirmation ---------- */
.success-banner {
  background: linear-gradient(135deg, #E9F7EC, #F2FBF3); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.success-check {
  width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.success-check svg { width: 24px; height: 24px; }
.success-banner h2 { font-size: 20px; color: var(--green); margin-bottom: 4px; }
.success-banner p { font-size: 13px; color: var(--ink); margin: 0; }
.success-emoji { font-size: 56px; line-height: 1; flex-shrink: 0; }

.my-tickets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 12px 0; }
.my-ticket-card {
  border: 1.5px dashed var(--border); border-radius: 12px; padding: 14px 8px;
  text-align: center; background: #FAFAFA;
}
.my-ticket-card .ticket-number { font-size: 26px; font-weight: 800; color: var(--purple); }
.my-ticket-card .ticket-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.my-ticket-card .ticket-id-tag { font-size: 10px; color: var(--muted); background: #fff; border-radius: 6px; padding: 2px 6px; margin-top: 6px; display: inline-block; }

.room-id-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #EFEBFB; border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; flex-wrap: wrap; }
.room-id-strip .room-id-value { font-size: 20px; font-weight: 800; color: var(--purple); display: flex; align-items: center; gap: 8px; }
.countdown-block { display: flex; gap: 10px; text-align: center; }
.countdown-block .cd-num { font-size: 18px; font-weight: 800; }
.countdown-block .cd-label { font-size: 9px; color: var(--muted); font-weight: 700; }

.two-btn-row { display: flex; gap: 10px; margin: 14px 0; }
.two-btn-row .btn { flex: 1; }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .cta-row, .wallet-card, .panel { margin-left: 48px; margin-right: 48px; }
  .site-header { padding: 20px 48px; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
