/* Rabbit Gaming colors on a plain, flat layout. Change the variables below to rebrand. */
:root {
  --bg: #07070f;
  --panel: #0c0c1a;
  --panel-2: #11111f;
  --panel-3: #181829;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --ink: #ededf5;
  --muted: #8080a0;
  --faint: #4a4a62;
  --violet: #7c3aed;
  --violet-hover: #8b5cf6;
  --lavender: #c4b5fd;
  --lavender-2: #a78bfa;
  --indigo: #818cf8;
  --tint: rgba(167, 139, 250, 0.1);
  --tint-line: rgba(167, 139, 250, 0.3);
  --green: #34d399;
  --green-btn: #059669;
  --green-soft: rgba(52, 211, 153, 0.1);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.1);
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.1);
  --prize: #f6c453;
  --discord: #5865f2;
  --f-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 10px;
  --max: 1140px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--lavender); }
img { max-width: 100%; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.logo img { height: 40px; width: auto; }
.logo .logo-tag { font: 500 14px/1 var(--f-body); color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-2); }
.players { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 6px; font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); white-space: nowrap; }
.players strong { color: var(--green); font-weight: 600; }
.players svg { width: 13px; height: 13px; color: var(--green); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font: 500 15px/1 var(--f-body); color: var(--muted); padding: 10px 16px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--lavender); background: var(--tint); }
.pill { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 6px; background: var(--violet); color: #fff; font: 600 11px/1 var(--f-body); }
.pill.grey { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); width: 190px; }
.search input[type=search] { background: none; border: 0; outline: 0; width: 100%; min-width: 0; height: auto; padding: 0; font-size: 13px; color: var(--ink); box-shadow: none; }
.search:focus-within { border-color: var(--tint-line); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.who { display: flex; align-items: center; gap: 8px; position: relative; }
.who-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); cursor: pointer; max-width: 200px; }
.who-btn:hover { border-color: var(--line-2); }
.who-btn img { width: 30px; height: 30px; border-radius: 50%; }
.who-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 14px; }
.menu-btn { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 38px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); cursor: pointer; }
.menu-btn span { height: 2px; background: var(--ink); border-radius: 2px; }
.dropdown { position: absolute; z-index: 30; right: 0; top: calc(100% + 8px); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; min-width: 210px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; }
.dropdown a, .dropdown button { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 9px; text-decoration: none; cursor: pointer; font-size: 14px; color: var(--ink); }
.dropdown a:hover, .dropdown button:hover { background: var(--tint); color: var(--lavender); }


@media (max-width: 900px) {
  .menu-btn { display: flex; order: 3; }
  .top-inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .top-right { margin-left: auto; }
  .nav { display: none; order: 10; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 0 4px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 16px; }
  .players { display: none !important; }
  .icon-btn#link-x, .icon-btn#link-discord { display: none; }
  .logo .logo-tag { display: none; }
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 24px; padding-block: 36px 72px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; padding-block: 24px 56px; } }
#view { display: flex; flex-direction: column; gap: 24px; }
.foot { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 24px; }
.banner { margin: 0; padding: 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-width: 0; }
@media (max-width: 600px) { .card { padding: 20px; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; margin: 0; line-height: 1.08; color: #fff; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
.grad, .red { color: inherit; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.lede { color: var(--muted); max-width: 62ch; margin: 10px 0 0; font-size: 15px; line-height: 1.6; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 12.5px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- Buttons and inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--f-body); height: 42px; padding: 0 20px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; text-decoration: none; background: var(--violet); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--violet-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.85); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.3); }
.btn-discord { background: var(--discord); }
.btn-discord:hover { background: #4752c4; }
.btn-gold { background: var(--green-btn); color: #fff; }
.btn-gold:hover { background: #10b981; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-link { background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; }
.btn-link:hover { color: var(--ink); }
.btn-link.danger:hover { color: var(--red); }
.btn svg { width: 15px; height: 15px; }

input[type=text], input[type=search], input[type=number], input[type=url], input[type=datetime-local], select, textarea, .input {
  width: 100%; min-width: 0; height: 44px; padding: 0 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); color: var(--ink); font-size: 14px; outline: 0;
}
select option { background: var(--panel-2); }
textarea { height: auto; padding: 12px 16px; resize: vertical; min-height: 76px; }
input:focus, select:focus, textarea:focus { border-color: var(--lavender-2); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=datetime-local] { color-scheme: dark; }
label, .label { display: block; font-size: 13px; font-weight: 600; color: #c8c8dc; margin-bottom: 8px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.inline { display: flex; gap: 8px; }
.inline > input { flex: 1; }
@media (max-width: 520px) { .inline { flex-wrap: wrap; } .inline > .btn { width: 100%; } }

/* ---------- Status messages ---------- */
.msg { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.msg ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.msg.err { background: var(--red-soft); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.25); }
.msg.ok { background: var(--green-soft); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.25); }
.msg.wait { background: rgba(255, 255, 255, 0.03); color: var(--muted); border: 1px solid var(--line); align-items: center; }
.msg strong { color: inherit; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--lavender-2); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.results { display: flex; flex-direction: column; gap: 8px; }
.result-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); font-size: 13.5px; }
.result-row .tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; }
.result-row.yes .tick { background: var(--green); color: #022c22; }
.result-row.no .tick { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.result-row ul { margin: 4px 0 0; padding-left: 16px; color: var(--muted); }

/* ---------- Raffles page ---------- */
/* Quick entry: one slim bar across the page. */
.quick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px 24px; align-items: center; padding: 16px 16px 16px 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); }
.quick-text { display: flex; align-items: center; gap: 14px; min-width: 0; }
.quick-text h3 { font-size: 1.05rem; margin-bottom: 2px; }
.quick-note { grid-column: 1 / -1; }
.quick-note:empty { display: none; }
@media (max-width: 760px) { .quick { grid-template-columns: 1fr; padding: 16px; } }

