:root {
  --ink: #1f1d19;
  --muted: #756f66;
  --bg: #eee7dc;
  --paper: #f8f3eb;
  --paper-strong: #fffaf2;
  --line: #d8cdbc;
  --line-dark: rgba(255, 255, 255, 0.22);
  --ember: #c65125;
  --olive: #7e8358;
  --pine: #2f6f52;
  --wine: #82364a;
  --water: #4b7e9e;
  --glass: rgba(24, 23, 20, 0.42);
  --shadow: 0 28px 80px rgba(30, 24, 17, 0.2);
  --content-max: 1460px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(9, 9, 8, 0) 0 420px, var(--bg) 421px),
    var(--bg);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: 100%;
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  padding: 28px 64px 92px;
  color: #fffaf1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 72% 46%, rgba(255, 180, 76, 0.16), transparent 28rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.5)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75));
}

.topbar {
  position: relative;
  z-index: 2;
  width: min(var(--content-max), 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup,
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fffaf1;
  font-weight: 750;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.user-chip {
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 7px 12px 7px 7px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.avatar-face {
  --avatar-color: var(--olive);
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 241, 0.78);
  background:
    radial-gradient(circle at 35% 34%, #fffaf1 0 4px, transparent 5px),
    radial-gradient(circle at 65% 34%, #fffaf1 0 4px, transparent 5px),
    linear-gradient(145deg, color-mix(in srgb, var(--avatar-color), #fff 18%), var(--avatar-color));
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.16);
  flex: 0 0 auto;
}

.avatar-face::before,
.avatar-face::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--avatar-color);
}

.avatar-face::before {
  left: 7px;
}

.avatar-face::after {
  right: 7px;
}

.avatar-mouth {
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 13px;
  height: 5px;
  border-radius: 0 0 999px 999px;
  background: rgba(255, 250, 241, 0.82);
  transform: translateX(-50%);
}

.avatar-initials {
  display: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(var(--content-max), 100%);
  max-width: none;
  margin-inline: auto;
  padding-top: clamp(58px, 7vw, 88px);
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--ember);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 250, 241, 0.76);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  max-width: 18ch;
  font-size: clamp(3.9rem, 5.8vw, 5.65rem);
}

h2 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
}

h3 {
  font-size: 1.2rem;
}

.lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 250, 241, 0.86);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.48;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
}

.facts span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf1;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.hero-media,
.hero-picture,
.hero-video,
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  z-index: 0;
}

.hero-picture {
  z-index: 0;
  display: block;
}

.hero-video {
  z-index: 1;
  display: block;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

.hero-photo {
  display: block;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

.panel {
  position: relative;
  z-index: 3;
  width: min(var(--content-max), calc(100% - 128px));
  margin: -86px auto 64px;
}

.glass-summary {
  width: min(720px, 100%);
  margin-bottom: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 20px 22px;
  background: var(--glass);
  color: #fffaf1;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.glass-summary .section-label {
  color: rgba(255, 250, 241, 0.76);
}

.glass-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.glass-items div {
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 18px;
}

.glass-items div:first-child {
  border-left: 0;
  padding-left: 0;
}

.glass-items span,
.glass-items small {
  display: block;
  color: rgba(255, 250, 241, 0.64);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.glass-items strong {
  display: block;
  margin: 8px 0 3px;
  overflow-wrap: anywhere;
  color: #fffaf1;
  font-size: 1rem;
}

.portal-header {
  max-width: 830px;
  margin-bottom: 24px;
}

.portal-header p:not(.section-label),
.entry-card p,
.summary-card p:not(.section-label),
.side-panel p,
.state p {
  color: var(--muted);
  line-height: 1.58;
}

.entry-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.entry-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  margin-bottom: 18px;
}

.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: start;
}

.main-panel,
.side-panel {
  display: contents;
}

.entry-card,
.summary-card,
.program-card,
.payment-card,
.attendee-card,
.drink-chart-card,
.practical-card,
.wizard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.94);
  box-shadow: 0 18px 55px rgba(54, 43, 31, 0.08);
}

.entry-card,
.summary-card,
.program-card,
.payment-card,
.attendee-card,
.drink-chart-card,
.practical-card,
.wizard {
  padding: 22px;
}

.summary-card {
  grid-column: 1;
  grid-row: 1;
}

.attendee-card {
  grid-column: 2;
  grid-row: 1;
}

