:root {
  color-scheme: light;
  --canvas: oklch(0.979 0.008 226);
  --paper: oklch(1 0 0);
  --ink: oklch(0.23 0.035 233);
  --text-muted: oklch(0.44 0.037 232);
  --border: oklch(0.9 0.016 228);
  --control-border: oklch(0.78 0.024 225);
  --tint: oklch(0.95 0.022 187);
  --primary: oklch(0.44 0.079 190);
  --primary-hover: oklch(0.38 0.074 190);
  --focus: oklch(0.54 0.115 222);
  --danger: oklch(0.43 0.143 24);
  --radius: 12px;
  font-family: "Avenir Next", Inter, system-ui, sans-serif;
  font-synthesis: none;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; font-size: 1rem; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.028em; line-height: 1.12; }
p { text-wrap: pretty; line-height: 1.55; }
button, input, textarea { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.68; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar { background: var(--paper); border-bottom: 1px solid var(--border); }
.topbar-inner {
  max-width: 1232px; margin: auto; padding: 0 32px; min-height: 70px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 1.12rem; font-weight: 750; letter-spacing: -0.045em; text-decoration: none; }
.mark {
  display: grid; place-content: center; height: 30px; width: 30px; flex: none;
  border-radius: 7px; background: var(--primary); color: var(--paper);
}
.mark::before { content: ''; width: 13px; height: 9px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: translateY(2px) rotate(45deg) skew(-6deg, -6deg); }
.top-link, .link-button {
  color: var(--primary); font-size: 0.875rem; font-weight: 650; text-underline-offset: 4px; text-decoration: none;
}
.top-link:hover, .link-button:hover { text-decoration: underline; }
.link-button { background: none; border: 0; padding: 0; min-height: 34px; text-align: left; }
.top-actions { display: flex; align-items: center; gap: 20px; }

.guest-layout {
  max-width: 1232px; margin: 0 auto; padding: 40px 32px 30px;
  display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); align-items: start; gap: 28px;
}
.guest-story { display: grid; gap: 20px; min-width: 0; }
.property-hero { position: relative; overflow: hidden; isolation: isolate; min-height: 390px; border-radius: var(--radius); background: oklch(0.34 0.038 228); }
.property-hero img { width: 100%; height: 100%; display: block; position: absolute; inset: 0; object-fit: cover; object-position: 56% 52%; }
.property-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, oklch(0.14 0.031 231 / 0.91), oklch(0.14 0.031 231 / 0.04) 76%); }
.property-hero figcaption { position: absolute; z-index: 1; inset: auto 0 0; padding: 34px; color: var(--paper); }
.property-hero h1 { font: 400 clamp(2.2rem, 4.8vw, 4.1rem)/1.01 Georgia, serif; letter-spacing: -0.036em; }
.location { font-size: 0.84rem; font-weight: 650; letter-spacing: 0.06em; margin-bottom: 12px; }

.assistant, .booking, .list-panel, .detail-panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); }
.assistant { padding: 22px; }
.assistant-top { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.assistant-top h2 { font-size: 1.06rem; }
.assistant-top p { color: var(--text-muted); font-size: 0.85rem; margin-top: 3px; }
.assistant-icon {
  display: grid; place-content: center; width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: var(--tint); color: var(--primary); font-weight: 750;
}
.quick-questions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.quick-questions button {
  border: 1px solid var(--border); background: var(--paper); color: var(--text-muted);
  font-size: 0.83rem; font-weight: 650; border-radius: 999px; padding: 7px 11px;
}
.quick-questions button:hover { background: var(--tint); color: var(--primary); }
.question-form { display: flex; gap: 8px; }
.question-form input { min-width: 0; flex: 1; }
.answer { border-radius: 8px; padding: 12px; background: var(--tint); color: var(--ink); margin-top: 12px; font-size: 0.88rem; line-height: 1.5; }
#handoff { margin-top: 5px; }

.booking { padding: 30px; }
.booking h2, .auth-panel h1 { font-size: 1.8rem; }
.intro { font-size: 0.95rem; color: var(--text-muted); margin-top: 8px; }
.mobile-questions { display: none; }
.stack { display: grid; gap: 15px; margin-top: 22px; }
.stack label { display: block; color: var(--ink); font-size: 0.88rem; font-weight: 650; min-width: 0; }
.stack label :is(input, textarea) { margin-top: 6px; }
input, textarea {
  width: 100%; min-width: 0; min-height: 43px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--paper);
  color: var(--ink); padding: 10px 11px; font-size: 1rem; font-weight: 430;
}
input[type="date"] { padding-inline: 9px; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
textarea { resize: vertical; display: block; }
.date-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 0; }
.optional { color: var(--text-muted); font-weight: 500; margin-left: 5px; font-size: 0.78rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px;
  padding: 9px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 0.89rem; font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease; text-decoration: none;
}
.button.primary { background: var(--primary); color: var(--paper); }
.button.primary:hover:not(:disabled) { background: var(--primary-hover); }
#booking-form .primary { justify-content: space-between; padding-inline: 15px; }
.button.secondary { background: var(--paper); border-color: var(--control-border); color: var(--primary); }
.button.secondary:hover:not(:disabled) { background: var(--tint); }
.button.danger { border-color: var(--control-border); color: var(--danger); background: var(--paper); }
.button.danger:hover:not(:disabled) { background: oklch(0.95 0.025 25); }
.form-hint { color: var(--text-muted); font-size: 0.78rem; line-height: 1.45; }
.form-error { background: oklch(0.95 0.03 25); color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 0.87rem; }
#receipt-panel .status { margin-bottom: 15px; }
.stay-facts { display: grid; gap: 14px; margin: 22px 0; padding: 16px; border-radius: 8px; background: var(--canvas); }
.stay-facts dt, .detail-facts dt { color: var(--text-muted); font-size: 0.78rem; margin-bottom: 4px; }
.stay-facts dd, .detail-facts dd { margin: 0; font-weight: 650; }
.receipt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
#receipt-panel .form-error { margin-top: 12px; }
.footer { max-width: 1232px; margin: auto; padding: 0 32px 28px; font-size: 0.8rem; color: var(--text-muted); }

