.member-shell h1 {
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
}

.member-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: stretch;
  padding: 46px 0 26px;
}

.member-hero > div,
.access-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
}

.access-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  font-size: 12px;
  font-weight: 900;
}

.status-chip.ready {
  border-color: rgba(97, 255, 173, 0.45);
  color: var(--green);
}

.status-chip.waiting {
  border-color: rgba(255, 214, 90, 0.45);
  color: var(--gold);
}

.full-button {
  width: 100%;
  text-align: center;
  border-radius: 16px;
  margin-top: 8px;
}

.tiny-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--soft);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 0;
}

.metric-panel strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--gold);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}

.portal-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}

.simple-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.empty-copy {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}

.member-record {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
}

.member-record strong,
.member-record small {
  display: block;
}

.member-record small {
  margin-top: 4px;
  color: var(--soft);
}

.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.bingo-head,
.bingo-card button {
  min-height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.bingo-head {
  color: #161616;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.bingo-card button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}

.bingo-card button:disabled {
  color: rgba(255,255,255,0.5);
  cursor: not-allowed;
}

.bingo-card button.marked {
  border-color: rgba(97, 255, 173, 0.65);
  background: rgba(97, 255, 173, 0.18);
  color: var(--green);
}

.bingo-card button.winning {
  border-color: rgba(255, 214, 90, 0.95);
  background: rgba(255, 214, 90, 0.22);
  color: var(--gold);
  box-shadow: 0 0 24px rgba(255, 214, 90, 0.18);
}

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

.play-actions button:disabled,
.access-panel button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

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

.member-help article {
  min-height: 210px;
}

@media (max-width: 900px) {
  .member-hero,
  .member-grid,
  .portal-layout,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .play-actions {
    grid-template-columns: 1fr;
  }
}


.telegram-login-box {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

#telegramWidgetMount {
  display: flex;
  justify-content: center;
  min-height: 46px;
}

#telegramWidgetMount iframe {
  max-width: 100%;
}

.logout-button {
  margin-top: 10px;
  width: 100%;
}

.member-record.clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.member-record.clickable:hover,
.member-record.clickable.selected {
  border-color: rgba(255, 214, 90, 0.6);
  transform: translateY(-1px);
}

.confetti-burst {
  animation: bingoPulse 0.9s ease-in-out 2;
}

@keyframes bingoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Phase 5F-3 secure member gate */
.login-screen {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
  padding: 56px 0;
}

.login-card {
  width: min(100%, 620px);
  padding: clamp(28px, 5vw, 54px);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.045));
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
}

.login-card .telegram-login-box {
  margin-top: 22px;
}

.portal-status-panel {
  min-height: 260px;
}

[hidden] {
  display: none !important;
}


/* Phase 5F-4 logout control */
.nav-logout {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-logout:hover {
  border-color: rgba(255, 214, 90, 0.55);
  color: var(--gold);
}

.login-screen[hidden],
#portalScreen[hidden],
.member-only-nav[hidden] {
  display: none !important;
}


/* Production security view control: signed-out visitors see only the login screen. */
body.signed-out #portalScreen,
body.signed-out .portal-only,
body.signed-out .member-only-nav {
  display: none !important;
  visibility: hidden !important;
}

body.signed-in #loginScreen,
body.signed-in .login-only {
  display: none !important;
  visibility: hidden !important;
}

body.signed-in #portalScreen {
  display: block !important;
  visibility: visible !important;
}

body.signed-out #loginScreen {
  display: grid !important;
  visibility: visible !important;
}

body.signed-out .logout-button {
  display: none !important;
}


/* Phase 7C member card purchase UI */
.buy-card-section {
  padding-top: 24px;
}

.compact-heading {
  margin-bottom: 16px;
}

.buy-card-panel {
  margin-bottom: 24px;
}

.panel-subcopy {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.purchase-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 214, 90, 0.25);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.045);
}

.purchase-option strong,
.purchase-option small {
  display: block;
}

.purchase-option strong {
  color: var(--text);
  font-size: 17px;
}

.purchase-option small {
  margin-top: 5px;
  color: var(--soft);
}

.purchase-option .button {
  white-space: nowrap;
}

.purchase-option.unavailable {
  border-color: rgba(255,255,255,0.12);
  opacity: 0.82;
}

.purchase-option.unavailable .button {
  opacity: 0.6;
}