.program-card {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.practical-card {
  grid-column: 4;
  grid-row: 1;
}

.payment-card {
  grid-column: 1;
  grid-row: 2;
}

.drink-chart-card {
  grid-column: 2;
  grid-row: 2;
}

.dashboard-grid.is-editing .wizard {
  grid-column: 1 / span 2;
  grid-row: 2;
}

.dashboard-grid.is-editing .payment-card {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.dashboard-grid.is-editing .program-card {
  grid-column: 4;
  grid-row: 1 / span 2;
}

.dashboard-grid.is-editing .practical-card,
.dashboard-grid.is-editing .drink-chart-card {
  grid-row: auto;
}

.entry-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.entry-card.secondary {
  background: rgba(255, 250, 242, 0.76);
}

fieldset {
  border: 0;
  margin: 24px 0 0;
  padding: 0;
}

legend,
label {
  font-weight: 800;
}

legend {
  margin-bottom: 12px;
  font-size: 1.02rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf8;
  color: var(--ink);
  text-align: center;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.choice input:checked + span {
  border-color: var(--olive);
  box-shadow: inset 0 0 0 2px var(--olive);
}

.choice span:hover {
  transform: translateY(-1px);
}

.form-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
}

.microcopy {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.form-error {
  min-height: 24px;
  margin: 14px 0 0;
  color: #9b2f1e;
  font-weight: 800;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fffdf8;
  color: var(--ink);
}

button,
.state a,
.payment-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--ink);
  color: #fffaf1;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.state {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.94);
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(43, 42, 38, 0.14);
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.wizard {
  min-width: 0;
}

.wizard[hidden],
[hidden] {
  display: none !important;
}

.summary-card.is-complete {
  border-color: rgba(126, 131, 88, 0.45);
  background: rgba(249, 250, 241, 0.94);
}

.summary-card button {
  min-height: 42px;
}

.hint {
  margin: 0 0 6px;
  border: 1px solid rgba(216, 162, 59, 0.38);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 246, 223, 0.74);
  color: var(--muted);
  line-height: 1.55;
}

.price-line {
  margin: 8px 0 0;
  color: var(--ink) !important;
  font-size: 1.05rem;
  font-weight: 900;
}

.payment-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0 0;
  font-weight: 800;
  line-height: 1.45;
}

.payment-status::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  margin-top: 1px;
}

.payment-status.is-paid {
  color: var(--pine);
}

.payment-status.is-paid::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  background: var(--pine);
  color: #fffaf1;
  font-size: 0.86rem;
  line-height: 1;
}

.payment-status.is-pending {
  color: var(--muted);
}

.payment-status.is-pending::before {
  border: 2px solid rgba(126, 131, 88, 0.45);
  background: rgba(126, 131, 88, 0.12);
}

.payment-actions {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.payment-qr {
  width: min(190px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-link {
  background: var(--pine);
}

.attendee-list {
  display: grid;
  gap: 10px;
}

.attendee-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(216, 205, 188, 0.72);
  padding-top: 10px;
  font-weight: 800;
}

.attendee-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.attendee-row img {
  display: none;
}

.attendee-row .avatar-face {
  width: 42px;
  height: 42px;
  border-color: rgba(31, 29, 25, 0.1);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px 14px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 0 18px;
}

.timeline-row:last-child {
  padding-bottom: 0;
}

.timeline-row.is-highlighted {
  padding-bottom: 18px;
}

.timeline-marker {
  position: relative;
  width: 14px;
  min-height: 100%;
}

.timeline-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  bottom: -18px;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.timeline-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--olive);
  border-radius: 50%;
  background: var(--paper-strong);
  transform: translateX(-50%);
}

.timeline-row:last-child .timeline-marker::before {
  display: none;
}

.timeline-row time {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.timeline-row strong,
.timeline-copy span {
  display: block;
}

.timeline-copy span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.timeline-row.is-highlighted .timeline-copy {
  border-radius: 8px;
  margin: -10px -10px 0;
  padding: 10px;
  background: rgba(126, 131, 88, 0.12);
}

.info-list {
  display: grid;
  gap: 14px;
}

.info-list div {
  display: grid;
  gap: 4px;
}

.info-list span,
.muted {
  color: var(--muted);
}

.pie-wrap {
  display: grid;
  place-items: center;
  margin: 10px 0 22px;
  perspective: 700px;
}

.pie-chart {
  width: 190px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 8px solid #fffdf8;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  transform: rotateX(54deg);
  box-shadow:
    0 24px 0 #cdbb9f,
    0 36px 42px rgba(53, 38, 23, 0.18);
}

.chart-legend {
  display: grid;
  gap: 8px;
}

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.legend-row strong {
  color: var(--ink);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .panel {
    width: min(100% - 36px, 760px);
  }

  .entry-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .main-panel,
  .side-panel {
    display: contents;
  }

  .summary-card,
  .attendee-card,
  .program-card,
  .practical-card,
  .payment-card,
  .drink-chart-card,
  .wizard,
  .dashboard-grid.is-editing .wizard,
  .dashboard-grid.is-editing .payment-card,
  .dashboard-grid.is-editing .program-card {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 560px;
    padding: 20px 18px 108px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-lockup span:last-child {
    display: none;
  }

  .user-chip span {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-copy {
    padding-top: 80px;
  }

  h1 {
    max-width: 11.5ch;
    font-size: clamp(3.45rem, 14.5vw, 4.55rem);
  }

  .glass-summary {
    padding: 18px;
  }

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

  .glass-items div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 12px 0 0;
  }

  .glass-items div:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .panel {
    width: min(100% - 24px, 620px);
    margin-top: -96px;
  }

  .choice-grid,
  .choice-grid.two,
  .form-footer {
    grid-template-columns: 1fr;
  }

  .form-footer {
    display: grid;
  }

  button,
  .state a,
  .payment-link {
    width: 100%;
  }
}
