:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #75655d;
  --line: #e2d2c8;
  --field: #fff9f5;
  --accent: #b65f42;
  --accent-dark: #8e412d;
  --surface: #ffffff;
  --page: #f6eee8;
  --warning: #8f3f1f;
  --success: #7d4a24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.wide-shell {
  width: min(1440px, calc(100% - 32px));
}

.intro {
  position: relative;
  min-height: 230px;
  display: flex;
  align-items: end;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(79, 41, 27, 0.86), rgba(154, 79, 50, 0.36)),
    url("https://images.unsplash.com/photo-1555990538-c48e0d2a56d0?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.language-slot {
  position: absolute;
  top: 18px;
  right: 18px;
}

.language-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.language-select select {
  width: auto;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 249, 245, 0.94);
  color: var(--ink);
  font-weight: 750;
}

.intro h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p {
  max-width: 600px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 800;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.panel > h2 {
  margin-bottom: 18px;
}

.section-head,
.guest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head {
  margin-bottom: 18px;
}

.guest-list {
  display: grid;
  gap: 16px;
}

.guest-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  background: #fbfdfc;
}

.guest-head {
  margin-bottom: 16px;
}

.guest-head h3 {
  margin: 0;
  font-size: 1rem;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(182, 95, 66, 0.2);
  border-color: var(--accent);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.submit,
.secondary,
.remove-guest {
  justify-self: start;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.submit {
  background: var(--accent);
  color: white;
  min-height: 48px;
  padding: 0 22px;
}

.secondary,
.remove-guest {
  min-height: 40px;
  padding: 0 14px;
}

.secondary {
  background: #f1ded2;
  color: var(--accent-dark);
}

.remove-guest {
  background: #f6e6df;
  color: var(--warning);
}

.remove-row {
  border: 0;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 10px;
  background: #f6e6df;
  color: var(--warning);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.roster-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.roster-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.roster-table th,
.roster-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.roster-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6e8df;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.roster-table tr:last-child td {
  border-bottom: 0;
}

.roster-table input,
.roster-table select {
  min-height: 40px;
  padding: 8px 9px;
}

.roster-table th:first-child,
.roster-table td:first-child {
  width: 42px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.secondary:hover {
  background: #e8caba;
}

.remove-guest:hover {
  background: #ead8d0;
}

.remove-row:hover {
  background: #ead8d0;
}

.submit:disabled,
.secondary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.message {
  display: none;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.message.show {
  display: block;
}

.message.error {
  color: var(--warning);
  border-color: rgba(143, 63, 31, 0.3);
}

.message.success {
  color: var(--success);
  border-color: rgba(15, 98, 71, 0.32);
}

.combo {
  display: inline-grid;
  place-items: center;
  min-width: 112px;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 16px;
  border-radius: 6px;
  background: #f3dfd3;
  color: var(--success);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1080px);
    padding-top: 10px;
  }

  .intro,
  .panel {
    padding: 20px;
  }

  .intro {
    min-height: 280px;
    align-items: end;
    padding-top: 82px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
