:root {
  --ink: #14111d;
  --muted: #716b7c;
  --paper: #f7f4ef;
  --card: #fff;
  --violet: #6d3ce7;
  --lime: #c9f75b;
  --line: #ded8e6;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; max-width: 1180px; margin: auto; padding: 0 24px; border-bottom: 1px solid var(--line); }
.brand { font-size: 22px; font-weight: 900; letter-spacing: -1px; }
.brand span { color: var(--violet); }
nav { display: flex; gap: 28px; font-weight: 650; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; min-height: 620px; max-width: 1180px; margin: auto; padding: 100px 24px; }
.eyebrow { color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
h1 { margin: 20px 0; font-size: clamp(48px, 7vw, 84px); line-height: .95; letter-spacing: -.055em; }
h1 em { color: var(--violet); font-style: normal; }
.lead { max-width: 580px; color: var(--muted); font-size: 21px; }
.actions { display: flex; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 20px; border: 0; border-radius: 10px; background: var(--violet); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.button:disabled { cursor: wait; opacity: .65; }
.button.secondary { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.button.wide { width: 100%; }
.event-card { padding: 32px; border-radius: 24px; background: var(--ink); color: #fff; box-shadow: 18px 18px 0 var(--lime); transform: rotate(1deg); }
.event-card h3 { margin: 24px 0 4px; font-size: 30px; }
.live, .status { display: inline-block; padding: 5px 9px; border-radius: 5px; background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.status.draft { background: #ece5f7; color: var(--violet); }
.roles { display: grid; gap: 8px; margin: 30px 0; }
.roles b { padding: 12px; border-radius: 8px; background: #272231; }
.bench { padding-top: 18px; border-top: 1px solid #40394e; color: var(--lime); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; padding: 70px max(24px, calc((100vw - 1132px)/2)); border-block: 1px solid var(--line); background: #fff; }
.features span { color: var(--violet); font-weight: 900; }
.features h2 { font-size: 24px; }
.features p { color: var(--muted); }
.panel { max-width: 1180px; margin: auto; padding: 64px 24px; }
.panel.narrow { max-width: 620px; padding-top: 130px; text-align: center; }
.panel.narrow h1, .panel h1 { font-size: 52px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.guild-card { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: transform .18s, box-shadow .18s; }
.guild-card:hover { transform: translateY(-2px); box-shadow: 0 14px 35px #2b173014; }
.guild-card > span { margin-left: auto; font-size: 24px; }
.guild-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: var(--lime); font-weight: 900; }
.guild-card h2 { margin: 0; font-size: 18px; }
.guild-card p { margin: 2px 0; color: var(--muted); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-head p { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 36px 0 52px; }
.stats article { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stats b, .stats span { display: block; }
.stats b { font-size: 26px; }
.stats span { color: var(--muted); }
.section-head h2 { margin-top: 4px; font-size: 30px; }
.event-list { display: grid; gap: 12px; }
.event-list > article, .event-list > a { display: grid; grid-template-columns: 60px 1fr auto; gap: 18px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.event-list > a:hover { border-color: var(--violet); box-shadow: 0 12px 28px #2b173014; }
.event-date { display: grid; place-items: center; padding: 8px; border-radius: 10px; background: var(--ink); color: #fff; }
.event-date b { font-size: 22px; line-height: 1; }
.event-date span { color: var(--lime); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.event-copy h3 { margin: 7px 0 0; }
.event-copy p { margin: 0; color: var(--muted); }
.empty { padding: 50px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.empty code { color: var(--violet); }
dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 32px 100px #24133655; }
dialog::backdrop { background: #18101fc4; backdrop-filter: blur(5px); }
dialog form { position: relative; padding: 34px; }
dialog h2 { margin: 4px 0 18px; font-size: 30px; }
.dialog-close { position: absolute; top: 18px; right: 20px; border: 0; background: transparent; color: var(--muted); font-size: 26px; cursor: pointer; }
label { display: grid; gap: 6px; margin: 14px 0; font-size: 13px; font-weight: 800; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid #6d3ce722; border-color: var(--violet); }
textarea { min-height: 88px; resize: vertical; }
.form-row, .role-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.role-row { grid-template-columns: repeat(3, 1fr); }
fieldset { margin: 14px 0; padding: 8px 14px 0; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.check { display: flex; align-items: center; }
.check input { width: auto; }
.form-error { min-height: 20px; color: #b42338; font-size: 13px; font-weight: 700; }
.notice { margin: 20px 0; padding: 14px 16px; border-radius: 10px; background: #ece5f7; }
.notice.error { background: #fee4e2; color: #912018; }
.notice a { text-decoration: underline; font-weight: 800; }
.onboarding > form { display: grid; gap: 16px; }
.setup-step { display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.setup-step > b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: var(--lime); font-size: 20px; }
.setup-step h2 { margin: 0; }
.setup-step p { margin: 4px 0 16px; color: var(--muted); }
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module { display: grid; grid-template-columns: auto 1fr; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.module input { width: auto; margin: 5px 10px 0 0; grid-row: 1 / 3; }
.module span, .muted { color: var(--muted); font-weight: 500; }
.button.danger { background: #b42318; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--violet); font-weight: 800; }
.event-summary { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin: 28px 0; }
.stats.event-stats { grid-template-columns: repeat(6, 1fr); }
.event-summary article, .preset-save { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.event-summary h2, .preset-save h2 { margin-top: 0; font-size: 18px; }
.role-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.role-pills span { padding: 6px 9px; border-radius: 7px; background: #ece5f7; color: var(--violet); font-size: 12px; font-weight: 800; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 50px; }
.participant-list { display: grid; gap: 9px; }
.participant-list > article { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(100px, 1fr)) auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.participant-list small { display: block; color: var(--muted); }
.participant-list details { position: relative; }
.participant-list details[open] { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); }
.participant-form, .attendance-form, #preset-form { display: flex; align-items: end; gap: 10px; }
.participant-form label, .attendance-form label { flex: 1; }
.preset-save { margin-top: 32px; }
.preset-save input { max-width: 360px; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .event-card { margin-right: 18px; }
  .features { grid-template-columns: 1fr; }
  .page-head { align-items: start; }
  .stats { grid-template-columns: 1fr; }
  .nav nav a:last-child { display: none; }
  .event-list > article, .event-list > a { grid-template-columns: 52px 1fr; }
  .event-list > article > b, .event-list > a > b { grid-column: 2; color: var(--muted); font-size: 13px; }
  .module-grid { grid-template-columns: 1fr; }
  .event-summary { grid-template-columns: 1fr; }
  .stats.event-stats { grid-template-columns: repeat(2, 1fr); }
  .participant-list > article { grid-template-columns: 1fr 1fr; }
  .participant-form, .attendance-form, #preset-form { display: grid; }
}
@media (max-width: 520px) {
  .page-head { display: block; }
  .page-head .button { margin-top: 12px; }
  .form-row, .role-row { grid-template-columns: 1fr; }
  dialog form { padding: 26px 20px; }
}
