/* Нейтральная галерея: изображения, небольшие подписи и постоянная навигация. */
:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #767676;
  --line: #e4e4e4;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font:
    14px/1.5 Arial,
    Helvetica,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: #686868;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
summary,
select {
  cursor: pointer;
}
button {
  border-radius: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 2px solid #222;
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  width: auto;
  height: auto;
  margin: 10px;
  padding: 12px;
  background: #fff;
  z-index: 100;
  clip-path: none;
}
.site-header {
  position: fixed;
  top: 46px;
  left: 44px;
  bottom: 40px;
  width: 176px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.artist-name {
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  white-space: nowrap;
}
.language-switch {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  font-size: 12px;
}
.language-switch button {
  color: var(--muted);
  padding: 5px 0;
}
.language-switch button[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.site-nav {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}
.site-nav a {
  color: var(--muted);
}
.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--ink);
}
.site-nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.sidebar-social {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.page-body {
  margin-left: 270px;
  padding: 46px 58px 0 0;
}
#main {
  min-height: calc(100svh - 190px);
}
.site-footer {
  display: flex;
  gap: 24px;
  padding: 30px 0 34px;
  margin-top: 100px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.site-footer a {
  margin-left: auto;
}
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  position: relative;
  gap: 30px;
  min-height: 38px;
  margin-bottom: 52px;
  font-size: 12px;
}
.gallery-toolbar h1 {
  padding-top: 5px;
}
.work-count {
  margin-left: 9px;
  color: var(--muted);
  font-size: 10px;
  vertical-align: super;
}
.view-switch {
  display: flex;
  gap: 17px;
  margin-left: auto;
}
.view-switch button {
  padding: 5px 0;
  border: 0;
  background: none;
  color: var(--muted);
}
.view-switch button[aria-pressed="true"] {
  color: var(--ink);
}
.view-switch button:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.filter-panel {
  position: relative;
}
.filter-panel summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 5px 0;
}
.filter-panel summary::-webkit-details-marker {
  display: none;
}
.filter-panel[open] summary span {
  transform: rotate(45deg);
}
.filter-panel form {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 20;
  width: 320px;
  padding: 25px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 7px 20px #00000008;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
  align-items: center;
}
.filter-panel label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
}
select {
  width: 100%;
  background: white;
  border: 0;
  border-bottom: 1px solid #bbb;
  padding: 7px 0;
  font-size: 12px;
}
.art-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 100px 76px;
}
.art-card {
  min-width: 0;
}
.art-link {
  display: block;
}
.art-image {
  height: min(44vw, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.art-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  padding-top: 22px;
}
.art-caption span:first-child {
  color: var(--ink);
}
.art-caption abbr {
  text-decoration: none;
}
.art-link:hover .art-caption span:first-child {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.art-grid.is-index {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 50px 35px;
}
.is-index .art-image {
  height: min(19vw, 260px);
}
.is-index .art-caption {
  flex-direction: column;
  gap: 1px;
  padding-top: 16px;
}
.page-nav {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 70px;
}
.page-nav [aria-current] {
  text-decoration: underline;
}
.empty-state {
  grid-column: 1/-1;
  padding: 80px 0;
}
.empty-state p {
  margin-bottom: 15px;
}
.collection-description {
  max-width: 560px;
  margin-bottom: 35px;
}
.back-link {
  display: inline-block;
  font-size: 12px;
  margin: 5px 0 42px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 60px;
  align-items: start;
}
.detail-gallery {
  min-width: 0;
}
.detail-image {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  margin-bottom: 20px;
  cursor: zoom-in;
}
.detail-image img {
  width: auto;
  max-width: 100%;
  max-height: 82svh;
  object-fit: contain;
}
.image-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}
/* Просмотр поверх страницы; нативный dialog удерживает фокус внутри окна. */
html.viewer-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}
.art-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: white;
  color: var(--ink);
}
.art-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.art-viewer::backdrop {
  background: white;
}
.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: max(12px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right)) 12px
    max(22px, env(safe-area-inset-left));
  font-size: 12px;
}
.viewer-close,
.viewer-prev,
.viewer-next {
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
}
.viewer-close span {
  margin-left: 12px;
  font-size: 22px;
  vertical-align: middle;
}
.viewer-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 clamp(12px, 3vw, 48px);
  cursor: zoom-out;
}
.viewer-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: default;
}
.viewer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 54px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  font-size: 11px;
  color: var(--muted);
}
.detail-info {
  padding-top: 6px;
  font-size: 13px;
}
.detail-info h1 {
  font-size: 15px;
  margin-bottom: 26px;
}
.detail-info .art-medium {
  margin-bottom: 5px;
}
.detail-description {
  margin-top: 20px;
}
.size-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 16px;
}
.detail-price {
  margin-top: 38px;
  margin-bottom: 15px;
}
.text-link {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.secondary-link {
  display: block;
  margin-top: 16px;
  color: var(--muted);
}
.related-section {
  margin-top: 120px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 35px;
}
.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.related-grid .art-image {
  height: 280px;
}
.related-grid .art-caption {
  flex-direction: column;
  gap: 3px;
}
.contact-page {
  max-width: 580px;
  padding-top: 5px;
}
.contact-page h1 {
  font-size: 14px;
  margin-bottom: 80px;
}
.contact-page p {
  margin-bottom: 30px;
  color: var(--muted);
}
.contact-link {
  display: block;
  width: fit-content;
  margin-bottom: 15px;
  font-size: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}
.button:hover {
  color: white;
  background: #444;
}
.button-outline {
  background: white;
  color: var(--ink);
  border-color: #c9c9c9;
}
.button-outline:hover {
  background: #f5f5f5;
  color: var(--ink);
}
.tryon-page h1 {
  font-size: 16px;
  margin-bottom: 18px;
}
.tryon-intro {
  max-width: 650px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 32px;
}
.tryon-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 34px;
}
.tryon-scene,
.tryon-controls {
  min-width: 0;
}
#stage {
  position: relative;
  width: 100%;
  background: #f2f2f2;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
