/* Tour 3D lives within Ambienti; brand tokens stay owned by brand.css. */
.villa-tour { background: var(--brand-cream, #f1eee5); padding: 72px 0 64px; scroll-margin-top: 120px; }
.tour-heading { max-width: 1560px; margin: 0 auto 22px; padding: 0 5vw; }
.tour-heading h2 { font: 400 clamp(2.4rem, 4vw, 3.6rem)/1.1 var(--serif); margin: 0; }
.tour-shortcut { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); right: max(22px, env(safe-area-inset-right)); z-index: 18; display: inline-flex; align-items: center; gap: 13px; padding: 15px 22px; max-width: calc(100vw - 32px); min-height: 56px; background: var(--ink); color: var(--cream); border: 1px solid var(--gold); box-shadow: 0 6px 28px #07161040; text-decoration: none; line-height: 1.2; }
.tour-shortcut strong { display: block; font-size: .95rem; }
.tour-shortcut small { display: block; font-size: .72rem; margin-bottom: 4px; }
.tour-shortcut > svg { width: 28px; height: 28px; flex: 0 0 28px; }
.tour-shortcut:hover { background: var(--brand-forest-deep, #132a22); }
.tour-shortcut:focus-visible { outline: 3px solid var(--brand-focus, #985422); outline-offset: 4px; }
.tour-shortcut[hidden], .menu-open .tour-shortcut, .villa-tour [hidden] { display: none !important; }
.villa-explorer { padding: 0 5vw; max-width: 1560px; margin: auto; }
.villa-tour .tour-fallback-floors { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.villa-tour .tour-fallback-floors a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--brand-line, #9aa398); text-underline-offset: 4px; }
.villa-tour .explorer-tools { padding-top: 8px; }
.villa-tour .three-status { font-size: .84rem; color: var(--brand-muted, #556258); margin: 8px 0; }
.villa-tour .floor-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 22px 0 18px; }
.villa-tour .floor-heading h3 { font: 400 2.35rem/1.1 var(--serif); margin: 0; }
.villa-tour .plan-floor { scroll-margin-top: 120px; }
.villa-tour .plan-floor + .plan-floor { margin-top: 40px; }
.map-enhanced .villa-tour .plan-floor + .plan-floor { margin-top: 0; }
.villa-tour .plan-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.villa-tour .plan-layout > * { min-width: 0; }
.villa-tour .map-card { background: var(--brand-paper, #faf8f1); padding: 22px; border: 1px solid var(--brand-line-soft, #17332930); }
.villa-tour .map-card:empty { display: none; }
.villa-tour .villa-3d-panel { min-width: 0; width: 100%; }
.villa-tour .three-view-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.villa-tour .three-view-switch button, .villa-tour .three-controls button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--brand-line, #9aa398); background: transparent; color: var(--ink); font: inherit; font-size: .8rem; cursor: pointer; }
.villa-tour .three-view-switch button { min-height: 48px; padding-inline: 6px; line-height: 1.3; }
.villa-tour .three-view-switch button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.villa-tour .three-view-switch button:disabled, .villa-tour .three-controls button:disabled { opacity: .5; cursor: default; }
.villa-tour .three-view-switch button:not(:disabled):hover { border-color: var(--ink); }
.villa-tour .three-view-switch button:focus-visible, .villa-tour .room-picker > summary:focus-visible { outline: 2px solid var(--brand-focus, #985422); outline-offset: 3px; }
.villa-tour .three-area-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .72rem; margin: 14px 0 0; color: var(--brand-muted, #556258); }
.villa-tour .three-area-key > span { display: inline-flex; align-items: center; gap: 8px; }
.villa-tour .three-area-key i { width: 12px; height: 12px; flex: 0 0 12px; background: #a5a7a9; border: 1px solid #666b6e; }
.villa-tour .three-area-key .selection-swatch { background: #db741f; border: 2px solid #713819; }
.villa-tour .villa-3d-stage { width: 100%; height: 480px; margin: 10px 0; background: var(--brand-paper, #faf8f1); }
.villa-tour .three-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.villa-tour .three-controls button:hover { background: var(--brand-stone, #ded9cb); }
.villa-tour .three-help, .villa-tour .three-note { color: var(--brand-muted, #556258); font-size: .74rem; margin: 14px 0 0; }
.villa-tour .three-note { border-top: 1px solid var(--brand-line-soft, #17332930); padding-top: 12px; }
.villa-tour .room-view { background: var(--ink); color: var(--cream); scroll-margin-top: 120px; min-width: 0; }
.villa-tour .room-kicker { display: flex; justify-content: space-between; gap: 15px; padding: 16px 22px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.villa-tour [data-photo-count] { color: var(--gold); font-variant-numeric: tabular-nums; }
.villa-tour .room-media { position: relative; background: var(--brand-forest-deep, #132a22); aspect-ratio: 4/3; overflow: hidden; touch-action: pan-y pinch-zoom; }
.villa-tour .room-media > img { width: 100%; height: 100%; object-fit: contain; }
.villa-tour .room-media.is-text-only { aspect-ratio: auto; min-height: 260px; }
.villa-tour .room-no-photo { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 36px; margin: 0; font: 400 2rem/1.15 var(--serif); }
.villa-tour .room-no-photo .no-photo-copy { font: 400 .95rem/1.6 var(--sans); }
.villa-tour .room-no-photo a { font: 400 .88rem/1.5 var(--sans); }
.villa-tour .gallery-controls { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 7px; }
.villa-tour .gallery-controls button { display: grid; place-items: center; border: 0; width: 46px; height: 46px; font-size: 1.3rem; background: var(--cream); color: var(--ink); cursor: pointer; }
.villa-tour .gallery-thumbnails { display: flex; gap: 8px; padding: 12px 18px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.villa-tour .gallery-thumbnail { padding: 3px; flex: 0 0 70px; width: 70px; height: 56px; background: transparent; border: 2px solid transparent; cursor: pointer; }
.villa-tour .gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.villa-tour .gallery-thumbnail[aria-current="true"] { border-color: var(--gold); }
.villa-tour .room-content { padding: 24px 28px 28px; }
.villa-tour .room-content h4 { font: 400 clamp(2rem, 3vw, 3rem)/1.08 var(--serif); margin: 0 0 15px; }
.villa-tour .room-content > p { font-size: .91rem; margin: 0 0 16px; }
.villa-tour .room-content .photo-caption { font-size: .76rem; border-top: 1px solid #f1eee530; padding-top: 14px; }
.villa-tour .room-content .gallery-hint { font-size: .73rem; }
.villa-tour .map-back { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; color: var(--gold); text-underline-offset: 4px; }
.villa-tour .room-picker { border-top: 1px solid var(--brand-line-soft, #17332930); margin-top: 16px; padding-top: 4px; }
.villa-tour .room-picker > summary { min-height: 44px; align-content: center; padding-block: 10px; font-size: .83rem; cursor: pointer; }
.villa-tour .room-selector { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; scroll-margin-top: 120px; }
.villa-tour .room-selector a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--brand-line, #9aa398); text-decoration: none; font-size: .83rem; line-height: 1.3; }
.villa-tour .room-selector a[aria-current="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.villa-tour .room-selector a:hover { border-color: var(--ink); }
.villa-tour [data-view-mode="photos"] .plan-layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin-inline: auto; }
.villa-tour .map-noscript { padding: 20px; background: var(--brand-stone, #ded9cb); }
.villa-tour .sr-only, .map-enhanced .villa-tour .floor-heading { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rooms-page footer { padding-bottom: 120px; }
.rooms-page .floor-index { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rooms-page .ground-floor-gallery figure:first-child { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .villa-tour .plan-layout { gap: 16px; }
  .villa-tour .map-card { padding: 16px; }
  .villa-tour .floor-heading { display: block; }
}
@media (max-width: 760px) {
  .rooms-page .floor-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rooms-page .floor-index a { padding: 14px 18px; border-bottom: 1px solid #ffffff2e; }
  .villa-tour { padding-top: 52px; }
  .villa-tour .plan-layout { grid-template-columns: minmax(0, 1fr); }
  .villa-tour .villa-3d-stage { height: 380px; max-height: 105vw; }
  .villa-tour .room-content { padding: 22px; }
  .villa-tour .room-selector a { flex-grow: 1; justify-content: center; }
  .tour-shortcut { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); padding: 12px 17px; }
  .tour-shortcut small { font-size: .68rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .villa-tour .room-media.is-changing > img { animation: tour-photo-in .25s ease-out; }
  @keyframes tour-photo-in { from { opacity: .6; } to { opacity: 1; } }
}
.villa-tour .three-retry { min-height: 44px; padding: 8px 16px; border: 1px solid var(--ink); background: var(--ink); color: var(--cream); font: inherit; font-size: .8rem; cursor: pointer; }
.villa-tour .three-retry:hover { background: transparent; color: var(--ink); }
