:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18312d;
  background: #f3f1ea;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

header { max-width: 720px; margin-bottom: 32px; }
h1 { margin: 4px 0 12px; font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: .98; letter-spacing: -.055em; }
h2 { margin-top: 0; }
p { line-height: 1.6; }
.eyebrow { color: #b64a2e; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }

.card {
  background: #fffdf7;
  border: 1px solid #d8d2c4;
  border-radius: 18px;
  padding: clamp(20px, 4vw, 36px);
  margin: 18px 0;
  box-shadow: 0 12px 30px rgba(24, 49, 45, .06);
}

.grid, .knowledge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.knowledge-grid { margin-bottom: 20px; }
label { display: grid; gap: 8px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid #bcb6a9;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: inherit;
}
textarea { min-height: 130px; resize: vertical; }
.full { grid-column: 1 / -1; }
button {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: #18312d;
  color: white;
  font-weight: 800;
  cursor: pointer;
  width: fit-content;
}
button:hover { background: #285148; }
button:disabled { opacity: .45; cursor: not-allowed; }
.status { min-height: 1.5em; color: #775f38; }
.hidden { display: none; }
.guest-link { display: block; margin-top: 18px; overflow-wrap: anywhere; color: #b64a2e; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(460px, 100%); background: #fffdf7; border: 1px solid #d8d2c4; border-radius: 22px; padding: 40px; }
.login-panel h1 { font-size: 3rem; }
.stack { display: grid; gap: 18px; margin-top: 28px; }
.hint { color: #766f62; font-size: .85rem; }
.backoffice { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 28px 20px; background: #18312d; color: white; }
.sidebar .eyebrow { color: #ffad91; }
.sidebar h2 { font-size: 1.8rem; }
.sidebar button.secondary { border: 1px solid #739087; background: transparent; width: 100%; }
.property-list { display: grid; gap: 7px; overflow-y: auto; }
.property-item { width: 100%; text-align: left; border-radius: 9px; background: transparent; color: #dbe6e2; font-weight: 600; }
.property-item:hover, .property-item.active { background: #31564f; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #42655e; padding-top: 18px; }
.sidebar-footer p { margin: 0; font-weight: 700; }
.text-button { padding: 8px 0; background: transparent; color: #ffad91; }
.admin-main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 80px; }
.knowledge-sections { display: grid; gap: 28px; margin: 28px 0; }
.knowledge-group { border-top: 1px solid #d8d2c4; padding-top: 20px; }
.knowledge-group:first-child { border-top: 0; padding-top: 0; }
.knowledge-group h3 { margin: 0 0 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.guest-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 211, 128, .34), transparent 22rem),
    linear-gradient(145deg, #f8fcf9 0%, #edf8fa 52%, #e2f2f4 100%);
  color: #153b43;
}
.guest-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image: radial-gradient(rgba(21, 59, 67, .18) .6px, transparent .6px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
.guest-sun {
  position: fixed;
  z-index: 0;
  top: -90px;
  right: max(-100px, calc((100vw - 1180px) / 2 - 180px));
  width: 330px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd98d, #f4aa62);
  box-shadow: 0 0 80px rgba(244, 170, 98, .25);
}
.guest-wave {
  position: fixed;
  z-index: 0;
  left: -12vw;
  width: 124vw;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-3deg);
}
.guest-wave-one { bottom: -195px; background: rgba(40, 139, 158, .15); }
.guest-wave-two { bottom: -225px; left: -5vw; background: rgba(20, 102, 125, .12); transform: rotate(2deg); }
.guest-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 54px;
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(440px, 1.22fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: center;
  min-height: 100vh;
}
.guest-hero { max-width: 470px; margin: 0; }
.guest-brand { display: flex; align-items: center; gap: 13px; margin-bottom: clamp(36px, 7vh, 72px); }
.assistant-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px 18px 18px 6px;
  background: #176b7c;
  box-shadow: 0 12px 24px rgba(23, 107, 124, .24);
}
.assistant-avatar::before, .assistant-avatar::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}
.assistant-avatar::before { left: 15px; }
.assistant-avatar::after { right: 15px; }
.assistant-avatar span { width: 16px; height: 7px; margin-top: 15px; border-bottom: 2px solid #fff; border-radius: 50%; }
.guest-kicker { margin: 0 0 3px; font-size: .82rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: #176b7c; }
.assistant-presence { display: flex; align-items: center; gap: 7px; margin: 0; color: #668087; font-size: .82rem; }
.assistant-presence span { width: 8px; height: 8px; border-radius: 50%; background: #45aa79; box-shadow: 0 0 0 4px rgba(69, 170, 121, .12); }
.guest-heading h1 {
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 7vw, 6.4rem);
  font-weight: 500;
  line-height: .86;
  letter-spacing: -.065em;
  color: #123f49;
}
.guest-heading p { max-width: 410px; margin: 0; color: #56747a; font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.65; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }
.quick-prompts button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid rgba(23, 107, 124, .17);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: #315f68;
  font-size: .82rem;
  font-weight: 750;
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.quick-prompts button span { color: #dd8651; font-size: 1rem; }
.quick-prompts button:hover { border-color: #dd8651; background: #fff; color: #153b43; transform: translateY(-1px); }
.chat-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(52, 111, 121, .16);
  border-radius: 30px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 28px 70px rgba(27, 91, 104, .16), 0 3px 10px rgba(27, 91, 104, .06);
  backdrop-filter: blur(18px);
}
.chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid #e2edef;
  background: rgba(248, 253, 252, .82);
  color: #6f878b;
  font-size: .76rem;
}
.chat-card-header div { display: flex; align-items: center; gap: 9px; color: #214b53; font-size: .9rem; }
.chat-card-dot { width: 9px; height: 9px; border-radius: 50%; background: #45aa79; box-shadow: 0 0 0 4px rgba(69, 170, 121, .12); }
.messages {
  height: min(58vh, 590px);
  min-height: 430px;
  overflow-y: auto;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #bdd6da transparent;
}
.message {
  max-width: 84%;
  padding: 13px 17px;
  border-radius: 19px;
  line-height: 1.52;
  white-space: pre-wrap;
  box-shadow: 0 5px 14px rgba(25, 76, 85, .05);
  animation: message-in .24s ease-out;
}
.message strong { font-weight: 850; color: inherit; }
.message.assistant {
  align-self: flex-start;
  border: 1px solid #e0ecec;
  border-bottom-left-radius: 6px;
  background: #f0f7f6;
  color: #244b52;
}
.message.owner {
  align-self: flex-start;
  border: 1px solid #c3dce3;
  border-bottom-left-radius: 6px;
  background: #e5f3f6;
  color: #214b53;
}
.message.owner::before { content: "Property owner"; display: block; margin-bottom: 5px; color: #176b7c; font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.message.guest {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(145deg, #e98b55, #d86e43);
  color: white;
  box-shadow: 0 8px 20px rgba(216, 110, 67, .2);
}
.message.streaming::after { content: "▋"; margin-left: 2px; color: #dd8651; animation: blink 1s steps(1) infinite; }
.chat-form { display: flex; gap: 10px; padding: 15px 16px 16px; border-top: 1px solid #e2edef; background: rgba(248, 253, 252, .88); }
.chat-input-wrap { flex: 1; }
.chat-form input {
  height: 50px;
  border: 1px solid #d5e3e5;
  border-radius: 16px;
  padding: 0 17px;
  background: #fff;
  color: #153b43;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(29, 78, 88, .04);
}
.chat-form input::placeholder { color: #8ba0a4; }
.chat-form input:focus { border-color: #55a2b0; box-shadow: 0 0 0 4px rgba(85, 162, 176, .12); }
.chat-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 108px;
  height: 50px;
  padding: 0 18px;
  background: #176b7c;
  box-shadow: 0 9px 18px rgba(23, 107, 124, .2);
}
.chat-form button:hover { background: #125968; transform: translateY(-1px); }
.send-arrow { font-size: 1.1rem; }
.chat-card .status { min-height: 0; margin: 0; padding: 0 22px; background: rgba(248, 253, 252, .88); color: #6d8589; font-size: .78rem; transition: padding .2s; }
.chat-card .status:not(:empty) { padding-bottom: 12px; }
.guest-footnote { grid-column: 2; margin: -42px 4px 0; color: #6f878b; text-align: center; font-size: .72rem; }

@keyframes message-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading, .owner-chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2, .section-heading p { margin-top: 0; }
.owner-chat-layout { display: grid; grid-template-columns: minmax(220px, 34%) 1fr; gap: 18px; margin-top: 22px; min-height: 420px; }
.owner-chat-list { display: grid; align-content: start; gap: 9px; max-height: 540px; overflow-y: auto; }
.owner-chat-item { display: grid; gap: 6px; width: 100%; text-align: left; background: #fff; color: #153b43; border: 1px solid #bfd4d8; box-shadow: 0 2px 7px rgba(20,63,72,.05); }
.owner-chat-item:hover, .owner-chat-item.active { border-color: #277f90; background: #e5f2f4; color: #082f39; }
.owner-chat-item.active { box-shadow: inset 0 0 0 2px rgba(39,127,144,.2); }
.owner-chat-item.needs_attention { border-left: 5px solid #d7663e; background: #fff1eb; }
.owner-chat-item.owner { border-left: 5px solid #176b7c; background: #e4f2f5; }
.owner-chat-item-status { color: #174852; font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.owner-chat-item.needs_attention .owner-chat-item-status { color: #a53f22; }
.owner-chat-item small { color: #3f5c62; font-weight: 650; }
.owner-chat-item.active small { color: #234b53; }
.owner-chat-item.needs_attention small { color: #713b2b; }
.owner-chat-item.owner small { color: #214f58; }
.muted { color: #526f75; }
.owner-chat-panel { border: 1px solid #bed7da; border-radius: 16px; padding: 16px; background: #f5faf9; }
.owner-chat-panel.empty { display: grid; place-items: center; color: #526f75; }
.chat-status-badge { padding: 6px 10px; border-radius: 999px; background: #e6ede9; font-size: .8rem; font-weight: 800; }
.chat-status-badge[data-status="needs_attention"] { background: #ffe1d6; color: #8a321b; }
.chat-status-badge[data-status="owner"] { background: #d8e9f0; color: #31564f; }
.owner-chat-messages { display: flex; flex-direction: column; gap: 12px; height: 330px; margin: 16px 0; padding: 14px; overflow-y: auto; border-radius: 13px; background: #e7f0f1; }
.owner-message { display: grid; gap: 5px; max-width: 82%; padding: 11px 14px; border: 1px solid transparent; border-radius: 15px; color: #153b43; line-height: 1.5; white-space: pre-wrap; box-shadow: 0 4px 12px rgba(20,63,72,.08); }
.owner-message small { color: #45656c; font-weight: 850; letter-spacing: .03em; }
.owner-message.guest { align-self: flex-start; border-bottom-left-radius: 5px; border-color: #f0c5b5; background: #fff4ef; color: #652d1d; }
.owner-message.guest small { color: #a14529; }
.owner-message.assistant { align-self: flex-end; border-bottom-right-radius: 5px; border-color: #bfd8d3; background: #edf8f5; color: #17483e; }
.owner-message.assistant small { color: #26715f; }
.owner-message.owner { align-self: flex-end; border-bottom-right-radius: 5px; border-color: #9fc8d0; background: #d9eef2; color: #103e48; }
.owner-message.owner small { color: #176b7c; }
.owner-chat-form { display: flex; gap: 10px; }
.owner-chat-form input { flex: 1; }

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 700px) {
  .shell { padding-top: 36px; }
  .grid, .knowledge-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .backoffice { display: block; }
  .sidebar { position: static; height: auto; }
  .admin-main { width: min(100% - 28px, 1120px); padding-top: 30px; }
  .chat-form { align-items: stretch; }
  .owner-chat-layout { grid-template-columns: 1fr; }
}

.owner-page, .login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 3%, rgba(255, 211, 128, .28), transparent 24rem),
    linear-gradient(145deg, #f8fcf9, #edf8fa);
  color: #153b43;
}
.owner-page .backoffice { grid-template-columns: 280px 1fr; }
.owner-page .backoffice { transition: grid-template-columns .24s ease; }
.owner-page .sidebar {
  position: sticky;
  padding: 30px 22px;
  background: linear-gradient(180deg, #124c59, #0d3c47);
  box-shadow: 12px 0 35px rgba(18, 76, 89, .12);
}
.owner-page .sidebar-toggle {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: -15px;
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border: 3px solid #edf8fa;
  background: #e98b55;
  box-shadow: 0 5px 14px rgba(12,53,64,.22);
  font-size: 1.35rem;
  line-height: 1;
}
.owner-page .sidebar-toggle:hover { background: #d97347; }
.owner-page.sidebar-collapsed .backoffice { grid-template-columns: 84px 1fr; }
.owner-page.sidebar-collapsed .sidebar { align-items: center; padding-inline: 14px; }
.owner-page.sidebar-collapsed .owner-brand > div:last-child,
.owner-page.sidebar-collapsed .sidebar > button.secondary,
.owner-page.sidebar-collapsed .sidebar-label,
.owner-page.sidebar-collapsed .property-list,
.owner-page.sidebar-collapsed .sidebar-footer { display: none; }
.owner-page.sidebar-collapsed .owner-brand .assistant-avatar { margin-top: 2px; }
.owner-brand { display: flex; align-items: center; gap: 13px; }
.owner-brand .assistant-avatar { width: 46px; height: 46px; border-radius: 15px 15px 15px 5px; background: #e98b55; box-shadow: 0 10px 22px rgba(233, 139, 85, .22); }
.owner-brand h2, .owner-brand p { margin: 0; }
.owner-brand h2 { margin-top: 3px; font-size: 1.45rem; }
.owner-page .sidebar .eyebrow { color: #9ddbe1; font-size: .68rem; }
.sidebar-label { margin: 14px 4px -5px; color: #8fc0c7; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.owner-page .sidebar button.secondary { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.owner-page .sidebar #new-property { color: #fff; }
.owner-page .property-item { padding: 12px 14px; border-radius: 13px; }
.owner-page .property-item:hover, .owner-page .property-item.active { background: rgba(255,255,255,.12); }
.owner-page .admin-main { width: min(1160px, calc(100% - 56px)); padding-top: 54px; }
.owner-page .admin-main > header { max-width: 820px; margin-bottom: 36px; }
.owner-page .admin-main > header h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: #123f49;
  font-weight: 500;
}
.owner-page .admin-main > header > p:last-child { max-width: 680px; color: #607b80; }
.owner-page .eyebrow, .login-page .eyebrow { color: #176b7c; }
.owner-page .card {
  border-color: rgba(52, 111, 121, .14);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 45px rgba(27, 91, 104, .08);
}
.owner-page .card h2 { color: #174852; }
.collapsible-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.collapsible-heading h2 { margin-bottom: 8px; }
.collapsible-heading p { margin: 0; }
.collapse-button { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.collapse-button b { font-size: 1rem; }
.section-collapsed { padding-block: 22px; }
.section-collapsed .collapsible-heading h2 { margin: 0; }
.section-collapsed .collapsible-heading p { display: none; }
.owner-page input, .owner-page textarea, .owner-page select,
.login-page input {
  border-color: #d5e3e5;
  border-radius: 13px;
  background: #fbfefe;
}
.owner-page input:focus, .owner-page textarea:focus, .owner-page select:focus,
.login-page input:focus { outline: 0; border-color: #55a2b0; box-shadow: 0 0 0 4px rgba(85,162,176,.12); }
.owner-page button, .login-page button { background: #176b7c; box-shadow: 0 8px 18px rgba(23,107,124,.14); }
.owner-page button:hover, .login-page button:hover { background: #125968; }
.owner-page button.secondary { border: 1px solid #c8dadd; background: #f4f9f9; color: #315f68; box-shadow: none; }
.card-kicker { margin: 0 0 5px; color: #dd8651; font-size: .72rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.guest-link-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; margin-top: 24px; }
.guest-links { display: grid; gap: 12px; margin-top: 20px; }
.guest-link-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 17px; border: 1px solid #dce9ea; border-radius: 17px; background: #f8fcfb; }
.guest-link-details { display: grid; gap: 5px; min-width: 0; }
.guest-link-details strong { color: #174852; }
.guest-link-details span { color: #71868a; font-size: .78rem; }
.guest-link-details a { overflow: hidden; color: #176b7c; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.guest-link-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.owner-page .small-button { padding: 8px 11px; background: #e7f2f3; color: #245963; box-shadow: none; font-size: .75rem; }
.owner-page .small-button:hover { background: #d6e9eb; }
.owner-page .small-button.danger { background: #fff0eb; color: #a1462c; }
.empty-state { display: grid; gap: 4px; place-items: center; padding: 34px; border: 1px dashed #c8dadd; border-radius: 17px; color: #71868a; text-align: center; }
.qr-dialog { width: min(520px, calc(100% - 30px)); border: 0; border-radius: 26px; padding: 24px; color: #153b43; box-shadow: 0 35px 90px rgba(16,60,70,.28); }
.qr-dialog::backdrop { background: rgba(10,48,57,.55); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 13px; right: 14px; width: 36px; height: 36px; padding: 0; background: #edf5f5; color: #315f68; box-shadow: none; font-size: 1.4rem; }
.qr-print-sheet { display: grid; justify-items: center; text-align: center; }
.qr-print-sheet h2 { margin-bottom: 8px; }
.qr-print-sheet img { width: min(320px, 80vw); margin: 14px 0; border-radius: 12px; }
.qr-print-sheet p { margin: 4px 0; }
.qr-help { max-width: 360px; color: #617a80; }
.qr-url { max-width: 100%; overflow-wrap: anywhere; color: #71868a; font-size: .68rem; }
.dialog-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.login-page { display: grid; place-items: center; padding: 24px; }
.login-page .login-shell { min-height: auto; width: 100%; }
.login-page .login-panel { border-color: rgba(52,111,121,.14); border-radius: 28px; background: rgba(255,255,255,.9); box-shadow: 0 28px 70px rgba(27,91,104,.14); }
.login-page .login-panel h1 { font-family: Georgia, "Times New Roman", serif; color: #123f49; font-weight: 500; }
.login-brand { margin-bottom: 28px; }

@media (max-width: 850px) {
  .owner-page .backoffice { display: block; }
  .owner-page .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 20px;
  }
  .owner-page .sidebar-toggle {
    top: 17px;
    right: 18px;
    border: 0;
    background: rgba(255,255,255,.12);
  }
  .owner-page.sidebar-collapsed .sidebar {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 64px 15px 17px;
  }
  .owner-page.sidebar-collapsed .owner-brand > div:last-child { display: block; }
  .owner-page.sidebar-collapsed .owner-brand .assistant-avatar { margin: 0; }
  .owner-page .sidebar > button.secondary { align-self: center; width: auto; }
  .owner-page .sidebar-label { grid-column: 1 / -1; margin: 4px 2px -5px; }
  .owner-page .property-list {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .owner-page .property-list::-webkit-scrollbar { display: none; }
  .owner-page .property-item { flex: 0 0 auto; width: auto; max-width: 240px; min-height: 44px; }
  .owner-page .sidebar-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
    padding-top: 13px;
  }
  .owner-page .admin-main {
    width: min(100% - 30px, 760px);
    padding: 32px 0 60px;
  }
  .owner-page .admin-main > header { margin-bottom: 24px; }
  .owner-page .admin-main > header h1 { font-size: clamp(2.7rem, 9vw, 4.2rem); }
  .owner-page .card { border-radius: 20px; padding: 24px; }
  .owner-page .grid, .owner-page .knowledge-grid { grid-template-columns: 1fr; }
  .owner-page .full { grid-column: auto; }
  .owner-page .section-heading { align-items: flex-start; }
  .owner-page .owner-chat-layout { grid-template-columns: 1fr; min-height: 0; }
  .owner-page .owner-chat-list {
    display: flex;
    max-height: none;
    padding-bottom: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .owner-page .owner-chat-list::-webkit-scrollbar { display: none; }
  .owner-page .owner-chat-item { flex: 0 0 min(280px, 78vw); min-height: 92px; }
  .owner-page .owner-chat-panel { min-height: 380px; }
  .owner-page .owner-chat-messages { height: min(48dvh, 420px); min-height: 280px; }
  .guest-link-item { grid-template-columns: 1fr; }
  .guest-link-actions { justify-content: flex-start; }
  .guest-shell {
    width: min(720px, calc(100% - 30px));
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 32px 0 58px;
  }
  .guest-hero { max-width: none; }
  .guest-brand { margin-bottom: 34px; }
  .guest-heading h1 { font-size: clamp(3.6rem, 14vw, 5.7rem); }
  .guest-heading p { max-width: 560px; }
  .guest-footnote { grid-column: 1; margin: -17px 4px 0; }
  .messages { height: min(54dvh, 540px); }
}

@media (max-width: 560px) {
  input, textarea, select { font-size: 16px; }
  button { min-height: 44px; }
  .owner-page .sidebar {
    grid-template-columns: 1fr;
    padding: 17px 15px 14px;
  }
  .owner-page .owner-brand { padding-right: 44px; }
  .owner-page .sidebar > button.secondary { width: 100%; }
  .owner-page .sidebar-label { grid-column: 1; }
  .owner-page .property-list { grid-column: 1; margin-inline: -15px; padding: 0 15px 5px; }
  .owner-page .sidebar-footer { grid-column: 1; }
  .owner-page .admin-main { width: min(100% - 20px, 760px); padding: 24px 0 48px; }
  .owner-page .admin-main > header { padding: 0 6px; }
  .owner-page .admin-main > header h1 { font-size: clamp(2.45rem, 14vw, 3.5rem); overflow-wrap: anywhere; }
  .owner-page .admin-main > header > p:last-child { font-size: .94rem; }
  .owner-page .card { margin: 12px 0; padding: 20px 16px; border-radius: 18px; }
  .owner-page .card h2 { font-size: 1.35rem; }
  .owner-page .knowledge-sections { gap: 22px; margin: 22px 0; }
  .owner-page textarea { min-height: 112px; }
  .owner-page #property-form > button[type="submit"],
  .owner-page #knowledge-form > button[type="submit"],
  .owner-page #guest-link-form > button[type="submit"] { width: 100%; }
  .owner-page .section-heading {
    flex-direction: column;
    gap: 8px;
  }
  .collapsible-heading { align-items: center; }
  .collapsible-heading p { display: none; }
  .collapse-button { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  .collapse-button span { display: none; }
  .owner-page .section-heading > button { width: 100%; }
  .guest-link-form { grid-template-columns: 1fr; }
  .guest-link-form button { width: 100%; }
  .guest-link-item { gap: 14px; padding: 14px; }
  .guest-link-details a { white-space: normal; overflow-wrap: anywhere; }
  .guest-link-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-page .small-button { width: 100%; min-height: 42px; }
  .owner-page .small-button.danger { grid-column: 1 / -1; }
  .owner-page .owner-chat-item { flex-basis: min(250px, 82vw); }
  .owner-page .owner-chat-panel { min-height: 0; padding: 12px; }
  .owner-page .owner-chat-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .owner-page .owner-chat-toolbar > div { display: grid; gap: 8px; }
  .owner-page .owner-chat-toolbar button { width: 100%; }
  .owner-page .owner-chat-messages { height: min(48dvh, 380px); min-height: 260px; }
  .owner-message { max-width: 92%; }
  .owner-chat-form { align-items: stretch; }
  .owner-chat-form button { min-width: 72px; padding-inline: 14px; }
  .qr-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
    padding: 22px 14px 16px;
    overflow-y: auto;
    border-radius: 20px;
  }
  .qr-print-sheet h2 { padding-inline: 24px; font-size: 1.35rem; }
  .qr-print-sheet img { width: min(280px, 76vw); }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog-actions button { width: 100%; padding-inline: 12px; }
  .login-page { padding: 12px; }
  .login-page .login-shell { padding: 0; }
  .login-page .login-panel { padding: 28px 20px; border-radius: 22px; }
  .login-page .login-panel h1 { font-size: clamp(2.4rem, 13vw, 3.2rem); }
  .login-page .stack button { width: 100%; }
  .guest-page { background: linear-gradient(160deg, #f8fcf9 0%, #edf8fa 52%, #e2f2f4 100%); }
  .guest-shell { width: min(100% - 16px, 720px); gap: 16px; padding: 14px 0 max(18px, env(safe-area-inset-bottom)); }
  .guest-sun { width: 220px; top: -100px; right: -100px; }
  .guest-wave { display: none; }
  .guest-brand { margin-bottom: 16px; }
  .guest-brand .assistant-avatar { width: 44px; height: 44px; border-radius: 15px 15px 15px 5px; }
  .guest-heading h1 { margin-bottom: 10px; font-size: clamp(2.55rem, 13vw, 3.5rem); line-height: .92; }
  .guest-heading h1 br { display: none; }
  .guest-heading p { max-width: 34rem; font-size: .9rem; line-height: 1.5; }
  .quick-prompts { flex-wrap: nowrap; margin-top: 15px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .quick-prompts::-webkit-scrollbar { display: none; }
  .quick-prompts button { flex: 0 0 auto; min-height: 42px; }
  .chat-card { border-radius: 20px; }
  .chat-card-header { min-height: 50px; padding: 0 16px; }
  .chat-card-header > span { display: none; }
  .messages { height: clamp(330px, 52dvh, 500px); min-height: 0; padding: 14px 12px; gap: 11px; }
  .message { max-width: 91%; }
  .chat-form {
    position: sticky;
    bottom: 0;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .chat-form input { height: 48px; padding-inline: 14px; }
  .chat-form button { min-width: 52px; width: 52px; padding: 0; }
  .chat-form button > span:first-child { display: none; }
  .guest-footnote { display: none; }
}

@media (max-width: 380px) {
  .owner-page .guest-link-actions { grid-template-columns: 1fr; }
  .owner-page .small-button.danger { grid-column: auto; }
  .owner-chat-form { display: grid; grid-template-columns: 1fr; }
  .owner-chat-form button { width: 100%; }
  .guest-heading h1 { font-size: 3rem; }
  .messages { min-height: 330px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .guest-shell { align-items: start; padding-top: 16px; }
  .guest-brand { margin-bottom: 18px; }
  .guest-heading h1 { font-size: 3.4rem; }
  .quick-prompts { margin-top: 18px; }
  .messages { height: 65dvh; min-height: 300px; }
}

@media print {
  body * { visibility: hidden !important; }
  .qr-dialog[open], .qr-dialog[open] * { visibility: visible !important; }
  .qr-dialog[open] { position: fixed; inset: 0; width: 100%; max-width: none; padding: 0; border-radius: 0; }
  .qr-print-sheet { position: absolute; inset: 0; align-content: center; padding: 30mm; background: #fff; }
  .dialog-actions, .dialog-close { display: none !important; }
  .qr-print-sheet img { width: 90mm; }
}
