* { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  /* typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* text */
  --ink: #3f3a32;             /* body — warm dark stone, ~9.9:1 on --paper */
  --ink-strong: #23201b;      /* headings, labels — ~15:1 */
  --muted: #6b6455;           /* hints, meta, weekdays — ~5.2:1 on paper */
  --placeholder: #857c6b;     /* ~4.5:1 on --sand-tint */

  /* surfaces */
  --paper: #fffdf9;           /* card, focused inputs */
  --cream: #f6f0e6;           /* page base */
  --cream-deep: #efe6d7;      /* calendar header base */
  --sand-tint: #fbf7ef;       /* input resting bg, fieldset wash */
  --hairline: #e6dcc9;        /* borders — decorative only */

  /* brand */
  --accent: #2e6240;          /* action/selection green — 7.15:1 on white */
  --accent-dark: #21492f;     /* dark surface, button gradient end */
  --accent-soft: rgba(46, 98, 64, 0.12);   /* selection washes, focus rings */
  --accent-glow: rgba(33, 73, 47, 0.35);   /* themed shadows */
  --gold: #c39d73;            /* decorative only, never body text */
  --gold-deep: #8a6a45;       /* text-safe gold: eyebrow, links — ~5.0:1 */
  --gold-bright: #d9b98e;     /* gold on dark receipt — ~7:1 on #21492f */
  --gold-soft: rgba(195, 157, 115, 0.14);  /* hover washes, logo halo */
  --receipt-ink: #f3ece1;     /* est-row text on dark panel — ~11:1 */

  /* status */
  --danger: #b4543e;          /* clay, not candy red — ~4.6:1 on white */
  --blush: #f7ece5;           /* revalued: now danger-soft */
  --danger-soft: var(--blush);
  --warn: #8a6a42;            /* staff 'new' badge text */
  --warn-soft: #f6efe4;       /* badge bg */

  /* geometry */
  --radius: 20px;
  --radius-sm: 12px;
  --card-pad: 2.4rem;         /* single token drives card padding */
  --shadow: 0 30px 70px -35px rgba(76, 55, 30, 0.40);   /* warm umber — 'shade on rock' */
  --shadow-sm: 0 8px 20px -12px rgba(76, 55, 30, 0.35);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 50% -12%, rgba(224, 181, 126, 0.30), transparent 65%),  /* dawn sky */
    radial-gradient(900px 600px at 85% 78%, rgba(195, 157, 115, 0.14), transparent 70%),    /* low-right dune sidelight */
    linear-gradient(180deg, #f9f3e9 0%, var(--cream) 50%, #ece1cd 100%);
  margin: 0;
  padding: 2.6rem 1rem 3.5rem;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* Twin ridgelines pinned to the viewport bottom — paraphrase of the logo path. */
body::after {
  content: '';
  position: fixed; inset: auto 0 0 0; height: 24vh;
  z-index: -1; pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 L0 22 L20 12 L38 20 L48 10 L66 18 L78 12 L100 21 L100 30 Z' fill='%2321492f' fill-opacity='0.11'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 L0 18 L18 6 L34 15 L52 3 L68 13 L84 7 L100 16 L100 30 Z' fill='%232e6240' fill-opacity='0.07'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: bottom, bottom;
  background-size: max(100%, 1800px) 60%, max(100%, 1800px) 100%; /* front ridge shorter; ultrawide cap prevents low-slope stretching */
}

h1, h2, h3 { line-height: 1.1; }

.card {
  position: relative; overflow: hidden;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid rgba(195, 157, 115, 0.35);
  box-shadow: var(--shadow);
  padding: var(--card-pad) var(--card-pad) calc(var(--card-pad) + 0.2rem);
  max-width: 580px;
  width: 100%;
}
/* Green→gold crown edge. */
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, #2e6240, #c39d73 55%, #e0bd8c);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding-bottom: 1.6rem;
  margin-bottom: 1.8rem;
  /* Faint gold contour rings behind the logo — hand-wobbled topo loops. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 140'%3E%3Cg stroke='%23c39d73' stroke-opacity='0.12' stroke-width='1' fill='none'%3E%3Cpath d='M74 64 C74 40 94 26 120 26 C148 26 166 42 166 64 C166 86 146 100 120 100 C92 100 74 86 74 64 Z'/%3E%3Cpath d='M50 66 C48 30 84 -2 121 -4 C158 -6 190 28 189 63 C188 100 156 132 119 133 C82 134 52 102 50 66 Z'/%3E%3Cpath d='M26 64 C28 14 68 -28 120 -30 C172 -32 212 12 214 62 C216 112 174 156 121 158 C68 160 24 114 26 64 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 50% 0;
  background-size: 240px auto;
}
/* Gold hero rule (replaces the old border-bottom). */
.hero::after {
  content: '';
  display: block;
  width: 56px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), #e0bd8c);
  margin: 1.4rem auto 0;
}
.hero-logo {
  width: 96px;
  height: auto;
  margin: 0 auto 0.9rem;
  display: block;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(195, 157, 115, 0.45),
    0 0 0 10px var(--gold-soft),
    0 14px 28px -16px rgba(76, 55, 30, 0.45);
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding-left: 0.18em;
  margin: 0 0 0.5rem;
}
h1 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}
.subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  margin-top: 0.6rem;
  line-height: 1.55;
  max-width: 38ch;
  margin-inline: auto;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.form-section { display: flex; flex-direction: column; gap: 0.9rem; }