.staff-shell { max-width: 1232px; margin: 0 auto; padding: 44px 32px; }
#page-error { margin-bottom: 16px; }
.auth-panel { max-width: 470px; margin: 24px auto 0; }
#return-login { display: inline-block; margin-top: 16px; }
.inbox-head { display: flex; justify-content: space-between; gap: 15px; align-items: end; margin-bottom: 24px; }
.kicker { font-size: 0.88rem; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.inbox-head h1 { font-size: 2.45rem; }
.inbox-grid { display: grid; grid-template-columns: minmax(315px, 0.83fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.list-panel { min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 13px; border-bottom: 1px solid var(--border); }
.filter {
  min-height: 36px; border: 1px solid transparent; border-radius: 8px; padding: 6px 12px;
  background: var(--paper); color: var(--text-muted); font-size: 0.86rem; font-weight: 650;
}
.filter:hover, .filter[aria-pressed="true"] { background: var(--tint); color: var(--primary); }
.request-list { display: grid; }
.request-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; text-align: left; align-items: start;
  padding: 16px; border: 0; border-bottom: 1px solid var(--border); background: var(--paper); color: var(--ink);
}
.request-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.request-row:hover, .request-row[aria-pressed="true"] { background: var(--canvas); }
.request-row[aria-pressed="true"] .request-name { color: var(--primary); }
.request-row:focus-visible { outline-offset: -4px; }
.request-name { font-size: 0.97rem; font-weight: 710; overflow-wrap: anywhere; }
.request-dates { color: var(--text-muted); font-size: 0.8rem; grid-column: 1 / -1; }
.status { display: inline-block; border-radius: 999px; white-space: nowrap; padding: 4px 9px; font-size: 0.73rem; line-height: 1.3; font-weight: 700; }
.status-pending { background: oklch(0.94 0.055 86); color: oklch(0.37 0.072 70); }
.status-confirmed { background: var(--tint); color: var(--primary); }
.status-declined, .status-cancelled { background: oklch(0.95 0.025 24); color: var(--danger); }
.detail-panel { padding: 24px; min-width: 0; }
.detail-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.detail-head h2 { font-size: 1.42rem; overflow-wrap: anywhere; }
.detail-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px;
  margin: 19px 0; padding: 14px; background: var(--canvas); border-radius: 8px;
}
.detail-facts dd { font-size: 0.89rem; overflow-wrap: anywhere; }
.detail-facts a { color: var(--primary); }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-muted); }
.empty { padding: 24px 16px; color: var(--text-muted); font-size: 0.9rem; }
.detail-actions { display: grid; gap: 10px; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 15px; }
.checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; }
.checkbox input { min-height: auto; width: 16px; height: 16px; flex: none; margin: 2px 0 0; accent-color: var(--primary); }
.action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.action-buttons button:disabled { cursor: not-allowed; }

@media (max-width: 860px) {
  .guest-layout { gap: 18px; padding-inline: 22px; }
  .booking { padding: 22px; }
  .property-hero { min-height: 340px; }
  .property-hero figcaption { padding: 24px; }
}
@media (max-width: 700px) {
  .topbar-inner { padding-inline: 16px; min-height: 59px; }
  .guest-layout { grid-template-columns: 1fr; padding: 18px 14px 24px; }
  .guest-story { display: contents; }
  .property-hero { min-height: 250px; min-height: clamp(245px, 55vw, 320px); }
  .property-hero figcaption { padding: 21px; }
  .booking { grid-row: 2; }
  .mobile-questions { display: inline-block; margin-top: 9px; }
  .assistant, .detail-panel { padding: 18px; }
  .footer { padding-inline: 15px; }
  .staff-shell { padding: 25px 15px; }
  .inbox-grid { grid-template-columns: 1fr; gap: 14px; }
  .inbox-head h1 { font-size: 1.95rem; }
  .inbox-head { align-items: start; }
  .inbox-head .button { flex: none; }
}
@media (max-width: 360px) {
  .booking { padding: 17px; }
  .date-row { grid-template-columns: 1fr; }
  .top-actions { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
