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

/* ── Self-hosted webfonts ── */
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bungee-400.woff2") format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/plusjakartasans-var.woff2") format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/spacemono-400.woff2") format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/spacemono-700.woff2") format('woff2');
}

:root {
  --bg: #14100c;
  --surface: #1e1811;
  --surface-2: #2b2219;
  --surface-3: #372c20;
  --paper: #f3e9d2;
  --paper-ink: #241b10;
  --paper-muted: #5a4c37;
  --paper-shadow: #d8c9a3;
  --text: #f3ece0;
  --text-muted: #a89a80;
  --muted: var(--text-muted);
  --purple: #9147ff;
  --purple-dark: #6c35c1;
  --kick: #53fc18;
  --gold: #ffb92e;
  --gold-dark: #c98a10;
  --accent: var(--gold);
  --radius-lg: 20px;
  --green: #00b26f;
  --red: #e91916;

  --font-display: 'Bungee', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SF Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

.sidebar-brand, .topbar-brand {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 400;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }

/* ── Layout ── */
.layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  min-height: 100vh;
}

.layout-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Sidebar (floating membership-card rail, height hugs its content) ── */
.sidebar {
  position: sticky;
  top: 24px;
  width: 220px;
  flex-shrink: 0;
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 100;
  scrollbar-width: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 14px 11px;
  border-bottom: 1px solid var(--surface-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: 56px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.sidebar-logo {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  min-width: 0;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(255,185,46,0.14);
  color: var(--gold);
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active svg,
.sidebar-link:hover svg { opacity: 1; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 11px 4px;
  opacity: 0.6;
}

.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Membership card: user block + perforated divider + balance, one paper ticket */
.sidebar-card {
  background: var(--paper);
  border-radius: 12px;
  padding: 14px 14px 12px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-bottom: 10px;
}

.sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--paper-shadow);
  flex-shrink: 0;
}

.sidebar-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-username {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--paper-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-kick-tag {
  font-size: 10.5px;
  color: #1a8f00;
  font-weight: 700;
  white-space: nowrap;
}

/* Perforated divider with punched-out notches, matching the sidebar's own background */
.sidebar-card-div {
  border-top: 2px dashed rgba(36,27,16,0.28);
  margin: 0 -14px;
  position: relative;
}
.sidebar-card-div::before, .sidebar-card-div::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 16px;
  height: 16px;
  background: var(--surface);
  border-radius: 50%;
}
.sidebar-card-div::before { left: -8px; }
.sidebar-card-div::after { right: -8px; }

.sidebar-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 8px;
}

.sidebar-balance strong {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--paper-ink);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.sidebar-balance span {
  font-size: 9.5px;
  color: var(--paper-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-action-btn {
  width: 100%;
  justify-content: center;
}

/* ── Topbar (mobile only) ── */
.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar-toggle {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}

.topbar-toggle:hover { background: var(--surface-2); }

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex: 1;
}

.topbar-logo {
  height: 24px;
  width: auto;
}

.topbar-pts {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-pts strong {
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 700;
}

/* ── Sidebar backdrop (mobile) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.open { display: block; }
body.sidebar-open { overflow: hidden; }

/* ── Avatar (shared) ── */
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--surface-2);
}

.btn-kick { background: #53fc18; color: #000; font-weight: 700; }
.btn-kick:hover { background: #3fd410; }

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 18px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 500;
}

.flash::before {
  font-size: 16px;
  flex-shrink: 0;
}

.flash-notice {
  background: rgba(0, 178, 111, 0.08);
  color: var(--green);
  border-color: rgba(0, 178, 111, 0.2);
}

.flash-notice::before { content: "✓"; }

.flash-alert {
  background: rgba(233, 25, 22, 0.08);
  color: var(--red);
  border-color: rgba(233, 25, 22, 0.2);
}

.flash-alert::before { content: "!"; }

main {
  padding: 12px 0 36px;
  width: 100%;
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.btn:hover { background: #3a3a46; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-primary { background: var(--purple); color: white; border-color: transparent; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #009960; }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #c51513; }
.btn-twitch { background: var(--purple); color: white; }
.btn-twitch:hover { background: var(--purple-dark); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: var(--text-muted);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.22);
  color: var(--text);
}
.btn-disabled, button:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  border-color: transparent;
}

.home-header { margin-bottom: 32px; }
.home-header h1 { font-size: 26px; }
.balance-display { font-size: 18px; color: var(--text-muted); margin-top: 8px; }
.balance-display strong { font-family: var(--font-mono); color: var(--gold); font-size: 24px; }

h2 { font-size: 20px; margin-bottom: 16px; }

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* ── Ticket stub: rewards & raffles ── */
.reward-card, .raffle-card {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  transition: transform 0.18s ease;
}

.reward-card:hover, .raffle-card:hover { transform: translateY(-3px); }

.reward-card { padding: 0; display: flex; flex-direction: column; }

.ticket-top { padding: 18px 16px 14px; }
.ticket-bottom { padding: 12px 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Perforated divider with punched-out notches */
.ticket-div {
  border-top: 2px dashed rgba(36,27,16,0.25);
  position: relative;
}
.ticket-div::before, .ticket-div::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  background: var(--bg);
  border-radius: 50%;
}
.ticket-div::before { left: -9px; }
.ticket-div::after { right: -9px; }

/* Redeem animation: a blade sweeps left-to-right cutting the perforation,
   then the two halves settle apart slightly before the card fades for reload. */
.reward-card.tearing { pointer-events: none; }

.reward-card.tearing .ticket-div::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--paper-ink);
  animation: ticketCutSweep 0.4s steps(24) forwards;
}