.form-section + .form-section { margin-top: 1.3rem; }

/* Booking-type segmented control (Overnight stay | Day event) */
.btype-toggle {
  display: flex;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 1.3rem;
  background: var(--cream-deep, #f3efe8);
  border-radius: 999px;
}
.btype-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink, #4d4d4c);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btype-btn.is-active {
  background: var(--paper, #fff);
  color: var(--accent-dark, #21492f);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.date-chip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.date-chip { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.date-chip-row input { padding: 0.55rem 0.7rem; font-size: 0.9rem; }

label {
  display: flex; flex-direction: column; gap: 0.45rem;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  color: var(--ink-strong);
}

input, select, textarea {
  font: inherit; font-weight: 400;
  padding: 0.78rem 0.9rem; font-size: 0.95rem;
  border: 1px solid #e2d7c3; border-radius: var(--radius-sm);
  background: var(--sand-tint); color: var(--ink-strong);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  background: var(--paper); box-shadow: 0 0 0 3px var(--accent-soft);
}
input:user-invalid, select:user-invalid, textarea:user-invalid {
  border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 84, 62, 0.14);
}
button:focus-visible, .slot-btn:focus-visible, .avail-nav:focus-visible,
.avail-day:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; transition: none;
}

textarea { resize: vertical; min-height: 72px; }

fieldset {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1.2rem;
  margin: 0;
  background: var(--sand-tint);
}

legend, .avail-label {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  text-transform: none; letter-spacing: 0;
  color: var(--ink-strong);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
legend { padding-left: 0.4rem; padding-right: 0.4rem; }

.flavor-hint {
  margin: 0 0 0.8rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
}

.flavor-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

/* Add-on cards */
.flavor-list .flavor-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem;
  background: var(--paper);
  cursor: pointer;
  font-weight: 400;
  font-size: 0.9rem;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.flavor-list .flavor-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: none;
}
.flavor-list .flavor-card.selected,
.flavor-list .flavor-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(46, 98, 64, 0.08);
}
/* Keyboard focus — :focus-within fallback is mandatory for older Firefox ESR. */
.flavor-card:focus-within, .package-card:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.flavor-card:has(input:focus-visible), .package-card:has(input:focus-visible) {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
/* hide the native checkbox; use a custom corner tick */
.flavor-list .flavor-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.flavor-list .flavor-card::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: var(--paper);
  transition: all 0.15s ease;
}
.flavor-list .flavor-card.selected::after,
.flavor-list .flavor-card:has(input:checked)::after {
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}
.flavor-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  padding-right: 0.8rem;
}
.flavor-card-name { font-size: 0.95rem; font-weight: 600; color: var(--ink-strong); line-height: 1.2; }
.flavor-card-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Dirham icon — base sizing; mask layer paints it with the local text color. */
.aed-icon {
  height: 0.8em;
  width: auto;
  vertical-align: baseline;
  margin-right: 0.3em;
  position: relative;
  top: 0.08em;
}
@supports (mask: url('dirham.svg') no-repeat center / contain) or
          (-webkit-mask: url('dirham.svg') no-repeat center / contain) {
  img.aed-icon {
    /* hide the raster, paint with text color */
    content: url("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");
    background-color: currentColor;
    -webkit-mask: url('dirham.svg') no-repeat center / contain;
    mask: url('dirham.svg') no-repeat center / contain;
    width: 0.8em; height: 0.8em;
  }
}

