:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #111111;
  --panel-2: #171717;
  --line: #292929;
  --text: #f5f2eb;
  --muted: #9f9b92;
  --accent: #e7dcc6;
  --accent-text: #11100e;
  --danger: #e98b8b;
  --success: #b9dfb2;
  --max: 1180px;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(218,194,152,.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.container { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.site-header {
  width: min(calc(100% - 36px), var(--max));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: inline-flex; align-items: center; gap: 12px; letter-spacing: .16em; font-weight: 700; font-size: 13px; }
.brand-mark { width: 34px; height: 34px; border: 1px solid #6f685c; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 18px; letter-spacing: 0; }
.brand-text { white-space: nowrap; }

.hero { padding: 96px 0 54px; max-width: 900px; margin-inline: auto; }
.eyebrow { margin: 0 0 14px; color: #b9ac95; font-size: 12px; font-weight: 800; letter-spacing: .22em; }
h1, h2, h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.025em; }
h1 { margin-bottom: 18px; font-size: clamp(48px, 8vw, 92px); line-height: .96; }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
h3 { font-size: 24px; }
.hero-copy { max-width: 650px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }
.muted { color: var(--muted); }

.event-section { padding: 18px 0 80px; }
.section-heading-row, .guest-heading-row { display:flex; justify-content:space-between; align-items:end; gap:16px; margin-bottom: 22px; }
.section-heading-row h2 { margin:0; font-size: 28px; }
.event-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:24px; }
.event-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow:hidden; display:flex; flex-direction:column; min-height:100%; transition: transform .2s ease, border-color .2s ease; }
.event-card:hover { transform: translateY(-3px); border-color:#48433a; }
.poster-shell { background:#0d0d0d; aspect-ratio: 4/5; display:grid; place-items:center; overflow:hidden; border-bottom:1px solid var(--line); }
.poster-shell img { width:100%; height:100%; object-fit:contain; display:block; }
.poster-placeholder { display:grid; place-items:center; width:100%; height:100%; color:#5e5a53; font-family:Georgia,serif; font-size:72px; }
.event-content { padding:22px; display:flex; flex-direction:column; gap:12px; flex:1; }
.event-date { color:#cbbda3; text-transform:uppercase; letter-spacing:.12em; font-size:12px; font-weight:700; }
.event-title { font-size:30px; line-height:1.05; margin:0; }
.event-location { margin:0; color:var(--muted); font-size:14px; }
.event-description { margin:0; color:#c8c4bb; font-size:14px; line-height:1.55; white-space:pre-wrap; }
.event-actions { margin-top:auto; padding-top:10px; }
.status-pill { display:inline-flex; align-items:center; min-height:30px; padding:0 10px; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:12px; }
.loading-card, .empty-state { grid-column:1/-1; padding:42px; border:1px dashed var(--line); border-radius:var(--radius); color:var(--muted); text-align:center; }

.button { appearance:none; border:1px solid transparent; border-radius:999px; min-height:48px; padding:0 20px; display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; font-weight:750; transition: opacity .18s ease, transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.button.primary { background:var(--accent); color:var(--accent-text); }
.button.secondary { background:#222; border-color:#363636; }
.button.ghost { background:transparent; border-color:#343434; }
.button.danger { background:transparent; border-color:#5b3030; color:var(--danger); }
.button.small { min-height:38px; padding:0 14px; font-size:13px; }
.button.full { width:100%; }

.site-footer { min-height:100px; border-top:1px solid rgba(255,255,255,.08); display:flex; justify-content:space-between; align-items:center; font-size:12px; letter-spacing:.08em; }

.dialog { width:min(92vw, 600px); max-height:90vh; padding:0; border:1px solid #343434; border-radius:26px; background:#101010; color:var(--text); overflow:auto; box-shadow:0 30px 80px rgba(0,0,0,.6); }
.dialog::backdrop { background:rgba(0,0,0,.78); backdrop-filter:blur(6px); }
.dialog-close { position:sticky; z-index:4; top:12px; float:right; margin:12px 12px -48px 0; width:38px; height:38px; border-radius:50%; border:1px solid #353535; background:rgba(10,10,10,.85); cursor:pointer; font-size:24px; line-height:1; }
.dialog-poster-wrap { background:#090909; border-bottom:1px solid var(--line); display:grid; place-items:center; max-height:48vh; overflow:hidden; }
.dialog-poster { width:100%; max-height:48vh; object-fit:contain; }
.dialog-body { padding:32px; clear:both; }
.dialog-meta { color:var(--muted); margin-top:-2px; margin-bottom:26px; }
.form-stack { display:grid; gap:18px; }
.form-stack.compact { max-width:440px; }
.field { display:grid; gap:8px; color:#d9d5cc; font-size:13px; font-weight:650; }
.field small { color:var(--muted); font-weight:400; }
.field input, .field textarea { width:100%; border:1px solid #333; background:#0b0b0b; color:var(--text); border-radius:14px; padding:14px 15px; outline:none; }
.field input { min-height:50px; }
.field textarea { resize:vertical; }
.field input:focus, .field textarea:focus { border-color:#7b715f; box-shadow:0 0 0 3px rgba(208,190,157,.08); }
.form-note { margin:0; color:#77736b; font-size:12px; line-height:1.5; }
.form-message { min-height:18px; margin:0; color:var(--danger); font-size:13px; }
.form-message.success { color:var(--success); }
.success-state { text-align:center; padding:10px 0 4px; }
.success-icon { width:64px; height:64px; margin:0 auto 20px; display:grid; place-items:center; border:1px solid #445a40; border-radius:50%; color:var(--success); font-size:28px; }

.organizer-main { padding:74px 0 100px; }
.auth-card { max-width:620px; margin:30px auto 0; padding:38px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); }
.auth-card h1, .dashboard-heading h1 { font-size:clamp(46px,7vw,72px); }
.dashboard-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:38px; }
.dashboard-heading h1 { margin-bottom:8px; }
.dashboard-heading p { margin-bottom:0; }
.setup-warning { margin-bottom:20px; border:1px solid #6a5331; background:#1c1710; color:#dfc59b; border-radius:16px; padding:16px 18px; line-height:1.5; }
.admin-event-list { display:grid; gap:14px; }
.admin-event { border:1px solid var(--line); border-radius:18px; background:var(--panel); padding:16px; display:grid; grid-template-columns:84px minmax(0,1fr) auto; gap:18px; align-items:center; }
.admin-thumb { width:84px; height:104px; border-radius:10px; background:#0a0a0a; border:1px solid #242424; object-fit:contain; }
.admin-thumb-placeholder { width:84px; height:104px; border-radius:10px; background:#0a0a0a; border:1px solid #242424; display:grid; place-items:center; color:#5e5a53; font-family:Georgia,serif; font-size:34px; }
.admin-event h3 { margin:0 0 7px; }
.admin-meta { display:flex; flex-wrap:wrap; gap:8px 14px; color:var(--muted); font-size:13px; }
.admin-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; max-width:330px; }
.state-dot { width:7px; height:7px; border-radius:50%; background:#6f6f6f; display:inline-block; margin-right:5px; }
.state-dot.live { background:#95c18d; }
.form-two-col { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.toggle-row { display:flex; gap:20px; flex-wrap:wrap; }
.inline-check { display:inline-flex; gap:9px; align-items:center; color:#c7c2b8; font-size:13px; cursor:pointer; }
.inline-check input { accent-color:#d8c6a8; }
.poster-preview-wrap { border:1px solid var(--line); border-radius:16px; padding:12px; display:grid; gap:12px; background:#0b0b0b; }
.poster-preview-wrap img { max-height:340px; margin:auto; object-fit:contain; border-radius:8px; }
.admin-dialog { width:min(94vw, 720px); }
.guests-dialog { width:min(94vw, 760px); }
.guests-list { display:grid; gap:1px; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.guest-row { display:grid; grid-template-columns:50px minmax(0,1fr) auto; gap:12px; align-items:center; padding:13px 15px; background:#131313; }
.guest-row + .guest-row { border-top:1px solid #242424; }
.guest-number { color:#6f6b64; font-variant-numeric:tabular-nums; }
.guest-time { color:var(--muted); font-size:12px; }

@media (max-width: 860px) {
  .event-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-event { grid-template-columns:72px minmax(0,1fr); }
  .admin-thumb, .admin-thumb-placeholder { width:72px; height:90px; }
  .admin-actions { grid-column:1/-1; justify-content:flex-start; }
}
@media (max-width: 620px) {
  .container, .site-header { width:min(calc(100% - 24px), var(--max)); }
  .site-header { height:72px; }
  .brand-text { font-size:11px; letter-spacing:.12em; }
  .hero { padding:66px 0 38px; }
  h1 { font-size:52px; }
  .event-grid { grid-template-columns:1fr; }
  .event-section { padding-top:6px; }
  .site-footer { flex-direction:column; justify-content:center; align-items:flex-start; gap:8px; }
  .dialog-body { padding:26px 20px 24px; }
  .form-two-col { grid-template-columns:1fr; }
  .dashboard-heading { align-items:flex-start; flex-direction:column; }
  .dashboard-heading .button { width:100%; }
  .auth-card { padding:28px 20px; }
  .admin-event { grid-template-columns:60px minmax(0,1fr); gap:12px; padding:12px; }
  .admin-thumb, .admin-thumb-placeholder { width:60px; height:76px; }
  .guest-row { grid-template-columns:34px minmax(0,1fr); }
  .guest-time { grid-column:2; }
}
