/* ---------- Thumbnail pages (Amenities and any other menu in thumbnail mode) ---------- */
.amen { position: absolute; inset: 0; background: #000; overflow: hidden; animation: amen-in 0.4s ease; }
@keyframes amen-in { from { opacity: 0; } }

/* While a thumbnail page is open, the orbit viewer and its controls step aside, unless the thumbnail
   on screen shows frames (body.amen-frames): then the orbit viewer, its balloons and their panel are
   its picture, under the page, without the turn buttons and the cube (turning is by dragging). */
body:not(.mode-frames):not(.amen-frames) #canvas,
body:not(.mode-frames) .navigation,
body:not(.mode-frames):not(.amen-frames) #spots,
body:not(.mode-frames):not(.amen-frames) #panel,
body:not(.mode-frames):not(.amen-frames) #loadbar { display: none !important; }
/* The page lets the drags through to the frames; only its own controls and columns take them. */
.amen.on-frames { background: transparent; pointer-events: none; }
.amen.on-frames .amen-side, .amen.on-frames .amen-switch, .amen.on-frames .amen-strip, .amen.on-frames .amen-pick { pointer-events: auto; }
/* A black cover over the frames while one thumbnail gives way to another. */
.amen-layer.amen-cover { background: #000; transform: none; transition: opacity 0.45s ease; }

/* Full-screen picture or video. A new one fades in above the old one with a slow settle. */
.amen-stage { position: absolute; inset: 0; isolation: isolate; }
.amen-layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transform: scale(1.06);
  transition: opacity 0.7s ease, transform 1.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.amen-layer.in { opacity: 1; transform: none; }
/* The previous picture fades out completely before the next one comes in. */
.amen-layer.out { opacity: 0; transform: none; transition: opacity 0.45s ease; }

/* Left column: title, gallery and the free HTML content, over a dark blurred fade. */
.amen-side { position: absolute; left: 0; top: 0; bottom: 0; width: 344px; }
.amen-side-bg { position: absolute; left: 0; top: 0; bottom: 0; width: 409px; pointer-events: none; }
.amen-side-bg::before, .amen-side-bg::after { content: ""; position: absolute; inset: 0; }
.amen-side-bg::before {
  backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); background: rgba(0, 0, 0, 0.08);
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent);
  mask-image: linear-gradient(to right, #000 45%, transparent);
}
.amen-side-bg::after {
  background: radial-gradient(409px 710px at 0 50%, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.32) 26%, rgba(0, 0, 0, 0));
}
.amen-side-scroll {
  position: absolute; left: 0; right: 0; top: 100px; bottom: 230px; padding: 0 45px;
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  -webkit-mask-image: linear-gradient(transparent, #000 16px, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.amen-side-content {
  margin: auto 0; padding: 16px 0; display: flex; flex-direction: column; gap: 30px;
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  user-select: text; -webkit-user-select: text;
}
.amen-side-content.out { opacity: 0; transform: translateY(10px); transition-duration: 0.45s; }
.amen-title {
  margin: 0; padding: 0 3px; font-size: 40px; font-weight: 400; line-height: 1.1; opacity: 0.8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); overflow-wrap: anywhere;
}

/* Gallery preview: up to three photos and a "+N Photo" tile, like the design. */
.amen-gallery { display: flex; flex-direction: column; gap: 4px; }
.amen-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 65.5px 65.5px; }
.amen-cell { display: block; padding: 5px; cursor: pointer; min-width: 0; }
.amen-cell:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.amen-cell:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
.amen-cell:nth-child(3) { grid-column: 2; grid-row: 2; }
.amen-cell:nth-child(4) { grid-column: 3; grid-row: 2; }
.amen-grid.n1 .amen-cell:nth-child(1) { grid-column: 1 / 4; }
.amen-grid.n2 .amen-cell:nth-child(2) { grid-row: 1 / 3; }
.amen-grid.n3 .amen-cell:nth-child(3) { grid-column: 2 / 4; }
.amen-card {
  position: relative; display: block; width: 100%; height: 100%; box-sizing: border-box; overflow: hidden;
  border-radius: 15px; border: 1px solid rgba(0, 0, 0, 0.26); box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease-quick);
}
.amen-card::after { content: ""; position: absolute; inset: 0; border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.16); pointer-events: none; }
.amen-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.amen-cell:hover .amen-card { transform: scale(1.03); }
.amen-more .amen-card {
  display: flex; align-items: center; padding: 10px; background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(100px); -webkit-backdrop-filter: blur(100px);
  font-size: 11px; font-weight: 700; line-height: 1.25; text-align: left; color: rgba(255, 255, 255, 0.8);
}
.amen-all {
  position: relative; align-self: flex-start; margin-left: 5px; display: flex; align-items: center; gap: 6px;
  height: 44px; box-sizing: border-box; padding: 0 15px 0 10px; border-radius: 20px; border: 1px solid var(--glass-line);
  font-size: 12px; color: rgba(255, 255, 255, 0.7); cursor: pointer; white-space: nowrap;
  filter: drop-shadow(0 14px 17.5px rgba(112, 112, 112, 0.28));
}
.amen-all img { display: block; flex: none; }
.amen-all:active { transform: scale(0.97); }

