/* ==========================================================================
   MyPlace — listing page
   Loaded only on /listing/<id>; builds on the tokens and components in
   main.css. Mobile-first: one column in reading order, then from 1024px the
   gallery and details on the left and the summary, agent and map on the right.
   ========================================================================== */

.listing-page { padding-top: 16px; }

/* Breadcrumb and actions ---------------------------------------------------- */

.listing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 12px;
}

.breadcrumbs { min-width: 0; }
.breadcrumbs ol {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumbs li { display: flex; flex: none; align-items: center; }
.breadcrumbs li:last-child { flex: 0 1 auto; min-width: 0; }
.breadcrumbs a { padding: 4px 0; transition: color .15s var(--ease); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs__sep { margin: 0 10px; color: #a3a6ad; }
.breadcrumbs [aria-current] { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--text); }

.listing-actions { display: flex; flex: none; gap: 4px; margin-right: -10px; }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  transition: background-color .15s var(--ease);
}
.text-button:hover { background: var(--surface-hover); }
.text-button:active svg { transform: scale(.9); }
.text-button svg { transition: transform .15s var(--ease), fill .15s var(--ease), color .15s var(--ease); }
.save-button[aria-pressed="true"] svg { fill: var(--heart); color: var(--heart); }
.save-button.is-popping svg { animation: heart-pop .38s var(--ease); }

@media (max-width: 599px) {
  /* Icons alone on phones; the words stay for screen readers. */
  .text-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .text-button { width: 40px; justify-content: center; padding: 0; }
  .breadcrumbs li:nth-child(3), .breadcrumbs li:nth-child(4) { display: none; }
}

/* Layout -------------------------------------------------------------------- */
/* Phones and tablets: one column in the order of the brief (gallery, title and
   price, specs, agent, description, amenities, map, details). The two column
   wrappers dissolve so their children can be ordered among each other. */

.listing-layout { display: flex; flex-direction: column; gap: 20px; }
.listing-side, .listing-main { display: contents; }
.gallery { order: 1; }
.summary { order: 2; }
.agent { order: 3; }
.listing-main > .listing-section:nth-child(1) { order: 4; }
.listing-main > .listing-section:nth-child(2) { order: 5; }
.map-card { order: 6; }
.listing-main > .listing-section:nth-child(3) { order: 7; }

@media (min-width: 1024px) {
  .listing-page { padding-top: 20px; }
  .listing-top { margin-bottom: 16px; }
  .listing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(340px, 31vw, 416px);
    grid-template-areas: "gallery side" "main side";
    grid-template-rows: auto 1fr;
    column-gap: 32px;
    row-gap: 8px;
    align-items: start;
  }
  .gallery { grid-area: gallery; }
  .listing-side { grid-area: side; display: grid; gap: 16px; }
  .listing-main { grid-area: main; display: block; }
}

/* Cards on the right --------------------------------------------------------- */

.listing-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(15 17 20 / .03), 0 8px 24px -16px rgb(15 17 20 / .14);
}