@media (max-width: 700px) {
  .purchase-option {
    grid-template-columns: 1fr;
  }

  .purchase-option .button {
    width: 100%;
  }
}


/* Branded in-portal card purchase confirmation modal */
body.modal-open {
  overflow: hidden;
}

.portal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.portal-modal-backdrop[hidden] {
  display: none !important;
}

.portal-modal {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid rgba(255, 214, 90, 0.28);
  border-radius: 28px;
  padding: 30px;
  background:
    radial-gradient(circle at top left, rgba(255, 97, 221, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 214, 90, 0.14), transparent 32%),
    #171725;
  box-shadow: 0 28px 80px rgba(0,0,0,0.55);
  color: var(--text);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.portal-modal h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
}

.portal-modal p {
  color: var(--soft);
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.modal-summary div {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.055);
}

.modal-summary span,
.modal-summary strong {
  display: block;
}

.modal-summary span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-summary strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 18px;
}

.modal-note {
  margin: 0 0 22px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255,214,90,0.24);
  background: rgba(255,214,90,0.06);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

@media (max-width: 620px) {
  .portal-modal {
    padding: 24px;
    border-radius: 24px;
  }

  .modal-summary,
  .modal-actions {
    grid-template-columns: 1fr;
  }
}


/* Phase 8E / Site v13 — Member Live Caller */
.member-caller-panel {
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 30px);
  background:
    radial-gradient(circle at top right, rgba(255, 214, 90, 0.14), transparent 22rem),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

.caller-heading-row {
  align-items: flex-start;
  gap: 16px;
}

.caller-heading-row h3 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.caller-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.panel-subcopy {
  margin-bottom: 0;
}

.member-caller-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.8fr 1.05fr;
  gap: 16px;
  margin-top: 20px;
}

.current-call-box,
.pattern-box,
.caller-audio-box,
.called-history-wrap {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  padding: 18px;
}

.current-call-box strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--gold);
  font-size: clamp(64px, 10vw, 118px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-shadow: 0 0 28px rgba(255, 214, 90, 0.22);
}


.pattern-box strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--gold);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.pattern-box p {
  margin-bottom: 0;
}

.current-call-box p,
.pattern-box p,
.caller-audio-box p {
  margin-bottom: 0;
}

.caller-audio-box {
  display: grid;
  align-content: center;
  gap: 10px;
}

.caller-audio-box .button {
  width: 100%;
  text-align: center;
}

.caller-audio-box .button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#memberAudioButton.audio-on {
  border-color: rgba(97, 255, 173, 0.55);
  color: var(--green);
  background: rgba(97, 255, 173, 0.12);
}

.called-history-wrap {
  margin-top: 16px;
}

.called-history-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}

.called-history-title h4 {
  margin: 0;
  font-size: 18px;
}

.member-called-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-called-list .call-pill.latest {
  border-color: rgba(255, 214, 90, 0.9);
  color: #151515;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 20px rgba(255, 214, 90, 0.16);
}

@media (max-width: 900px) {
  .member-caller-grid {
    grid-template-columns: 1fr;
  }

  .caller-status-actions {
    justify-content: flex-start;
  }
}


/* Phase 9G cleanup: live card section only shows active/current cards. */
.card-play-panel {
  border-color: rgba(255, 214, 90, 0.26);
  background:
    radial-gradient(circle at top right, rgba(255, 214, 90, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(21, 23, 42, 0.96), rgba(12, 13, 24, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-list-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.035));
}

.live-card-record {
  border-color: rgba(255, 214, 90, 0.42);
  background: rgba(255, 214, 90, 0.055);
}

.live-card-record.selected {
  border-color: rgba(255, 214, 90, 0.78);
  box-shadow: 0 0 0 2px rgba(255, 214, 90, 0.12), 0 16px 34px rgba(0,0,0,0.22);
}

.past-card-record {
  opacity: 0.86;
}

.card-play-panel .bingo-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.16);
}


/* =========================================================
   GLOW BINGO — PHASE 9G
   MEMBER CARD VISUAL UPGRADE

   Purpose:
   Make the active Card Play area easier to see inside the
   member dashboard without changing any game logic.
   ========================================================= */

