:root {
  color-scheme: light;
  --bg: #f7f4f1;
  --card: #ffffff;
  --text: #2b2420;
  --muted: #6d625c;
  --accent: #a86b4e;
  --accent-soft: #f1e7df;
  --border: #e2d7cf;
  --shadow: 0 18px 40px rgba(30, 20, 15, 0.08);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Password Protection Styles */
.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.password-modal {
  background: var(--card);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.password-modal h2 {
  margin: 0 0 16px 0;
  color: var(--accent);
  font-size: 1.5rem;
}

.password-modal p {
  margin: 16px 0;
  color: var(--text);
}

.password-modal input {
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.password-modal input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.password-modal button {
  padding: 12px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 12px;
  font-weight: 600;
  transition: background 0.2s;
}

.password-modal button:hover {
  background: #934a2c;
}

.password-error {
  color: #d32f2f;
  font-weight: 600;
  margin: 8px 0 0 0;
  font-size: 0.9rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.language-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

.language-selector label {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.language-selector select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

.language-selector select:focus {
  outline: 2px solid rgba(168, 107, 78, 0.3);
  border-color: var(--accent);
}

.page {
  min-height: 100vh;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}

.language-flags {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: -10px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.tab-btn {
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--accent-soft);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel-active {
  display: block;
}

.flag-btn {
  font-size: 2rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.flag-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.flag-btn.active {
  opacity: 1;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero {
  text-align: center;
  display: grid;
  gap: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
}

.subtitle {
  margin: 0 auto;
  max-width: 520px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

.location {
  background: var(--accent-soft);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
}

.rsvp {
  display: grid;
  gap: 20px;
}

.choice {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.choice legend {
  font-weight: 600;
  margin-bottom: 8px;
  width: 100%;
}

.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  cursor: pointer;
  border: 1px solid transparent;
}

.radio input {
  accent-color: var(--accent);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
}

input:focus,
select:focus {
  outline: 2px solid rgba(168, 107, 78, 0.3);
  border-color: var(--accent);
}

.guest-fields {
  display: grid;
  gap: 18px;
}

.guest-card {
  border: 1px dashed var(--border);
  padding: 16px;
  border-radius: 16px;
  display: grid;
  gap: 12px;
}

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

.hidden {
  display: none;
}

.primary {
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  justify-self: start;
}

.primary:hover {
  filter: brightness(0.95);
}

.secondary {
  border: 2px solid var(--accent);
  padding: 12px 20px;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 12px;
}

.secondary:hover {
  background: var(--accent-soft);
}

.remove-guest {
  border: 2px solid #d32f2f;
  padding: 10px 16px;
  border-radius: 999px;
  background: transparent;
  color: #d32f2f;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 8px;
}

.remove-guest:hover {
  background: rgba(211, 47, 47, 0.1);
}

.muted,
.disclaimer {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 640px) {
  .card {
    padding: 22px;
  }

  .radio {
    flex: 1;
    min-width: 140px;
    white-space: nowrap;
    justify-content: center;
  }

  .primary {
    width: 100%;
    justify-self: stretch;
  }
}