/* The admin's own content. Kept readable on the dark fade whatever the editor produced. */
.amen-html { padding: 0 5px; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.6); overflow-wrap: anywhere; }
.amen-html:empty { display: none; }
.amen-html > :first-child { margin-top: 0; }
.amen-html > :last-child { margin-bottom: 0; }
.amen-html p { margin: 0 0 0.9em; }
.amen-html h1, .amen-html h2, .amen-html h3, .amen-html h4, .amen-html h5, .amen-html h6 {
  margin: 1.2em 0 0.5em; color: rgba(255, 255, 255, 0.85); font-weight: 400; line-height: 1.15;
}
.amen-html h1 { font-size: 29px; }
.amen-html h2 { font-size: 24px; }
.amen-html h3 { font-size: 19px; }
.amen-html h4, .amen-html h5, .amen-html h6 { font-size: 15px; font-weight: 600; }
.amen-html strong, .amen-html b { color: rgba(255, 255, 255, 0.85); }
.amen-html a { color: var(--accent); }
.amen-html hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.35); margin: 30px 0; }
.amen-html ul, .amen-html ol { margin: 0 0 0.9em; padding-left: 1.3em; }
.amen-html img { max-width: 100%; height: auto; border-radius: 12px; }
.amen-html table { width: 100%; border-collapse: collapse; margin: 0 0 0.9em; font-size: 13px; }
.amen-html td, .amen-html th { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); text-align: left; vertical-align: top; }
.amen-html th { color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.amen-html blockquote { margin: 0 0 0.9em; padding-left: 12px; border-left: 2px solid rgba(255, 255, 255, 0.3); }

/* Bottom: section switcher and the thumbnails, over a dark blurred fade. */
.amen-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 216px; box-sizing: border-box; padding: 24px 50px 31px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.amen-bottom-bg { position: absolute; inset: 0 0 -1px; pointer-events: none; }
.amen-bottom-bg::before, .amen-bottom-bg::after { content: ""; position: absolute; inset: 0; }
.amen-bottom-bg::before {
  backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); background: rgba(0, 0, 0, 0.08);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent);
  mask-image: linear-gradient(to top, #000 30%, transparent);
}
.amen-bottom-bg::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.33) 41.8%, rgba(0, 0, 0, 0)); }

.amen-switch {
  position: relative; flex: none; display: flex; padding: 3px; border-radius: 20px; max-width: 100%;
  border: 1px solid var(--glass-line); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.26);
}
.amen-switch[hidden] { display: none; }
.amen-switch-pill {
  position: absolute; top: 3px; left: 0; height: 38px; width: 0; border-radius: 17px; background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07); box-sizing: border-box;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1), 0 2px 1px rgba(0, 0, 0, 0.03);
  transition: left 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), width 0.35s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.amen-tab {
  position: relative; z-index: 1; height: 38px; padding: 0 17px 0 15px; border-radius: 17px; cursor: pointer;
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; color: rgba(255, 255, 255, 0.6);
  transition: color 0.25s;
}
.amen-tab:hover { color: rgba(255, 255, 255, 0.9); }
.amen-tab.active { color: #212121; cursor: default; }

.amen-strip { position: relative; flex: 1 1 auto; min-height: 0; max-width: 100%; display: flex; align-items: center; gap: 16px; }
.amen-strip .round-btn { position: relative; top: auto; transform: none; flex: none; }
.amen-strip .round-btn:active { transform: scale(0.96); }
.amen-prev { margin-left: 64px; }
.amen-next { margin-right: 64px; }
.amen-cards {
  display: flex; gap: 5px; height: 99px; width: calc(var(--n, 4) * 158.5px + (var(--n, 4) - 1) * 5px); max-width: 649px;
  min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.amen-cards::-webkit-scrollbar { display: none; }
.amen-thumb {
  position: relative; flex: 0 0 158.5px; min-width: 0; height: 99px; box-sizing: border-box; padding: 5px; border-radius: 29px;
  cursor: pointer; scroll-snap-align: start;
}
.amen-thumb::before {
  content: ""; position: absolute; inset: 0; border-radius: 29px; opacity: 0; transition: opacity 0.3s;
  background: rgba(255, 255, 255, 0.13); box-shadow: inset 0 0 0 99px rgba(255, 255, 255, 0.1);
}
.amen-thumb.active::before { opacity: 1; }
.amen-thumb-card {
  position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%;
  box-sizing: border-box; overflow: hidden; padding: 0 10px 18px; border-radius: 25px;
  border: 1px solid rgba(0, 0, 0, 0.26); box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--ease-quick);
}
.amen-thumb-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The shade sits above the picture (z-index), so the title stays readable on bright images. */
.amen-thumb-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.45) 65%, rgba(0, 0, 0, 0.8));
}
.amen-thumb-card::after { content: ""; position: absolute; inset: 0; border-radius: 25px; border: 1px solid rgba(255, 255, 255, 0.16); }
.amen-thumb-title {
  position: relative; z-index: 2; font-size: 13px; font-weight: 700; line-height: 1.2; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.6);
}
.amen-thumb-bar {
  position: absolute; z-index: 2; left: 50%; bottom: 3px; width: 17px; height: 4px; margin-left: -8.5px;
  border-radius: 6px; background: var(--accent); opacity: 0; transition: opacity 0.3s;
}
.amen-thumb.active .amen-thumb-bar { opacity: 1; }
.amen-thumb:not(.active):hover .amen-thumb-card { transform: scale(1.03); }