.card-list-panel {
  background:
    radial-gradient(circle at top left, rgba(255, 214, 90, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(35, 37, 60, 0.96), rgba(22, 24, 42, 0.98));
  border-color: rgba(255, 255, 255, 0.16);
}

.card-play-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 214, 90, 0.34);
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 214, 90, 0.16), transparent 32%),
    radial-gradient(circle at 18% 0%, rgba(255, 92, 184, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(42, 44, 70, 0.98), rgba(26, 28, 50, 0.99));
  box-shadow:
    0 28px 78px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 214, 90, 0.06);
}

.card-play-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  pointer-events: none;
}

.card-play-panel > * {
  position: relative;
  z-index: 1;
}

.card-play-panel .panel-header-row {
  margin-bottom: 12px;
}

.card-play-panel .status-chip {
  background: rgba(97, 255, 173, 0.10);
  border-color: rgba(97, 255, 173, 0.44);
}

.card-play-panel .bingo-card {
  gap: 10px;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid rgba(255, 214, 90, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(19, 21, 36, 0.72), rgba(9, 10, 19, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 38px rgba(0, 0, 0, 0.24);
}

.card-play-panel .bingo-head {
  min-height: 58px;
  border: 1px solid rgba(255, 214, 90, 0.5);
  color: #141414;
  background:
    linear-gradient(180deg, rgba(255, 229, 125, 1), rgba(255, 184, 49, 1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 18px rgba(0, 0, 0, 0.16);
  letter-spacing: 0.03em;
}

.card-play-panel .bingo-card button {
  min-height: 58px;
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(58, 60, 83, 0.98), rgba(41, 43, 65, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 8px 14px rgba(0, 0, 0, 0.18);
  font-size: 16px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.24);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.card-play-panel .bingo-card button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 90, 0.44);
  background:
    linear-gradient(180deg, rgba(70, 72, 98, 0.98), rgba(48, 50, 76, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 12px 20px rgba(0, 0, 0, 0.22);
}

.card-play-panel .bingo-card button:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.card-play-panel .bingo-card button:disabled {
  opacity: 0.78;
  color: rgba(255, 255, 255, 0.64);
}

.card-play-panel .bingo-card button.marked {
  border-color: rgba(97, 255, 173, 0.82);
  background:
    linear-gradient(180deg, rgba(38, 104, 89, 0.98), rgba(24, 75, 66, 0.98));
  color: #77ffbd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(97, 255, 173, 0.14),
    0 14px 24px rgba(0, 0, 0, 0.22);
}


.card-play-panel .bingo-card button.winning {
  border-color: rgba(255, 214, 90, 1);
  background:
    linear-gradient(180deg, rgba(255, 218, 90, 0.34), rgba(255, 181, 46, 0.20)),
    linear-gradient(180deg, rgba(72, 66, 43, 0.98), rgba(46, 42, 29, 0.98));
  color: #ffe27a;
  box-shadow:
    0 0 0 2px rgba(255, 214, 90, 0.18),
    0 0 28px rgba(255, 214, 90, 0.20),
    0 14px 24px rgba(0, 0, 0, 0.22);
}

.live-card-record {
  border-color: rgba(255, 214, 90, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 214, 90, 0.075), rgba(255, 255, 255, 0.035));
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.live-card-record:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 90, 0.64);
  background:
    linear-gradient(180deg, rgba(255, 214, 90, 0.11), rgba(255, 255, 255, 0.045));
}

.live-card-record.selected {
  border-color: rgba(255, 214, 90, 0.95);
  background:
    radial-gradient(circle at right, rgba(255, 214, 90, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(255, 214, 90, 0.14), rgba(255, 255, 255, 0.055));
  box-shadow:
    0 0 0 2px rgba(255, 214, 90, 0.16),
    0 18px 36px rgba(0, 0, 0, 0.24);
}

.card-play-panel .play-actions {
  margin-top: 14px;
}

.card-play-panel .play-actions .button {
  min-height: 44px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.card-play-panel .hint {
  margin-top: 10px;
  color: rgba(230, 232, 255, 0.76);
}

@media (max-width: 680px) {
  .card-play-panel .bingo-card {
    gap: 7px;
    padding: 10px;
    border-radius: 18px;
  }

  .card-play-panel .bingo-head,
  .card-play-panel .bingo-card button {
    min-height: 48px;
    border-radius: 12px;
    font-size: 14px;
  }
}


/* =========================================================
   GLOW BINGO — PHASE 9H
   MEMBER CONVERSION + HISTORY WINDOW UI
   ========================================================= */

.nav-history-button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nav-history-button:hover {
  background: rgba(255, 214, 90, .18);
  border-color: rgba(255, 214, 90, .45);
}

.conversion-section {
  scroll-margin-top: 90px;
}

.conversion-panel {
  background:
    radial-gradient(circle at top right, rgba(255, 214, 90, 0.10), transparent 36%),
    linear-gradient(180deg, rgba(29, 31, 52, 0.98), rgba(18, 20, 36, 0.98));
}

.conversion-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.conversion-summary-grid > div {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.045);
}

.conversion-summary-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.conversion-summary-grid strong {
  display: block;
  font-size: clamp(24px, 4vw, 38px);
  color: var(--gold);
}

.conversion-form {
  display: grid;
  grid-template-columns: minmax(0, 240px) 1fr auto;
  gap: 14px;
  align-items: end;
}

.conversion-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.conversion-form input,
.conversion-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(5,6,14,.72);
  color: #fff;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

.conversion-form input:focus,
.conversion-form textarea:focus {
  border-color: rgba(255, 214, 90, .58);
  box-shadow: 0 0 0 3px rgba(255, 214, 90, .12);
}

.conversion-notice {
  margin-top: 14px;
  color: var(--muted);
}

.conversion-history-wrap {
  margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 18px;
}

.history-launch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at right, rgba(255, 214, 90, .12), transparent 35%),
    linear-gradient(180deg, rgba(29,31,52,.96), rgba(18,20,36,.96));
}

.history-launch-panel p {
  color: var(--muted);
  max-width: 760px;
}

.history-modal {
  max-width: min(1040px, calc(100vw - 32px));
}

.history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.history-tab {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255,255,255,.075);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.history-tab.active {
  background: var(--gold);
  color: #121212;
  border-color: transparent;
}

.history-window-section {
  display: none;
}

.history-window-section.active {
  display: block;
}

.history-window-section h3 {
  margin-top: 0;
}

.history-window-grid {
  min-height: 320px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}

@media (max-width: 840px) {
  .conversion-summary-grid {
    grid-template-columns: 1fr;
  }

  .conversion-form {
    grid-template-columns: 1fr;
  }

  .history-launch-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .history-modal {
    max-width: calc(100vw - 20px);
  }
}


/* =========================================================
   GLOW BINGO — SITE v20
   TOKEN REQUEST TOP MENU + CLEANER MEMBER WORDING
   ========================================================= */

.nav-token-request-button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nav-token-request-button:hover {
  background: rgba(255, 214, 90, .18);
  border-color: rgba(255, 214, 90, .45);
}

.conversion-section {
  scroll-margin-top: 110px;
}

.conversion-section .section-heading h2 {
  letter-spacing: -0.04em;
}

.conversion-panel {
  border-color: rgba(255, 214, 90, .22);
}

@media (max-width: 760px) {
  .nav-token-request-button,
  .nav-history-button {
    width: 100%;
  }
}


/* =========================================================
   GLOW BINGO — SITE v21
   TOKEN REQUEST MOVED TO SEPARATE PAGE
   ========================================================= */

.token-request-page {
  padding-top: 70px;
}

.token-request-standalone-panel {
  max-width: 1180px;
}

.token-request-note {
  margin-top: 22px;
  max-width: 1180px;
}

.token-request-note p {
  color: var(--muted);
}

.nav-token-request-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* =========================================================
   GLOW BINGO — SITE v23
   MEMBER FIRST-CARD COUNTDOWN
   ========================================================= */

.countdown-box {
  border: 1px solid rgba(255, 214, 90, .20);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 214, 90, .10), transparent 46%),
    rgba(255,255,255,.045);
}