#stage canvas {
  display: block;
  width: 100%;
  height: auto;
}
#drop {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  justify-content: center;
  text-align: center;
  color: #444;
  pointer-events: none;
  padding: 16px;
  font-size: 11px;
}
#drop > div {
  background: #ffffffd9;
  padding: 12px 16px;
  max-width: 340px;
}
#drop strong {
  display: block;
  font-size: 13px;
  font-weight: normal;
  margin-bottom: 5px;
}
.scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.scene-actions label:focus-within {
  outline: 2px solid #222;
  outline-offset: 3px;
}
.camera-button {
  display: none;
}
.scene-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.art-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.art-selector > div {
  text-align: center;
  font-size: 12px;
}
.art-selector .meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.arrow-button {
  border: 1px solid var(--line);
  background: white;
  min-width: 34px;
  height: 34px;
}
.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 10px;
  margin: 14px 0 5px;
}
.thumbs button {
  padding: 4px;
  background: #fff;
  border: 1px solid transparent;
  flex: 0 0 48px;
}
.thumbs img {
  width: 38px;
  height: 48px;
  object-fit: contain;
}
.thumbs button.active {
  border-color: var(--ink);
}
#plink {
  font-size: 11px;
}
.estimate-notice {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 18px;
}
.scale-control {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.scale-control h2 {
  margin-bottom: 15px;
}
.scale-control ol {
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
}
.scale-control li {
  margin-bottom: 7px;
}
.measurement {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}
.measurement input {
  min-width: 0;
  width: 95px;
  padding: 7px 10px;
  border: 1px solid #bcbcbc;
  background: white;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-label input {
  accent-color: var(--ink);
}
.scale-control .fine-print {
  color: var(--muted);
  font-size: 11px;
  margin-top: 18px;
}
.notice {
  margin-bottom: 25px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.tryon-empty {
  margin: 70px 0;
}
.tryon-empty p {
  margin-bottom: 20px;
}
@media (min-width: 1800px) {
  .page-body {
    margin-left: 320px;
    padding-right: 90px;
  }
  .art-grid {
    gap: 120px;
  }
  .art-image {
    height: 720px;
  }
}
@media (max-width: 1199px) {
  .site-header {
    left: 28px;
    width: 160px;
  }
  .artist-name {
    font-size: 21px;
  }
  .page-body {
    margin-left: 220px;
    padding-right: 30px;
  }
  .art-grid {
    gap: 75px 40px;
  }
  .art-image {
    height: 44vw;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 30px;
  }
  .tryon-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .tryon-controls {
    max-width: 600px;
  }
}
@media (max-width: 899px) {
  .site-header {
    position: relative;
    inset: auto;
    width: auto;
    padding: 28px 28px 0;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 30px;
  }
  .site-nav {
    order: 2;
    flex-direction: row;
    margin-top: 0;
    gap: 24px;
    font-size: 12px;
  }
  .language-switch {
    order: 3;
    margin-top: 0;
    flex-shrink: 0;
  }
  .sidebar-social {
    display: none;
  }
  .page-body {
    margin-left: 0;
    padding: 48px 28px 0;
  }
  .art-image {
    height: 56vw;
  }
  .art-grid.is-index {
    gap: 35px 24px;
  }
  .is-index .art-image {
    height: 25vw;
  }
  .site-footer {
    margin-top: 80px;
  }
  .related-grid .art-image {
    height: 240px;
  }
  .camera-button {
    display: inline-flex;
  }
}
@media (max-width: 649px) {
  .site-header {
    padding: 28px 22px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 27px;
  }
  .artist-name {
    font-size: 24px;
  }
  .site-nav {
    gap: 26px;
  }
  .language-switch {
    position: absolute;
    top: 29px;
    right: 22px;
  }
  .page-body {
    padding: 39px 22px 0;
  }
  .gallery-toolbar {
    gap: 14px;
    margin-bottom: 28px;
    font-size: 11px;
  }
  .view-switch {
    gap: 13px;
  }
  .art-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 62px;
  }
  .art-image {
    height: auto;
    min-height: 0;
  }
  .art-image img {
    max-height: none;
    max-width: 100%;
    width: 100%;
  }
  .art-caption {
    padding-top: 15px;
    font-size: 11px;
  }
  .art-grid.is-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 35px 24px;
  }
  .is-index .art-image {
    height: 46vw;
  }
  .is-index .art-image img {
    width: auto;
    max-height: 100%;
  }
  .filter-panel {
    position: static;
  }
  .filter-panel form {
    width: min(320px, 100%);
    top: 38px;
  }
  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }
  .detail-gallery {
    width: 100%;
  }
  .detail-image img {
    max-height: none;
    width: 100%;
  }
  .detail-info {
    width: 100%;
  }
  .detail-info h1 {
    margin-bottom: 18px;
  }
  .detail-price {
    margin-top: 24px;
  }
  .back-link {
    margin-bottom: 30px;
  }
  .related-section {
    margin-top: 75px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
  }
  .related-grid .art-card:nth-child(3) {
    display: none;
  }
  .related-grid .art-image {
    height: 220px;
  }
  .related-grid .art-image img {
    width: auto;
    max-height: 100%;
  }
  .site-footer {
    flex-wrap: wrap;
    gap: 9px 18px;
    margin-top: 65px;
    padding: 24px 0;
    font-size: 10px;
  }
  .site-footer > span:nth-child(2) {
    display: none;
  }
  .contact-page h1 {
    margin-bottom: 55px;
  }
  .contact-page p {
    max-width: 280px;
  }
  .tryon-intro {
    margin-bottom: 25px;
  }
  #drop {
    position: static;
    padding: 10px 0;
    background: white;
  }
  #drop > div {
    padding: 8px 12px;
    font-size: 10px;
    max-width: 260px;
  }
  #drop strong {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Страницы записей и компактные формы продолжают типографику галереи. */
