#site-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  min-height: 44px;
  border: 1px solid #d4af378c;
  border-radius: 8px;
  background: #101b31;
  color: #f7e39c;
  font: 700 12px/1 system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
#site-theme-toggle > span:first-child { font-size: 18px; }
#site-theme-toggle:focus-visible { outline: 2px solid #fff0b2; outline-offset: 2px; }
@media (max-width: 760px) {
  .header-end #site-theme-toggle { justify-content: center; min-width: 44px; }
  .header-end #site-theme-toggle .theme-label { display: none; }
  .header-end:has(#site-theme-toggle) { gap: clamp(4px, 1.5vw, 9px); }
}
@media (max-width: 360px) {
  .header:has(#site-theme-toggle) .lang { display: none; }
}

html[data-theme="light"] {
  --theme-paper: #f7f4ed;
  --theme-card: #fffdf8;
  --theme-ink: #101b31;
  --theme-muted: #37475c;
  --theme-accent: #715119;
  --theme-edge: #cbb786;
  color-scheme: light;
}
[data-theme="light"] body { background: var(--theme-paper); color: var(--theme-ink); }
[data-theme="light"] #site-theme-toggle { background: #f7e39c; color: #101827; }
[data-theme="light"] body:is(.is-sales,.is-unit-detail,:has(.corporate-contact-page)) #main,
[data-theme="light"] .projects-page,
[data-theme="light"] body.is-unit-detail .mobile-unit-screen,
[data-theme="light"] body.is-unit-detail .mobile-unit-screen dialog.mu-panel,
[data-theme="light"] dialog#project-content.mp-panel,
[data-theme="light"] dialog.plan-tour.pt-public-media,
[data-theme="light"] .home-locations {
  background: var(--theme-paper);
  color: var(--theme-ink);
}
[data-theme="light"] .projects-page {
  --project-brand-gold: var(--theme-accent);
  --catalogue-text: var(--theme-muted);
  --catalogue-border: var(--theme-edge);
}
[data-theme="light"] body:is(.is-sales,.is-unit-detail) {
  --unit-ink: var(--theme-paper);
  --unit-card: var(--theme-card);
  --unit-text: var(--theme-ink);
  --unit-gold: var(--theme-accent);
  --unit-edge: var(--theme-edge);
}
[data-theme="light"] body:has(.corporate-contact-page) {
  --contact-ink: var(--theme-paper);
  --contact-surface: var(--theme-card);
  --contact-text: var(--theme-ink);
  --contact-gold: var(--theme-accent);
  --contact-line: var(--theme-edge);
}
[data-theme="light"] body:has(.corporate-contact-page) :is(.header,#footer) { background: #080f1e; }
[data-theme="light"] .projects-page :is(.chips,.project-card),
[data-theme="light"] dialog#project-content :is(.project-contact-intro,.project-contact-secondary a,.project-contact-secondary button,.project-contact-call,.project-video-card,.project-plan-card),
[data-theme="light"] dialog.plan-tour.pt-public-media :is(.pt-plan,.pt-room,.pt-controls),
[data-theme="light"] body.is-unit-detail .mobile-unit-screen dialog.mu-panel :is(.mu-sheetbar,.fs-price) {
  background: var(--theme-card);
  border-color: var(--theme-edge);
  color: var(--theme-ink);
}
[data-theme="light"] .project-catalogue-hero { --project-brand-gold: var(--home-gold-light); }
[data-theme="light"] body.is-sales .sales-brand-hero { --unit-gold: var(--home-gold-light); }
[data-theme="light"] .projects-page .project-card .project-code { color: var(--theme-accent); }
[data-theme="light"] .projects-page .project-card :is(.project-list-year,.image + div > p,.project-meta) { color: var(--theme-muted); }
[data-theme="light"] .projects-page .project-card:hover { background: #f1e8d4; }
[data-theme="light"] .projects-page .project-card :is(h2 a,.project-list-short-title),
[data-theme="light"] body.is-sales #main .unit-info h2,
[data-theme="light"] body.is-unit-detail .mobile-unit-screen .mu-heading h1,
[data-theme="light"] .mobile-unit-screen .mu-sheetbody :is(.fs-sheet,.fs-fact strong,.fs-benefit h4),
[data-theme="light"] dialog#project-content .ps-content :is(.fs-fact strong,.fs-benefit h4),
[data-theme="light"] dialog#project-content :is(.project-plan-card strong,.project-video-card h3),
[data-theme="light"] .projects-page .empty {
  color: var(--theme-ink);
}
[data-theme="light"] .projects-page .chip:hover:not(.active) { background: #f1e8d4; color: var(--theme-ink); }
[data-theme="light"] .projects-page .project-card .status:not(.done) { background: #f7e39c; border-color: var(--theme-edge); }
[data-theme="light"] .projects-page .project-card .status.done { background: #101b31; }
[data-theme="light"] .projects-page :is(.chip.active,.project-card>.button) { border-color: var(--theme-edge); }
[data-theme="light"] body.is-unit-detail .mobile-unit-screen .mu-five-dock { background: #101b31; }
[data-theme="light"] body.is-unit-detail .mobile-unit-screen .mu-five-dock svg { color: #f7e39c; }
[data-theme="light"] body.is-unit-detail .mobile-unit-screen .mu-five-dock .mu-whatsapp svg { color: #101827; }
[data-theme="light"] dialog#project-content :is(h2,.project-contact-intro > span,.project-plan-card > button > span,.listing-video > a),
[data-theme="light"] dialog.plan-tour.pt-public-media :is(.pt-head h2,.pt-room h3) {
  background: none;
  color: var(--theme-accent);
}
[data-theme="light"] dialog#project-content :is(p,.location-area,.location-navigation-note,.project-contact-number,.project-media-actions [role="status"]),
[data-theme="light"] .mobile-unit-screen .project-media-actions [role="status"],
[data-theme="light"] .pt-public-media .project-media-actions [role="status"],
[data-theme="light"] .pt-public-media .pt-view-note summary { color: var(--theme-muted); }
[data-theme="light"] dialog#project-content .ps-sheet {
  --ps-gold: var(--theme-accent);
  --ps-muted: var(--theme-muted);
  --ps-surface: var(--theme-card);
  --ps-border: var(--theme-edge);
}
[data-theme="light"] dialog#project-content .ps-content { color: var(--theme-ink); }
[data-theme="light"] dialog#project-content :is(.ps-bar,.fs-identity) { background: #101b31; color: #f7e39c; }
[data-theme="light"] dialog#project-content :is(.project-contact-number button,.project-contact-call svg,.project-contact-secondary svg) { color: var(--theme-accent); }
[data-theme="light"] dialog#project-content .project-contact-whatsapp { color: #101827; }
[data-theme="light"] .contact-map-view #destinations { border-color: var(--theme-edge); }
[data-theme="light"] #destinations :is(article,select,article button) {
  background: var(--theme-card);
  color: var(--theme-ink);
  border-color: var(--theme-edge);
  color-scheme: light;
}
[data-theme="light"] #destinations :is(label, article strong) { color: var(--theme-accent); }
[data-theme="light"] #destinations article small { color: var(--theme-muted); }
[data-theme="light"] .home-locations :is(h2,.corporate-eyebrow) { color: var(--theme-accent); }

#navigation [data-home-company]:not([hidden]) {
  display:flex;
  align-items:center;
  gap:6px;
  min-height:44px;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:700 12px Inter,Arial,sans-serif;
  letter-spacing:.3px;
  cursor:pointer;
}
#navigation [data-home-company] svg { width:16px; height:16px; color:#f4dc96; flex:none; }
#navigation [data-home-company]:is(:hover,:focus-visible) { color:#f4dc96; }
@media (min-width:761px) and (max-width:960px) {
  .header #navigation:has([data-home-company]:not([hidden])) { gap:14px; }
}
@media (max-width:760px) {
  #navigation [data-home-company]:not([hidden]) { padding:17px 5px; text-align:start; }
}
dialog.home-company {
  position:fixed;
  inset:0;
  margin:auto;
  width:min(560px,calc(100% - 32px));
  max-height:calc(100dvh - 40px);
  overflow:auto;
  padding:clamp(18px,5vw,32px);
  border:1px solid #b99756;
  border-radius:16px;
  background:#0d182b;
  color:#e4ebf6;
}
dialog.home-company::backdrop { background:#030710bc; }
.home-company form { display:flex; justify-content:flex-end; margin:0 0 14px; }
.home-company form button {
  min-height:44px;
  padding:0 13px;
  border:1px solid currentColor;
  border-radius:999px;
  background:transparent;
  color:#f4dc96;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.home-company-label { margin:0 0 7px; color:#f1d890; font-size:.75rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.home-company h2 { margin:0; color:#f4dc96; font:700 clamp(1.65rem,5vw,2.5rem)/1.1 Georgia,serif; overflow-wrap:anywhere; }
.home-company-text { margin:16px 0 0; line-height:1.65; white-space:pre-line; overflow-wrap:anywhere; }
[data-theme="light"] dialog.home-company { background:var(--theme-paper); color:var(--theme-ink); border-color:var(--theme-edge); }
[data-theme="light"] .home-company :is(h2,.home-company-label,form button) { color:var(--theme-accent); }

.unit-picture .status[data-reserved="true"], .unit-reservation-stamp {
 background:#f6e09a;
 color:#241804;
 border:1px solid #b58936;
 font-weight:800;
}
.unit-reservation-stamp {
 width:fit-content;
 padding:6px 12px;
 margin:10px 12px;
 border-radius:999px;
}

.panel-theme-toggle {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #b49a5c;
  border-radius: 8px;
  background: #162943;
  color: #fff;
  font: 700 13px/1.2 system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.project-video-theme { float: right; margin: 0 8px 6px; }
.project-video-theme + h2 { clear: both; }
.mu-sheetbar .panel-theme-toggle { margin-inline-start: auto; }
.listing-video .video-sound-hint { margin: 0 0 8px; font-size: 13px; line-height: 1.4; }
[data-theme="dark"] dialog#project-content.mp-video-full .video-sound-hint { color: #e2eaf7; }
body.is-unit-detail dialog.mu-panel[data-panel-key="video"] { padding: 0; overflow: hidden; }
body.is-unit-detail dialog.mu-panel[data-panel-key="video"] .unit-video-player,
dialog.mp-panel.mp-video-full .unit-video-player {
  width: min(100%, max(260px, calc((100dvh - 220px) * 16 / 9)));
}
[data-theme="light"] .panel-theme-toggle {
  background: var(--theme-card);
  color: var(--theme-ink);
}
[data-theme="light"] body.is-unit-detail .mobile-unit-screen dialog.mu-panel[data-panel-key="video"] :is(.project-video-card,.listing-video),
[data-theme="light"] dialog#project-content.mp-video-full .listing-video {
  background: var(--theme-card);
  border-color: var(--theme-edge);
  color: var(--theme-ink);
}
[data-theme="light"] body.is-unit-detail .mobile-unit-screen dialog.mu-panel[data-panel-key="video"] :is(h2,h3,.video-sound-hint,.listing-video > a),
[data-theme="light"] dialog#project-content.mp-video-full .video-sound-hint {
  color: var(--theme-ink);
}
@media (max-width: 599px) {
  .mu-sheetbar:has(.panel-theme-toggle) { gap: 6px; }
  .mu-sheetbar:has(.panel-theme-toggle) > button { padding-inline: 7px; font-size: 12px; }
}

/* Branded surfaces retain dark backgrounds in either theme. */
[data-theme="light"] .contact-map-page > header {
  --contact-gold: var(--home-gold-light);
  --contact-text: #e2eaf7;
}
[data-theme="light"] body.is-unit-detail .mobile-unit-screen dialog.mu-panel .mu-sheetbar > span {
  color: var(--theme-ink);
}
[data-theme="light"] dialog#project-content .ps-content .fs-identity p,
[data-theme="light"] body.is-unit-detail .mobile-unit-screen .mu-sheetbody .fs-identity p {
  color: #f7e39c;
}
[data-theme="light"] .projects-page .project-card > .button:hover {
  background: #f7e39c;
}