.countdown-box small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.countdown-box strong {
  display: block;
  color: var(--gold);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-box p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

#memberRoundCountdown[data-countdown-mode="active"] {
  color: #61ffad;
}


/* =========================================================
   GLOW BINGO — SITE v24
   MEMBER DASHBOARD CLEANUP
   ========================================================= */

.member-summary-section {
  padding: 10px 0 34px;
}

.member-summary-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) 2.2fr;
  gap: 20px;
  align-items: center;
  background:
    radial-gradient(circle at right, rgba(255, 214, 90, .10), transparent 34%),
    linear-gradient(180deg, rgba(28, 30, 50, .98), rgba(16, 18, 32, .98));
}

.summary-card-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.04em;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-metric {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.045);
}

.summary-metric small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-metric strong {
  display: block;
  color: var(--gold);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-metric p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.history-launch-section {
  display: none !important;
}

.legacy-history-records {
  display: none !important;
}

.countdown-box strong {
  font-size: clamp(27px, 3.4vw, 42px);
  letter-spacing: -.035em;
  line-height: 1.04;
}

.countdown-box small {
  color: #dfe1ff;
  font-weight: 800;
}

@media (max-width: 880px) {
  .member-summary-card {
    grid-template-columns: 1fr;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   GLOW BINGO — SITE v25
   OFFICIAL PATTERN DESCRIPTION DISPLAY
   ========================================================= */

.round-pattern-rule {
  margin: 12px 0 10px;
  border: 1px solid rgba(255, 214, 90, .22);
  border-radius: 16px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 214, 90, .12), transparent 42%),
    rgba(255,255,255,.045);
}

.round-pattern-rule span {
  display: block;
  color: var(--gold);
  font-weight: 900;
  margin-bottom: 5px;
}

.round-pattern-rule p {
  margin: 0;
  color: #eef0ff;
  font-size: 14px;
  line-height: 1.45;
}

.pattern-modal-note {
  border: 1px solid rgba(255, 214, 90, .22);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 214, 90, .075);
  color: #fff7d7;
}