textarea {
  font: inherit;
  color: inherit;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 28px 0;
  font-size: 12px;
}
.contact-primary {
  margin-bottom: 22px;
  padding: 13px 24px;
  font-size: 18px;
}
.enquiry-primary {
  width: 100%;
}
.enquiry-panel {
  margin-top: 42px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.enquiry-panel h2 {
  margin-bottom: 20px;
  font-size: 14px;
}
.enquiry-form {
  display: grid;
  gap: 17px;
}
.form-field {
  display: grid;
  gap: 7px;
}
.form-field label {
  font-size: 12px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #bcbcbc;
  background: #fff;
  padding: 10px;
  border-radius: 0;
}
.form-field textarea {
  resize: vertical;
  min-height: 90px;
}
.enquiry-form .button {
  justify-self: start;
}
.enquiry-form .consent {
  align-items: flex-start;
  font-size: 11px;
}
.enquiry-form .consent input {
  flex-shrink: 0;
  margin-top: 3px;
}
.enquiry-form .fine-print {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.errorlist {
  color: #a32626;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.form-success {
  color: #21613a;
  margin-bottom: 22px;
}
.events-page > h1,
.about-page > h1 {
  font-size: 16px;
  margin-bottom: 46px;
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
}
.event-card img {
  width: 100%;
  height: 330px;
  object-fit: cover;
}
.event-period {
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0 8px;
}
.event-card h2 {
  font-size: 16px;
}
.event-detail {
  max-width: 960px;
}
.event-detail h1 {
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.3;
  margin: 10px 0 32px;
}
.event-detail .event-period {
  margin-top: 0;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}
.carousel-slide .detail-image {
  margin: 0;
  height: min(65vw, 600px);
  background: #f7f7f5;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: none;
}
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 14px;
  font-size: 12px;
}
.event-copy {
  max-width: 640px;
  margin-top: 35px;
  font-size: 15px;
  line-height: 1.8;
}
.event-copy p,
.about-copy p {
  margin-bottom: 22px;
}
.source-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 65px;
  max-width: 1050px;
}
.artist-portrait {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  object-position: top;
}
.about-copy {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.8;
}
.room-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.room-selector > div {
  flex: 1;
  text-align: center;
  font-size: 12px;
}
.room-thumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.room-thumbs button {
  width: 90px;
  border: 1px solid transparent;
  padding: 3px;
  background: #fff;
}
.room-thumbs button[aria-pressed="true"] {
  border-color: #191919;
}
.room-thumbs img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}
.room-hint {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 1050px) and (min-width: 650px) {
  .site-header {
    flex-wrap: wrap;
  }
  .site-nav {
    flex-wrap: wrap;
    gap: 14px 20px;
  }
}
@media (max-width: 649px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 13px 23px;
  }
  .events-grid,
  .about-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 35px;
  }
  .event-card img {
    height: auto;
    max-height: 420px;
  }
  .carousel-slide .detail-image {
    height: 65vw;
  }
  .contact-page .form-success {
    max-width: none;
  }
  .enquiry-primary {
    width: auto;
    min-width: 200px;
  }
}