.reward-card.tearing .ticket-top {
  animation: ticketSettleTop 0.4s ease-out 0.4s forwards;
}
.reward-card.tearing .ticket-bottom {
  animation: ticketSettleBottom 0.4s ease-out 0.4s forwards;
}
.reward-card.tearing {
  animation: ticketFadeOut 0.3s ease-in 0.75s forwards;
}

@keyframes ticketCutSweep {
  to { width: 100%; }
}
@keyframes ticketSettleTop {
  to { transform: translateY(-5px) rotate(-1deg); }
}
@keyframes ticketSettleBottom {
  to { transform: translateY(5px) rotate(1deg); }
}
@keyframes ticketFadeOut {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reward-card, .raffle-card { transition: none; }
  .reward-card:hover, .raffle-card:hover { transform: none; }

  .reward-card.tearing .ticket-div::after { animation: none; width: 100%; }
  .reward-card.tearing .ticket-top,
  .reward-card.tearing .ticket-bottom { animation: none; }
  .reward-card.tearing { animation: none; opacity: 0; }
}

.reward-icon { font-size: 28px; margin-bottom: 8px; }
.reward-info h3 { font-size: 16px; margin-bottom: 4px; color: var(--paper-ink); }
.reward-info p { font-size: 13px; color: var(--paper-muted); }
.reward-cost {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  background: var(--paper-ink);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.reward-card .btn-disabled {
  background: var(--paper-shadow);
  color: #8a7c60;
}

.info-box {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 24px;
}

.info-box h3 { font-size: 16px; margin-bottom: 12px; }
.info-box ol { padding-left: 20px; }
.info-box li { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.conversion-note { font-size: 13px; color: var(--muted); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--surface-2); line-height: 1.6; }

/* "Boarding pass" earn-points panel */
.pass {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  overflow: hidden;
}
.pass-lane { padding: 20px 22px; }
.pass-lane + .pass-lane { border-left: 2px dashed var(--surface-3); }
.pass-lane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 800; font-size: 14px; }
.pass-lane-head .chip { width: 8px; height: 8px; border-radius: 50%; }
.pass-lane-tw .chip { background: var(--purple); }
.pass-lane-kk .chip { background: var(--kick); }
.pass-lane ol { margin: 0 0 12px 18px; padding: 0; font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.pass-lane .conversion-note { margin-top: 0; padding-top: 10px; border-top: 1px solid var(--surface-2); }
@media (max-width: 620px) {
  .pass { grid-template-columns: 1fr; }
  .pass-lane + .pass-lane { border-left: none; border-top: 2px dashed var(--surface-3); }
}

.home-section-header { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 16px; }
.home-section-header h2 { margin: 0; }
.home-section-link { font-size: 14px; color: var(--accent); text-decoration: none; }
.home-section-link:hover { text-decoration: underline; }

.info-box-support { margin-bottom: 16px; }
.info-box-support-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.info-box-support-content h3 { margin-bottom: 6px; }
.info-box-support-content p { font-size: 14px; color: var(--text-muted); margin: 0; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-header h1 { font-size: 24px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface-2);
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.table-actions { display: flex; align-items: center; gap: 8px; }
.table-actions form { margin: 0; }

.admin-form { max-width: 500px; }
.admin-form h1 { margin-bottom: 8px; }
.admin-form > p { margin-bottom: 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.form-group { margin-bottom: 20px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.field-error { display: block; color: var(--red); font-size: 12px; margin-top: 4px; }

.field-error ~ .form-control,
.form-control.field-invalid {
  border-color: var(--red);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-control:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(145,71,255,0.15); }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check label { margin-bottom: 0; }

.form-errors {
  background: #2e1a1a;
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--red);
}

.empty-state { color: var(--text-muted); font-size: 15px; padding: 40px 0; text-align: center; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.points-toast {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: var(--gold);
  color: var(--paper-ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.points-toast-show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .layout { display: block; max-width: none; padding: 0; gap: 0; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    max-height: none;
    width: 260px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--surface-3);
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
  }

  .sidebar.open { transform: translateX(0); }

  .topbar { display: flex; }

  main { padding: 20px 16px; }

  .home-header h1 { font-size: 22px; }
  .balance-display { font-size: 16px; }
  .balance-display strong { font-size: 20px; }
  h2 { font-size: 17px; margin-bottom: 12px; }

  .rewards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ticket-top {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .ticket-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .reward-cost { text-align: center; }

  .reward-card .btn,
  .reward-card .btn-disabled {
    width: 100%;
  }


  .info-box { padding: 18px; }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-header .btn { width: 100%; justify-content: center; }

  .admin-table { min-width: 480px; }

  .flash { padding: 10px 16px; }

  .admin-form { max-width: 100%; }
}

/* ── Tickets ── */
.ticket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: 2px;
}

.ticket-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.ticket-status-open { background: rgba(237,137,54,0.15); color: #ed8936; }
.ticket-status-in_progress { background: rgba(66,153,225,0.15); color: #4299e1; }
.ticket-status-resolved { background: rgba(72,187,120,0.15); color: #48bb78; }

.ticket-detail {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ticket-info-box {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.ticket-info-label {
  color: var(--muted);
  font-weight: 500;
}

.ticket-message-box {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 16px 20px;
}

.ticket-message-box h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.ticket-message-box p {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ticket-row-unread td { font-weight: 600; }
.ticket-id-link { color: var(--purple); font-weight: 600; text-decoration: none; }
.ticket-id-link:hover { text-decoration: underline; }

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-thread-message {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 14px 18px;
}

.ticket-thread-admin {
  border-left: 3px solid var(--purple);
}

.ticket-thread-user {
  border-left: 3px solid var(--surface-2);
}

.ticket-thread-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ticket-thread-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.ticket-thread-admin .ticket-thread-author { color: var(--purple); }

.ticket-thread-time {
  font-size: 12px;
  color: var(--text-muted);
}

.ticket-thread-message p {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input { width: auto; }

.form-info {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ── Stream floating widget ── */
.stream-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  text-decoration: none;
  z-index: 1000;
  border: 2px solid var(--surface-2);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.stream-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  border-color: #53fc18;
}

.stream-widget-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.stream-widget-iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

.stream-widget-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-widget-live {
  background: #53fc18;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.stream-widget-label {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── Viewers leaderboard ── */
.viewers-page { max-width: 1040px; margin: 0 auto; }
.viewers-page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 38px; border: 1px solid var(--surface-3); border-radius: 18px; background: radial-gradient(circle at 88% 10%, rgba(83, 255, 44, .14), transparent 30%), var(--surface-1); }
.viewers-kicker { margin-bottom: 8px; color: var(--kick); font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.viewers-page h1 { margin: 0; font-family: var(--font-display); font-size: clamp(38px, 6vw, 64px); font-weight: 400; line-height: 1; }
.viewers-page-header p:not(.viewers-kicker) { margin: 12px 0 0; color: var(--text-muted); font-size: 16px; }
.viewers-chat-icon { display: grid; width: 82px; height: 82px; flex: 0 0 auto; place-items: center; border: 1px solid var(--kick); border-radius: 50%; background: rgba(83, 255, 44, .08); box-shadow: 0 0 35px rgba(83, 255, 44, .1); font-size: 32px; }
.viewers-search { display: flex; align-items: center; gap: 16px; margin-top: 26px; padding: 18px 22px; border: 1px solid var(--surface-3); border-radius: 14px; background: var(--surface-1); }
.viewers-search-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 16px; }
.viewers-search-copy { display: grid; flex: 0 0 auto; gap: 2px; }
.viewers-search-copy strong { font-size: 15px; }
.viewers-search-copy span { color: var(--text-muted); font-size: 12px; }
.viewers-search-input { flex: 1 1 auto; min-width: 0; padding: 11px 14px; border: 1px solid var(--surface-3); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 14px; }
.viewers-search-input:focus { outline: none; border-color: var(--kick); }
.viewers-search-submit { flex: 0 0 auto; padding: 11px 20px; border: none; border-radius: 8px; background: var(--kick); color: #111; font-weight: 800; cursor: pointer; }
.viewers-search-submit:hover { background: #74ff45; }

.viewers-search-result { display: grid; gap: 14px; margin-top: 16px; padding: 18px 22px; border: 1px solid var(--surface-3); border-radius: 14px; background: var(--surface-1); }
.viewers-search-result-header { display: flex; align-items: center; gap: 14px; }
.viewers-search-result-who { display: grid; flex: 1 1 auto; gap: 2px; }
.viewers-search-result-who span { color: var(--text-muted); font-size: 13px; }
.viewers-search-result-close { color: var(--text-muted); font-size: 18px; text-decoration: none; }
.viewers-search-result-close:hover { color: var(--text); }
.viewers-search-result-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--surface-3); }
.viewers-search-result-label { font-weight: 800; }
.viewers-search-result-stats { display: flex; flex-wrap: wrap; gap: 18px; color: var(--text-muted); font-size: 13px; }
.viewers-search-result-stats strong { color: var(--text); font-family: var(--font-mono); }
.viewers-search-result-rank { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--kick); font-family: var(--font-mono); font-size: 12px; font-weight: 800; }
.viewers-search-result-empty { color: var(--text-muted); font-size: 13px; }
.viewers-search-empty { margin: 0; color: var(--text-muted); }

.viewers-type-tabs { display: flex; gap: 10px; margin-top: 28px; }
.viewers-type-tab { flex: 1 1 0; padding: 13px; border: 1px solid var(--surface-3); border-radius: 10px; background: var(--surface-1); color: var(--text-muted); font-weight: 800; text-align: center; text-decoration: none; }
.viewers-type-tab:hover { color: var(--text); background: var(--surface-2); }
.viewers-type-tab.active { border-color: var(--gold); color: var(--gold); background: rgba(255, 185, 46, .08); }

.viewers-period-tabs { display: inline-flex; margin-top: 30px; overflow: hidden; border: 1px solid var(--surface-3); border-radius: 10px; }
.viewers-period-tab { padding: 11px 17px; border-right: 1px solid var(--surface-3); color: var(--text-muted); font-weight: 800; text-decoration: none; }
.viewers-period-tab:last-child { border-right: 0; }
.viewers-period-tab:hover { color: var(--text); background: var(--surface-2); }
.viewers-period-tab.active { color: var(--text); background: var(--surface-3); }
.viewers-note { margin: 17px 0 28px; color: var(--text-muted); font-size: 13px; }
.viewers-notes { display: grid; gap: 4px; margin: 17px 0 28px; }
.viewers-notes .viewers-note { margin: 0; }
.viewers-note::before { content: "ⓘ"; margin-right: 7px; color: var(--kick); }
.viewers-empty-state { padding: 64px 24px; border: 1px solid var(--surface-3); border-radius: 18px; background: var(--surface-1); text-align: center; }
.viewers-empty-state > span { display: block; margin-bottom: 13px; font-size: 34px; }
.viewers-empty-state h2 { margin: 0; font-size: 21px; }
.viewers-empty-state p { max-width: 430px; margin: 10px auto 0; color: var(--text-muted); line-height: 1.6; }

.viewers-podium { display: flex; align-items: flex-end; justify-content: center; gap: 24px; padding: 44px 32px 0; margin-bottom: 28px; border: 1px solid var(--surface-3); border-radius: 18px; background: var(--surface-1); }
.viewers-podium-slot { position: relative; display: flex; width: 150px; flex-direction: column; align-items: center; text-align: center; }
.viewers-podium-crown { position: absolute; top: -34px; font-size: 22px; }
.viewers-podium-avatar { display: grid; width: 64px; height: 64px; overflow: hidden; place-items: center; border: 3px solid var(--surface-3); border-radius: 50%; background: var(--surface-2); color: var(--text-muted); font-family: var(--font-mono); font-size: 16px; font-weight: 800; }
.viewers-podium-avatar img { width: 100%; height: 100%; object-fit: cover; }
.viewers-podium-name { margin-top: 10px; font-size: 15px; font-weight: 800; }
.viewers-podium-count { margin-top: 4px; font-family: var(--font-mono); font-size: 14px; font-weight: 800; }
.viewers-podium-block { display: grid; width: 100%; margin-top: 16px; place-items: center; border-radius: 10px 10px 0 0; font-family: var(--font-display); font-size: 26px; color: var(--text-muted); background: var(--surface-2); }
.viewers-podium-slot--1 .viewers-podium-avatar { width: 84px; height: 84px; border-color: var(--gold); box-shadow: 0 0 24px rgba(255, 185, 46, .35); }
.viewers-podium-slot--1 .viewers-podium-count { color: var(--gold); }
.viewers-podium-slot--1 .viewers-podium-block { height: 96px; color: var(--gold-dark); background: linear-gradient(180deg, rgba(255, 185, 46, .28), rgba(255, 185, 46, .06)); }
.viewers-podium-slot--2 .viewers-podium-count { color: #d9d9e0; }
.viewers-podium-slot--2 .viewers-podium-block { height: 74px; }
.viewers-podium-slot--3 .viewers-podium-avatar { border-color: #cd7f32; }
.viewers-podium-slot--3 .viewers-podium-count { color: #e0995a; }
.viewers-podium-slot--3 .viewers-podium-block { height: 60px; color: #cd7f32; background: linear-gradient(180deg, rgba(205, 127, 50, .24), rgba(205, 127, 50, .05)); }

.viewers-ranking { display: grid; gap: 10px; }
.viewers-row { display: grid; grid-template-columns: 54px 42px 1fr auto; align-items: center; gap: 16px; padding: 18px 22px; border: 1px solid var(--surface-3); border-radius: 12px; background: var(--surface-1); }
.viewers-rank { color: var(--text-muted); font-family: var(--font-mono); font-weight: 800; }
.viewers-avatar { display: grid; width: 42px; height: 42px; overflow: hidden; place-items: center; border: 1px solid var(--surface-3); border-radius: 50%; background: var(--surface-2); color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; font-weight: 800; }
.viewers-avatar img { width: 100%; height: 100%; object-fit: cover; }
.viewers-row-main { display: grid; gap: 8px; min-width: 0; }
.viewers-name { font-size: 17px; font-weight: 800; }
.viewers-bar-track { width: 100%; height: 6px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.viewers-bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--kick); }
.viewers-messages { color: var(--kick); font-family: var(--font-mono); font-size: 13px; font-weight: 800; white-space: nowrap; }
.viewers-row--mine { border-color: var(--gold); background: rgba(255, 185, 46, .06); }
.viewers-podium-slot--mine .viewers-podium-block { box-shadow: inset 0 0 0 2px var(--gold); }

/* ── Gaming page ── */
.gaming-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 28px;
  padding: 52px;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.gaming-page-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 30%; z-index: 0; }
.gaming-page-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at top right, rgba(145, 71, 255, .3), transparent 38%), rgba(10, 8, 6, .55);
}
.gaming-page-copy { position: relative; z-index: 2; max-width: 620px; }
.gaming-page-kicker { margin-bottom: 16px; color: var(--kick); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.gaming-page h1 { margin-bottom: 18px; font-family: var(--font-display); font-size: clamp(34px, 5vw, 58px); font-weight: 400; line-height: 1.05; }
.gaming-page-lede { color: var(--text); font-size: 18px; line-height: 1.6; }
.gaming-page-description { margin-top: 10px; color: var(--text-muted); line-height: 1.6; }
.gaming-page-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 28px; }
.gaming-page-bonus-row { display: flex; gap: 16px; margin-top: 10px; }
.gaming-page-bonus-link { color: var(--kick); font-weight: 700; font-size: 13px; text-decoration: none; }
.gaming-page-bonus-link:hover { color: #74ff45; }
.gaming-page-cta { display: inline-flex; margin-top: 0; background: var(--kick); color: #111; font-weight: 800; text-decoration: none; }
.gaming-page-cta:hover { background: #74ff45; }
.gaming-page-info { display: inline-flex; margin-top: 0; border: 1px solid var(--text-muted); color: var(--text); font-weight: 800; text-decoration: none; }
.gaming-page-info:hover { border-color: var(--text); background: var(--surface-2); }
.gaming-page-details { position: relative; z-index: 2; display: grid; gap: 1px; align-self: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(255, 255, 255, .08); }
.gaming-page-detail { padding: 20px; background: rgba(20, 16, 12, .7); backdrop-filter: blur(2px); }
.gaming-page-detail dt { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gaming-page-detail dd { color: var(--text); font-size: 19px; font-weight: 800; }
.gaming-page-detail--highlight { position: relative; background: rgba(83, 255, 44, .07); }
.gaming-page-detail--highlight::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--kick); }
.gaming-page-detail--highlight dt { color: var(--kick); }
.gaming-page-detail--highlight dd { color: var(--kick); text-shadow: 0 0 18px rgba(83, 255, 44, .35); }
.gaming-page-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--kick); box-shadow: 0 0 8px var(--kick); animation: gaming-live-pulse 1.6s ease-in-out infinite; }
.gaming-page-clan { display: flex; align-items: center; gap: 8px; }
.gaming-page-clan-crest { width: 32px; height: 16px; image-rendering: pixelated; border-radius: 3px; }

@keyframes gaming-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Live page ── */
.live-page {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  height: calc(100vh - 58px);
  padding: 16px;
  box-sizing: border-box;
}

.live-player-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.live-player {
  width: 100%;
  height: 100%;
  border: none;
}

.live-chat-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--surface-2);
}

.live-chat {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .live-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 400px;
    height: auto;
  }

  .live-player-wrap {
    aspect-ratio: 16/9;
    height: auto;
  }

  .gaming-page {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .viewers-page-header { padding: 28px 22px; }
  .viewers-chat-icon { display: none; }
  .viewers-search { flex-wrap: wrap; }
  .viewers-search-icon { display: none; }
  .viewers-search-copy { display: none; }
  .viewers-search-input { flex-basis: 100%; }
  .viewers-search-submit { flex: 1 1 auto; }
  .viewers-podium { gap: 8px; padding: 40px 12px 0; }
  .viewers-podium-slot { width: 33%; }
  .viewers-podium-avatar, .viewers-podium-slot--1 .viewers-podium-avatar { width: 52px; height: 52px; }
  .viewers-podium-name { font-size: 13px; }
  .viewers-podium-count { font-size: 12px; }
  .viewers-row { grid-template-columns: 36px 38px 1fr; gap: 10px; }
  .viewers-avatar { width: 38px; height: 38px; }
  .viewers-messages { grid-column: 3; }

  .stream-widget {
    width: 150px;
    bottom: 16px;
    right: 16px;
  }
}

/* ── 7TV emote picker ── */
.emote-picker-wrapper {
  position: relative;
}

.emote-picker-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s;
  line-height: 1;
}

.emote-picker-btn:hover {
  background: var(--surface-3);
}

.emote-picker-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 100;
  padding: 10px;
  flex-direction: column;
  gap: 8px;
}

.emote-picker-popover.open {
  display: flex;
}

.emote-picker-search {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  box-sizing: border-box;
  outline: none;
}

.emote-picker-search:focus {
  border-color: var(--purple);
}

.emote-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.emote-picker-emote {
  height: 48px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px;
  transition: background 0.1s;
}

.emote-picker-emote:hover {
  background: var(--surface-2);
}

.inline-emote {
  height: 24px;
  width: auto;
  vertical-align: middle;
  display: inline;
}

/* ── Static pages (FAQ, Privacy) ── */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px;
}

.static-page-header {
  margin-bottom: 36px;
}

.static-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.static-page-subtitle {
  color: var(--muted);
  font-size: 15px;
}

/* Changelog */
.changelog-list { display: flex; flex-direction: column; gap: 18px; }
.changelog-entry { display: flex; gap: 20px; padding: 20px; border: 1px solid var(--surface-2); border-radius: 12px; background: var(--surface); }
.changelog-entry-date { flex: 0 0 auto; width: 110px; color: var(--kick); font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.changelog-entry-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.changelog-entry-description { margin: 0 0 10px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.changelog-entry-link { color: var(--gold); font-size: 14px; font-weight: 600; text-decoration: none; }
.changelog-entry-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .changelog-entry { flex-direction: column; gap: 8px; }
  .changelog-entry-date { width: auto; }
}

/* Changelog welcome-back modal */
.changelog-welcome-logo { width: 52px; height: 52px; }

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--surface-2);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}

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

.faq-question::before {
  content: "›";
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.2s;
  display: inline-block;
  width: 16px;
}

.faq-item[open] > .faq-question::before {
  transform: rotate(90deg);
}

.faq-question:hover {
  background: var(--surface);
}

.faq-answer {
  padding: 4px 20px 20px 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Privacy sections */
.privacy-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.privacy-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.privacy-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.privacy-section p:last-child { margin-bottom: 0; }

.privacy-section ul {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  padding-left: 20px;
}

/* Site footer */

.site-footer {
  text-align: center;
  padding: 24px;
  margin-top: 48px;
  border-top: 1px solid var(--surface-2);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 20px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--text); }

/* ── Raffles ── */
.raffle-card {
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.raffle-card-ended { opacity: 0.7; }
.raffle-card-ended:hover { transform: none; box-shadow: none; }

.raffle-card-upcoming { opacity: 0.9; cursor: default; }
.raffle-card-upcoming:hover { transform: none; box-shadow: none; }

.raffle-card-upcoming-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

.raffle-card-upcoming-label {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.raffle-card-upcoming-date {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* Full-bleed image area */
.raffle-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface-2) center/cover no-repeat;
  border-radius: 14px 14px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-shrink: 0;
  overflow: hidden;
}

.raffle-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.raffle-card-countdown {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 0 10px;
  letter-spacing: 0.03em;
}

.raffle-card-ended-badge {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 0 10px;
  letter-spacing: 0.03em;
}

/* Text area below image — the ticket stub proper */
.raffle-card-body {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 0 0 14px 14px;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.raffle-card-title { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--paper-ink); }
.raffle-card-desc { font-size: 12px; color: var(--paper-muted); line-height: 1.5; }

.raffle-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 2px dashed rgba(36,27,16,0.25);
  position: relative;
}
.raffle-card-footer::before, .raffle-card-footer::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  background: var(--bg);
  border-radius: 50%;
}
.raffle-card-footer::before { left: -16px; }
.raffle-card-footer::after { right: -16px; }

.raffle-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.raffle-card-participants { font-size: 12px; color: var(--paper-muted); }

.raffle-card-footer .btn,
.raffle-card-footer .btn-disabled,
.raffle-entered-btn { width: 100%; justify-content: center; }

.raffle-card-footer .btn-disabled { background: var(--paper-shadow); color: #8a7c60; }

.raffle-winner {
  font-size: 13px;
  color: #1a8f00;
  font-weight: 700;
  padding: 6px 10px;
  background: rgba(26,143,0,0.1);
  border-radius: 8px;
  border: 1px solid rgba(26,143,0,0.25);
}

/* Date presets */
.raffle-winner-row td { background: rgba(0, 178, 111, 0.05) !important; }

.date-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.date-preset {
  border: 1px solid var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 10px;
}

.date-preset:hover { border-color: var(--purple); color: var(--text); }
.date-preset.active { background: var(--purple); color: #fff; border-color: var(--purple); }

/* Generic confirm/result modal — used for raffle entries and reward redemptions */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 500;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open { opacity: 1; }

.modal {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 380px;
  width: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-backdrop.open .modal { transform: translateY(0); }

.modal-icon { font-size: 32px; line-height: 1; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-body { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.modal-body strong { color: var(--gold); font-family: var(--font-mono); }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.modal-actions .btn { flex: 1; }

@media (max-width: 768px) {
  .raffle-card-img { aspect-ratio: 16/9; }
  .raffle-card-placeholder { font-size: 34px; }
  .raffle-card-body { padding: 12px 14px 14px; gap: 8px; }
  .raffle-card-title { font-size: 13px; }
  .raffle-card-desc { font-size: 11.5px; }
}

/* Public home: the broadcast, a store admission ticket, and the community. */
.public-home-heading, .member-home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.home-kicker, .home-destination-kicker, .home-ticket-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.public-home-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 8px;
}
.public-home-heading h1 span { color: var(--gold); }
.home-broadcast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.home-player { min-width: 0; display: flex; flex-direction: column; }
.home-player-heading, .home-player-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
}
.home-player-heading h2 { font-size: 13px; margin: 0; }
.home-play-mark { color: var(--kick); margin-right: 7px; font-size: 10px; }
.home-text-link { color: var(--text-muted); text-decoration: none; font-size: 12px; }
.home-text-link:hover { color: var(--gold); }
.home-player-iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #0b0907; }
.home-player-caption { justify-content: flex-end; color: var(--text-muted); font-size: 11px; margin-top: auto; }
.home-welcome {
  border-left: 1px solid var(--surface-3);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.home-welcome-logo { width: 54px; height: 54px; object-fit: contain; margin-bottom: 18px; }
.home-welcome h2 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; letter-spacing: -.04em; }
.home-welcome h2 span { color: var(--gold); }
.home-welcome > p { color: var(--text-muted); font-size: 12px; line-height: 1.8; margin-bottom: 24px; }
.home-welcome-ticket {
  position: relative;
  width: 100%;
  margin-top: auto;
  border-top: 1px dashed var(--paper-muted);
  padding-top: 18px;
}
.home-welcome-ticket::before, .home-welcome-ticket::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
}
.home-welcome-ticket::before { left: -31px; }
.home-welcome-ticket::after { right: -31px; }
.home-ticket-label { font-size: 9px; }
.home-welcome-ticket .button_to { margin: 10px 0; }
.home-welcome-ticket .btn { width: 100%; padding: 12px 8px; }
.home-community { margin-top: 34px; }
.home-community-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.home-community-heading h2 { font-size: 16px; margin: 0; }
.home-community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-destination {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--surface-3);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
}
.home-destination:hover { border-color: var(--gold-dark); }
.home-destination-kicker { color: var(--gold); position: relative; }
.home-destination-copy { margin: 26px 0 22px; position: relative; }
.home-destination h3 { font-size: 18px; line-height: 1.3; margin-bottom: 8px; }
.home-destination p { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.home-destination-action { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; margin-top: auto; position: relative; }
.home-destination-action > span { color: var(--gold); font-size: 16px; }
.home-destination-gaming { background: linear-gradient(0deg, var(--surface) 5%, rgba(20,16,12,.76)), url("/videos/gaming-bg.jpg") center / cover; }
.home-destination-gaming p { color: var(--text); }
.home-destination-raffles { background: var(--paper); color: var(--paper-ink); border-color: var(--paper-shadow); }
.home-destination-raffles .home-destination-kicker, .home-destination-raffles p { color: var(--paper-muted); }
.home-destination-raffles .home-destination-action > span { color: var(--paper-ink); }
.home-destination-raffles::before, .home-destination-raffles::after { content: ''; position: absolute; bottom: 49px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); }
.home-destination-raffles::before { left: -10px; }
.home-destination-raffles::after { right: -10px; }
.home-destination-raffles .home-destination-action { border-top: 1px dashed var(--paper-shadow); padding-top: 13px; }
.home-points-guide { display: grid; grid-template-columns: 210px 1fr; gap: 24px; margin-top: 36px; border-top: 1px solid var(--surface-3); padding-top: 24px; }
.home-points-intro h2 { font-size: 17px; margin: 8px 0 12px; }
.home-points-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; counter-reset: points; }
.home-points-steps li { counter-increment: points; }
.home-points-steps li::before { content: counter(points); display: block; color: var(--gold); font-family: var(--font-mono); font-size: 12px; margin-bottom: 12px; }
.home-points-steps h3 { font-size: 12px; margin-bottom: 8px; }
.home-points-steps p { font-size: 11px; color: var(--text-muted); line-height: 1.8; }
.member-home-header h1 { font-size: 25px; margin-top: 8px; }
:is(.home-text-link, .home-destination, .public-home .btn, .topbar-toggle, .sidebar-link):focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
@media (max-width: 1100px) and (min-width: 769px) {
  .home-broadcast { grid-template-columns: 1fr; }
  .home-welcome { border-left: 0; border-top: 1px solid var(--surface-3); display: grid; grid-template-columns: 54px 1fr 220px; gap: 0 20px; align-items: center; }
  .home-welcome-logo { grid-row: span 2; margin: 0; }
  .home-welcome h2 { font-size: 20px; }
  .home-welcome > p { grid-column: 2; margin: 0; }
  .home-welcome-ticket { grid-column: 3; grid-row: 1 / span 2; border-top: 0; border-left: 1px dashed var(--paper-muted); padding: 0 0 0 20px; }
  .home-welcome-ticket::before, .home-welcome-ticket::after { display: none; }
  .home-points-guide { grid-template-columns: 1fr; }
  .home-destination { padding: 18px; }
}
@media (max-width: 768px) {
  .public-home-heading { margin-bottom: 20px; }
  .home-broadcast { grid-template-columns: 1fr; }
  .home-player-heading, .home-player-caption { padding: 14px 16px; }
  .home-welcome { border-left: 0; border-top: 1px solid var(--surface-3); padding: 22px; }
  .home-welcome-logo { display: none; }
  .home-welcome h2 { font-size: 24px; }
  .home-welcome > p { font-size: 13px; max-width: 450px; }
  .home-welcome-ticket .btn { width: auto; padding: 13px 22px; }
  .home-community-heading { align-items: flex-start; }
  .home-community-heading h2 { max-width: 220px; line-height: 1.5; }
  .home-community-heading .home-text-link { white-space: nowrap; padding-top: 4px; }
  .home-community-grid { grid-template-columns: 1fr; }
  .home-destination { min-height: 185px; }
  .home-destination-copy { margin: 20px 0; }
  .home-points-guide { grid-template-columns: 1fr; }
  .home-points-steps { grid-template-columns: 1fr; gap: 20px; }
  .home-points-steps li { position: relative; padding-left: 30px; }
  .home-points-steps li::before { position: absolute; left: 0; top: 0; }
}
@media (prefers-reduced-motion: reduce) { .home-destination { transition: none; } }
