/* UTAGE shared shell. Colors and reading hierarchy only: layout ownership,
   keyboard/visual viewport, menu layering, history, and dialogs stay in style.css. */
body:has(> #sidebar) {
  --site-forest: #17231d;
  --site-night: #101d17;
  --site-forest-surface: #22332a;
  --site-forest-rule: #526657;
  --site-ivory: #f4efe4;
  --site-paper: #fffaf0;
  --site-paper-shade: #ebe4d7;
  --site-rule: #c9bead;
  --site-ink: #17231d;
  --site-muted: #515b4e;
  --site-purple: #65458b;
  --site-purple-hover: #523573;
  --site-lavender: #cbb0fa;
  --site-night-muted: #c7d1c6;
  --site-display: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  --bg: var(--site-forest);
  --side: var(--site-night);
  --surface: var(--site-forest-surface);
  --surface-hover: #2b4034;
  --text: var(--site-ivory);
  --muted: var(--site-night-muted);
  --purple: var(--site-lavender);
  --grape: var(--site-purple);
  --border: var(--site-forest-rule);
  --line: var(--site-forest-rule);
  background: var(--site-night);
  color: var(--site-ivory);
}

#sidebar {
  background: var(--site-night);
  border-inline-end-color: var(--site-forest-rule);
}
#sidebar .wordmark { color: var(--site-ivory); }
#sidebar .dot { background: var(--site-lavender); }
#sidebar :is(.hints, .side-bottom) { border-top-color: var(--site-forest-rule); }
#sidebar :is(nav a, nav button, .hints button, .side-bottom a, .side-bottom button) { color: var(--site-night-muted); }
#sidebar :is(nav a, nav button, .hints button, .side-bottom a, .side-bottom button):hover {
  background: var(--site-forest-surface);
  color: var(--site-ivory);
}
#sidebar nav .selected {
  background: #352a45 !important;
  color: #f8f1ff;
  box-shadow: inset 3px 0 var(--site-lavender);
}
#sidebar :is(.access-link span:first-child, .official-links svg) { color: var(--site-lavender); }
body.menu-open > .scrim { background: rgb(9 15 11 / 72%); }