/* ── Package selection cards ──────────────────────────────────────────────── */
.package-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
.package-card {
  position: relative;
  display: block;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.package-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: none;
}
.package-card.selected,
.package-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(46, 98, 64, 0.08);
}
.package-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.package-card-body { display: flex; flex-direction: column; gap: 0.3rem; }
.package-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.package-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink-strong);
}
.package-price {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--accent-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.package-meta {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}
.package-note {
  margin: 0.85rem 0 0;
  padding: 0.6rem 0.85rem;
  background: var(--blush);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-strong);
  text-align: center;
}

/* corner tick on selected package */
.package-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: var(--paper);
  opacity: 0;
  transition: all 0.15s ease;
}
.package-card.selected::after,
.package-card:has(input:checked)::after {
  opacity: 1;
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}
/* keep the tick from overlapping the price text */
.package-card-top { padding-right: 1.6rem; }

/* ── Live quote — the dark receipt (the one dark forest surface on the page) ─ */
.estimate { margin: 0; text-align: left; }
.estimate:empty { display: none; }   /* reclaims the doubled flex gap */
.estimate:not(:empty) {
  /* hardcoded endpoints — deliberate single-tenant tradeoff */
  background: linear-gradient(160deg, #274f34, #21492f);
  color: var(--receipt-ink);
  border-radius: 14px;
  padding: 1.1rem 1.25rem 1.15rem;
  box-shadow: 0 20px 44px -24px rgba(33, 73, 47, 0.55);
  animation: receipt-rise 260ms ease-out;
}
.estimate .est-row {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.9rem; font-weight: 500; color: var(--receipt-ink);
  padding: 0.15rem 0; font-variant-numeric: tabular-nums;
}
.estimate .est-row > span:last-child {  /* amounts: mono/tabular stack */
  font-family: var(--font-mono); font-size: 0.95em; font-variant-numeric: tabular-nums;
  white-space: nowrap;  /* keep dirham icon + digits on one line at 375px */
}
.estimate .est-row.est-total {
  margin-top: 0.5rem; padding-top: 0.6rem;
  border-top: 1px solid rgba(217, 185, 142, 0.5);
  font-size: 1.35rem; font-weight: 700; color: var(--gold-bright);
}
.estimate .est-note {
  display: block; margin-top: 0.55rem; font-size: 0.85rem; opacity: 1;
  color: #e9dfcf; border-left: 3px solid var(--gold-bright);
  padding-left: 0.7rem; line-height: 1.45;
}
.estimate .aed-icon { color: var(--gold-bright); }
.estimate .est-total .aed-icon { color: var(--gold-bright); }
@keyframes receipt-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Add-on price chip on each option card. */
.flavor-card-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}
.flavor-card-price .aed-icon { height: 0.7em; }

/* ── Event setup / teardown day toggles ───────────────────────────────────── */
.extra-days { margin-top: 0.9rem; }
.extra-day-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-top: 0.6rem;
}
.extra-day-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem 0.7rem 0.7rem;
  background: var(--paper);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.extra-day-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.extra-day-card.selected,