.detail-gallery .carousel-slide .detail-image {
  height: min(75svh, 780px);
  background: white;
}
.detail-gallery .carousel-nav {
  margin: 16px 0 12px;
}
.photo-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 8px;
}
.photo-thumbs button {
  flex: 0 0 64px;
  border: 1px solid transparent;
  background: white;
  padding: 3px;
}
.photo-thumbs button[aria-pressed="true"] {
  border-color: #191919;
}
.photo-thumbs img {
  width: 56px;
  height: 65px;
  object-fit: contain;
}
@media (max-width: 649px) {
  .detail-gallery .carousel-slide .detail-image {
    height: min(120vw, 70svh);
  }
}
/* Переключение без пустых кадров, индикатор непосредственно на видимой стрелке. */
[data-carousel] {
  position: relative;
}
.carousel-ready .carousel-track {
  display: block;
  height: min(72svh, 850px);
  overflow: hidden;
  touch-action: pan-y;
  scroll-snap-type: none;
}
.carousel-ready .carousel-slide {
  display: none;
  width: 100%;
  height: 100%;
}
.carousel-ready .carousel-slide.is-current {
  display: block;
}
.carousel-ready .detail-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-ready .detail-image img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
.carousel-ready .carousel-nav {
  position: absolute;
  top: min(36svh, 425px);
  inset-inline: 8px;
  transform: translateY(-50%);
  z-index: 4;
  margin: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.carousel-ready .carousel-nav button {
  pointer-events: auto;
  background: #fffffff0;
  box-shadow: 0 1px 8px #0001;
}
.carousel-ready .carousel-nav span {
  position: absolute;
  top: calc(min(36svh, 425px) - 30px);
  left: 50%;
  transform: translateX(-50%);
  background: #fffffff0;
  padding: 3px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.arrow-button,
.viewer-prev,
.viewer-next {
  position: relative;
}
.is-loading {
  color: transparent !important;
}
.is-loading::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  left: calc(50% - 9px);
  top: calc(50% - 9px);
  border: 2px solid #bbb;
  border-top-color: #222;
  border-radius: 50%;
  animation: astra-spin 0.7s linear infinite;
}
.viewer-stage {
  touch-action: pan-y;
}
@keyframes astra-spin {
  to {
    transform: rotate(360deg);
  }
}
.room-thumbs {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}
.room-thumb {
  position: relative;
  flex: 0 0 88px;
}
.room-thumb > button:first-child {
  width: 88px;
  height: 62px;
  padding: 3px;
}
.room-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.room-thumbs .add-room {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 62px;
  border: 1px dashed #999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 10px;
  background: #faf9f6;
}
.add-room > span:first-child {
  font-size: 23px;
  line-height: 1;
}
.room-thumbs .remove-room {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  padding: 0;
  background: white;
  border: 1px solid #aaa;
  font-size: 16px;
  line-height: 18px;
}
.room-thumb [aria-pressed="true"] {
  outline: 1px solid #222;
  outline-offset: 1px;
}
#stage {
  position: relative;
}
#ruler-label {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, calc(-100% - 8px));
  padding: 5px 8px;
  border: 1px solid #b8982f;
  border-radius: 4px;
  background: #fff4c4;
  color: #332c13;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    box-shadow 0.15s,
    background 0.15s,
    scale 0.15s;
  cursor: text;
}
#ruler-label:hover,
#ruler-label:focus-visible {
  background: #ffe78a;
  box-shadow: 0 2px 9px #0003;
  scale: 1.05;
}
#ruler-label > span + span {
  display: inline-block;
  opacity: 0.55;
  transition:
    transform 0.15s,
    opacity 0.15s;
}
#ruler-label:hover > span + span {
  transform: rotate(-15deg);
  opacity: 1;
}
.ruler-editor {
  position: absolute;
  z-index: 7;
  transform: translate(-50%, calc(-100% - 8px));
  background: #fff4c4;
  border: 1px solid #b8982f;
  border-radius: 4px;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.ruler-editor[hidden],
.ruler-label[hidden] {
  display: none !important;
}
.ruler-editor input {
  width: 70px;
  padding: 4px;
  border: 1px solid #b8982f;
  background: #fff;
  font-size: 14px;
}
.ruler-editor button {
  border: 0;
  background: #e5ce78;
  padding: 5px;
}
.ruler-tooltip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  background: #222;
  color: #fff;
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 10px;
  white-space: nowrap;
}
#scene-status {
  font-size: 12px;
  color: #806323;
}
#scene-status:empty {
  display: none;
}
#choose-art {
  width: 100%;
  margin: 16px 0 4px;
}
.art-picker {
  width: min(1100px, calc(100vw - 24px));
  max-height: 90svh;
  border: 1px solid #ccc;
  padding: 26px;
}
.art-picker::backdrop {
  background: #0007;
}
.picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.picker-heading button {
  font-size: 26px;
  border: 0;
  background: none;
}
.picker-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}
.picker-filters input {
  padding: 10px;
  border: 1px solid #bbb;
  flex: 1;
  min-width: 0;
}
.picker-filters select {
  width: auto;
  min-width: 140px;
}
.art-picker .art-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.picker-card {
  border: 0;
  background: white;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 8px;
}
.picker-card[aria-pressed="true"] {
  outline: 1px solid #aaa;
}
.picker-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
}
.picker-card small {
  color: #777;
}
.picker-card span {
  font-size: 13px;
}
@media (max-width: 600px) {
  .art-picker {
    padding: 16px;
  }
  .art-picker .art-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .picker-card img {
    height: 160px;
  }
  .picker-filters {
    flex-wrap: wrap;
    gap: 10px;
  }
  .picker-filters input,
  .picker-filters select {
    width: 100%;
    flex: auto;
  }
  .room-thumb,
  .room-thumbs .add-room {
    flex-basis: 77px;
    width: 77px;
  }
  .room-thumb > button:first-child {
    width: 77px;
  }
  .ruler-label {
    font-size: 11px;
  }
}

.language-switch form {
  display: flex;
  gap: 14px;
}
.language-switch button {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}

.tryon-page > h1 {
  margin-bottom: 32px;
}

.photo-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

#dl.is-loading {
  color: inherit !important;
  position: relative;
  padding-right: 42px;
}
#dl.is-loading::after {
  left: auto;
  content: "";
  position: absolute;
  right: 14px;
  top: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border: 2px solid #999;
  border-top-color: transparent;
  border-radius: 50%;
  animation: astra-spin 0.7s linear infinite;
}
