:root {
  color-scheme: light;
  --ink: #111317;
  --muted: #606875;
  --line: #d8dde6;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --accent: #0b6bcb;
  --accent-dark: #074b8f;
  --danger: #b42318;
  --ok: #087443;
  --shadow: 0 18px 45px rgba(20, 28, 38, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: #edf1f7;
  color: var(--ink);
}

button.secondary:hover {
  background: #e0e6ef;
}

button.danger {
  background: #fee4e2;
  color: var(--danger);
}

a {
  color: var(--accent);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand h1,
.event-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.event-list {
  display: grid;
  gap: 8px;
}

.event-list button {
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  padding: 10px;
  height: auto;
}

.event-list button.active,
.event-list button:hover {
  background: #eef6ff;
  border-color: #c8e1ff;
}

.event-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.content {
  padding: 28px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #333a45;
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 11px;
  min-height: 40px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.invite-row:first-of-type {
  border-top: 0;
}

.invite-meta {
  min-width: 0;
}

.invite-meta strong,
.invite-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-meta span {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  color: var(--muted);
  font-size: 14px;
}

.error {
  color: var(--danger);
}

.success {
  color: var(--ok);
}

.guest {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  background: #101419;
  color: white;
}

.cover {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(10, 13, 18, 0.2), rgba(10, 13, 18, 0.72)),
    var(--cover, linear-gradient(135deg, #215c83, #1f7f5f));
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: end;
  padding: 40px;
}

.guest-info {
  max-width: 680px;
}

.guest-info h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.96;
}

.guest-info p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.5;
}

.guest-panel {
  background: #ffffff;
  color: var(--ink);
  padding: 42px;
  display: flex;
  align-items: center;
}

.guest-panel-inner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.details {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}

.details div {
  display: grid;
  gap: 2px;
}

.details dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.details dd {
  margin: 0;
  font-weight: 650;
}

.rsvp-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rsvp-options button {
  background: #edf1f7;
  color: var(--ink);
}

.rsvp-options button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.rsvp-options button.selected {
  background: var(--accent);
  color: white;
}

.rsvp-options button.selected:disabled {
  opacity: 0.72;
}

.attendees {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.attendees h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.attendee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
}

.attendee strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendee span {
  color: var(--muted);
  font-size: 13px;
}

.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.setup {
  width: min(720px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .shell,
  .guest,
  .grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cover {
    min-height: 46vh;
    padding: 28px;
  }

  .guest-panel {
    padding: 28px;
  }

  .row,
  .rsvp-options {
    grid-template-columns: 1fr;
  }
}