/* Summary */
.summary__head { padding: 20px 20px 18px; }
.summary__title {
  font-size: clamp(1.5rem, 1.2rem + .8vw, 1.625rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.025em;
  color: var(--ink);
  text-wrap: balance;
}
.summary__place {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 15px;
  color: var(--text);
}
.summary__place .icon { color: var(--ink); }
.summary__price { margin-top: 18px; font-size: 18px; color: var(--text); line-height: 1.1; }
.summary__price strong { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.summary__period { white-space: nowrap; }
.summary__unit { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 18px;
  margin: 0;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line-soft);
}
.spec {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-content: start;
}
.spec__icon { margin-top: 3px; }
.spec:nth-child(odd) { padding-right: 14px; border-right: 1px solid var(--line-soft); }
.spec:nth-child(even) { padding-left: 18px; }
.spec__icon { grid-row: 1 / 3; color: var(--ink); }
.spec dt { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.spec dd { margin: 1px 0 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: break-word; }

@media (max-width: 459px) {
  /* Narrow phones: the icon sits above the text so values keep their width. */
  .specs { padding-inline: 18px; row-gap: 16px; }
  .spec { grid-template-columns: minmax(0, 1fr); row-gap: 4px; align-content: start; }
  .spec__icon { grid-row: auto; margin-bottom: 4px; }
  .spec:nth-child(odd) { padding-right: 12px; }
  .spec:nth-child(even) { padding-left: 14px; }
}

/* Agent */
.agent { padding: 16px 18px 18px; }
.agent__who { display: flex; align-items: center; gap: 14px; }
.avatar { display: block; flex: none; border-radius: 999px; object-fit: cover; background: var(--surface-muted); }
.agent__text { min-width: 0; }
.agent__name { display: flex; align-items: center; gap: 6px; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.agent__role { margin-top: 2px; font-size: 14px; color: var(--muted); }
.verified { flex: none; color: #2f6feb; }
.agent__contact { width: 100%; margin-top: 16px; }
/* Side by side at equal widths; if a language's labels don't fit, one per row. */
.agent__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.agent__actions .button { flex: 1 1 0; min-width: max-content; gap: 8px; }

/* Map */
.map-card { overflow: hidden; }
.map-card__map {
  position: relative;
  height: 220px;
  background: #eef0ee;
  isolation: isolate;
}
.map-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
}
.map-card__map.is-ready .map-card__fallback { display: none; }
.map-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 18px;
  border-top: 1px solid var(--line-soft);
}
.map-card__place { display: flex; flex: 1 1 120px; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.map-card__place > span { display: flex; flex-direction: column; min-width: 0; }
.map-card__note { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.map-card__link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.map-card__link .icon { transition: transform .2s var(--ease); }
.map-card__link:hover .icon { transform: translateX(2px); }

/* Expanded map fills the window. */
.map-card__map.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 150;
  height: auto;
}

/* The map itself (Leaflet). Tiles are softened toward the page's neutral palette. */
.map-card .map-card__map .leaflet-tile-pane { filter: saturate(.3) brightness(1.05) contrast(.92); }
.map-card .map-card__map.leaflet-container { font: inherit; background: #eef0ee; }
.map-card .map-card__map .leaflet-bar { border: 0; border-radius: 10px; box-shadow: 0 1px 2px rgb(15 17 20 / .12), 0 4px 12px -4px rgb(15 17 20 / .18); }
.map-card .map-card__map .leaflet-bar a,
.map-card .map-card__map .leaflet-bar button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--ink);
  font: 400 20px/1 var(--font);
  cursor: pointer;
}
.map-card .map-card__map .leaflet-bar a:hover,
.map-card .map-card__map .leaflet-bar button:hover { background: var(--surface-muted); }
.map-card .map-card__map .leaflet-bar > :first-child { border-top-left-radius: 10px; border-top-right-radius: 10px; }
.map-card .map-card__map .leaflet-bar > :last-child { border-bottom: 0; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; }
.map-card .map-card__map .leaflet-control-zoom-in,
.map-card .map-card__map .leaflet-control-zoom-out { text-indent: 0; }
.map-card .map-card__map .leaflet-top.leaflet-right .leaflet-control { margin: 10px 10px 0 0; }
.map-card .map-card__map .leaflet-control-attribution { font-size: 10.5px; background: rgb(255 255 255 / .85); }
.map-card .map-pin { color: var(--ink); filter: drop-shadow(0 2px 3px rgb(15 17 20 / .35)); }

/* Sections under the gallery ------------------------------------------------- */

.listing-section { padding: 8px 0 0; }
.listing-section__title { font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }

@media (min-width: 1024px) {
  .listing-section { padding: 28px 0; }
  .listing-section + .listing-section { border-top: 1px solid var(--line-soft); }
  .listing-main > .listing-section:first-child { padding-top: 32px; }
}

.description {
  position: relative;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: #4b4f57;
}
.description p + p { margin-top: .8em; }
.description.is-collapsed {
  max-height: calc(1.6em * 4 + 2px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-link .icon { transition: transform .2s var(--ease); }
.text-link[aria-expanded="true"] .icon { transform: rotate(180deg); }

.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 138px), 1fr));
  gap: 10px;
  margin-top: 16px;
}
.amenity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.25;
  color: var(--ink);
}

