:root {
  --bg: #f6f1ea;
  --paper: #fffaf5;
  --text: #5c4333;
  --muted: #9a7a66;
  --accent: #8f684b;
  --accent-dark: #6e4d36;
  --line: #eadfd4;
  --success-bg: #edf7ef;
  --success-text: #22543d;
  --error-bg: #fff1f0;
  --error-text: #912018;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8f3ed 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a { color: inherit; }
.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 12px;
}
h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(36px, 5vw, 56px);
  color: var(--accent-dark);
}
.lead {
  max-width: 760px;
  line-height: 1.6;
  color: #6a5242;
  margin-top: 12px;
}
.card {
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 30px rgba(102, 74, 51, 0.06);
}
.reserve-card { margin-bottom: 24px; }
.alert {
  padding: 14px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: #c6e6cf; }
.alert-error { background: var(--error-bg); color: var(--error-text); border-color: #f2c5c0; }
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 999px;
  transition: .2s ease;
}
.admin-link:hover { background: #fff; }
.gift-section { margin-bottom: 24px; }
.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-title-wrap h2 {
  margin: 0;
  font-family: Georgia, serif;
  color: var(--accent-dark);
  font-size: 32px;
}
.section-title-wrap span { color: var(--muted); }
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.gift-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
}
.gift-item.is-reserved {
  opacity: .78;
  background: #f5eee7;
}
.gift-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.gift-number {
  font-weight: 700;
  color: var(--accent-dark);
}
.gift-item h3 {
  margin: 0 0 16px;
  min-height: 48px;
  line-height: 1.35;
}
.badge {
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
  font-weight: 700;
}
.badge-available { background: #efe7de; color: var(--accent-dark); }
.badge-reserved { background: #e9dfd5; color: #7b5d49; }
.btn {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn-disabled,
.btn:disabled {
  background: #c8b7a8;
  cursor: not-allowed;
}
.reserved-copy {
  margin: 0 0 16px;
  color: var(--muted);
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
}
.modal.is-open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 28, 20, .52);
}
.modal-dialog {
  position: relative;
  max-width: 540px;
  margin: 8vh auto;
  background: var(--paper);
  border-radius: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 15px 60px rgba(0,0,0,.15);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 34px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.reserve-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
input, textarea {
  width: 100%;
  border: 1px solid #d8c9bc;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
}
input:focus, textarea:focus {
  outline: 2px solid #dcc8b6;
  border-color: #cdb39f;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}
.login-card {
  width: 100%;
  max-width: 420px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.topbar h1 {
  font-size: clamp(30px, 4vw, 42px);
}
.inline-form { display: inline; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-box {
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 16px;
  background: #fff;
}
.stat-box strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
  color: var(--accent-dark);
}
@media (max-width: 720px) {
  .hero,
  .section-title-wrap,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-dialog {
    margin: 4vh 14px;
  }
}


.unit-copy{
  margin: -4px 0 12px;
  font-size: 14px;
  color: #9a7b64;
}
.units-modal-text{
  margin: -8px 0 14px;
  color: #9a7b64;
  font-size: 14px;
}
