:root {
  color-scheme: light;
  --ink: #24211e;
  --muted: #6d6259;
  --paper: #fffaf3;
  --surface: #ffffff;
  --line: #e6d8c9;
  --accent: #24746b;
  --accent-strong: #185c54;
  --rose: #c05b67;
  --gold: #b7853a;
  --shadow: 0 20px 60px rgba(47, 35, 24, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.hero {
  min-height: 58vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 6vw, 84px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(16, 15, 13, 0.12), rgba(16, 15, 13, 0.76)),
    url("/assets/banquete-boda.png") center / cover;
}

.hero-copy {
  width: min(760px, 100%);
  padding-bottom: clamp(12px, 4vh, 44px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffe5b5;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 9vw, 7.6rem);
  font-weight: 500;
  line-height: 0.9;
}

.intro {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: clamp(1.05rem, 2.3vw, 1.45rem);
  line-height: 1.45;
}

.form-section {
  width: min(1040px, calc(100% - 32px));
  margin: -30px auto 72px;
  padding: clamp(22px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading h2,
.admin-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.wedding-form {
  display: grid;
  gap: 20px;
}

.field-grid,
.word-grid,
.admin-controls,
.login-form {
  display: grid;
  gap: 16px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

label span {
  font-size: 0.94rem;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf9;
  outline: none;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(36, 116, 107, 0.13);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
}

.check-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button,
.ghost-button {
  color: var(--accent-strong);
  background: #eaf4f2;
}

.danger-button {
  min-height: 38px;
  color: #9d2836;
  background: #f8e7ea;
}

.danger-button:hover {
  background: #f2d4d9;
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 24px;
  color: var(--muted);
  font-weight: 700;
}

.status.success {
  color: var(--accent-strong);
}

.status.error {
  color: #9d2836;
}

.admin-body {
  background:
    linear-gradient(rgba(255, 250, 243, 0.92), rgba(255, 250, 243, 0.98)),
    url("/assets/banquete-boda.png") center / cover fixed;
}

.admin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

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

.login-panel {
  display: grid;
  gap: 18px;
  width: min(560px, 100%);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(47, 35, 24, 0.09);
}

.login-panel h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
}

.dashboard[hidden],
.login-panel[hidden] {
  display: none;
}

.admin-controls {
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(47, 35, 24, 0.1);
}

.admin-summary {
  min-height: 24px;
  margin: 20px 0;
  color: var(--muted);
  font-weight: 800;
}

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

.response-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(47, 35, 24, 0.09);
}

.response-card header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.response-card h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.response-card h3 {
  margin: 18px 0 8px;
  color: var(--accent-strong);
  font-size: 0.95rem;
}

.response-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.response-card time,
.response-footer {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.response-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

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

.chips span {
  padding: 7px 10px;
  color: var(--accent-strong);
  background: #eaf4f2;
  border-radius: 8px;
  font-weight: 800;
}

.empty {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 780px) {
  .hero {
    min-height: 52vh;
    padding: 24px 18px;
  }

  .form-section {
    width: calc(100% - 20px);
    margin-top: -18px;
    padding: 20px;
  }

  .field-grid,
  .word-grid,
  .admin-controls,
  .login-form {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .response-card header,
  .response-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-controls .secondary-button {
    width: 100%;
  }

  .admin-controls .ghost-button {
    width: 100%;
  }
}