.extra-day-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(46, 98, 64, 0.08);
}
.extra-day-card:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.extra-day-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--sand-tint);
}
/* Hide the native checkbox; use a custom corner tick like the add-on cards. */
.extra-day-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.extra-day-card::after {
  content: "";
  position: absolute;
  top: 8px; right: 8px;
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: var(--paper);
  transition: all 0.15s ease;
}
.extra-day-card.selected::after,
.extra-day-card:has(input:checked)::after {
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}
.extra-day-text { display: flex; flex-direction: column; gap: 0.15rem; padding-right: 1.4rem; }
.extra-day-name { font-size: 0.9rem; font-weight: 600; color: var(--ink-strong); line-height: 1.25; }
.extra-day-sub { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.extra-day-note { font-size: 0.76rem; font-weight: 600; color: var(--accent-dark); margin-top: 0.15rem; }
.extra-day-note.is-error { color: var(--danger); font-weight: 500; }
.extra-days-lock {
  margin-top: 0.7rem;
  padding: 0.5rem 0.65rem;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
}

/* ── Booking policy + agreement ───────────────────────────────────────────── */
.booking-policy {
  border: 1px solid var(--hairline, #e6dcc9);
  border-radius: var(--radius-sm, 12px);
  background: var(--sand-tint, #fbf7ef);
  padding: 0.75rem 1rem;
  margin: 0.4rem 0 0.9rem;
}
.booking-policy .policy-title {
  cursor: pointer; font-weight: 600; color: var(--ink-strong, #23201b);
  font-size: 0.92rem; list-style: none;
}
.booking-policy .policy-title::-webkit-details-marker { display: none; }
.booking-policy .policy-title::before { content: '▸ '; color: var(--gold-deep, #8a6a45); }
.booking-policy[open] .policy-title::before { content: '▾ '; }
.policy-list {
  margin: 0.7rem 0 0.2rem; padding-left: 1.1rem; display: grid; gap: 0.5rem;
  font-size: 0.82rem; line-height: 1.5; color: var(--muted, #6b6455);
}
.terms-agree {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.85rem; color: var(--ink, #3f3a32); margin: 0 0 1rem;
  cursor: pointer;
}
.terms-agree input[type="checkbox"] {
  width: auto; margin: 0.15rem 0 0; flex: 0 0 auto; accent-color: var(--accent, #2e6240);
}

/* ── Submit — the one kinetic element on the page ─────────────────────────── */
button[type="submit"] {
  font-family: inherit;
  border: none; cursor: pointer; color: #fff;
  border-radius: 999px;
  background: linear-gradient(140deg, #2e6240, #21492f);
  padding: 1.05rem 1.5rem;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; text-transform: none;
  box-shadow: 0 16px 30px -18px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px -18px var(--accent-glow), inset 0 0 0 1px rgba(217, 185, 142, 0.35);
}
button[type="submit"]:active { transform: translateY(0); }
button[type="submit"]:disabled {
  background: var(--accent-dark); opacity: 0.7; color: #fff;
  cursor: not-allowed; transform: none; box-shadow: none;
}

/* ── Result box ───────────────────────────────────────────────────────────── */
.result {
  margin-top: 1.4rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  font-weight: 400;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.result.success {
  background: rgba(46, 98, 64, 0.08);
  border-color: var(--accent);
  color: var(--accent-dark);
}
.result.error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}
.result p { margin: 0 0 0.6rem; }
.result p:last-child { margin-bottom: 0; }
.result a { color: var(--accent-dark); font-weight: 600; }

.track-link {
  text-align: center;
  margin-top: 1.6rem;
  font-size: 0.9rem;
}
.track-link a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
}
.track-link a:hover {
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.tracking-code {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  background: linear-gradient(180deg, var(--paper), #faf3e7);
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  color: var(--ink-strong);
}
.field-hint { font-size: 0.8rem; color: var(--muted); font-weight: 400; line-height: 1.45; }

/* ── Availability calendar ───────────────────────────────────────────────── */
.avail-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avail-calendar {
  max-width: 400px;
  margin-inline: auto;
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
#avail-calendar.loading { opacity: 0.55; pointer-events: none; }
#avail-calendar.loading .avail-grid { animation: cal-shimmer 1.1s ease-in-out infinite alternate; }
@keyframes cal-shimmer { from { opacity: 1; } to { opacity: 0.6; } }

.avail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(135deg, #f3e9d8, #ecdfc8);
  border-bottom: 1px solid var(--hairline);
}

.avail-month-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.avail-nav {
  font-family: inherit;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #e2d7c3;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.avail-nav:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}
.avail-nav:disabled {
  background: transparent;
  color: #b9ac97;
  border-color: var(--hairline);
  cursor: default;
}

.avail-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 0.6rem;
}

.avail-weekday {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding-bottom: 0.3rem;
}

/* Day cells are now <button type="button"> — reset so no button styling leaks. */
.avail-day {
  font: inherit; border: none; background: transparent; cursor: pointer;
  padding: 0; color: var(--ink);
  min-height: 40px; aspect-ratio: auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; border-radius: 10px;
  font-variant-numeric: tabular-nums; position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
.avail-day.past { color: #c9bfae; cursor: default; }
.avail-day.free:hover { background: var(--gold-soft); }  /* gold = invitation */
.avail-day.booked {
  background: var(--blush);
  color: var(--danger);
  font-weight: 500;
  text-decoration: line-through 1px rgba(180, 84, 62, 0.6);  /* non-color cue */
  cursor: pointer;  /* still clickable as a check-out day in range mode */
}
.avail-day.booked:hover { background: #f3e0d5; }
.avail-day.selected {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 6px 14px -6px var(--accent-glow);
  animation: day-settle 240ms ease-out, day-ripple 240ms ease-out;
}
.avail-day.in-range {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 10px;
}
/* Weekend-rate marker: small gold dot under the number. */
.avail-day.weekend::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
}
.avail-day.selected.weekend::after { background: var(--gold-bright); }
/* Reserved setup (day before) / teardown (day after) for an event. */
.avail-day.event-adjacent {
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  font-weight: 600;
}

/* "Stone into sand" day-select pulse. */
@keyframes day-settle {
  0% { transform: scale(0.92); } 60% { transform: scale(1.05); } 100% { transform: scale(1); }
}
@keyframes day-ripple {
  from { box-shadow: 0 6px 14px -6px var(--accent-glow), 0 0 0 0 rgba(195, 157, 115, 0.45); }
  to   { box-shadow: 0 6px 14px -6px var(--accent-glow), 0 0 0 9px rgba(195, 157, 115, 0); }
}

/* Time-slot picker (slots mode) */
.slot-picker { margin-bottom: 1.1rem; }
.slot-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.slot-btn {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.slot-btn:hover { border-color: var(--gold); }
.slot-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.slot-btn.full { opacity: 0.4; text-decoration: line-through; cursor: default; }

.avail-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.45rem 0.9rem 0.65rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
  color: var(--muted);
}
.avail-legend span { display: flex; align-items: center; gap: 0.3rem; }
.avail-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.avail-legend .dot-free { background: var(--paper); border: 1px solid #e2d7c3; }
.avail-legend .dot-booked { background: var(--blush); border: 1px solid var(--danger); }
.avail-legend .dot-selected { background: var(--accent); }
.avail-legend .dot-weekend { background: var(--gold); border-radius: 50%; width: 6px; height: 6px; }

.avail-warning {
  background: var(--blush);
  border: 1px solid rgba(180, 84, 62, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--danger);
  font-weight: 500;
}

.avail-date-input {
  font-family: inherit;
  width: 100%;
}

/* ── Motion safety ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  button[type="submit"]:hover { transform: none; }
  .avail-day.selected { animation: none; }
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .card { --card-pad: 1.5rem; padding: 1.5rem 1.25rem 1.8rem; }
  h1 { font-size: 2rem; }
  .subtitle { font-size: 0.95rem; }
  .flavor-list { grid-template-columns: 1fr; }
  .package-list { grid-template-columns: 1fr; }
  .extra-day-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  /* Stack check-in / check-out on all phones (incl. the 440px iPhone Pro Max)
     so the two date fields never crowd together. */
  .date-chip-row { grid-template-columns: 1fr; gap: 0.85rem; }

  body { background:
    radial-gradient(1100px 480px at 50% -12%, rgba(224, 181, 126, 0.30), transparent 65%),
    linear-gradient(180deg, #f9f3e9 0%, var(--cream) 50%, #ece1cd 100%);
  }
  body::after { height: 16vh; opacity: 0.6; }

  /* Sticky receipt — never covers the submit button (45vh cap + scroll). */
  .estimate:not(:empty) {
    position: sticky; bottom: 0.75rem; z-index: 5;
    padding: 0.85rem 1rem;
    max-height: 45vh; overflow-y: auto;
    box-shadow: 0 -8px 30px -18px rgba(33, 73, 47, 0.5), 0 20px 44px -24px rgba(33, 73, 47, 0.55);
  }
  .estimate .est-note { font-size: 0.8rem; line-height: 1.35; }

  /* Touch targets */
  .avail-nav { width: 44px; height: 44px; }
  .avail-day { min-height: 42px; }
  .avail-grid { gap: 2px; padding: 0.4rem; }
  .slot-btn { min-height: 44px; }

  button[type="submit"] { padding: 0.95rem 1.25rem; }
}

@media (max-width: 430px) {
  .avail-calendar { max-width: none; }
}

@media (max-width: 340px) {
  button[type="submit"] { border-radius: 28px; }
}
