:root {
  --bg: #d9dde3;
  --surface: #ffffff;
  --soft: #f0ecfb;
  --line: #e4deef;
  --text: #2e2d35;
  --muted: #807d90;
  --primary: #5f2eea;
  --success: #44a567;
  --danger: #d24545;
  --warning: #eea32b;
  --shadow: 2px 2px 3px rgba(31, 16, 73, .24);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

button, input, select {
  font: inherit;
  letter-spacing: 0;
}

button { cursor: pointer; }

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  margin-bottom: 12px;
  padding: 9px 10px;
  background: var(--bg);
  box-shadow: 0 0 0 14px var(--bg);
}

.brand-block {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-size: 18px;
  line-height: 1.1;
}

.brand-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ece8fa;
  color: var(--primary);
  font-size: 12px;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 14px;
}

.filter-panel, .panel-card, .listing-item, .detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.filter-toggle {
  display: none;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  background: #ece8fa;
  color: var(--primary);
  align-items: center;
  justify-content: space-between;
}

.filter-toggle-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #a98df1;
  flex: 0 0 auto;
  transition: transform .16s ease, background .16s ease;
}

.filter-toggle-icon::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #ffffff;
  transform: translateY(1px);
}

.filter-panel.filters-open .filter-toggle-icon::before {
  border-top: 0;
  border-bottom: 8px solid #ffffff;
  transform: translateY(-1px);
}

.filter-body {
  display: grid;
  gap: 10px;
}

.filter-title {
  font-size: 18px;
  margin-bottom: 2px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

input, select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.primary-btn, .soft-btn, .ghost-btn, .danger-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 40px;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(95, 46, 234, .28);
}

.soft-btn, .ghost-btn {
  background: #ece8fa;
  color: var(--primary);
}

.danger-btn {
  background: #fff0f0;
  color: var(--danger);
  border: 1px solid #f1cccc;
}

.ghost-btn {
  flex: 0 0 auto;
}

.filter-extra {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfaff;
}

.filter-extra summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 13px;
}

.filter-extra[open] {
  display: grid;
  gap: 10px;
}

.dev-tools {
  display: grid;
  gap: 9px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dev-tools .filter-extra {
  background: #f6f4fb;
}

.dev-tools-inner {
  display: grid;
  gap: 9px;
  padding-top: 10px;
}

.dev-status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.content-area {
  min-width: 0;
}

.card-open .workspace {
  grid-template-columns: 1fr;
}

.card-open .filter-panel {
  display: none;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding-left: 22px;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
}

h1 {
  font-size: 25px;
}

.section-head p, .muted {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.listing-list {
  display: grid;
  gap: 12px;
}

.listing-item {
  display: grid;
  gap: 10px;
  padding: 14px 14px 8px;
  text-align: left;
  color: inherit;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.listing-item:hover {
  transform: translateY(-1px);
  box-shadow: 3px 5px 10px rgba(31, 16, 73, .20);
}

.listing-main-row {
  display: flex;
  gap: 13px;
  min-height: 82px;
  align-items: flex-start;
  min-width: 0;
}

.listing-media {
  position: relative;
  width: 74px;
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 5px;
  cursor: zoom-in;
  touch-action: pan-y;
  overflow: hidden;
  isolation: isolate;
}

.listing-photo {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f0f8;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: 0 0 auto;
}

.listing-photo[hidden],
.listing-media .photo-count[hidden],
.listing-map-box[hidden] {
  display: none !important;
}

.listing-photo img, .main-photo img, .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f3f0f8;
}

.listing-photo img {
  transition: transform .18s ease, opacity .18s ease;
}

.listing-photo.has-track {
  display: block;
  background: transparent;
}

.photo-frame .listing-photo-track,
.listing-photo-track {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: inherit;
}

.listing-photo-track::-webkit-scrollbar {
  display: none;
}

.photo-frame .listing-photo-slide,
.listing-photo-slide {
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
  background: #f3f0f8;
  color: var(--muted);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.photo-frame .listing-photo-slide span,
.listing-photo-slide span {
  display: none;
}

.photo-frame .listing-photo-slide.photo-fallback span,
.listing-photo-slide.photo-fallback span {
  display: inline;
}

.listing-photo-slide.photo-fallback {
  background: #f3f0f8;
}

.listing-photo.swipe-next img {
  opacity: .2;
  transform: translateX(-18%);
}

.listing-photo.swipe-prev img {
  opacity: .2;
  transform: translateX(18%);
}

.photo-frame span {
  display: none;
}

.photo-fallback {
  background: #f3f0f8;
  color: var(--muted);
}

.photo-fallback span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}

.listing-main {
  min-width: 0;
  flex: 1;
}

.listing-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.listing-flags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.listing-right-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.favorite-toggle {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #8b8798;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.favorite-toggle.is-on {
  color: #d99a00;
}

.favorite-toggle:focus-visible {
  outline: 2px solid rgba(95, 46, 234, .35);
  outline-offset: 2px;
}

.listing-flag {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #5d5d69;
  font-size: 11px;
  line-height: 1;
}

.listing-flag span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.listing-flag.flag-green {
  background: #44a567;
}

.listing-flag.flag-amber {
  background: #eea32b;
}

.listing-flag.flag-violet {
  background: var(--primary);
}

.listing-flag.flag-amber span,
.listing-flag.flag-violet span {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 11px;
}

.listing-chain {
  color: #2a7de1;
  display: block;
  font-size: 11.6px;
  line-height: 1.12;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}

.listing-title {
  display: block;
  margin: 0 0 6px;
  font-size: 16.2px;
  line-height: 1.12;
  font-weight: 400;
  cursor: pointer;
}

.listing-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0;
  color: var(--muted);
  font-size: 11.8px;
  line-height: 1.25;
  cursor: pointer;
}

.listing-location, .listing-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f4f1fb;
  color: #4d4a59;
  font-size: 11.5px;
}