/* Long Russian words ("Посудомоечная") don't fit a two-column tile on the
   smallest phones; let them hyphenate rather than overflow. */
html:lang(ru) .amenity span { min-width: 0; hyphens: auto; }

.details {
  display: grid;
  margin: 12px 0 0;
}
.details__row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.details dt { flex: none; color: var(--muted); }
.details dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; overflow-wrap: break-word; }

@media (min-width: 700px) {
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}

/* Gallery ----------------------------------------------------------------------- */

.gallery__stage {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-muted);
}
.gallery__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity .25s var(--ease);
}
.gallery__image.is-swapping { opacity: .55; }

.gallery__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .94);
  color: var(--ink);
  box-shadow: 0 2px 8px rgb(15 17 20 / .18);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.gallery__arrow:hover { background: #fff; }
.gallery__arrow:active { transform: translateY(-50%) scale(.94); }
.gallery__arrow--prev { left: 12px; }
.gallery__arrow--next { right: 12px; }

.gallery__counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius);
  background: rgb(15 17 20 / .74);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.gallery__strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
  margin-top: 8px;
}
.gallery__thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 8px) / 2.4);
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumbs li { scroll-snap-align: start; }
.gallery__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  cursor: pointer;
}
.gallery__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity .2s var(--ease), transform .3s var(--ease);
}
.gallery__thumb:hover img { transform: scale(1.04); }
.gallery__thumb:not([aria-current]) img { opacity: .82; }
.gallery__thumb:not([aria-current]):hover img { opacity: 1; }
.gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow .15s var(--ease);
}
.gallery__thumb[aria-current]::after { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px #fff; }
.gallery__thumb:focus-visible { outline-offset: 2px; }

.gallery__all {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.gallery__all:hover { background: var(--surface); border-color: var(--line-strong); }
.gallery__all-count { display: block; color: var(--muted); }
.gallery__all-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 599px) {
  .gallery__thumb img { aspect-ratio: 4 / 3; }
  .gallery__all { gap: 4px; padding: 4px; font-size: 12.5px; }
  .gallery__all .icon { width: 20px; height: 20px; }
}

.gallery__empty {
  display: grid;
  place-items: center;
  gap: 8px;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--muted);
}

