/* Scoped progressive enhancement. The editorial grid is the no-script fallback. */
.rooms-page .cg-source[hidden] { display: none !important; }
.rooms-page .compact-floor {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 5vw, 80px); padding: 64px 7vw; min-height: 0;
  direction: inherit; align-items: center; border-bottom: 1px solid #17332924;
}
.rooms-page .compact-floor > * { direction: inherit; min-width: 0; }
.rooms-page .compact-floor .floor-copy { padding: 0; display: block; }
.compact-floor .floor-number { margin: 0 0 18px; }
.rooms-page .compact-floor h2 { font-size: clamp(2.5rem, 3.6vw, 4.1rem); line-height: 1.05; margin-bottom: 24px; }
.compact-floor .floor-copy > p:not(.eyebrow):not(.floor-number) { font-size: .95rem; }
.cg-details { border-top: 1px solid #17332938; margin-top: 24px; padding-top: 15px; font-size: .9rem; }
.cg-details summary { cursor: pointer; min-height: 44px; display: list-item; font-weight: 600; }
.cg-details .floor-details { margin-top: 18px; padding-top: 18px; }
.compact-gallery { min-width: 0; width: 100%; }
.cg-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #ded9cb; }
.cg-open { width: 100%; height: 100%; padding: 0; display: block; border: 0; cursor: zoom-in; background: none; touch-action: pan-y; }
.cg-open .cg-photo { display: block; width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; object-fit: cover; }
.cg-open .cg-photo.cg-portrait { object-fit: contain; }
.cg-expand { position: absolute; inset-inline-end: 16px; bottom: 16px; display: grid; place-items: center; width: 44px; height: 44px; background: var(--ink); color: white; font-size: 1.6rem; }
.cg-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cg-counter { font-size: .75rem; letter-spacing: .12em; margin-inline-end: auto; font-variant-numeric: tabular-nums; direction: ltr; }
.compact-gallery .cg-prev, .compact-gallery .cg-next, .cg-dialog button { display: grid; place-items: center; min-width: 46px; min-height: 46px; border: 1px solid #17332970; background: transparent; color: var(--ink); font: inherit; font-size: 1.25rem; cursor: pointer; }
.compact-gallery .cg-prev:hover, .compact-gallery .cg-next:hover { color: white; background: var(--ink); }
.cg-caption { display: grid; gap: 4px; min-height: 3.7em; margin: 10px 0 14px; font-size: .84rem; line-height: 1.4; }
.cg-group { color: var(--ink); font-weight: 600; font-size: .73rem; letter-spacing: .02em; }
.cg-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 4px 3px 9px; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
.cg-thumb { flex: 0 0 80px; width: 80px; height: 62px; padding: 3px; border: 2px solid transparent; background: none; cursor: pointer; scroll-snap-align: center; }
.cg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cg-thumb[aria-pressed="true"] { border-color: var(--ink); }
.cg-open:focus-visible, .compact-gallery button:focus-visible, .cg-details summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cg-open:focus-visible { outline-offset: -5px; }
.cg-dialog { box-sizing: border-box; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 64px 6vw 24px; border: 0; background: #10251ff5; color: #fff; }
.cg-dialog[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 14px; }
.cg-dialog::backdrop { background: #10251f; }
.cg-dialog .cg-dialog-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; touch-action: pan-y; }
.cg-dialog .cg-close { position: absolute; top: 10px; inset-inline-end: 18px; border: 1px solid #ffffff88; color: #fff; font-size: 2rem; }
.cg-dialog-caption { margin: 0; text-align: center; font-size: .9rem; }
.cg-dialog-bar { display: flex; gap: 24px; align-items: center; justify-content: center; }
.cg-dialog-bar button { color: #fff; border-color: #ffffff88; }
.cg-dialog-count { font-size: .8rem; direction: ltr; font-variant-numeric: tabular-nums; }
.cg-dialog button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 900px) {
  .rooms-page .compact-floor { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 42px 5vw; }
  .rooms-page .compact-floor h2 { max-width: 18ch; font-size: clamp(2.4rem, 6vw, 3.6rem); }
  .compact-floor .floor-number { margin-bottom: 10px; }
  .cg-stage { aspect-ratio: 3 / 2; }
}
@media (max-width: 500px) {
  .rooms-page .compact-floor { padding-block: 32px; gap: 22px; }
  .cg-stage { aspect-ratio: 4 / 3; }
  .cg-thumb { flex-basis: 68px; width: 68px; height: 54px; }
  .cg-caption { min-height: 4.3em; }
  .cg-dialog { padding-inline: 12px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .cg-open:hover .cg-expand { background: #34574a; }
  .cg-thumb { transition: border-color 160ms ease; }
}
