/* the aerial map and the stay card */
.cabins { padding-block: clamp(48px, 6.5vw, 86px); }
.cabins__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.cabins__grid > * { min-width: 0; }
@media (min-width: 980px) { .cabins__grid { grid-template-columns: minmax(0, 2.35fr) minmax(320px, 1fr); gap: 18px; } }

.atlas {
  background: var(--night); color: var(--on-dark); border: 1px solid var(--plum); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 20px 56px -34px rgb(40 22 38 / 0.5);
}
.atlas__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 8px 12px; }
.atlas__bar--status { border-block-start: 1px solid rgb(255 255 255 / 0.12); }
.atlas__label { font-weight: 500; font-size: 0.94rem; padding-inline-start: 4px; }
.atlas__status { display: flex; align-items: center; gap: 9px; font-weight: 500; line-height: 1.3; padding-inline-start: 4px; }
.atlas__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #f8a4d8; box-shadow: 0 0 0 4px rgb(248 164 216 / 0.2); }
.atlas__caption { padding: 2px 16px 12px; color: var(--on-dark-muted); font-size: 0.86rem; }
/* the photograph keeps its 4:3 frame; markers are placed from its physical left */
.map { position: relative; isolation: isolate; width: 100%; aspect-ratio: 4 / 3; background: #c98d58; container-type: size; }
.map > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pin {
  position: absolute; z-index: 1; translate: -50% -50%; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: none; color: #fff; line-height: 1;
  clip-path: circle(15px);
}
.pin span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff9f1; color: var(--ink); box-shadow: 0 2px 10px rgb(37 18 43 / 0.55);
  font-size: 0.68rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 190ms var(--ease-out);
}
.pin[aria-pressed="true"] span { background: var(--magenta); color: #fff; border-color: #fff3e1; box-shadow: 0 0 0 2px var(--magenta), 0 0 0 5px rgb(166 20 114 / 0.22), 0 2px 10px rgb(37 18 43 / 0.55); }
.pin:active span { transform: scale(0.97); }
.pin:focus-visible { outline: none; }
.pin:focus-visible span { outline: 2px solid #e565ad; outline-offset: 3px; }
.pin[data-taken] span { color: rgb(43 25 40 / 0.5); text-decoration: line-through; background: #e9dcd3; }
.pin[data-taken][aria-pressed="true"] span { background: #6a3156; color: #fff; }
@media (hover: hover) and (pointer: fine) { .pin:hover:not([aria-pressed="true"]) span { background: #f6dfeb; border-color: #bc719d; } }
/* travel between domes: a curved trace drawn in the photograph's own coordinates, a warm locator riding it, one
   pulse on arrival. The script moves them; nothing here takes input. */
.map__trail { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.map__trail path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0; }
.map__trail path:first-child { stroke: #863268; stroke-width: 6px; }
.map__trail path:last-child { stroke: #fff0dc; stroke-width: 2px; }
.pin { z-index: 2; }
.pin[aria-pressed="true"] { z-index: 3; }
.map__ring {
  position: absolute; z-index: 4; top: 0; left: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid #ffe6f7; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 4px rgb(176 35 139 / 0.22), 0 0 18px rgb(255 175 238 / 0.6);
  transform: translate(calc(var(--x, 50) * 1cqw), calc(var(--y, 50) * 1cqh));
}
.map__ring[data-travelling] { width: 22px; height: 22px; margin: -11px 0 0 -11px; background: rgb(255 232 212 / 0.28); box-shadow: 0 0 18px 5px rgb(253 166 217 / 0.66); }
.map__ring::after { content: ""; position: absolute; inset: 0; border: 2px solid #ffdaee; border-radius: 50%; opacity: 0; }
.map__ring[data-pulse]::after { animation: ring-pulse 670ms var(--ease-out) both; }
@keyframes ring-pulse { from { opacity: 0.9; scale: 0.86; } to { opacity: 0; scale: 1.58; } }
@media (prefers-reduced-motion: reduce) { .map__ring[data-pulse]::after { animation: none; } }
@media (min-width: 700px) {
  .pin { clip-path: none; }
  .pin span { width: 34px; height: 34px; font-size: 0.78rem; }
  .map__ring { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  .map__ring[data-travelling] { width: 27px; height: 27px; margin: -13.5px 0 0 -13.5px; }
  .atlas__bar { padding: 10px 16px; }
  .atlas__caption { padding-inline: 20px; }
}

.unit-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 4px 8px 16px; }
.unit {
  appearance: none; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff9f1;
  color: var(--ink); font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 190ms var(--ease-out);
}
.unit:active { transform: scale(0.97); }
.unit[aria-pressed="true"] { background: var(--magenta); color: #fff; border-color: #fff3e1; box-shadow: 0 0 0 2px var(--magenta), 0 0 0 5px rgb(166 20 114 / 0.25); }
.unit[data-taken]:not([aria-pressed="true"]) { color: rgb(43 25 40 / 0.5); text-decoration: line-through; background: #e9dcd3; }
@media (hover: hover) and (pointer: fine) { .unit:hover:not([aria-pressed="true"]) { background: #f6dfeb; border-color: #bc719d; } }
@media (min-width: 700px) { .unit-strip { justify-content: flex-start; gap: 9px; padding: 4px 18px 18px; } }

/* expanded view: the same atlas node moves into the dialog and back */
.map-dialog {
  width: min(100% - 20px, 1130px); max-width: none; max-height: calc(100dvh - 20px); padding: 0; border: 0; overflow: auto;
  background: var(--deep); color: var(--on-dark); border-radius: var(--radius); box-shadow: 0 30px 100px rgb(0 0 0 / 0.6);
  overscroll-behavior: contain;
}
.map-dialog::backdrop { background: rgb(23 15 25 / 0.86); }
.map-dialog[open] { animation: map-open 250ms var(--ease-out) both; }
@keyframes map-open { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .map-dialog[open] { animation-name: map-fade; } }
@keyframes map-fade { from { opacity: 0; } to { opacity: 1; } }
.map-dialog { border: 1px solid rgb(255 234 240 / 0.3); }
.map-dialog .atlas { border: 0; border-radius: 0; box-shadow: none; }
.map-dialog .atlas__caption { display: none; }
.map-dialog .unit-strip { justify-content: center; padding-block-start: 4px; }
@media (min-width: 700px) { .map-dialog .map { max-width: calc((100dvh - 200px) * 4 / 3); margin-inline: auto; } }
html:has(.map-dialog[open]) { overflow: hidden; }

/* the stay card */
.stay {
  background: var(--paper-hi); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.2vw, 26px); box-shadow: 0 12px 60px -42px rgb(81 48 65 / 0.4);
}
.stay:focus { outline: none; }
.stay:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: var(--radius); }
@media (min-width: 980px) and (min-height: 920px) { .stay { position: sticky; top: calc(var(--header) + 16px); } }
.stay__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stay__label { color: var(--magenta); font-weight: 500; font-size: 0.86rem; }
.stay__steps { display: flex; gap: 6px; }
.stay__title { margin-block: 2px 14px; font-weight: 400; line-height: 1.05; font-size: clamp(2.6rem, 4.4vw, 3.9rem); }
.stay__title span { font-size: 1.1rem; color: var(--muted); margin-inline-end: 4px; }
.stay__title bdi { font-weight: 300; letter-spacing: -0.04em; }

.cal { border-block-start: 1px solid var(--line); padding-block-start: 14px; }
.cal__head { display: grid; gap: 6px; }
.cal__label { font-weight: 500; font-size: 0.9rem; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal__month { font-weight: 500; }
.cal__week, .cal__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cal__days { justify-items: center; }
.cal__week { margin-block: 8px 2px; color: var(--muted); font-size: 0.72rem; }
.day {
  position: relative; width: 100%; max-width: 44px; height: 42px; padding: 0; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--ink); font-size: 0.92rem; font-variant-numeric: tabular-nums;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.day:disabled { color: #b9a9b0; cursor: default; }
.day[data-taken] { text-decoration: line-through; }
.day[data-today]:not([aria-pressed="true"]) { border-color: var(--line); }
.day[aria-pressed="true"] { background: var(--magenta); color: #fff; }
.day[aria-pressed="true"][data-taken] { background: #6a3156; }
.day[data-range]:not([aria-pressed="true"]) { background: #f6e3ee; border-radius: 0; }
.day[data-range]:not([aria-pressed="true"]):disabled { color: var(--ink); }
.cal[data-pending] .day:not(:disabled):not([aria-pressed="true"]) { color: #8c7a84; }
@media (hover: hover) and (pointer: fine) { .day:hover:not(:disabled):not([aria-pressed="true"]) { background: #f6e3ee; } }
.stay__error[data-hint] { color: var(--muted); font-weight: 400; }
.stay__error { margin-block-start: 10px; color: #8b125d; font-weight: 500; font-size: 0.86rem; line-height: 1.55; }

.stay__summary { display: grid; margin-block: 12px 16px; }
.stay__summary div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 9px; border-block-start: 1px solid var(--line); font-size: 0.9rem; }
.stay__summary dt { color: var(--muted); flex: none; }
.stay__summary dd { font-weight: 500; text-align: end; }
.stay__rate dd { color: var(--magenta); font-size: 1.25rem; white-space: nowrap; }
.stay__alt { display: flex; justify-content: center; align-items: center; min-height: 44px; margin-block-start: 6px; color: var(--ink); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #cdb6c4; }
.stay__note { margin-block-start: 8px; color: var(--muted); font-size: 0.8rem; line-height: 1.6; text-align: center; }

/* the question about a booking left in the cart */
.ask { width: min(100% - 32px, 440px); padding: 24px; border: 0; border-radius: var(--radius); background: var(--paper-hi); color: var(--ink); box-shadow: 0 30px 90px rgb(0 0 0 / 0.4); }
.ask::backdrop { background: rgb(23 15 25 / 0.7); }
.ask[open] { animation: map-fade 220ms var(--ease-out) both; }
.ask__title { font-size: 1.2rem; font-weight: 500; line-height: 1.35; }
.ask__text { margin-block: 8px 10px; color: var(--muted); font-size: 0.94rem; }
.ask__list { margin-block-end: 18px; font-weight: 500; }
.ask__actions { display: grid; gap: 8px; }
@media (max-width: 699px) { .unit-strip { display: grid; grid-template-columns: repeat(5, 44px); gap: 8px; } }

/* arrows beside the map status share the card's selection; on phones "choose date" takes its own row */
.atlas__bar--status { flex-wrap: wrap; }
.atlas__steps { display: flex; gap: 5px; margin-inline-start: auto; }
.atlas__jump { flex: 1 1 100%; }
@media (min-width: 560px) { .atlas__jump { flex: 0 0 auto; } }
.stay__title bdi { display: inline-block; }