@media (min-width: 600px) {
  .gallery__strip { grid-template-columns: minmax(0, 1fr) 116px; }
  .gallery__thumbs { grid-auto-columns: calc((100% - 3 * 8px) / 4); }
  .gallery__arrow { width: 44px; height: 44px; }
  .gallery__arrow--prev { left: 16px; }
  .gallery__arrow--next { right: 16px; }
  .gallery__counter { right: 16px; bottom: 16px; padding: 8px 14px; font-size: 15px; }
  .gallery__all { font-size: 14px; gap: 8px; }
  .gallery__all-word { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}

@media (min-width: 1024px) {
  .gallery__image { aspect-ratio: 16 / 7; }
  .gallery__strip { grid-template-columns: minmax(0, 1fr) 124px; margin-top: 10px; }
  .gallery__thumbs { grid-auto-columns: calc((100% - 4 * 8px) / 5); }
}

/* Similar listings: reuses the homepage cards and scroller. -------------------- */

.section--similar { padding-top: 48px; }
@media (min-width: 1180px) {
  .listings--similar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Lightbox ---------------------------------------------------------------------- */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  color: var(--ink);
}
.lightbox[open] { display: flex; flex-direction: column; animation: fade-in .2s var(--ease); }
.lightbox::backdrop { background: rgb(15 17 20 / .6); }

.lightbox__bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line-soft);
}
.lightbox__title { flex: 1; min-width: 0; overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__counter { flex: none; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lightbox__back {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}
.lightbox__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.lightbox__close:hover, .lightbox__back:hover { background: rgb(127 127 127 / .14); }

.lightbox__grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr;
  /* Rows take their photos' height; without this a fixed-height scroller
     squeezes every row to share the visible space. */
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lightbox__tile {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  cursor: zoom-in;
}
.lightbox__tile img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .2s var(--ease); }
.lightbox__tile:hover img { opacity: .9; }
@media (min-width: 700px) {
  .lightbox__grid { grid-template-columns: 1fr 1fr; padding: 24px; }
  .lightbox__tile:nth-child(3n + 1) { grid-column: 1 / -1; }
  .lightbox__tile:nth-child(3n + 1) img { aspect-ratio: 16 / 9; }
}

/* Viewer: one photo, dark surround. */
.lightbox.is-viewing { background: #0f1114; color: #fff; }
.lightbox.is-viewing .lightbox__bar { border-color: rgb(255 255 255 / .1); }
.lightbox.is-viewing .lightbox__counter { color: rgb(255 255 255 / .7); }
.lightbox.is-viewing .lightbox__back { border-color: rgb(255 255 255 / .25); }

.lightbox__viewer { position: relative; display: grid; flex: 1; min-height: 0; place-items: center; padding: 16px 16px 20px; }
.lightbox__figure { display: grid; justify-items: center; gap: 12px; max-width: 100%; max-height: 100%; margin: 0; }
.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 64px - 90px);
  width: auto;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__caption { font-size: 14px; color: rgb(255 255 255 / .72); text-align: center; }
.lightbox__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .12);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .15s var(--ease);
}
.lightbox__arrow:hover { background: rgb(255 255 255 / .22); }
.lightbox__arrow--prev { left: 16px; }
.lightbox__arrow--next { right: 16px; }
.lightbox :focus-visible { outline-color: currentColor; }
@media (max-width: 599px) {
  .lightbox__arrow { width: 40px; height: 40px; background: rgb(15 17 20 / .5); }
  .lightbox__arrow--prev { left: 8px; }
  .lightbox__arrow--next { right: 8px; }
  .lightbox__title { display: none; }
  .lightbox__counter { margin-left: auto; }
}

/* Contact dialog ------------------------------------------------------------------ */

.modal {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}
.modal[open] { animation: pop-in .2s var(--ease); }
.modal::backdrop { background: rgb(15 17 20 / .45); animation: fade-in .2s var(--ease); }

.modal__head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 0 22px; }
.modal__heading { flex: 1; min-width: 0; }
.modal__title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.modal__subtitle { margin-top: 2px; overflow: hidden; font-size: 13.5px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.modal__close { align-self: flex-start; margin: -6px -6px 0 0; }

.contact-form { display: grid; gap: 14px; padding: 18px 22px 22px; }
.form-field { display: grid; gap: 6px; }
.form-field label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.form-field__optional { font-weight: 400; color: var(--muted); }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px; /* 16px keeps iOS from zooming into the field */
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-field input, .form-field select { height: 46px; padding: 0 14px; }
.form-field textarea { min-height: 104px; padding: 12px 14px; font-family: inherit; line-height: 1.45; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgb(15 17 20 / .08);
}
.form-field [aria-invalid="true"] { border-color: #c8312f; }
.form-field__error, .form-error { font-size: 13px; color: #b42318; }
.form-select { position: relative; }
.form-select select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; }
.form-select .icon { position: absolute; top: 50%; right: 14px; pointer-events: none; transform: translateY(-50%); }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__submit { width: 100%; height: 48px; margin-top: 4px; }
.contact-form__submit.is-loading .search__spinner { display: block; }
.contact-form__note { font-size: 12.5px; color: var(--muted); text-align: center; }
.modal[data-kind="message"] [data-only-kind="viewing"] { display: none; }

.modal__done { display: grid; justify-items: center; gap: 10px; padding: 26px 24px 26px; text-align: center; outline: none; }
.modal__done .icon { color: var(--ink); }
.modal__done-title { font-size: 20px; font-weight: 600; color: var(--ink); }
.modal__done-text { max-width: 30ch; font-size: 15px; color: var(--muted); }
.modal__done .button { margin-top: 8px; min-width: 140px; }

@media (max-width: 599px) {
  /* A sheet from the bottom edge on phones. */
  .modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal[open] { animation: sheet-in .26s var(--ease); }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }

html.is-locked { overflow: hidden; }