@media (max-width: 1000px) {
  .amen-prev { margin-left: 0; }
  .amen-next { margin-right: 0; }
  .amen-bottom { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 760px) {
  .amen-side { width: min(344px, 100%); }
  .amen-side-scroll { padding: 0 24px; }
  .amen-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .amen-layer { transform: none; transition: opacity 0.4s ease; }
  .amen-side-content, .amen-switch-pill { transition: none; }
}

/* A tour as the main content: dragged to look around, under the column and the thumbnails. */
.amen-stage > .amen-tour { position: absolute; background: #000; }

/* ---------- Unit page: the opened unit's details on the left (Figma "Filter Frame") ---------- */
.amen.for-unit .amen-side { display: none; }
.unit-side { position: absolute; left: 0; top: 0; bottom: 0; width: 344px; }
.unit-side[hidden] { display: none; }
.unit-side .amen-side-scroll { bottom: 40px; }
body.mode-thumbs .unit-side .amen-side-scroll { bottom: 230px; }
body.mode-thumbs .unit-side .amen-side-scroll.clear { bottom: 40px; }
.us-content {
  margin: auto 0; padding: 16px 5px; display: flex; flex-direction: column; align-items: flex-start; gap: 30px;
  user-select: text; -webkit-user-select: text; animation: amen-in 0.4s ease;
}
.us-content [hidden] { display: none !important; }
.us-title {
  margin: 0; font-size: 40px; font-weight: 400; line-height: 1.1; opacity: 0.8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); overflow-wrap: anywhere;
}
.us-facts { display: grid; grid-template-columns: minmax(99px, max-content) auto; gap: 30px 18px; }
.us-facts:empty { display: none; }
.us-fact { display: flex; align-items: center; gap: 7px; min-width: 0; }
.us-fact.wide { grid-column: 1 / -1; }
.us-icon {
  flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 20px; background: rgba(255, 255, 255, 0.16);
}
.us-icon img { display: block; }
.us-text { display: flex; flex-direction: column; gap: 7px; white-space: nowrap; }
.us-val { display: flex; align-items: flex-end; gap: 3px; font-size: 29px; font-weight: 400; line-height: 0.75; opacity: 0.8; }
.us-val small { font-size: 9px; line-height: 1; }
.us-label { font-size: 10px; line-height: 1; opacity: 0.6; }
.us-fact.long .us-val { font-size: 20px; line-height: 0.75; }
.us-fact.status .us-val { align-items: center; font-size: 14px; line-height: 18px; letter-spacing: -0.02em; margin: -5px 0 -6px; }
.us-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.25); }
.us-fact.price .us-val { font-size: 20px; letter-spacing: -0.04em; line-height: 0.75; }
.us-desc { margin: 0; font-size: 14px; line-height: 1.25; opacity: 0.6; white-space: pre-line; overflow-wrap: anywhere; }
.us-line { align-self: stretch; margin: 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.35); }
.us-plan { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.us-plan-title { margin: 0; font-size: 15px; opacity: 0.8; }
.us-plan-btn { display: block; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.us-plan-btn img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: 10px; transition: transform 0.25s var(--ease-quick); }
.us-plan-btn:hover img { transform: scale(1.02); }
.us-fns { align-self: stretch; display: flex; flex-wrap: wrap; gap: 10px; margin-left: 5px; }
.us-fns[hidden] { display: none; }
.us-fn { margin-left: 0; font-family: inherit; }
.us-more { margin-left: 5px; color: rgba(255, 255, 255, 0.7); text-decoration: none; }
