:root {
  color-scheme: dark;
  --ink: #f8f2e5;
  --muted: #a99e89;
  --dim: #746b5d;
  --surface: rgba(34, 29, 20, .78);
  --surface-solid: #221d14;
  --line: rgba(246, 211, 101, .13);
  --gold: #f6d365;
  --gold-soft: #d0b156;
  --brown: #5e4a28;
  --dark: #100e0a;
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--dark); color: var(--ink); }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background:
  radial-gradient(circle at 70% -10%, rgba(246,211,101,.14), transparent 34rem),
  radial-gradient(circle at -5% 75%, rgba(94,74,40,.2), transparent 30rem), #100e0a; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .35; background-image: repeating-linear-gradient(115deg, transparent 0 8px, rgba(255,255,255,.009) 9px); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar { height: 82px; max-width: 1480px; padding: 0 42px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { position: relative; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; color: #211a0d; font: 800 21px Georgia, serif; background: linear-gradient(145deg, var(--gold), var(--brown)); box-shadow: 0 7px 24px rgba(246,211,101,.14); }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }.brand-mark.has-logo { background: transparent; box-shadow: none; }.brand-mark.has-logo .brand-fallback { display: none; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font: 650 17px Georgia, serif; letter-spacing: .02em; }
.brand small { color: var(--muted); margin-top: 4px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.account { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
select { color: var(--ink); background: #1d1912; border: 1px solid var(--line); border-radius: 9px; padding: 8px 30px 8px 10px; max-width: 220px; }
.quiet-link { color: var(--gold-soft); text-decoration: none; }

main { max-width: 1480px; margin: auto; padding: 54px 42px 72px; }
.welcome { min-height: calc(100vh - 210px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 790px; }
.eyebrow, .kicker { color: var(--gold-soft); text-transform: uppercase; letter-spacing: .22em; font-size: 10px; font-weight: 700; }
h1 { font: 500 clamp(42px, 5vw, 76px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; margin: 17px 0; }
h1 em { color: var(--gold); font-weight: 400; }
.welcome > p { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 590px; }
.discord-button { margin-top: 23px; display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 12px; color: #211a0d; background: var(--gold); text-decoration: none; font-weight: 750; box-shadow: 0 12px 45px rgba(246,211,101,.13); }
.discord-button:hover { background: #ffe18b; transform: translateY(-1px); }
.permission-note { font-size: 12px !important; color: var(--dim) !important; margin-top: 16px; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-hero { min-height: 470px; }
.home-giveaways { padding: 18px 0 30px; }
.home-section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.home-section-head h2 { font: 500 32px Georgia, serif; margin: 7px 0 0; }
.giveaway-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.giveaway-card { min-height: 170px; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(246,211,101,.055), rgba(94,74,40,.025)); transition: transform .15s ease, border-color .15s ease; }
.giveaway-card:hover { transform: translateY(-2px); border-color: rgba(246,211,101,.3); }
.giveaway-card-top { display: flex; justify-content: flex-end; }
.giveaway-card h3 { font: 500 22px Georgia, serif; margin: 22px 0 18px; }
.giveaway-card-meta { display: flex; justify-content: space-between; gap: 15px; margin-top: auto; color: var(--muted); font-size: 11px; }
.home-empty { grid-column: 1 / -1; padding: 34px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.public-giveaway { padding-top: 8px; }.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 12px; margin-bottom: 26px; }.back-link:hover { color: var(--gold); }
.public-card { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); min-height: 610px; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: linear-gradient(135deg, rgba(246,211,101,.05), rgba(34,29,20,.7) 42%, rgba(94,74,40,.1)); }
.public-copy { padding: clamp(30px, 5vw, 70px); }.public-heading-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; }.public-timing { color: var(--muted); font-size: 12px; }.public-copy h1 { max-width: 820px; margin: 15px 0 20px; }.public-copy > p { color: var(--muted); line-height: 1.65; max-width: 680px; }
.public-stats { display: flex; gap: 34px; margin: 35px 0; }.public-stat span { display: block; color: var(--dim); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }.public-stat strong { display: block; color: var(--gold); font: 500 27px Georgia, serif; margin-top: 6px; }
.entry-card { padding: 36px 30px; background: rgba(16,14,10,.68); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }.entry-card h2 { font: 500 30px Georgia, serif; margin: 9px 0 11px; }.entry-card > p { color: var(--muted); font-size: 13px; line-height: 1.6; }.entry-action { display: block; width: 100%; margin-top: 10px; text-align: center; text-decoration: none; }.entry-note { color: var(--dim) !important; font-size: 10px !important; margin-top: 18px; }.public-winners { margin-top: 25px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; color: var(--gold); }

.intro-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.intro-row h1 { font-size: clamp(38px, 4vw, 58px); margin: 12px 0 9px; }
.intro-row p { color: var(--muted); margin: 0; }
.intro-actions { display: flex; align-items: center; gap: 10px; }
.live-chip { display: flex; align-items: center; gap: 9px; color: var(--muted); border: 1px solid var(--line); background: rgba(246,211,101,.035); border-radius: 999px; padding: 9px 13px; font-size: 12px; white-space: nowrap; }
.live-chip i { width: 7px; height: 7px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 5px rgba(246,211,101,.08); }
.gold-button, .quiet-button, .danger-button { border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 12px; }
.gold-button { border: 1px solid var(--gold); color: #211a0d; background: var(--gold); }
.gold-button:hover { background: #ffe18b; }.gold-button:disabled { opacity: .55; cursor: wait; }
.quiet-button { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.danger-button { border: 1px solid rgba(210,106,82,.3); color: #e7a18e; background: rgba(210,106,82,.08); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { min-height: 125px; background: linear-gradient(145deg, rgba(246,211,101,.055), rgba(94,74,40,.025)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { font: 500 36px Georgia, serif; color: var(--gold); }
.tabs { margin: 36px 0 14px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.tab { color: var(--muted); background: none; border: 0; padding: 13px 3px; margin-right: 22px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--ink); border-color: var(--gold); }

.panel-layout { display: grid; grid-template-columns: minmax(470px, 1.1fr) minmax(370px, .9fr); gap: 14px; }
.panel { background: var(--surface); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; }
.panel-head h2 { font: 500 24px Georgia, serif; margin: 5px 0 0; }
.search { width: min(220px, 45%); display: flex; align-items: center; gap: 8px; background: #17140f; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; color: var(--dim); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 9px 0; font-size: 12px; }
.filters { display: flex; gap: 7px; padding: 0 24px 16px; }
.filter { border: 1px solid var(--line); color: var(--muted); background: transparent; border-radius: 999px; padding: 6px 11px; font-size: 10px; cursor: pointer; }
.filter.active { color: #211a0d; border-color: var(--gold); background: var(--gold); }
.giveaway-list { max-height: 610px; overflow-y: auto; border-top: 1px solid var(--line); }
.giveaway-row { width: 100%; color: inherit; border: 0; border-bottom: 1px solid rgba(246,211,101,.08); background: transparent; padding: 18px 24px; display: grid; grid-template-columns: 1fr auto; text-align: left; cursor: pointer; }
.giveaway-row:hover, .giveaway-row.selected { background: rgba(246,211,101,.055); }
.giveaway-row h3 { margin: 0 0 7px; font-size: 14px; }
.giveaway-meta { color: var(--dim); font-size: 11px; display: flex; gap: 13px; }
.status { justify-self: end; align-self: start; border-radius: 999px; padding: 5px 8px; color: var(--gold); background: rgba(246,211,101,.08); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.status.cancelled { color: #a9936d; }.status.ended { color: #cab377; }.status.paused { color: #d0b156; }
.detail-panel { min-height: 480px; padding: 25px; }
.empty-state { min-height: 430px; display: grid; place-content: center; text-align: center; color: var(--dim); }
.empty-state span { color: var(--gold); font-size: 24px; }.empty-state h2 { color: var(--ink); font: 500 24px Georgia, serif; margin: 13px 0 5px; }.empty-state p { margin: 0; }
.detail-top { display: flex; justify-content: space-between; gap: 15px; }.detail-top h2 { font: 500 29px Georgia, serif; margin: 8px 0; }.detail-top p { color: var(--muted); margin: 0; font-size: 12px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 23px 0; }.mini-stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }.mini-stat span { color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; display: block; }.mini-stat strong { display: block; margin-top: 7px; font: 500 20px Georgia, serif; color: var(--gold); }
.section-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .15em; margin: 22px 0 10px; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 2px; }.manage-actions button { padding: 8px 11px; }
.requirements { display: flex; flex-wrap: wrap; gap: 7px; }.requirement { color: #d8cdb8; background: rgba(246,211,101,.06); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 10px; }
.entrant-stack { max-height: 270px; overflow-y: auto; }.entrant { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(246,211,101,.06); }.entrant img, .person img { width: 31px; height: 31px; border-radius: 50%; background: var(--brown); }.entrant-info { min-width: 0; flex: 1; }.entrant strong, .person strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }.entrant small, .person small { color: var(--dim); font-size: 10px; }.winner { color: var(--gold); font-size: 10px; }
.audience-panel { min-height: 430px; }.table-wrap { overflow: auto; }table { width: 100%; border-collapse: collapse; }th, td { padding: 14px 24px; text-align: left; border-top: 1px solid rgba(246,211,101,.07); font-size: 12px; }th { color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }td { color: #d8cdb8; }.person { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.loading, .no-results { color: var(--dim); text-align: center; padding: 48px 20px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 0; color: var(--dim); font-size: 11px; }.pagination.compact { padding: 14px 18px; border-top: 1px solid var(--line); }.pagination.compact-detail { padding-top: 14px; }.pagination-controls { display: flex; align-items: center; gap: 5px; }.page-button { min-width: 32px; height: 32px; padding: 0 9px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 10px; }.page-button:hover:not(:disabled), .page-button.current { color: #211a0d; background: var(--gold); border-color: var(--gold); }.page-button:disabled { opacity: .35; cursor: default; }.page-gap { padding: 0 3px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; color: #211a0d; background: var(--gold); border-radius: 12px; padding: 13px 16px; box-shadow: 0 15px 50px #0008; font-size: 13px; }

dialog { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 36px); overflow-y: auto; color: var(--ink); background: #19160f; border: 1px solid rgba(246,211,101,.22); border-radius: 22px; padding: 0; box-shadow: 0 35px 110px #000c; }
dialog::backdrop { background: rgba(5,4,3,.78); backdrop-filter: blur(5px); }
#giveaway-form { padding: 26px; }.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }.dialog-head h2 { font: 500 31px Georgia, serif; margin: 7px 0 0; }.icon-button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }.span-2 { grid-column: span 2; }.field { display: grid; gap: 7px; }.field > span, .check-field span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }.field input, .field select { width: 100%; max-width: none; color: var(--ink); background: #100e0a; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; }.field input:focus, .field select:focus { border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(246,211,101,.07); }.field input::placeholder { color: #5f574b; }.form-section { margin: 25px 0 13px; padding-top: 20px; border-top: 1px solid var(--line); }.form-section p { color: var(--dim); font-size: 11px; margin: 6px 0 0; }.check-field { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 40px; }.check-field input { accent-color: var(--gold); }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; }

@media (max-width: 900px) {
  .topbar { padding: 0 20px; }.account-name { display: none; }main { padding: 40px 20px 60px; }.stats { grid-template-columns: repeat(2, 1fr); }.panel-layout { grid-template-columns: 1fr; }.detail-panel { min-height: 360px; }.giveaway-list { max-height: 460px; }.intro-actions { align-items: flex-start; }.public-card { grid-template-columns: 1fr; }.entry-card { border-left: 0; border-top: 1px solid var(--line); }.public-heading-row { margin-bottom: 30px; }.giveaway-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .topbar { height: auto; min-height: 76px; align-items: flex-start; padding-top: 17px; padding-bottom: 14px; }.account { align-items: flex-end; gap: 9px; }.account > span { display: none; }select { max-width: 145px; }.quiet-link { font-size: 11px; }.intro-row { align-items: flex-start; flex-direction: column; }.intro-actions { width: 100%; justify-content: space-between; }.stats { gap: 8px; }.stat { min-height: 100px; padding: 15px; }.stat strong { font-size: 29px; }.panel-head { align-items: flex-start; padding: 19px 17px 14px; }.search { width: 47%; }.filters { padding-left: 17px; }.giveaway-row { padding: 16px 17px; }.detail-panel { padding: 18px; }.mini-stats { grid-template-columns: repeat(3, 1fr); }.mini-stat { padding: 9px; }th, td { padding: 12px 17px; }.welcome { min-height: calc(100vh - 150px); }.form-grid { grid-template-columns: 1fr; }.span-2 { grid-column: span 1; }#giveaway-form { padding: 21px 17px; }.public-copy { padding: 25px 20px 35px; }.entry-card { padding: 30px 20px; }.public-stats { gap: 19px; }.public-heading-row { align-items: flex-start; gap: 14px; }.public-timing { text-align: right; }
}
@media (max-width: 520px) { .giveaway-grid { grid-template-columns: 1fr; }.home-hero { min-height: 410px; } }
@media (max-width: 520px) { .pagination { align-items: flex-start; flex-direction: column; }.pagination-controls { width: 100%; flex-wrap: wrap; }.page-button:first-child, .page-button:last-child { flex: 1; } }