/* Step 30C-1 — compact, scroll-safe card purchase confirmation on phones */
@media (max-width: 620px) {
  .portal-modal-backdrop {
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .portal-modal {
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto 0;
    padding: 16px;
    border-radius: 20px;
  }

  .portal-modal .eyebrow {
    margin: 0 44px 6px 0;
    font-size: 11px;
    line-height: 1.2;
  }

  .portal-modal h2 {
    margin: 0 42px 8px 0;
    font-size: clamp(23px, 7vw, 30px);
    line-height: 1.06;
  }

  .portal-modal > p:not(.modal-note):not(.eyebrow) {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.4;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 25px;
  }

  .modal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
  }

  .modal-summary div {
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }

  .modal-summary div:last-child {
    grid-column: 1 / -1;
  }

  .modal-summary span {
    font-size: 10px;
    line-height: 1.15;
  }

  .modal-summary strong {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .portal-modal .modal-note,
  .portal-modal .pattern-modal-note {
    margin: 0 0 10px;
    padding: 10px 11px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.35;
  }

  .modal-actions {
    position: sticky;
    bottom: -1px;
    z-index: 2;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.55fr);
    gap: 8px;
    margin: 0 -2px -2px;
    padding: 10px 2px 2px;
    background: linear-gradient(180deg, rgba(23, 23, 37, 0), #171725 30%);
  }

  .modal-actions .button {
    min-height: 44px;
    padding: 9px 8px;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .portal-modal {
    padding: 14px;
  }

  .portal-modal h2 {
    font-size: 22px;
  }

  .modal-summary strong {
    font-size: 13px;
  }

  .modal-actions .button {
    font-size: 11px;
  }
}

/* =========================================================
   GLOW BINGO — STEP 30C2
   HELP MODAL + PUBLIC NAVIGATION LABEL SUPPORT
   ========================================================= */

.nav-help-button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nav-help-button:hover {
  background: rgba(255, 214, 90, .18);
  border-color: rgba(255, 214, 90, .45);
}

.help-modal {
  width: min(1040px, 100%);
}

.help-modal-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.help-modal-steps article {
  min-height: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

.help-modal-steps article h3 {
  margin: 0 0 8px;
}

.help-modal-steps article p {
  margin: 0;
}

.help-modal-actions {
  grid-template-columns: minmax(180px, 280px);
  justify-content: end;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .nav-help-button {
    width: 100%;
  }

  .help-modal-steps {
    grid-template-columns: 1fr;
  }

  .help-modal-steps article {
    padding: 14px;
  }

  .help-modal-actions {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   GLOW BINGO — STEP 30D1
   MEMBER PERSONALIZED / GENERAL WINNER ANNOUNCEMENT
   ========================================================= */

body.winner-modal-open {
  overflow: hidden;
}

.member-winner-backdrop {
  z-index: 1800;
}

.member-winner-modal {
  width: min(620px, 100%);
  text-align: center;
  overflow-x: hidden;
  border-color: rgba(255,214,90,.55);
  box-shadow: 0 34px 100px rgba(0,0,0,.72), 0 0 60px rgba(255,214,90,.1);
}

.member-winner-crown {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffd65a, #ff78dd);
  color: #17131e;
  font-size: 40px;
  box-shadow: 0 18px 40px rgba(255,97,221,.22);
}

.member-winner-modal h2 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(42px, 9vw, 72px);
  line-height: .98;
}

.member-winner-modal h3 {
  margin: 12px 0 8px;
  font-size: clamp(22px, 5vw, 32px);
}

.member-winner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin: 22px 0;
}

.member-winner-summary div {
  padding: 14px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}

.member-winner-summary span,
.member-winner-summary strong {
  display: block;
}

.member-winner-summary span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.member-winner-summary strong {
  margin-top: 6px;
  color: #fff;
  overflow-wrap: anywhere;
}

.member-winner-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.member-winner-confetti-piece {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  background: var(--gold);
  animation: member-confetti-fall 2.8s linear forwards;
}

@keyframes member-confetti-fall {
  from { transform: translate3d(0,-10px,0) rotate(0deg); opacity: 1; }
  to { transform: translate3d(var(--drift), 720px, 0) rotate(760deg); opacity: 0; }
}

@media (max-width: 620px) {
  .member-winner-modal {
    padding-top: 24px;
  }

  .member-winner-summary {
    grid-template-columns: 1fr;
  }

  .member-winner-modal > .button {
    width: 100%;
  }
}

/* ==========================================================
   STEP 31C MEMBER APP SHELL — LIVE PRODUCTION ELEMENTS
   ========================================================== */
.member-app-shell .member-top-nav { grid-auto-columns: minmax(82px,1fr); }
.member-app-shell .app-login-screen { min-height: calc(100dvh - 150px); display: grid; place-items: center; padding: 18px 0; }
.member-app-shell .app-login-card { width: min(100%,520px); text-align: center; padding: clamp(20px,5vw,30px); }
.member-app-shell .app-login-card .panel-header-row { align-items: center; }
.member-app-shell .login-brand-icon { width: 70px; height: 70px; margin: 0 auto 14px; border-radius: 22px; box-shadow: 0 18px 46px rgba(255,92,184,.22); }
.member-app-shell .app-portal { min-height: 65vh; }
.member-app-shell .member-home-hero { padding: clamp(20px,5vw,30px); border-color: rgba(255,214,90,.30); background: radial-gradient(circle at 90% 0%,rgba(255,214,90,.16),transparent 18rem),linear-gradient(145deg,#22223e,#141426 74%); }
.member-app-shell .home-token-balance { display: block; margin: 5px 0; color: var(--app-gold); font-size: clamp(50px,15vw,78px); line-height: .92; letter-spacing: -.05em; }
.member-app-shell .member-home-copy p:last-child { color: var(--app-muted); }
.member-app-shell .home-summary-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.member-app-shell .home-summary-grid div { padding: 13px; border: 1px solid var(--app-border); border-radius: 14px; background: rgba(255,255,255,.04); }
.member-app-shell .home-summary-grid small { display: block; color: var(--app-subtle); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.member-app-shell .home-summary-grid strong { display: block; margin-top: 5px; font-size: 25px; }
.member-app-shell .app-purchase-section { margin-top: 14px; }
.member-app-shell .app-purchase-section .buy-card-panel { margin: 0; }
.member-app-shell .app-member-live { padding: clamp(17px,4vw,25px); }
.member-app-shell .app-live-grid { grid-template-columns: 1fr; }
.member-app-shell .app-live-tile { min-height: 150px; display: flex; flex-direction: column; justify-content: center; text-align: center; border: 1px solid var(--app-border); border-radius: 18px; background: rgba(255,255,255,.04); }
.member-app-shell .app-live-tile small { color: var(--app-subtle); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.member-app-shell .app-live-tile strong { color: var(--app-gold); font-size: clamp(30px,10vw,52px); line-height: 1; }
.member-app-shell .primary-live-tile strong { font-size: clamp(68px,23vw,116px); }
.member-app-shell .app-live-tile p { margin: 8px 0 0; color: var(--app-muted); }
.member-app-shell .app-live-audio { grid-column: 1/-1; display: grid; gap: 9px; }
.member-app-shell .app-called-history { margin-top: 14px; }
.member-app-shell .app-card-layout { grid-template-columns: 1fr; }
.member-app-shell .app-card-play-panel { min-width: 0; }
.member-app-shell .app-bingo-card { width: min(100%,540px); margin: 0 auto; gap: 5px; padding: 7px; border: 1px solid rgba(255,214,90,.35); border-radius: 20px; background: linear-gradient(145deg,rgba(255,214,90,.22),rgba(255,92,184,.15)); }
.member-app-shell .app-bingo-card .bingo-head { min-height: 42px; display: grid; place-items: center; border-radius: 10px; background: rgba(11,11,20,.86); color: var(--app-gold); font-size: clamp(20px,6vw,28px); }
.member-app-shell .app-bingo-card button { aspect-ratio: 1; min-width: 0; min-height: 0; border-radius: 11px; font-size: clamp(15px,5vw,24px); }
.member-app-shell .app-play-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
.member-app-shell .wallet-app-card { padding: clamp(20px,5vw,30px); border-color: rgba(255,214,90,.30); }
.member-app-shell .wallet-app-balance { display: block; color: var(--app-gold); font-size: clamp(52px,16vw,82px); line-height: .92; }
.member-app-shell .wallet-app-actions { margin-top: 20px; display: grid; gap: 10px; }
.member-app-shell .wallet-information-card { margin-top: 14px; }
.member-app-shell .app-account-card { margin-bottom: 14px; }
.member-app-shell .app-more-list { display: grid; gap: 10px; }
.member-app-shell .app-more-row { width: 100%; min-height: 64px; padding: 13px 15px; display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; align-items: center; border: 1px solid var(--app-border); border-radius: 16px; background: rgba(255,255,255,.045); color: var(--app-text); text-align: left; text-decoration: none; cursor: pointer; }
.member-app-shell .app-more-row:hover { background: rgba(255,255,255,.08); }
.member-app-shell .app-more-row span { font-weight: 900; }
.member-app-shell .app-more-row small { color: var(--app-muted); line-height: 1.35; }
.member-app-shell .danger-row { border-color: rgba(255,107,107,.30); background: rgba(255,107,107,.08); }
.member-app-shell .portal-modal-backdrop { z-index: 220; }
.member-app-shell .portal-modal { border-radius: 24px; background: linear-gradient(180deg,#242440,#121220); }
.member-app-shell .member-winner-modal { border-color: rgba(255,214,90,.38); }
.member-app-shell .member-winner-summary { grid-template-columns: 1fr; }
.member-app-shell .portal-modal[role="dialog"] { max-height: min(88dvh,760px); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 720px) {
  .member-app-shell .app-live-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .member-app-shell .primary-live-tile strong { font-size: clamp(62px,10vw,100px); }
  .member-app-shell .app-card-layout { grid-template-columns: minmax(280px,.7fr) minmax(0,1.3fr); align-items: start; }
  .member-app-shell .wallet-app-actions { grid-template-columns: 1fr 1fr; }
  .member-app-shell .member-winner-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 420px) {
  .member-app-shell .app-play-actions { grid-template-columns: 1fr; }
  .member-app-shell .app-nav-button { font-size: 11px !important; padding-left: 7px; padding-right: 7px; }
}



/* Step 32D1: keep the verified winning pattern visible before the Bingo dialog. */
.member-app-shell .app-bingo-card.winner-pattern-preview {
  border-color: rgba(255, 214, 90, 0.92);
  box-shadow:
    0 0 0 3px rgba(255, 214, 90, 0.18),
    0 0 42px rgba(255, 214, 90, 0.30),
    0 24px 52px rgba(0, 0, 0, 0.38);
}

.member-app-shell .app-bingo-card.winner-pattern-preview button.winning {
  color: #fff7c2;
  border-color: #ffe06b;
  background:
    linear-gradient(180deg, rgba(255, 225, 105, 0.68), rgba(255, 176, 45, 0.42)),
    linear-gradient(180deg, rgba(80, 70, 36, 0.98), rgba(47, 41, 24, 0.98));
  box-shadow:
    0 0 0 3px rgba(255, 214, 90, 0.24),
    0 0 34px rgba(255, 214, 90, 0.48),
    0 14px 24px rgba(0, 0, 0, 0.26);
  animation: glow-bingo-winning-cell-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes glow-bingo-winning-cell-pulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.045); filter: brightness(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  .member-app-shell .app-bingo-card.winner-pattern-preview button.winning {
    animation: none;
  }
}