.listing-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  padding-top: 2px;
  color: #9591a2;
  font-size: 11.6px;
  line-height: 1.15;
}

.listing-foot > :last-child {
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-price {
  color: var(--primary);
  display: block;
  font-size: 18.5px;
  font-weight: 400;
  line-height: 1.04;
  margin-bottom: 8px;
  min-width: 0;
}

.photo-count {
  color: #9591a2;
  font-size: 11.6px;
  line-height: 1.1;
  white-space: nowrap;
}

.listing-map-toggle,
.listing-map-box {
  display: none;
}

.photo-preview-popover {
  position: absolute;
  z-index: 1000;
  overflow: hidden;
  border-radius: 18px;
  background: #f3f0f8;
  box-shadow: 0 14px 36px rgba(31, 16, 73, .28);
  pointer-events: none;
}

.photo-preview-popover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f3f0f8;
}

.photo-preview-popover span {
  display: none;
}

.photo-preview-popover.photo-preview-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.photo-preview-popover.photo-preview-fallback span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}

.empty-state, .error-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  gap: 14px;
}

.detail-card {
  padding: 16px;
}

.hero-card {
  display: grid;
  gap: 12px;
}

.card-head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 26px;
  line-height: 1.16;
}

.card-price {
  color: var(--primary);
  font-size: 26px;
  white-space: nowrap;
  text-align: left;
}

.card-address, .breadcrumb {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb {
  margin-top: 0;
  color: #2a7de1;
}

.gallery {
  display: grid;
  gap: 8px;
}

.main-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ece8fa;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.detail-photo-viewport {
  display: block;
  touch-action: pan-y;
}

.detail-photo-track {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: inherit;
}

.detail-photo-track::-webkit-scrollbar {
  display: none;
}

.detail-photo-slide {
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
  background: #f3f0f8;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  cursor: zoom-in;
}

.detail-photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f3f0f8;
}

.detail-photo-slide span {
  display: none;
}

.detail-photo-slide.photo-fallback span {
  display: inline-flex;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}

.thumb {
  height: 58px;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ece8fa;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  cursor: zoom-in;
}

.thumb span {
  display: none;
}

.thumb.photo-fallback span {
  display: inline-flex;
}

.thumb.active {
  border-color: var(--primary);
}

body.modal-open {
  overflow: hidden;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(52, 50, 60, .72);
  backdrop-filter: blur(4px);
}