/* This scope excludes the active landing page and the separate standalone pages. */
body.conversation > main {
  background: var(--site-forest);
}
body.conversation > main > header {
  background: var(--site-night);
  color: var(--site-ivory);
  border-bottom: 1px solid var(--site-forest-rule);
}
body.conversation > main > header .language-switch {
  background: var(--site-forest-surface);
  border-color: var(--site-forest-rule);
  box-shadow: none;
}
body.conversation > main > header .language-switch button { color: var(--site-night-muted); }
body.conversation > main > header .language-switch button[aria-pressed="true"] {
  background: var(--site-purple);
  color: #fff;
  box-shadow: none;
}
body.conversation > main > header .home-pill {
  background: var(--site-forest-surface);
  border-color: var(--site-forest-rule);
  color: var(--site-ivory);
  box-shadow: none;
}
body.conversation > main > header .home-pill:hover,
body.conversation > main > header .home-pill:active { background: #352a45; border-color: var(--site-lavender); }
body.conversation > main > header .home-pill svg { fill: var(--site-lavender); }
@media (max-width: 760px) {
  body.conversation > main > header .home-pill .home-outline { fill: none; stroke: var(--site-ivory); }
  body.conversation > main > header .home-pill .home-outline rect { fill: var(--site-lavender); stroke: none; }
}

body.conversation main > .main-body {
  background: var(--site-ivory);
  color: var(--site-ink);
  color-scheme: light;
}
body.conversation #content .message {
  background: #e9ddf5;
  border: 1px solid #d5c0e9;
  color: #302339;
  box-shadow: none;
  overflow-wrap: anywhere;
}
/* The atmospheric villa story and 3D player keep their local visual systems. */
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) {
  color: var(--site-ink);
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) :is(.page-heading, h2, h3, h4):not(.tour-toolbar h3) {
  color: var(--site-ink);
  line-height: 1.4;
  text-wrap: balance;
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) :is(.page-heading, h2) {
  font-family: var(--site-display);
  font-weight: 650;
  letter-spacing: .01em;
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) .page-heading {
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  margin-block: 0 .75em;
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  margin-block: .65em .55em;
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) :where(p, dd) {
  color: var(--site-ink);
  line-height: 1.75;
  overflow-wrap: break-word;
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) :is(.eyebrow, .badge) {
  color: var(--site-purple) !important;
  font-weight: 650;
}
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) .caption {
  color: var(--site-muted) !important;
}
body.conversation #content :is(.card, .owner-pet-feature, .owner-interest-card, .visitor-card, .stay-rates, .recommend-item) {
  background: var(--site-paper);
  border-color: var(--site-rule);
  color: var(--site-ink);
  box-shadow: none;
}
body.conversation #content .stay-rates { border: 1px solid var(--site-rule); }
body.conversation #content :is(.info-detail, .visit-details div, .owner-value-option, .owner-butler-value, .play-steps li, .activity-list li, .card img) {
  border-color: var(--site-rule);
}
body.conversation #content :is(.rates-kicker, .info-detail summary, .visit-details dt, .activity-list li, .visitor-note, .status) {
  color: var(--site-muted);
}
body.conversation #content .status { border-color: #958778; }
body.conversation #content :is(.owner-value .owner-price, .owner-value .owner-stay-zero, .owner-value .owner-allocation, .owner-butler-price, .owner-numbers strong, .play-steps li span, .visitor-season) {
  color: var(--site-purple);
}
body.conversation #content :is(.visitor-photo, .villa-completion, .villa-media) {
  background: var(--site-paper-shade);
  border-color: var(--site-rule);
}
body.conversation #content :is(.visitor-photo figcaption, .visitor-photo figcaption p, .villa-completion figcaption, .villa-media figcaption) {
  color: var(--site-muted);
}
body.conversation #content .outdoor-experience { border-left-color: var(--site-purple); }
body.conversation #content .retry-question {
  border-left-color: var(--site-purple);
  color: var(--site-muted) !important;
}
body.conversation #content .thinking { color: var(--site-muted) !important; }
body.conversation #content :where(.reply:not(:has(> .villa-story)), .villa-facts) a:not(:where(.actions a, .tour-details a)) {
  color: var(--site-purple);
  text-decoration: underline;
  text-underline-offset: .2em;
}
body.conversation #content .visitor-credit summary { color: var(--site-purple); }
body.conversation #content :is(.actions > a, .actions > button, .chat-retry) {
  background: transparent;
  color: var(--site-purple);
  border: 1px solid #877198;
}
body.conversation #content :is(.actions > a, .actions > button, .chat-retry):hover {
  background: #eee4f5;
  color: var(--site-purple-hover);
  border-color: var(--site-purple);
}
body.conversation #content :is(.actions > .primary, .actions > a[data-consult].primary, .visitor-actions > a) {
  color: #fff;
  background: var(--site-purple);
  border-color: var(--site-purple);
  text-decoration: none;
  font-weight: 650;
}
body.conversation #content :is(.actions > .primary, .actions > a[data-consult].primary, .visitor-actions > a):hover {
  color: #fff;
  background: var(--site-purple-hover);
  border-color: var(--site-purple-hover);
}
body.conversation #content :is(a, button, summary):focus-visible {
  outline: 2px solid var(--site-purple);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--site-paper);
}
body.conversation #content :is(.villa-story, .villa-tour) :is(a, button):focus-visible {
  outline-color: var(--site-lavender);
  box-shadow: none;
}

