:root {
  color-scheme: dark;
  --edge: clamp(16px, 3vw, 46px);
  font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  color: #fffaf0;
}

* { box-sizing: border-box; }
html, body, #pano { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: #243026; }
[hidden] { display: none !important; }

footer {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 65px max(var(--edge), env(safe-area-inset-right)) max(var(--edge), env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
  background: linear-gradient(transparent, #142018a6 68%, #101c15d9);
  pointer-events: none;
}

h1 {
  margin: 0 0 4px;
  font: 400 clamp(27px, 2.7vw, 44px)/1.05 "Baskervville", Georgia, serif;
  letter-spacing: -.035em;
}
body:has(#nl-badge-frame) footer {
  padding-bottom: max(70px, calc(env(safe-area-inset-bottom) + 64px));
}

p { margin: 0; font-size: clamp(12px, 1vw, 15px); }
p span { color: #efce88; margin-inline: 3px; }
.property-details { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
#lot-lines {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid #ffffff70;
  border-radius: 16px;
  background: #142018db;
  font-size: 12px;
  pointer-events: auto;
}
#lot-lines::before { content: ""; width: 14px; border-top: 2px solid #ffe087; }
#lot-lines[aria-pressed="false"]::before { opacity: .5; border-top-style: dashed; }
nav, .tools { display: flex; }
nav {
  gap: 2px;
  padding: 4px;
  pointer-events: auto;
  border: 1px solid #ffffff65;
  border-radius: 30px;
  background: #19271eef;
}

button {
  color: inherit;
  font: 600 14px/1.12 "Instrument Sans", "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}
button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
nav button {
  min-height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 24px;
  background: transparent;
}
nav button:hover { background: #38483a; }
nav .compact { display: none; }
nav button[aria-pressed="true"] { color: #242519; background: #f1d18e; }

.tools {
  position: absolute;
  top: max(var(--edge), env(safe-area-inset-top));
  right: max(var(--edge), env(safe-area-inset-right));
  gap: 7px;
}
.tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff69;
  border-radius: 50%;
  background: #18251dd9;
}
.tools button:hover { background: #162219; }
.tools svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tools #lot-photos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding: 0 15px;
  border-radius: 24px;
}

#photo-viewer {
  width: min(1120px, 94vw);
  max-width: none;
  padding: 0;
  max-height: none;
  color: #fffaf0;
  border: 1px solid #a4b09e65;
  border-radius: 16px;
  background: #19241d;
  box-shadow: 0 18px 80px #0006;
}
#photo-viewer::backdrop { background: #07100ae5; }
.photo-panel { display: flex; flex-direction: column; }
.photo-head, .photo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(12px, 2vw, 24px);
}
.photo-head h2 {
  font: 400 clamp(23px, 3vw, 32px)/1.08 "Baskervville", Georgia, serif;
  margin: 0 0 3px;
}
#line-note { color: #efce88; font-size: 13px; }
.photo-stage { background: #0c120f; margin: 0; }
.photo-stage img {
  display: block;
  width: 100%;
  height: min(64vw, 72vh);
  height: min(64vw, 72dvh, calc(100dvh - 165px));
  object-fit: contain;
}
.photo-action {
  border: 1px solid #ffffff60;
  border-radius: 50%;
  background: #233027;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
}
.photo-action:hover { background: #35483b; }
.photo-action svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.photo-caption { display: flex; gap: 9px; align-items: center; font-size: 14px; text-align: center; }
.photo-caption span { margin: 0; white-space: nowrap; }
.photo-caption strong { font-weight: 550; }

@media (max-width: 740px) {
  footer { align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 38px; }
  nav { align-self: stretch; max-width: 100%; }
  nav button { flex: 1; padding: 0 clamp(6px, 2vw, 14px); font-size: 13px; }
  #photo-viewer { width: 98vw; border-radius: 10px; }
  .photo-stage img { height: min(76vw, calc(100dvh - 155px)); }
  .photo-caption { flex-direction: column; gap: 2px; }
  .photo-caption span { font-size: 12px; }
}
@media (min-width: 741px) and (max-width: 1050px) {
  nav button { padding-inline: 10px; }
  .property-details { max-width: 265px; }
}
@media (max-width: 600px) {
  nav button { padding-inline: 3px; font-size: clamp(11px, 3.25vw, 13px); white-space: nowrap; }
  nav button span { display: none; }
  nav button .compact { display: inline; }
}