/* Underlined tabs with the Stake site switch on the right. */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: -4px; }
.tabs-line { display: flex; gap: 6px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 6px; margin-right: 14px; text-decoration: none; color: var(--muted); font: 600 15px/1 var(--f-display); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: #fff; border-bottom-color: var(--lavender-2); }
.list-head .seg { margin-bottom: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); }
.seg button { height: 32px; padding: 0 14px; border-radius: 6px; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 13.5px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--tint); color: var(--lavender); }

/* Header: Rabbit Gaming's own forest artwork, darkened on the left so the text reads. */
.banner-head { position: relative; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; padding: 44px 40px; min-height: 250px; display: flex; align-items: flex-end;
  background: linear-gradient(90deg, rgba(7, 7, 15, 0.96) 0%, rgba(7, 7, 15, 0.86) 38%, rgba(7, 7, 15, 0.25) 75%, rgba(7, 7, 15, 0.1) 100%), url("/banner.jpg") center 60% / cover no-repeat, var(--panel); }
.bh-text { max-width: 560px; }
.bh-text h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.bh-text .lede { color: #b9b9cf; }
.totals { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; }
.totals strong { color: #fff; font: 700 1.15rem/1 var(--f-display); margin-right: 2px; }
.money { color: var(--prize) !important; }
@media (max-width: 600px) {
  .banner-head { padding: 28px 20px; min-height: 0;
    background: linear-gradient(180deg, rgba(7, 7, 15, 0.55) 0%, rgba(7, 7, 15, 0.95) 70%), url("/banner.jpg") center 40% / cover no-repeat, var(--panel); }
}

/* Recent winners: one scrolling row. */
.recent h3 { font-size: 1rem; margin-bottom: 10px; }
.recent-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rw { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.rw img { width: 30px; height: 30px; border-radius: 50%; }
.rw > div { display: flex; flex-direction: column; line-height: 1.25; }
.rw strong { font-size: 13.5px; }
.rw .money { font: 700 15px/1 var(--f-display); margin-left: 6px; }

/* ---------- Raffle tickets ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.tile:hover { border-color: var(--line-2); }
.tile.featured { border-color: var(--tint-line); }
.t-state { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--green); background: rgba(7, 7, 15, 0.85); border: 1px solid rgba(52, 211, 153, 0.35); }
.t-state .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-state.wait { color: var(--gold); border-color: rgba(251, 191, 36, 0.35); }
.t-state.done { color: #c8c8dc; border-color: var(--line-2); }
.t-in { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff; background: var(--violet); }
.t-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.t-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.t-body .eyebrow { margin: 0; }
.t-body h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.t-prize { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.t-prize strong { font: 700 1.75rem/1 var(--f-display); }
.t-prize span { color: var(--muted); font-size: 13px; }
.reqs { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; }
.reqs li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.reqs span { color: var(--muted); }
.reqs strong { font-weight: 600; text-align: right; color: #e2e2ee; }
.r-desc { margin: 0; color: #a5a5c0; font-size: 13.5px; }

/* Perforation: a dashed tear line with a notch cut into each side of the ticket. */
.perf { position: relative; height: 0; margin: 0 14px; border-top: 2px dashed var(--line-2); }
.perf::before, .perf::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.perf::before { left: -25px; }
.perf::after { right: -25px; }
.t-stub { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 255, 255, 0.015); }
.t-time-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.t-time-row strong { font-size: 13.5px; color: #fff; }
.boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.boxes span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font: 700 21px/1 var(--f-display); font-variant-numeric: tabular-nums; color: #fff; }
.boxes small { font: 500 11px/1 var(--f-body); color: var(--muted); }
.boxes.soon span { color: var(--gold); border-color: rgba(251, 191, 36, 0.3); }
.boxes.urgent span { color: var(--red); border-color: rgba(248, 113, 113, 0.4); }
.t-winners { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: win; }
.t-winners li { counter-increment: win; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); font-size: 13.5px; }
.t-winners li::before { content: counter(win) "."; width: 18px; color: var(--muted); font-size: 13px; }
.t-winners img { width: 26px; height: 26px; border-radius: 50%; }
.t-winners .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-foot { padding: 11px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-btn { background: none; border: 0; padding: 4px 0; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--lavender); }
.sub-btn:hover { color: #fff; text-decoration: underline; }
.fair-btn { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 4px; }
.fair-btn:hover { color: var(--ink); text-decoration: underline; }


/* Covers (also used in the admin panel). */
.cover { width: 112px; aspect-ratio: 3 / 4; border-radius: 14px; object-fit: cover; background: var(--panel-3); display: block; }
/* Games without a cover show their name over a darkened slice of the forest artwork. */
.cover.ph { display: grid; place-items: center; text-align: center; padding: 10px; font: 700 16px/1.1 var(--f-display); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  background: linear-gradient(rgba(24, 12, 56, 0.55), rgba(10, 8, 24, 0.8)), url("/banner.jpg") 30% 70% / cover, #2e1065; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, 0.05); color: #c8c8dc; border: 1px solid var(--line); white-space: nowrap; }
.chip.gold { color: var(--lavender); border-color: var(--tint-line); background: var(--tint); }
.chip.green { color: var(--green); border-color: rgba(52, 211, 153, 0.3); background: var(--green-soft); }
.chip.red { color: var(--red); border-color: rgba(248, 113, 113, 0.3); background: var(--red-soft); }
.chip svg { width: 12px; height: 12px; }
.winner { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); font-size: 14px; }
.winner img { width: 28px; height: 28px; border-radius: 50%; }
.winner .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.winners { display: flex; flex-direction: column; gap: 6px; }
.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty h3 { margin-bottom: 8px; }
.skeleton { height: 520px; border-radius: var(--radius); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Modal ---------- */
.modal { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); }
.modal::backdrop { background: rgba(4, 4, 10, 0.8); }
.modal[open] { display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.3rem; }
.modal-body { padding: 22px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--panel-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.person { display: flex; align-items: center; gap: 8px; }
.person img { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-3); }
tr.win td { background: rgba(167, 139, 250, 0.07); }
tr.dq td { opacity: 0.45; text-decoration: line-through; }
tr.dq td:last-child { text-decoration: none; opacity: 1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--f-mono); font-size: 12px; overflow-wrap: anywhere; white-space: pre-line; color: #c8c8dc; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; color: #b4b4cc; font-size: 14px; }

/* ---------- Account ---------- */
.profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile .avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--panel-3); }
.profile-text { flex: 1; min-width: 0; }
.profile-text h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); overflow-wrap: anywhere; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.verified { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--green-soft); border: 1px solid rgba(52, 211, 153, 0.25); }
.check { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #022c22; font-weight: 800; font-size: 18px; flex: none; }
.verified-name { margin: 0; font: 700 1.3rem/1.1 var(--f-display); overflow-wrap: anywhere; }
.code-wrap { display: grid; grid-template-columns: minmax(180px, 220px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 560px) { .code-wrap { grid-template-columns: 1fr; } }
.code-box { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 16px; background: var(--tint); border: 1px solid var(--tint-line); }
.code { font: 700 2.4rem/1.05 var(--f-mono); color: #fff; }
.tip { margin: 0; font-size: 13px; color: var(--muted); border-left: 2px solid var(--tint-line); padding-left: 12px; }
.offline { font-size: 12.5px; color: var(--red); display: inline-flex; gap: 6px; align-items: center; }
.offline::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.online { font-size: 12.5px; color: var(--green); display: inline-flex; gap: 6px; align-items: center; }
.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.confirm { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; gap: 10px; }
.confirm p { margin: 0; }
.row-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.login-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding: 32px; }
@media (max-width: 760px) { .login-hero { grid-template-columns: 1fr; padding: 24px; } }
.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; color: #c8c8dc; }
.how strong { color: #fff; }

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); flex-wrap: wrap; }
.tabs button { height: 36px; padding: 0 16px; border-radius: 6px; border: 0; background: none; color: var(--muted); font-weight: 500; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { background: var(--tint); color: var(--lavender); }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.admin-row .thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--panel-3); }
.admin-row .thumb.ph { display: grid; place-items: center; font: 700 11px/1.1 var(--f-display); text-align: center; padding: 4px; background: #2e1065; }
.admin-row h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.admin-row .meta { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.admin-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 760px) { .admin-row { grid-template-columns: 48px 1fr; } .admin-row .thumb { width: 48px; height: 48px; } .admin-row .actions { grid-column: 1 / -1; justify-content: flex-start; } }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: #c8c8dc; cursor: pointer; margin: 0; }
.check-row input { width: 17px; height: 17px; accent-color: var(--violet); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.img-pick { display: flex; gap: 14px; align-items: center; }
.img-pick img, .img-pick .cover.ph { width: 72px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; }
.img-pick .grow { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.game-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.game-tile .cover { width: 100%; }
.game-tile .cover.ph { font-size: 20px; }
.game-tile strong { font-size: 14px; overflow-wrap: anywhere; }
.game-tile .slug { font: 500 11px/1.3 var(--f-mono); color: var(--muted); overflow-wrap: anywhere; }
.game-tile .row-actions { gap: 10px; margin-top: auto; }

/* Small utilities (the security policy blocks inline style attributes). */
.row-actions.spread { justify-content: space-between; }
.stack.tight { gap: 7px; }
.hint.flush { margin: 0; }
.pad-top { margin-top: 12px; }
.mb { margin-bottom: 14px; }
.w-search { width: min(320px, 100%); }
.gap-r { margin-right: 4px; }


.tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }

/* ---------- Tidy-up ---------- */
/* Search sits with the tabs, on the right. */
.list-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.list-tools .seg { margin: 0; }
.list-tools .search { width: 220px; height: 36px; }
@media (max-width: 600px) { .list-head { padding-bottom: 4px; } .list-tools { width: 100%; } .list-tools .search { flex: 1; width: auto; } }

/* Requirements: two small stat boxes, then one line of dates. */
.t-window { margin: 0; font-size: 12.5px; color: var(--muted); }

/* Smaller countdown boxes. */
.boxes span { padding: 7px 4px; font-size: 17px; gap: 2px; }
.boxes small { font-size: 10.5px; }

/* Account: the profile is a plain header row. */
.profile { padding: 4px 0 4px; }
.profile .avatar { width: 64px; height: 64px; }


/* ---------- Raffle cards: two per row ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 18px; }
.t-head { display: grid; grid-template-columns: 124px 1fr; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
/* The cover keeps its own 3:4 shape, so nothing is cut off. */
.t-cover .cover { width: 124px; aspect-ratio: 3 / 4; height: auto; border-radius: 8px; object-fit: cover; }
.t-cover .cover.ph { font-size: 15px; }
.t-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t-badges { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.t-badges .t-state, .t-badges .t-in { position: static; }
.t-feat { padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--prize); border: 1px solid rgba(246, 196, 83, 0.35); }
.t-info .eyebrow { margin: 0; }
.t-info h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.t-info .t-prize strong { font-size: 1.4rem; }
.t-time { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.t-body { padding: 14px 16px; gap: 10px; }
.t-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.t-stats div { padding: 10px 6px; text-align: center; min-width: 0; }
.t-stats div + div { border-left: 1px solid var(--line); }
.t-stats strong { display: block; font: 700 16px/1.2 var(--f-display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-stats span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.t-window { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-window svg { width: 14px; height: 14px; color: var(--lavender-2); }
.t-stub { padding: 14px 16px; gap: 8px; }
.t-stub .label { margin: 0; font-size: 12.5px; }
.t-foot { padding: 11px 16px; }
.tile.featured { border-color: rgba(246, 196, 83, 0.35); }
@media (max-width: 480px) {
  .t-head { grid-template-columns: 92px 1fr; gap: 12px; padding: 14px; }
  .t-cover .cover { width: 92px; }
  .t-stats { grid-template-columns: repeat(2, 1fr); }
  .t-stats div:nth-child(3) { border-left: 0; }
  .t-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .boxes span { font-size: 15px; padding: 6px 2px; }
}

/* Featured raffles span the full row: cover, title and countdown on the left;
   the numbers and the entry form on the right. */
.tile.featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
.tile.featured .t-head { grid-column: 1; grid-row: 1 / span 3; grid-template-columns: 172px 1fr; gap: 20px; padding: 20px; border-bottom: 0; border-right: 1px solid var(--line); }
.tile.featured .t-cover .cover { width: 172px; }
.tile.featured .t-info h3 { font-size: 1.45rem; }
.tile.featured .t-info .t-prize strong { font-size: 2rem; }
.tile.featured .t-body { grid-column: 2; grid-row: 1; padding: 20px 20px 14px; }
.tile.featured .perf { grid-column: 2; grid-row: 2; }
.tile.featured .perf::before { display: none; } /* would sit on the divider between the halves */
.tile.featured .t-stub { grid-column: 2; grid-row: 3; padding-inline: 20px; }
.tile.featured .t-foot { grid-column: 1 / -1; grid-row: 4; padding-inline: 20px; }
@media (max-width: 860px) {
  .tile.featured { display: flex; }
  .tile.featured .t-head { grid-template-columns: 124px 1fr; gap: 16px; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tile.featured .t-cover .cover { width: 124px; }
  .tile.featured .t-info h3 { font-size: 1.15rem; }
  .tile.featured .t-info .t-prize strong { font-size: 1.4rem; }
  .tile.featured .t-body, .tile.featured .t-stub, .tile.featured .t-foot { padding-inline: 16px; }
  .tile.featured .perf::before { display: block; }
}
@media (max-width: 480px) {
  .tile.featured .t-head { grid-template-columns: 92px 1fr; gap: 12px; padding: 14px; }
  .tile.featured .t-cover .cover { width: 92px; }
}

/* Ghost Mode warning: amber, impossible to miss, with the exact steps. */
.ghost-warn { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 18px 20px; border-radius: var(--radius);
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.45); border-left-width: 4px; }
.gw-mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1b1405; font: 700 20px/1 var(--f-display); }
.gw-text h2 { font-size: 1.2rem; color: var(--gold); }
.gw-text p { margin: 6px 0 0; color: #e8dcc0; font-size: 14px; max-width: 70ch; }
.gw-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: gw; }
.gw-steps li { counter-increment: gw; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; background: rgba(7, 7, 15, 0.6); border: 1px solid rgba(251, 191, 36, 0.3); font-size: 13.5px; color: #fff; }
.gw-steps li::before { content: counter(gw); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 191, 36, 0.2); color: var(--gold); font: 700 12px/1 var(--f-display); }
@media (max-width: 520px) { .ghost-warn { grid-template-columns: 1fr; gap: 10px; padding: 16px; } .gw-steps { flex-direction: column; } }

/* In place of the entry form once a player has used all their entries. */
.entered-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--green-soft); border: 1px solid rgba(52, 211, 153, 0.3); }
.en-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--green); color: #022c22; font-weight: 800; font-size: 14px; }
.entered-note strong { color: #fff; font-size: 14.5px; }
.entered-note p { margin: 2px 0 0; color: #a7d8c3; font-size: 13px; }