/* Dock retains its existing safe-area, compact keyboard and fixed-shell rules. */
body.conversation #input-area {
  background: var(--site-night);
  border-top: 1px solid var(--site-forest-rule);
  color: var(--site-ivory);
}
body.conversation #input-area .composer-label { color: var(--site-ivory); }
body.conversation #composer {
  background: var(--site-forest-surface);
  border-color: #728578;
  box-shadow: none;
}
body.conversation #composer:focus-within {
  border-color: var(--site-lavender);
  box-shadow: 0 0 0 1px var(--site-lavender);
}
body.conversation #composer textarea { color: var(--site-ivory); }
body.conversation #composer textarea::placeholder { color: var(--site-night-muted); }
body.conversation #composer .send {
  color: #fff;
  background: var(--site-purple);
  box-shadow: inset 0 0 0 1px #9677b8;
}
body.conversation #composer .send:hover { background: #7652a2; }
body.conversation #composer .send:active { background: var(--site-purple-hover); }
body.conversation #composer .send:disabled { opacity: .55; cursor: wait; }
body.conversation #input-area #composer-status { color: #e4d5f8 !important; }
body.conversation #chips button {
  color: var(--site-ivory);
  background: transparent;
  border-color: #728578;
}
body.conversation #chips .surprise { color: #ead9ff; border-color: #9577b4; }
body.conversation #chips button:hover { color: #fff; background: var(--site-forest-surface); border-color: var(--site-lavender); }
body.conversation #input-area .helper { color: var(--site-night-muted); }
:is(#sidebar, body.conversation > main > header, body.conversation #input-area)
:is(a, button, textarea):focus-visible {
  outline-color: var(--site-lavender);
}

/* Reading and answering use the same compact phone dock. The field stays usable. */
@media (max-width: 760px) {
  body.conversation:has(#content > .reply[data-guide-history-entry]:last-child) > main > .main-body {
    padding: 12px max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left));
  }
  body.conversation #content .stay-rates {
    padding: 18px 12px;
    border-radius: 10px;
  }
  body.conversation #content .stay-rates .editorial-prices .ed-price-option {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
    padding-block: .13rem;
    font-size: 1rem;
    font-weight: 550;
    line-height: 1.42;
  }
  body.conversation #content .stay-rates .editorial-prices .ed-price-option strong {
    flex: none;
    font-size: 1.12rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  body.conversation #content .stay-rates .ed-price-separator { display: none; }
  body.conversation:has(#content > .reply:is([data-guide-history-entry],.concierge-reply):last-child) > main > #input-area {
    padding: 5px max(12px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  body.conversation:has(#content > .reply:is([data-guide-history-entry],.concierge-reply):last-child) #input-area .composer-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    margin: 0;
  }
  body.conversation:has(#content > .reply:is([data-guide-history-entry],.concierge-reply):last-child) #input-area :is(#chips, .helper) { display: none; }
  body.conversation:has(#content > .reply:is([data-guide-history-entry],.concierge-reply):last-child) #composer {
    min-height: 51px;
    padding: 3px 5px 3px 11px;
    border-radius: 12px;
  }
}


/* Ask UTAGE replies only. Saved guides and static Villa pages stay editorial. */
body.conversation #content > .reply.concierge-reply {
  background: #fbf8f0;
  border: 1px solid #ddd1c2;
  border-inline-start: 3px solid var(--site-purple);
  padding: clamp(.8rem,3vw,1.4rem);
  border-radius: 4px;
}
body.conversation #content .concierge-reply .concierge-attribution { margin: 0 0 .7rem; color: var(--site-purple); letter-spacing: .06em; }
body.conversation #content .concierge-reply .concierge-lead { font-weight: 750; font-size: clamp(1.04rem,4.5vw,1.23rem); color: var(--site-ink); }
body.conversation #content .concierge-reply .source-links { border-top: 1px solid #ddd1c2; padding-top: .45rem; margin-top: .8rem; }
body.conversation #content .concierge-reply .source-links > a { background: transparent; border-color: transparent; color: var(--site-purple); text-align: start; text-decoration: underline; text-underline-offset: .2em; padding-inline: .15rem; min-height: 44px; }
body.conversation #content .concierge-reply .source-links > a:hover { background: #eee4f4; color: var(--site-purple); }

/* One linked preview makes the plan tangible without replacing the owner guide. */
body.conversation #content .owner-lp-entry {
  max-width: 38rem;
  margin: 16px 0 22px;
}
body.conversation #content .owner-lp-entry > a.owner-lp-link {
  display: grid;
  grid-template-columns: clamp(5.25rem, 28%, 8.25rem) minmax(0, 1fr);
  min-height: 110px;
  overflow: hidden;
  border: 1px solid var(--site-purple);
  border-radius: 10px;
  color: #fff;
  background: #3c2a56;
  text-decoration: none;
  transition: background-color .18s ease;
}
body.conversation #content .owner-lp-entry > a.owner-lp-link:is(:hover, :focus-visible) {
  background: #50356d;
}
body.conversation #content .owner-lp-entry > a.owner-lp-link:focus-visible {
  outline: 2px solid var(--site-purple);
  outline-offset: 3px;
}
.owner-lp-preview { position: relative; min-width: 0; }
body.conversation #content .owner-lp-preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: 52% center;
}
.owner-lp-caption {
  position: absolute;
  bottom: 5px;
  left: 5px;
  padding: 2px 4px;
  border-radius: 3px;
  color: #fff;
  background: #251a36;
  font-size: .6875rem;
  line-height: 1.25;
}
.owner-lp-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 12px clamp(10px, 3vw, 20px);
}
.owner-lp-copy strong {
  color: #fff;
  font-size: clamp(1.0625rem, 4.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: .015em;
}
.owner-lp-copy strong > span { display: inline-block; }
.owner-lp-cta {
  color: #f3e6ff;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: .23em;
}
@media (prefers-reduced-motion: reduce) {
  body.conversation #content .owner-lp-entry > a.owner-lp-link { transition: none; }
}