.photo-modal-shell {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: min(92vh, 900px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.photo-modal-stage {
  position: relative;
  min-height: 240px;
  height: min(72vh, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #34323c;
  touch-action: pan-y;
  cursor: grab;
}

.photo-modal-stage:active {
  cursor: grabbing;
}

.photo-modal-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-modal-counter {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #35313f;
  font-size: 13px;
}

.photo-modal-close,
.photo-modal-nav {
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .94);
  color: #4d3fd8;
  box-shadow: 0 8px 22px rgba(28, 24, 40, .24);
}

.photo-modal-close svg,
.photo-modal-nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 42px;
  height: 42px;
}

.photo-modal-nav {
  width: 48px;
  height: 48px;
}

.photo-modal-prev {
  grid-column: 1;
  grid-row: 1;
}

.photo-modal-next {
  grid-column: 3;
  grid-row: 1;
}

.photo-modal-stage {
  grid-column: 2;
  grid-row: 1;
}

.photo-modal-thumbs {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.photo-modal-thumb {
  flex: 0 0 74px;
  width: 74px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 10px;
  background-color: #ece8fa;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.photo-modal-thumb.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--primary);
}

.text-block {
  white-space: pre-wrap;
  line-height: 1.48;
  margin: 0;
}

.info-grid, .params-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kv {
  padding: 10px;
  border-radius: 12px;
  background: #f7f5fc;
}

.kv-name {
  color: var(--muted);
  font-size: 12px;
}

.kv-value {
  margin-top: 3px;
  line-height: 1.22;
}

.card-stack {
  display: grid;
  gap: 12px;
}

.map-box {
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef0f4;
}

.map-address {
  margin: 0 0 8px;
  color: #4d4a59;
  font-size: 14px;
}

.map-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.map-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f7f5fc;
  border-radius: var(--radius);
}

.debug-panel {
  font-size: 12px;
  color: var(--muted);
}

.debug-panel summary {
  cursor: pointer;
  color: var(--primary);
}

.debug-panel pre {
  white-space: pre-wrap;
  overflow: auto;
}

@media (max-width: 1024px) {
  .workspace, .card-layout {
    grid-template-columns: 1fr;
  }
  .filter-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 16px, 100%);
    padding-top: 8px;
  }
  .topbar {
    min-height: 62px;
    padding: 6px 0;
  }
  .brand-block {
    padding: 8px;
  }
  .brand-mark {
    width: 44px;
    height: 44px;
  }
  .filter-grid, .filter-actions, .info-grid, .params-grid {
    grid-template-columns: 1fr;
  }
  .filter-panel {
    gap: 0;
    padding: 10px;
  }
  .filter-toggle {
    display: flex;
  }
  .filter-body {
    display: none;
    gap: 10px;
    padding-top: 10px;
  }
  .filter-panel.filters-open .filter-body {
    display: grid;
  }
  .section-head {
    padding-left: 18px;
  }
  .listing-item {
    gap: 11px;
    padding: 12px;
  }
  .listing-item:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  .listing-main-row {
    display: grid;
    gap: 10px;
  }
  .listing-media {
    position: relative;
    width: 100%;
    justify-items: stretch;
    gap: 0;
    cursor: default;
  }
  .listing-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
  }
  .listing-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .listing-photo img.is-portrait-photo,
  .listing-photo.has-track .listing-photo-slide img.is-portrait-photo {
    object-fit: cover;
  }
  .listing-photo.has-track .listing-photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .listing-map-box {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #e7e9ef;
    touch-action: pan-y;
  }
  .listing-map-box .leaflet-container,
  .listing-map-box .leaflet-pane,
  .listing-map-box .leaflet-tile-container {
    pointer-events: none;
  }
  .listing-map-box.is-loading-map {
    display: grid;
    place-items: center;
  }
  .listing-map-box[hidden] {
    display: none !important;
  }
  .listing-map-message {
    width: 100%;
    height: 100%;
    min-height: 170px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #f3f0f8;
    font-size: 13px;
  }
  .listing-media .photo-count {
    position: absolute;
    left: 9px;
    bottom: 9px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #4d4a59;
    box-shadow: 0 2px 7px rgba(31, 16, 73, .18);
  }
  .listing-map-toggle {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 900;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(31, 16, 73, .20);
    font-size: 18px;
    line-height: 1;
    padding: 0;
    color: #5e35df;
  }
  .listing-toggle-svg {
    width: 20px;
    height: 20px;
    display: block;
  }
  .listing-toggle-map-pin {
    width: 22px;
    height: 22px;
    transform: translateY(-1px);
  }
  .listing-foot > :last-child {
    text-align: right;
  }
  .card-price {
    font-size: 26px;
    text-align: left;
  }
  .card-title {
    font-size: 21px;
  }
  .card-head {
    display: contents;
  }
  .hero-card .breadcrumb {
    order: 1;
  }
  .hero-card .card-price {
    order: 2;
    margin-top: -2px;
    margin-bottom: 2px;
  }
  .hero-card .card-head > :first-child {
    order: 3;
  }
  .hero-card .gallery {
    order: 4;
  }
  .map-box {
    height: 260px;
  }
  .photo-modal {
    padding: 10px;
  }
  .photo-modal-shell {
    max-height: 94vh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .photo-modal-stage {
    grid-column: 1;
    height: min(72vh, 620px);
    border-radius: 16px;
  }
  .photo-modal-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .82);
  }
  .photo-modal-prev {
    left: 8px;
  }
  .photo-modal-next {
    right: 8px;
  }
  .photo-modal-thumbs {
    grid-column: 1;
  }
  .photo-modal-thumb {
    flex-basis: 64px;
    width: 64px;
    height: 48px;
  }
}
