.reference-duplicate-card {
  display: grid;
  gap: 0.38rem;
  margin-top: 0.05rem;
  padding: 0.72rem;
  border: 1px solid var(--accent-border);
  border-radius: 0.85rem;
  background: #fcf6f0;
}

.reference-duplicate-card p {
  margin: 0;
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reference-duplicate-card strong {
  color: #513d34;
  font-size: 0.82rem;
  line-height: 1.4;
}

.reference-duplicate-card > span {
  color: #796257;
  font-size: 0.75rem;
}

.reference-duplicate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.22rem;
}

.reference-duplicate-actions .solid-button,
.reference-duplicate-actions .outline-button {
  min-height: 2.25rem;
  font-size: 0.72rem;
}

.reference-review-link {
  margin-top: 0.45rem;
  padding-top: 0.9rem !important;
  border-top: 1px solid #eadfd7 !important;
  border-radius: 0 !important;
}

@media (max-width: 520px) {
  .reference-duplicate-actions {
    display: grid;
  }

  .reference-duplicate-actions .solid-button,
  .reference-duplicate-actions .outline-button {
    width: 100%;
  }
}

/* Encyclopedia: structured reference and editorial journal */
.encyclopedia-view,
.encyclopedia-brand-page,
.encyclopedia-glossary,
.encyclopedia-article-page {
  min-width: 0;
}

.encyclopedia-intro {
  max-width: 48rem;
  margin: 0.1rem 0 1.1rem;
  color: #796257;
  font-size: 0.88rem;
  line-height: 1.65;
}

.encyclopedia-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 27rem);
  gap: 0.2rem;
  margin-bottom: 1.1rem;
  padding: 0.22rem;
  border: 1px solid #eadfd7;
  border-radius: 0.9rem;
  background: #fffaf5;
}

.encyclopedia-tabs button {
  min-height: 2.45rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: #745d50;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.encyclopedia-tabs button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.encyclopedia-directory-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  margin-bottom: 1rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid #eadfd7;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 10% 15%, #f6d9ce 0, transparent 32%),
    linear-gradient(125deg, #fff9f3, #f7eee7);
}

.encyclopedia-directory-actions p,
.encyclopedia-directory-actions h3,
.encyclopedia-directory-actions span {
  margin: 0;
}

.encyclopedia-directory-actions p,
.encyclopedia-feed-heading p,
.encyclopedia-brand-hero > p,
.encyclopedia-article header > p {
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.encyclopedia-directory-actions h3 {
  margin-top: 0.2rem;
  color: #503d35;
  font-size: 1.2rem;
}

.encyclopedia-directory-actions span {
  display: block;
  max-width: 38rem;
  margin-top: 0.28rem;
  color: #796257;
  font-size: 0.8rem;
  line-height: 1.5;
}

.encyclopedia-directory-actions .outline-button {
  flex: none;
  white-space: nowrap;
}

.encyclopedia-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.encyclopedia-brand-card {
  display: grid;
  min-width: 0;
  min-height: 12rem;
  padding: 1.1rem;
  border: 1px solid #eadfd7;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 100% 0, #f1d9cf 0, transparent 31%),
    #fffaf5;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.encyclopedia-brand-card:hover,
.encyclopedia-brand-card:focus-visible {
  border-color: var(--accent-border);
  box-shadow: 0 9px 20px rgba(91, 55, 42, 0.1);
  outline: none;
}

.encyclopedia-brand-card > span,
.encyclopedia-brand-card small {
  color: #956c55;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.encyclopedia-brand-card h3 {
  margin: 0.4rem 0;
  color: #503d35;
  font-size: 1.2rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.encyclopedia-brand-card p {
  display: -webkit-box;
  margin: 0 0 0.75rem;
  overflow: hidden;
  color: #796257;
  font-size: 0.8rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.encyclopedia-brand-card small {
  align-self: end;
  color: #8a6e5f;
}

.encyclopedia-brand-card.has-image {
  grid-template-areas:
    "eyebrow image"
    "title image"
    "copy image"
    "meta image";
  grid-template-columns: minmax(0, 1fr) 5.35rem;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  column-gap: 0.78rem;
}

.encyclopedia-brand-card.has-image > span { grid-area: eyebrow; }
.encyclopedia-brand-card.has-image > h3 { grid-area: title; }
.encyclopedia-brand-card.has-image > p { grid-area: copy; }
.encyclopedia-brand-card.has-image > small { grid-area: meta; }

.encyclopedia-brand-card-image {
  grid-area: image;
  align-self: stretch;
  min-height: 9.75rem;
  overflow: hidden;
  border-radius: 0.72rem;
  background: #eadfd7;
}

.encyclopedia-brand-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.encyclopedia-brand-hero {
  margin: 0.9rem 0 1rem;
  padding: 1.25rem;
  border-radius: 1.05rem;
  background:
    linear-gradient(135deg, rgba(146, 74, 64, 0.16), transparent 62%),
    #fff6ef;
}

.encyclopedia-brand-hero h2,
.encyclopedia-article h2 {
  margin: 0.25rem 0 0;
  color: #49372f;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  line-height: 1.07;
  overflow-wrap: anywhere;
}

.encyclopedia-brand-photo {
  margin: 0.95rem 0 0;
}

.encyclopedia-brand-photo img {
  display: block;
  width: 100%;
  max-height: 22rem;
  border-radius: 0.8rem;
  object-fit: cover;
  object-position: center 35%;
}

.encyclopedia-brand-photo figcaption {
  padding: 0.45rem 0.1rem 0;
}

.encyclopedia-history,
.encyclopedia-reference-section,
.encyclopedia-brand-articles {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid #eadfd7;
}

.encyclopedia-history h3,
.encyclopedia-reference-section h3,
.encyclopedia-brand-articles h3,
.encyclopedia-sources h3 {
  margin: 0 0 0.65rem;
  color: #513d34;
  font-size: 1.02rem;
}

.encyclopedia-history > p {
  max-width: 53rem;
  margin: 0.58rem 0;
  color: #654f44;
  font-size: 0.88rem;
  line-height: 1.7;
}

.encyclopedia-section-note,
.section-muted {
  margin: 0 0 0.72rem;
  color: #80695d;
  font-size: 0.79rem;
  line-height: 1.55;
}

.encyclopedia-line-list {
  display: grid;
  gap: 0.58rem;
}

.encyclopedia-line-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.75rem 0.82rem;
  border-radius: 0.78rem;
  background: #fff9f5;
}

.encyclopedia-line-list b {
  min-width: 0;
  color: #574137;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.encyclopedia-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.encyclopedia-tags span {
  max-width: 100%;
  padding: 0.25rem 0.46rem;
  border-radius: 999px;
  background: #f4e3db;
  color: #815d4d;
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.encyclopedia-mold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.encyclopedia-mold-card {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #eadfd7;
  border-radius: 0.9rem;
  background: #fffaf5;
}

.encyclopedia-mini-image,
.encyclopedia-tile-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(149, 108, 85, 0.2), transparent 60%),
    #f4e6dd;
  color: #8a6353;
  font-family: Georgia, serif;
  font-weight: 700;
}

.encyclopedia-mini-image {
  width: 3.4rem;
  height: 4.1rem;
  border-radius: 0.65rem;
}

.encyclopedia-mini-image img,
.encyclopedia-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.encyclopedia-mold-card h4 {
  margin: 0 0 0.38rem;
  color: #503d35;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.encyclopedia-mold-card p {
  margin: 0;
  color: #80695d;
  font-size: 0.72rem;
  line-height: 1.45;
}

.image-credit {
  display: block;
  margin-top: 0.46rem;
  color: #866f62;
  font-size: 0.63rem;
  font-style: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.encyclopedia-reference-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.encyclopedia-reference-tiles article {
  display: grid;
  gap: 0.48rem;
  min-width: 0;
}

.encyclopedia-tile-image {
  aspect-ratio: 1 / 0.72;
  border-radius: 0.72rem;
}

.encyclopedia-reference-tiles b {
  display: block;
  color: #584238;
  font-size: 0.75rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.encyclopedia-brand-articles .section-row > span,
.encyclopedia-feed-heading > span {
  display: grid;
  place-items: center;
  min-width: 1.65rem;
  min-height: 1.65rem;
  border-radius: 999px;
  background: #f3e4dc;
  color: #8a5e4d;
  font-size: 0.7rem;
  font-weight: 800;
}

.encyclopedia-brand-article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.encyclopedia-feed {
  min-width: 0;
}

.encyclopedia-feed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.2rem 0 0.85rem;
}

.encyclopedia-feed-heading h3 {
  margin: 0.18rem 0 0;
  color: #503d35;
  font-size: 1.35rem;
}

.encyclopedia-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.95rem;
  padding: 0.75rem;
  border: 1px solid #eadfd7;
  border-radius: 0.9rem;
  background: #fffaf5;
}

.encyclopedia-filters label {
  display: grid;
  flex: 1 1 12rem;
  gap: 0.28rem;
  min-width: 0;
}

.encyclopedia-filters label > span {
  color: #80695d;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.encyclopedia-filters select {
  width: 100%;
  min-width: 0;
  min-height: 2.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #ddccc1;
  border-radius: 0.62rem;
  background: #fff;
  color: #5f493d;
  font: inherit;
  font-size: 0.78rem;
}

.encyclopedia-article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.encyclopedia-article-card {
  min-width: 0;
  border: 1px solid #eadfd7;
  border-radius: 1rem;
  overflow: hidden;
  background: #fffaf5;
}

.encyclopedia-article-card > button {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.encyclopedia-article-card > button:hover h4,
.encyclopedia-article-card > button:focus-visible h4 {
  color: var(--accent);
}

.encyclopedia-article-card > button:focus-visible {
  outline: 3px solid rgba(149, 108, 85, 0.35);
  outline-offset: -3px;
}

.encyclopedia-article-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #f4e6dd;
}

.encyclopedia-article-card .encyclopedia-article-cover {
  aspect-ratio: 16 / 8.5;
}

.encyclopedia-article-cover img,
.encyclopedia-article-cover .encyclopedia-cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.encyclopedia-article-cover img {
  object-fit: cover;
}

.encyclopedia-cover-placeholder {
  position: relative;
  align-content: end;
  gap: 0.4rem;
  padding: 1rem;
  overflow: hidden;
  color: #fffaf5;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.28) 0 0.13rem, transparent 0.15rem) 0 0 / 1.2rem 1.2rem,
    linear-gradient(135deg, #c68f79, #9a554d);
}

.encyclopedia-cover-placeholder::after {
  position: absolute;
  right: -10%;
  top: -55%;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  content: "";
}

.encyclopedia-cover-placeholder.tone-1 {
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.24) 0 0.13rem, transparent 0.15rem) 0 0 / 1.2rem 1.2rem,
    linear-gradient(135deg, #aa7a94, #714b73);
}

.encyclopedia-cover-placeholder.tone-2 {
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.24) 0 0.13rem, transparent 0.15rem) 0 0 / 1.2rem 1.2rem,
    linear-gradient(135deg, #bd9e68, #956e42);
}

.encyclopedia-cover-placeholder.tone-3 {
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.24) 0 0.13rem, transparent 0.15rem) 0 0 / 1.2rem 1.2rem,
    linear-gradient(135deg, #778f8c, #496d6c);
}

.encyclopedia-cover-placeholder span {
  position: relative;
  z-index: 1;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.encyclopedia-cover-placeholder b {
  position: relative;
  z-index: 1;
  max-width: 29rem;
  font-family: Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.encyclopedia-article-copy {
  display: grid;
  gap: 0.36rem;
  min-width: 0;
  padding: 0.9rem;
}

.encyclopedia-article-copy > p {
  margin: 0;
  color: #956c55;
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.encyclopedia-article-copy h4 {
  margin: 0;
  color: #503d35;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.encyclopedia-article-copy > span {
  display: -webkit-box;
  overflow: hidden;
  color: #796257;
  font-size: 0.76rem;
  line-height: 1.48;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.encyclopedia-article-copy .encyclopedia-tags {
  margin-top: 0.15rem;
}

.encyclopedia-glossary-search {
  width: min(100%, 31rem);
  margin: 0.2rem 0 0.95rem;
}

.encyclopedia-glossary-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.encyclopedia-glossary-list > div {
  padding: 0.9rem 1rem;
  border: 1px solid #eadfd7;
  border-radius: 0.85rem;
  background: #fffaf5;
}

.encyclopedia-glossary-list dt {
  color: #503d35;
  font-size: 0.96rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.encyclopedia-glossary-list dt small {
  margin-left: 0.45rem;
  color: #8d7263;
  font-size: 0.67rem;
  font-weight: 650;
}

.encyclopedia-glossary-list dd {
  margin: 0.35rem 0 0;
  color: #6c5549;
  font-size: 0.82rem;
  line-height: 1.58;
}

.encyclopedia-article {
  max-width: 49rem;
  margin: 0.9rem auto 0;
}

.encyclopedia-article header {
  margin-bottom: 1rem;
}

.encyclopedia-article header .encyclopedia-tags {
  margin-top: 0.72rem;
}

.encyclopedia-article-cover.large {
  aspect-ratio: 16 / 8.25;
  border-radius: 1rem;
}

.encyclopedia-article-cover.large .encyclopedia-cover-placeholder {
  padding: clamp(1.15rem, 4vw, 2rem);
}

.encyclopedia-article-cover.large .encyclopedia-cover-placeholder b {
  max-width: 35rem;
  font-size: clamp(1.35rem, 4vw, 2.35rem);
}

.encyclopedia-article-cover figcaption {
  padding: 0.45rem 0.1rem 0;
}

.encyclopedia-article-body {
  margin-top: 1.25rem;
  color: #5f493e;
  font-size: 0.92rem;
  line-height: 1.75;
}

.encyclopedia-article-body h2,
.encyclopedia-article-body h3,
.encyclopedia-article-body h4 {
  margin: 1.45rem 0 0.5rem;
  color: #513d34;
  line-height: 1.2;
}

.encyclopedia-article-body h2 { font-size: 1.34rem; }
.encyclopedia-article-body h3 { font-size: 1.1rem; }
.encyclopedia-article-body h4 { font-size: 0.98rem; }

.encyclopedia-article-body p,
.encyclopedia-article-body ul {
  margin: 0.72rem 0;
}

.encyclopedia-article-body ul { padding-left: 1.25rem; }
.encyclopedia-article-body a,
.encyclopedia-sources a { color: #8a4d46; text-underline-offset: 0.18em; }
.encyclopedia-article-body code { padding: 0.08rem 0.25rem; border-radius: 0.24rem; background: #f2e5dc; color: #70483f; }

.encyclopedia-sources {
  margin-top: 1.35rem;
  padding: 1rem;
  border-radius: 0.9rem;
  background: #f9efe8;
}

.encyclopedia-sources h3 { margin-bottom: 0.46rem; }
.encyclopedia-sources ul { display: grid; gap: 0.35rem; margin: 0; padding-left: 1.1rem; }
.encyclopedia-sources li { color: #705b50; font-size: 0.78rem; line-height: 1.45; overflow-wrap: anywhere; }



@media (max-width: 620px) {
  .encyclopedia-directory-actions {
    display: grid;
    align-items: start;
  }

  .encyclopedia-directory-actions .outline-button {
    width: 100%;
  }

  .encyclopedia-brand-grid,
  .encyclopedia-mold-grid,
  .encyclopedia-article-grid,
  .encyclopedia-brand-article-list {
    grid-template-columns: 1fr;
  }

  .encyclopedia-reference-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .encyclopedia-line-list article {
    display: grid;
  }

  .encyclopedia-filters label {
    flex-basis: 100%;
  }
}

@media (max-width: 390px) {
  .encyclopedia-tabs button {
    padding-inline: 0.35rem;
    font-size: 0.71rem;
  }

  .encyclopedia-mold-card {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .encyclopedia-mini-image {
    width: 3rem;
    height: 3.7rem;
  }

  .encyclopedia-glossary-list > div {
    padding: 0.8rem;
  }
}



@media (max-width: 620px) {
  .encyclopedia-brand-card.has-image {
    grid-template-columns: minmax(0, 1fr) 5rem;
  }

  .encyclopedia-brand-card-image {
    min-height: 8.5rem;
  }

  .encyclopedia-brand-photo img {
    max-height: 17.5rem;
  }
}




/* 2026-09-04 UX audit fixes */

/* Forms: avoid iOS focus zoom and keep the primary action reachable. */
.archive-form > .solid-button:last-child {
  position: sticky;
  z-index: 4;
  bottom: 0;
  width: 100%;
  min-height: 3rem;
  margin-top: .25rem;
  box-shadow: 0 -8px 18px #fffaf5, 0 8px 20px #4a2b2030;
}

/* Status colors carry meaning; burgundy remains the action/active color. */
.doll-image em.status-in_collection,
.doll-detail-meta em.status-in_collection { background: #5f7867; }
.doll-image em.status-for_sale,
.doll-detail-meta em.status-for_sale { background: #a46f2f; }
.doll-image em.status-sold,
.doll-detail-meta em.status-sold { background: #756e69; }
.doll-image em.status-wishlist,
.doll-detail-meta em.status-wishlist { background: #756088; }

/* Default portrait framing favors faces in the upper third. */
.doll-image .cover-crop-image,
.doll-detail-cover .cover-crop-image { object-position: 50% 32%; }

/* Horizontal filters make their scrollability visible and snap cleanly. */
.collection-filter {
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-right: 1.25rem;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.8rem), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.8rem), transparent 100%);
}
.collection-filter button { scroll-snap-align: start; }

/* Better contrast for small secondary copy. */
.journal-card small,
.doll-card small,
.profile-handle,
.profile-stats span,
.section-muted,
.form-hint,
.entry-photo figcaption small,
.personal-reference-list span { color: #6f5a50; }

@media (max-width: 860px) {
  /* Symmetric collection grid; no right-edge clipping. */
  .archive-content {
    width: 100%;
    max-width: 100%;
    padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
    overflow-x: clip;
  }
  .doll-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
  }

  /* Inputs >= 16px prevent Safari's automatic focus zoom. */
  .archive-form input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  .archive-form select,
  .archive-form textarea {
    min-height: 3rem;
    font-size: 1rem;
  }
  .archive-form textarea { min-height: 7.5rem; }

  /* Usable sheet margins make backdrop dismissal possible with a finger. */
  .modal-layer {
    place-items: center;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  }
  .archive-modal {
    width: min(92vw, 49rem);
    max-width: 92vw;
    max-height: 88dvh;
  }

  /* One implementation for the center action: the button itself is the 54px hit target. */
  .mobile-nav {
    min-height: 4.75rem;
    padding: .32rem .28rem .4rem;
    overflow: visible;
  }
  .mobile-nav > button:nth-child(1) { grid-column: 1; }
  .mobile-nav > button:nth-child(2) { grid-column: 2; }
  .mobile-nav > button:nth-child(4) { grid-column: 4; }
  .mobile-nav > button:nth-child(5) { grid-column: 5; }
  .mobile-nav button { font-size: .625rem; }
  .mobile-nav .mobile-add-button {
    position: absolute;
    z-index: 3;
    top: -1.15rem;
    left: 50%;
    display: block;
    width: 3.375rem;
    min-width: 3.375rem;
    height: 3.375rem;
    min-height: 3.375rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    transform: translateX(-50%);
    overflow: visible;
  }
  .mobile-nav .mobile-add-button .mobile-add-icon-slot,
  .mobile-nav .mobile-add-button .mobile-add-circle {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100%;
    margin: 0;
    place-items: center;
  }
  .mobile-nav .mobile-add-button .mobile-add-circle {
    border: 3px solid #fffaf5;
    border-radius: 50%;
    background: var(--accent);
    color: #fffaf5;
    box-shadow: 0 8px 18px #8f334747;
  }
  .mobile-nav .mobile-add-button .mobile-add-circle svg {
    position: static;
    width: 1.3rem;
    height: 1.3rem;
    margin: 0;
    transform: none;
  }
  .mobile-nav .mobile-add-button .mobile-add-label {
    position: absolute;
    top: calc(100% + .46rem);
    left: 50%;
    margin: 0;
    color: var(--accent);
    font-size: .625rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .profile-stats span { font-size: .6875rem; }
}

@media (max-width: 520px) {
  .archive-modal {
    width: 92vw;
    max-width: 92vw;
    max-height: 88dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Readability floor for dense archive metadata. */
.archive-shell .section-kicker,
.archive-shell .doll-image em,
.archive-shell .doll-card p,
.archive-shell .journal-copy > p,
.archive-shell .journal-tags b,
.archive-shell .entry-tags button,
.archive-shell .search-group h3,
.archive-shell .reference-section small,
.archive-shell .profile-notes span,
.archive-shell .backup-state,
.archive-shell .doll-detail-copy > p,
.archive-shell .entry-detail > p,
.archive-shell .doll-detail-copy > em,
.archive-shell .detail-list dt,
.archive-shell .reference-picker-helper,
.archive-shell .crop-ranges p,
.archive-shell .add-menu small,
.archive-shell .media-manager-heading small,
.archive-shell .managed-photo-select,
.archive-shell .photo-tag-content small,
.archive-shell .doll-journal-list span,
.archive-shell .entry-photo figcaption button,
.archive-shell .entry-text-tags > span,
.archive-shell .entry-text-tags button,
.archive-shell .collection-filter small,
.archive-shell .brand-reference-heading p,
.archive-shell .brand-reference-group b,
.archive-shell .detail-edit,
.archive-shell .doll-detail-copy p,
.archive-shell .doll-detail-meta em,
.archive-shell .detail-add-photo,
.archive-shell .detail-delete,
.archive-shell .photo-crop-toggle,
.archive-shell .photo-crop-editor .crop-ranges label,
.archive-shell .photo-crop-editor .crop-ranges p,
.archive-shell .entry-photo figcaption > span,
.archive-shell .entry-photo figcaption small,
.archive-shell .personal-reference-list span,
.archive-shell .personal-reference-delete,
.archive-shell .doll-detail-meta > span,
.archive-shell .reference-duplicate-card p,
.archive-shell .encyclopedia-directory-actions p,
.archive-shell .encyclopedia-feed-heading p,
.archive-shell .encyclopedia-brand-hero > p,
.archive-shell .encyclopedia-article header > p,
.archive-shell .encyclopedia-brand-card > span,
.archive-shell .encyclopedia-brand-card small,
.archive-shell .encyclopedia-tags span,
.archive-shell .image-credit,
.archive-shell .encyclopedia-filters label > span,
.archive-shell .encyclopedia-cover-placeholder span,
.archive-shell .encyclopedia-article-copy > p,
.archive-shell .encyclopedia-glossary-list dt small {
  font-size: max(.6875rem, 11px);
}

/* 2026-09-04 card redesign v2 — responsive editorial doll card */

/* Keep the approved typography. */
.archive-shell,
.archive-shell button,
.archive-shell input,
.archive-shell select,
.archive-shell textarea,
.archive-shell .doll-image em,
.archive-shell .doll-detail-meta em {
  font-family: var(--font-ui);
}

/* Semantic statuses: white Golos Text everywhere. */
.doll-image em[class*="status-"],
.doll-detail-meta em[class*="status-"] {
  color: #fff !important;
  font-family: var(--font-ui) !important;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  border: 0;
  box-shadow: 0 1px 2px rgba(45, 30, 26, .12);
}
.doll-image em.status-in_collection,
.doll-detail-meta em.status-in_collection { background: #8f3347 !important; }
.doll-image em.status-sold,
.doll-detail-meta em.status-sold { background: #6b6a68 !important; }
.doll-image em.status-for_sale,
.doll-detail-meta em.status-for_sale { background: #58789a !important; }
.doll-image em.status-wishlist,
.doll-detail-meta em.status-wishlist { background: #55735e !important; }

/* Doll page: one centered card, no duplicated outer back button. */
.archive-main:has(.doll-detail) > .archive-topbar { display: none !important; }
.detail-view:has(.doll-detail) {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}
.doll-page-back { display: none !important; }

.doll-detail {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) !important;
  grid-template-areas:
    "head head"
    "media copy" !important;
  gap: 0 !important;
  background: #fffaf5 !important;
  border: 1px solid #e4d9d0 !important;
  border-bottom: 0 !important;
  border-radius: 18px 18px 0 0 !important;
  overflow: visible !important;
  box-shadow: 0 16px 42px rgba(77, 53, 45, .07);
}

.doll-card-header {
  grid-area: head;
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 64px;
  padding: 8px 14px;
  border-bottom: 1px solid #eee3dc;
  background: #fffaf5;
  border-radius: 18px 18px 0 0;
}
.doll-card-back,
.doll-card-menu > summary {
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
}
.doll-card-back:hover,
.doll-card-menu > summary:hover { background: #f7e9ec; }
.doll-card-header-title {
  color: #533b36;
  text-align: center;
  font-size: .92rem;
  font-weight: 500;
}
.doll-card-menu {
  position: relative;
  justify-self: end;
}
.doll-card-menu > summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.doll-card-menu > summary::-webkit-details-marker { display: none; }
.doll-card-menu-popover {
  z-index: 30;
  position: absolute;
  top: 44px;
  right: 0;
  width: 178px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: #fffdf9;
  border: 1px solid #e3d8d0;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(50, 33, 29, .18);
}
.doll-card-menu-popover button {
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5b4740;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 500;
}
.doll-card-menu-popover button:hover { background: #f8f0eb; }
.doll-card-menu-popover .doll-card-menu-delete { color: #945047; }

.doll-detail-media-column {
  grid-area: media;
  align-self: start;
  position: sticky;
  top: 1.25rem;
  padding: 20px 10px 20px 20px;
}
.doll-detail-cover {
  width: 100% !important;
  aspect-ratio: 4 / 5 !important;
  max-height: 560px !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: block !important;
  background: #eadfd7 !important;
  border: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
.doll-detail-cover .cover-crop-image,
.doll-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  display: block;
}

.doll-desktop-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.doll-desktop-thumbs button {
  flex: 0 0 calc((100% - 16px) / 3);
  scroll-snap-align: start;
}
.doll-desktop-thumbs button,
.detail-gallery-photo {
  aspect-ratio: 1 / 1 !important;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #eadfd7;
  border: 0;
  border-radius: 10px;
}
.doll-desktop-thumbs img,
.detail-gallery-photo img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: 50% 32%;
  display: block;
}

.doll-detail-copy {
  grid-area: copy;
  align-self: start !important;
  padding: 26px 28px 30px !important;
  display: grid !important;
  gap: 16px !important;
}
.doll-detail-copy h2 {
  margin: 0;
  color: #302020;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.doll-official-name {
  margin-top: 7px;
  color: #5e4940;
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 500;
}
.doll-detail-line {
  margin-top: 6px;
  color: #806b60;
  font-size: .88rem;
  line-height: 1.45;
}
.doll-detail-meta {
  display: flex !important;
  flex-wrap: wrap;
  gap: 7px !important;
  margin-top: 12px !important;
}
.doll-detail-meta em,
.doll-detail-meta .doll-meta-chip {
  min-height: 30px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: .75rem !important;
  line-height: 1;
}
.doll-detail-meta .doll-meta-chip {
  color: #5f4b43;
  background: transparent;
  border: 1px solid #cfb8ae;
  font-weight: 500;
}
.doll-description {
  margin: 0 !important;
  color: #5c4b45 !important;
  font-family: var(--font-ui) !important;
  font-size: .94rem !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: pre-wrap;
}

.doll-summary-list {
  margin: 0 !important;
  border-top: 1px solid #eee3dc;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}
.doll-summary-list > div,
.doll-summary-list > div:nth-child(odd) {
  margin-right: 0 !important;
  padding: 10px 0 !important;
  display: grid !important;
  grid-template-columns: minmax(9rem, .9fr) minmax(0, 1.1fr) !important;
  gap: 14px !important;
  align-items: center;
  border-top: 0 !important;
  border-bottom: 1px solid #eee3dc;
}
.doll-summary-list dt,
.doll-summary-list dd {
  margin: 0 !important;
  font-family: var(--font-ui);
  font-size: .82rem !important;
  line-height: 1.4;
}
.doll-summary-list dt {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #806b60 !important;
  font-weight: 500 !important;
}
.doll-summary-list dd {
  color: #493832 !important;
  text-align: right;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.doll-summary-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--accent);
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 17px 17px;
  mask-size: 17px 17px;
}
.icon-sculpt { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5.5 21c.7-4.2 3-6.4 6.5-6.4s5.8 2.2 6.5 6.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5.5 21c.7-4.2 3-6.4 6.5-6.4s5.8 2.2 6.5 6.4'/%3E%3C/svg%3E"); }
.icon-skin { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3s6 6.1 6 11a6 6 0 0 1-12 0c0-4.9 6-11 6-11Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3s6 6.1 6 11a6 6 0 0 1-12 0c0-4.9 6-11 6-11Z'/%3E%3C/svg%3E"); }
.icon-body { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='4.5' r='2.2'/%3E%3Cpath d='M8 9h8M12 7v7m-4 7 4-7 4 7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='4.5' r='2.2'/%3E%3Cpath d='M8 9h8M12 7v7m-4 7 4-7 4 7'/%3E%3C/svg%3E"); }
.icon-series,.icon-release { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 11.5 11.5 3H20v8.5L11.5 20 3 11.5Z'/%3E%3Ccircle cx='16' cy='7' r='1.2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 11.5 11.5 3H20v8.5L11.5 20 3 11.5Z'/%3E%3Ccircle cx='16' cy='7' r='1.2'/%3E%3C/svg%3E"); }
.icon-edition { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M9 3 7 21M17 3l-2 18M4 9h16M3 15h16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M9 3 7 21M17 3l-2 18M4 9h16M3 15h16'/%3E%3C/svg%3E"); }
.icon-year,.icon-date { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4M17 3v4M3 10h18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4M17 3v4M3 10h18'/%3E%3C/svg%3E"); }
.icon-hair { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 7c3 0 3-3 6-3s3 3 6 3 3-3 4-3M4 12c3 0 3-3 6-3s3 3 6 3 3-3 4-3M4 17c3 0 3-3 6-3s3 3 6 3 3-3 4-3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 7c3 0 3-3 6-3s3 3 6 3 3-3 4-3M4 12c3 0 3-3 6-3s3 3 6 3 3-3 4-3M4 17c3 0 3-3 6-3s3 3 6 3 3-3 4-3'/%3E%3C/svg%3E"); }
.icon-eyes { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E"); }
.icon-price { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15.5 8.5c-.8-.8-1.8-1.2-3.2-1.2-1.8 0-3 .9-3 2.2 0 3.5 6.2 1.5 6.2 5 0 1.4-1.3 2.4-3.2 2.4-1.5 0-2.7-.5-3.6-1.4M12 5.5v13'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15.5 8.5c-.8-.8-1.8-1.2-3.2-1.2-1.8 0-3 .9-3 2.2 0 3.5 6.2 1.5 6.2 5 0 1.4-1.3 2.4-3.2 2.4-1.5 0-2.7-.5-3.6-1.4M12 5.5v13'/%3E%3C/svg%3E"); }
.icon-link { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E"); }

.doll-detail .detail-actions {
  display: block !important;
  margin: 2px 0 0 !important;
}
.doll-detail .detail-edit {
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #fffaf5 !important;
  background: var(--accent) !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-family: var(--font-ui) !important;
  font-size: .86rem !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 18px rgba(143, 51, 71, .13);
}
.doll-detail .detail-edit:hover { background: var(--accent-strong) !important; }

/* Tabs and their active panel visually continue the same white card. */
.detail-tabs {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 0 18px;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  background: #fffaf5;
  border: 1px solid #e4d9d0;
  border-top: 1px solid #eee3dc;
  border-radius: 0 0 18px 18px;
}
.detail-tabs button {
  min-height: 52px;
  padding: 0 10px !important;
  color: #806b60;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  font-family: var(--font-ui);
  font-size: .82rem !important;
  font-weight: 500 !important;
}
.detail-tabs button.active {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
}
.detail-tabs button small { margin-left: 4px; opacity: .6; }
.detail-section {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 18px 20px 22px !important;
  background: #fffaf5 !important;
  border: 1px solid #e4d9d0 !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
}
.detail-section > h3 { display: none !important; }
.detail-tabs:has(+ .detail-journal-panel) {
  border-bottom: 0;
  border-radius: 0;
}
.detail-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

/* Gallery thumbnails live in the "Галерея" tab panel on every width.
   The old desktop-only strip under the main photo is retired. */
.doll-desktop-thumbs { display: none !important; }
@media (min-width: 1024px) {
  .detail-gallery-panel { display: block !important; }
}

@media (max-width: 1023px) {
  .detail-view:has(.doll-detail) { max-width: 46rem; }
  .doll-detail {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "head"
      "media"
      "copy" !important;
  }
  .doll-detail-media-column {
    position: static;
    padding: 12px 12px 0;
  }
  .doll-detail-cover {
    max-height: none !important;
  }
  .doll-desktop-thumbs { display: none !important; }
  .doll-detail-copy { padding: 18px 18px 22px !important; }
  .detail-tabs,
  .detail-section { max-width: 46rem !important; }
  .detail-tabs:has(+ .detail-gallery-panel),
  .detail-tabs:has(+ .detail-journal-panel) {
    border-bottom: 0;
    border-radius: 0;
  }
}

@media (max-width: 860px) {
  .detail-view:has(.doll-detail) {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .doll-detail,
  .detail-tabs,
  .detail-section { width: 100% !important; }
  .doll-card-header {
    min-height: 56px;
    padding-inline: 8px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
  .doll-detail-media-column { padding: 10px 10px 0; }
  .doll-detail-cover { border-radius: 14px !important; }
  .doll-detail-copy { gap: 14px !important; padding: 16px 14px 18px !important; }
  .doll-detail-copy h2 { font-size: 2rem !important; }
  .doll-summary-list > div,
  .doll-summary-list > div:nth-child(odd) {
    grid-template-columns: minmax(7.8rem, .9fr) minmax(0, 1.1fr) !important;
    gap: 9px !important;
    padding: 9px 0 !important;
  }
  .doll-summary-list dt,
  .doll-summary-list dd { font-size: .78rem !important; }
  .doll-summary-icon { flex-basis: 17px; width: 17px; height: 17px; }
  .detail-tabs { padding-inline: 10px; }
  .detail-section { padding: 12px 10px 16px !important; }
  .detail-gallery { gap: 7px !important; }
  .detail-gallery-photo { border-radius: 8px; }
}

/* ============================================================
   Karamelki — доработки карточки куклы (итерация 3)
   1. ширина правой колонки
   2. липкий переключатель «Галерея / Журнал»
   3. плавающая кнопка «Редактировать»
   ============================================================ */

/* --- 1. Правая колонка сжималась по содержимому ---------------
   .doll-detail-copy объявлен во втором CSS как flex с
   justify-content: space-between. Здесь он переключён на grid,
   но space-between остался — а в гриде это свойство не растягивает
   дорожку, а прижимает её к краям, оставляя ширину по содержимому.
   Отсюда 271px вместо 356px на телефоне и 316px вместо 635px на
   десктопе. Задаём дорожку явно и возвращаем растягивание. */
.doll-detail-copy {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-content: stretch !important;
  justify-items: stretch !important;
}
.doll-detail-copy > * { min-width: 0; }
.doll-detail-copy .detail-list,
.doll-detail-copy .doll-summary-list {
  grid-template-columns: minmax(0, 1fr) !important;
}
.doll-detail-copy .detail-actions,
.doll-detail-copy .detail-edit {
  width: 100% !important;
  max-width: none !important;
}
.doll-detail-copy p,
.doll-detail-copy .doll-detail-description {
  max-width: none !important;
}

/* --- 2. Липкий переключатель вкладок -------------------------
   Прилипает к верху окна, чтобы переключаться между снимками и
   записями журнала с любой глубины прокрутки. Фон уже непрозрачный
   (#fffaf5), содержимое сквозь него не просвечивает. */
.detail-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 rgba(228, 217, 208, .9);
}
/* Когда полоса прилипла, скруглять её верх не нужно —
   она визуально продолжает верхний край экрана. */
.detail-tabs { border-top-left-radius: 0; border-top-right-radius: 0; }

/* --- 3. Плавающая кнопка «Редактировать» ---------------------
   Появляется, только когда основная кнопка ушла за пределы экрана,
   и прячется при прокрутке вниз. Слой ниже нижней навигации. */
.detail-edit-pill {
  position: fixed;
  left: 50%;
  bottom: calc(var(--karamelki-nav-h, 5.25rem) + env(safe-area-inset-bottom) + 12px);
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent, #8f3347);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(48, 32, 32, .22);
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(140%);
  transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
}
.detail-edit-pill.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: transform .2s ease, opacity .2s ease, visibility 0s;
}
.detail-edit-pill:active { background: var(--accent-strong, #6f2335); }
.detail-edit-pill svg { width: 15px; height: 15px; }

/* На широких экранах пилюля не нужна — основная кнопка рядом. */
@media (min-width: 1024px) {
  .detail-edit-pill { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-edit-pill { transition: opacity .01s linear, visibility 0s; }
  .detail-edit-pill,
  .detail-edit-pill.is-visible { transform: translateX(-50%); }
}

/* --- 4. Содержимое уходило под нижнюю навигацию -------------- */
@media (max-width: 860px) {
  .detail-view:has(.doll-detail) {
    padding-bottom: calc(var(--karamelki-nav-h, 5.25rem) + env(safe-area-inset-bottom) + 4.5rem) !important;
  }
}

/* --- 5. Отступы текстового блока = отступам фото --------------
   Фото отбито от края карточки на 10px, текстовый блок — на 14px,
   из-за чего левые кромки снимка и кнопки не совпадали. */
@media (max-width: 1023px) {
  .doll-detail-copy { padding-inline: 12px !important; }
}
@media (max-width: 520px) {
  .doll-detail-copy { padding-inline: 10px !important; }
}

/* ============================================================
   Karamelki — UX-аудит 2026-09-04
   Финальный override-слой. React bundle не изменяется.
   ============================================================ */

/* P0: карточки брендов — строго три целых строки без полустроки. */
.encyclopedia-brand-card p {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  max-height: calc(1.55em * 3) !important;
}

/* P1: монограмма-заглушка должна быть центрирована в области обложки. */
.doll-detail-cover-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Поиск: 16px исключает типичный iOS auto-zoom. */
.archive-search input,
.search-view input,
.search-field input {
  font-size: 16px !important;
}
.k-search-empty {
  margin: 24px 0 0;
  padding: 28px 24px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fbf6f2;
  text-align: center;
}
.k-search-empty__title {
  margin: 0 0 6px;
  color: #3b2b25;
  font-family: var(--font-display, "Prata", serif);
  font-size: 20px;
  font-weight: 400;
}
.k-search-empty__hint {
  margin: 0;
  color: #6f5a50;
  font-size: 14px;
  line-height: 1.45;
}
.k-card-meta-empty { display: none !important; }

/* Коллекция: сортировка и счётчик результата фильтра. */
.k-collection-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
}
.k-collection-tools label {
  color: #725d52;
  font-size: 12px;
  font-weight: 600;
}
.k-collection-sort {
  min-height: 44px;
  padding: 0 34px 0 12px;
  color: #4f3b35;
  background: #fffaf5;
  border: 1px solid #d9c8ba;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 13px;
}

/* Заметка: фотографии не должны наследовать сетку галереи куклы. */
.entry-gallery.detail-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 330px)) !important;
  justify-content: start;
  gap: 16px !important;
  max-width: 690px;
}
.entry-gallery.detail-gallery .entry-photo {
  width: 100% !important;
  margin: 0 !important;
}
.entry-gallery.detail-gallery .entry-photo-open,
.entry-gallery.detail-gallery .entry-photo-open img {
  width: 100% !important;
  height: auto !important;
}
.entry-gallery.detail-gallery .entry-photo-open img {
  border-radius: 12px !important;
}

/* Форма заметки: русская inline-валидация и понятный optional title. */
.k-field-hint {
  color: #806b60;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.k-field-error {
  margin: 0;
  color: #a3342f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* Форма куклы: безопасная группировка без перестановки React-узлов. */
.k-doll-form-progress {
  position: sticky;
  top: 57px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: -2px 0 0;
  padding: 8px 10px;
  color: #6f5a50;
  background: #fffaf5;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  font-size: 12px;
}
.k-doll-form-progress strong { color: #4f3b35; font-weight: 600; }
.k-form-section-label {
  grid-column: 1 / -1;
  margin: 6px 0 -2px;
  padding-top: 10px;
  color: #8f3347;
  border-top: 1px solid #eadfd7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.k-doll-description-label { margin-top: 2px; }

/* Черновики уже живут в sessionStorage; показываем восстановление явно. */
.k-draft-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #604b42;
  background: #fbf6f2;
  border: 1px solid #e4d9d0;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.35;
}
.k-draft-banner button {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  color: #8f3347;
  background: #fffaf5;
  border: 1px solid #d8a8b4;
  border-radius: 12px;
  font: 600 12px var(--font-ui);
}

/* Карточка куклы: превью заметно меньше главной фотографии. */
@media (min-width: 1024px) {
  .detail-gallery:not(.entry-gallery) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  /* Десктопное меню добавления открывается рядом с sidebar, не поверх nav. */
  .sidebar-add-control .add-menu {
    width: 288px !important;
    min-width: 288px;
    left: calc(100% + 20px) !important;
    right: auto !important;
    bottom: 0 !important;
  }
  .sidebar-add-control .add-menu button { min-height: 64px; }

  /* Журнал: единая высота карточек и контролируемая медиаколонка. */
  .journal-open {
    grid-template-columns: 200px minmax(0, 1fr) auto !important;
    min-height: 220px !important;
    align-items: stretch;
  }
  .journal-image {
    width: 200px;
    min-height: 220px !important;
    height: 220px;
  }
  .journal-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
  }

  /* Detail topbar дублировал заголовок заметки. */
  .archive-main:has(.entry-detail) > .archive-topbar { display: none !important; }

  /* Нижняя граница кегля для самых мелких desktop meta. */
  .archive-logo small,
  .archive-shell .section-kicker,
  .archive-shell .doll-card p,
  .archive-shell .doll-card small,
  .archive-shell .journal-copy > p,
  .archive-shell .journal-card small {
    font-size: 12px !important;
  }

  /* Меню добавления выходит за sidebar: sidebar должен быть выше main. */
  .archive-sidebar { z-index: 10; }
}

/* Мобильные тач-таргеты и шапка заметки. */
@media (max-width: 520px) {
  .entry-detail-title-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .entry-detail-title-row > .detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }
  .entry-detail-title-row .detail-actions button {
    width: 100%;
    min-height: 44px !important;
  }

  .entry-gallery.detail-gallery {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100%;
    max-width: none;
  }

  .detail-gallery:not(.entry-gallery) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .detail-gallery:not(.entry-gallery) .detail-gallery-photo,
  .detail-gallery:not(.entry-gallery) .detail-gallery-photo img {
    aspect-ratio: 4 / 5 !important;
  }
  .detail-gallery:not(.entry-gallery) .detail-gallery-photo img {
    object-fit: cover !important;
  }

  .tag-options span,
  .collection-filter button {
    min-height: 44px !important;
  }
  .tag-options span {
    display: inline-flex;
    align-items: center;
  }

  .k-collection-tools {
    justify-content: stretch;
    margin-top: 0;
  }
  .k-collection-tools label { display: none; }
  .k-collection-sort { width: 100%; font-size: 16px; }

  .k-doll-form-progress { top: 55px; }
}

/* Самые узкие телефоны: одна карточка в ряд; подписи nav не слипаются. */
@media (max-width: 340px) {
  .doll-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .mobile-nav button > span:last-child,
  .mobile-add-label {
    font-size: 9.5px !important;
    letter-spacing: -.01em;
  }
}

/* Дубликаты поиска скрываем через CSS, потому что hidden может быть перебит display:grid. */
.search-group .k-search-duplicate { display: none !important; }
/* Исправленные числительные должны сохранять нормальный регистр. */
.encyclopedia-brand-card small { text-transform: none !important; }

/* ============================================================
   Karamelki — mobile QA 2026-09-05
   Локальные исправления форм/фото без изменений React bundle.
   ============================================================ */

/* Date inputs имеют большой intrinsic width в WebKit. Не позволяем им
   расширять grid-колонку или модальную форму на mobile и desktop. */
.archive-form label.form-field:has(> input[type="date"]) {
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
}
.archive-form input[type="date"] {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Связь заметки с куклами теперь выводится из тегов каждой фотографии.
   Технический picker остаётся в DOM только для синхронизации React-state. */
.k-note-derived-dolls {
  display: none !important;
}

/* iOS Safari: native date control keeps its own intrinsic logical width even
   when width/max-width are 100%. Remove only the mobile WebKit appearance so
   the control obeys the form column; the native date picker still opens on tap. */
@media (max-width: 520px) {
  @supports (-webkit-touch-callout: none) {
    .archive-form input[type="date"] {
      display: block !important;
      -webkit-appearance: none !important;
      appearance: none !important;
      -webkit-min-logical-width: 0 !important;
      min-inline-size: 0 !important;
      inline-size: 100% !important;
      max-inline-size: 100% !important;
      overflow: hidden !important;
      text-align: center;
    }

    .archive-form input[type="date"]::-webkit-date-and-time-value,
    .archive-form input[type="date"]::-webkit-datetime-edit {
      min-width: 0;
      text-align: center;
    }
  }
}

/* ============================================================
   Karamelki v8 — поиск и выбор кукол на фотографии.
   ============================================================ */
.doll-tag-picker.k-tag-search-enabled > legend,
.doll-tag-picker.k-tag-search-enabled > .tag-options {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.k-tag-trigger {
  width: 100%;
  min-width: 0;
  min-height: 3.2rem;
  padding: .62rem .72rem;
  border: 1px solid #decbbd;
  border-radius: .75rem;
  background: #fffaf5;
  color: #4e3a32;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  text-align: left;
}
.k-tag-trigger-copy { min-width: 0; display: grid; gap: .18rem; }
.k-tag-trigger-copy strong { font-size: .72rem; font-weight: 800; color: #513d34; }
.k-tag-trigger-copy small {
  min-width: 0;
  color: #8a7165;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.k-tag-trigger > b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
}

.k-tag-layer {
  z-index: 75;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(.7rem, env(safe-area-inset-top)) max(.7rem, env(safe-area-inset-right)) max(.7rem, env(safe-area-inset-bottom)) max(.7rem, env(safe-area-inset-left));
  background: rgba(36, 24, 21, .56);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.k-tag-modal {
  width: min(100%, 38rem);
  max-height: min(92dvh, 54rem);
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #352622;
  background: #fffaf5;
  border: 1px solid #e2d3c7;
  border-radius: 1.15rem;
  box-shadow: 0 24px 70px rgba(31, 20, 17, .35);
}
.k-tag-modal-header {
  min-height: 4.15rem;
  padding: .85rem 1rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid #eadfd6;
}
.k-tag-modal-header h2 {
  min-width: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.22rem;
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 800;
}
.k-tag-close {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d9c5b6;
  border-radius: 50%;
  background: #fffaf5;
  color: #725448;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;
}
.k-tag-modal-body {
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: .8rem 1rem 1rem;
  scrollbar-gutter: stable;
}
.k-tag-photo {
  aspect-ratio: 16 / 7;
  width: 100%;
  overflow: hidden;
  border-radius: .8rem;
  background: #e9ded4;
  display: grid;
  place-items: center;
  color: #9b8072;
  font-weight: 800;
}
.k-tag-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-tag-section { min-width: 0; margin-top: 1rem; }
.k-tag-section h3 {
  margin: 0;
  color: #513d34;
  font-family: var(--font-ui);
  font-size: .78rem;
  line-height: 1.25;
  font-weight: 800;
}
.k-tag-section-head { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.k-tag-clear {
  min-height: 2rem;
  padding: .2rem 0;
  border: 0;
  background: transparent;
  color: #795b4d;
  font-size: .7rem;
  font-weight: 700;
}
.k-tag-clear:disabled { opacity: .38; cursor: default; }
.k-tag-chips {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .55rem;
}
.k-tag-chip {
  max-width: 100%;
  min-height: 2.75rem;
  padding: .28rem .48rem .28rem .3rem;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  border: 1px solid #e1d2c7;
  border-radius: 999px;
  background: #fffaf5;
  color: #4b3932;
}
.k-tag-chip > span:nth-child(2) {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 700;
}
.k-tag-chip b { color: #73594d; font-size: 1rem; font-weight: 500; }
.k-tag-empty-copy { color: #9a8377; font-size: .76rem; }
.k-tag-avatar {
  flex: 0 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ead8c8;
  color: #765344;
  font-size: .7rem;
  font-weight: 800;
}
.k-tag-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-tag-avatar.is-small { width: 2rem; height: 2rem; }
.k-tag-avatar.is-card { width: 3.35rem; height: 3.35rem; margin: 0 auto; }
.k-tag-avatar.is-result { width: 2.55rem; height: 2.55rem; }

.k-tag-search {
  width: 100%;
  min-width: 0;
  min-height: 3.45rem;
  margin-top: 1rem;
  padding: 0 .8rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  border: 1px solid #d7c1b1;
  border-radius: .85rem;
  background: #fff;
}
.k-tag-search:focus-within { border-color: #a87967; box-shadow: 0 0 0 3px rgba(143, 51, 71, .09); }
.k-tag-search-icon { flex: 0 0 auto; width: .9rem; height: .9rem; position: relative; border: 1.6px solid #6f554a; border-radius: 50%; font-size: 0; line-height: 0; }
.k-tag-search-icon::after { content: ''; position: absolute; width: .42rem; height: 1.6px; right: -.32rem; bottom: -.16rem; background: #6f554a; border-radius: 99px; transform: rotate(45deg); transform-origin: center; }
.k-tag-search input {
  min-width: 0;
  width: 100%;
  height: 3.35rem;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #382a25;
  font-size: 1rem;
}
.k-tag-search input::placeholder { color: #aaa19c; }
.k-tag-search input::-webkit-search-cancel-button { display: none; }

.k-tag-recent-grid {
  min-width: 0;
  margin-top: .55rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4.6rem, 5.2rem);
  gap: .45rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: .25rem;
  scrollbar-width: none;
}
.k-tag-recent-grid::-webkit-scrollbar { display: none; }
.k-tag-recent-card {
  min-width: 0;
  min-height: 7.7rem;
  padding: .45rem .35rem .4rem;
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: .22rem;
  border: 1px solid #e4d7ce;
  border-radius: .72rem;
  background: #fffaf5;
  color: #44342e;
  text-align: left;
}
.k-tag-recent-card.is-selected { border-color: #c78898; background: #fcf1f3; }
.k-tag-recent-card strong,
.k-tag-recent-card small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-tag-recent-card strong { font-size: .67rem; line-height: 1.2; font-weight: 800; }
.k-tag-recent-card small { color: #8c776d; font-size: .57rem; line-height: 1.2; }
.k-tag-plus {
  width: 1.65rem;
  height: 1.65rem;
  position: absolute;
  right: .25rem;
  top: 2.65rem;
  display: grid;
  place-items: center;
  border: 1px solid #d7c0af;
  border-radius: 50%;
  background: #fffaf5;
  color: #6e5145;
  font-size: 1.05rem;
  font-weight: 500;
}
.k-tag-recent-card.is-selected .k-tag-plus { color: #fff; background: var(--accent); border-color: var(--accent); }

.k-tag-results-section { margin-top: 1.15rem; }
.k-tag-results {
  min-width: 0;
  margin-top: .45rem;
  border-top: 1px solid #eadfd7;
}
.k-tag-result {
  width: 100%;
  min-width: 0;
  min-height: 3.85rem;
  padding: .48rem .15rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  border: 0;
  border-bottom: 1px solid #eadfd7;
  background: transparent;
  color: #43332d;
  text-align: left;
}
.k-tag-result.is-selected { background: #fcf2f4; }
.k-tag-result-copy { min-width: 0; display: grid; gap: .16rem; }
.k-tag-result-copy strong,
.k-tag-result-copy small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-tag-result-copy strong { font-size: .82rem; font-weight: 800; }
.k-tag-result-copy small { color: #8b766c; font-size: .68rem; }
.k-tag-result-plus {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid #d9c3b3;
  border-radius: 50%;
  background: #fffaf5;
  color: #725449;
  font-size: 1.22rem;
  font-weight: 500;
}
.k-tag-result.is-selected .k-tag-result-plus { color: #fff; background: var(--accent); border-color: var(--accent); }
.k-tag-no-results { margin: .75rem 0 0; color: #8b756a; font-size: .76rem; line-height: 1.5; }

.k-tag-footer {
  min-width: 0;
  padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(7rem, .75fr);
  gap: .65rem;
  border-top: 1px solid #eadfd7;
  background: #fffaf5;
}
.k-tag-previous,
.k-tag-done {
  min-width: 0;
  min-height: 3rem;
  border-radius: .8rem;
  font-weight: 800;
  font-size: .78rem;
}
.k-tag-previous { border: 1px solid #dcc9ba; background: #fffaf5; color: #5d463c; }
.k-tag-previous:disabled { opacity: .38; cursor: default; }
.k-tag-done { border: 0; background: var(--accent); color: #fffaf5; }
.k-tag-done:hover { background: var(--accent-strong); }

@media (max-width: 520px) {
  .k-tag-layer {
    align-items: end;
    padding: max(.45rem, env(safe-area-inset-top)) max(.45rem, env(safe-area-inset-right)) max(.45rem, env(safe-area-inset-bottom)) max(.45rem, env(safe-area-inset-left));
  }
  .k-tag-modal {
    width: 100%;
    max-height: calc(100dvh - max(.9rem, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    border-radius: 1.05rem;
  }
  .k-tag-modal-header { min-height: 3.85rem; padding: .7rem .85rem .65rem; }
  .k-tag-modal-header h2 { font-size: 1.05rem; }
  .k-tag-close { width: 2.5rem; height: 2.5rem; font-size: 1.65rem; }
  .k-tag-modal-body { padding: .72rem .85rem .9rem; scrollbar-gutter: auto; }
  .k-tag-photo { aspect-ratio: 16 / 7.2; border-radius: .72rem; }
  .k-tag-section { margin-top: .85rem; }
  .k-tag-search { min-height: 3.35rem; margin-top: .85rem; padding-inline: .7rem; }
  .k-tag-search input { height: 3.25rem; font-size: 1rem; }
  .k-tag-avatar.is-card { width: 3.15rem; height: 3.15rem; }
  .k-tag-recent-grid { grid-auto-columns: 4.75rem; gap: .38rem; }
  .k-tag-recent-card { min-height: 7.35rem; padding-inline: .28rem; }
  .k-tag-footer { padding: .65rem .85rem max(.65rem, env(safe-area-inset-bottom)); gap: .5rem; }
  .k-tag-previous, .k-tag-done { min-height: 3rem; font-size: .72rem; }
}

@media (max-width: 340px) {
  .k-tag-modal-header h2 { font-size: .98rem; }
  .k-tag-footer { grid-template-columns: minmax(0, 1fr) 6rem; }
  .k-tag-previous { font-size: .66rem; }
  .k-tag-recent-grid { grid-auto-columns: 4.35rem; }
  .k-tag-chip > span:nth-child(2) { max-width: 9rem; }
}

/* ============================================================
   v10 — corrected social-post presentation + sharing controls.
   ============================================================ */
.k-social-post {
  overflow: hidden;
  margin-bottom: 0 !important;
  padding: 0 !important;
  background: #fffaf6 !important;
  border: 1px solid #e8ddd5 !important;
  border-bottom: 0 !important;
  border-radius: 20px 20px 0 0 !important;
}
.k-social-post > .k-social-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 0;
}
.k-social-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 50%;
  background: #f0dce1;
  color: #8f3347;
  font-family: Prata, serif;
  font-size: 17px;
}
.k-social-brand strong,
.k-social-brand small { display: block; }
.k-social-brand strong { font-size: 14px; }
.k-social-brand small {
  margin-top: 1px;
  color: #8a7469;
  font-size: 11px;
}
.k-social-post > .entry-detail-title-row {
  padding: 14px 20px 0 !important;
}
.k-social-post > .entry-body {
  margin: 0 !important;
  padding: 10px 20px 18px !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}
.k-social-tags {
  margin: 0 !important;
  padding: 0 20px 18px !important;
  border: 0 !important;
}
.k-social-tags button {
  border-radius: 999px !important;
  background: #f4ebe6 !important;
}

/* Variant D: one post. The first frame is the hero, subsequent frames are thumbnails. */
.k-social-post + .entry-gallery {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 3px !important;
  overflow: hidden;
  background: #eadfd8;
  border-left: 1px solid #e8ddd5;
  border-right: 1px solid #e8ddd5;
}
.k-social-post + .entry-gallery .entry-photo {
  position: relative;
  min-width: 0;
  margin: 0 !important;
  background: #fffaf6;
}
.k-social-post + .entry-gallery .entry-photo:first-child {
  grid-column: 1 / -1;
}
.k-social-post + .entry-gallery .entry-photo-open {
  height: 100%;
}
.k-social-post + .entry-gallery .entry-photo-open img {
  display: block;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: cover;
  border-radius: 0 !important;
}
.k-social-post + .entry-gallery .entry-photo:first-child .entry-photo-open img {
  aspect-ratio: 16 / 10;
}
.k-social-post + .entry-gallery .entry-photo:not(:first-child) .entry-photo-open img {
  aspect-ratio: 1 / 1;
}
.k-social-post + .entry-gallery figcaption {
  margin: 0 !important;
  padding: 9px 11px 10px !important;
  background: #fffaf6;
}

.k-social-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 9px 12px 11px;
  background: #fffaf6;
  border: 1px solid #e8ddd5;
  border-top: 1px solid #eadfd7;
  border-radius: 0 0 20px 20px;
}
.k-social-footer button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-family: "Golos Text", sans-serif;
  font-size: 22px;
}
.k-social-footer .k-social-disabled {
  color: #b2a39b;
  cursor: default;
}
.k-social-footer .k-social-share {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5e4941;
  font-size: 16px;
  font-weight: 600;
}
.k-social-footer .k-social-share span { font-size: 13px; }

/* Doll card: share is an icon opposite the doll name, not a second primary CTA. */
.doll-detail-copy { position: relative; }
.doll-detail-copy h2 { padding-right: 52px; }
.k-doll-share-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #8f3347;
  background: #fffaf5;
  border: 1px solid #dbc9bd;
  border-radius: 50%;
  box-shadow: none;
}
.k-doll-share-icon:hover { background: #f7ece7; }
.k-doll-share-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.k-shareable-photo { position: relative; }
.k-photo-share {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: rgba(49,36,31,.72);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.k-share-open { overflow: hidden; }
.k-share-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 16px;
}
.k-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(41,31,27,.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.k-share-sheet {
  position: relative;
  z-index: 1;
  width: min(520px,100%);
  padding: 18px;
  background: #fffaf6;
  border: 1px solid #eadfd7;
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(53,36,30,.2);
}
.k-share-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.k-share-sheet header strong {
  font-family: Prata, serif;
  font-size: 22px;
  font-weight: 400;
}
.k-share-close {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #5f4a42;
  font-size: 28px;
}
.k-share-loading {
  padding: 26px 8px;
  color: #7d685e;
  text-align: center;
}
.k-share-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
}
.k-share-grid > a,
.k-share-grid > button {
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 4px;
  border: 1px solid #eadfd7;
  border-radius: 14px;
  background: #fff;
  color: #4e3b34;
  text-decoration: none;
  font-family: "Golos Text", sans-serif;
}
.k-share-grid span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3e8e3;
  color: #8f3347;
  font-weight: 700;
  font-size: 14px;
}
.k-share-grid b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 600;
}
.k-share-url {
  margin: 14px 2px 0;
  color: #8a7469;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .k-social-post {
    border-radius: 16px 16px 0 0 !important;
  }
  .k-social-post > .k-social-brand { padding: 16px 16px 0; }
  .k-social-post > .entry-detail-title-row { padding: 12px 16px 0 !important; }
  .k-social-post > .entry-body { padding: 9px 16px 15px !important; }
  .k-social-tags { padding: 0 16px 15px !important; }
  .k-social-post + .entry-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .k-social-post + .entry-gallery .entry-photo:first-child .entry-photo-open img {
    aspect-ratio: 4 / 3;
  }
  .k-social-footer { border-radius: 0 0 16px 16px; }

  .doll-detail-copy h2 { padding-right: 46px; }
  .k-doll-share-icon {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .k-share-layer { align-items: end; padding: 0; }
  .k-share-sheet {
    width: 100%;
    padding: 18px 14px max(18px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }
  .k-share-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 8px;
  }
  .k-share-grid > a,
  .k-share-grid > button { min-height: 88px; }
}

@media (max-width: 360px) {
  .k-share-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* v11 — note photos keep their uploaded aspect ratio; no crop inside a note. */
.k-social-post + .entry-gallery .entry-photo-open {
  height: auto !important;
}
.k-social-post + .entry-gallery .entry-photo-open img,
.k-social-post + .entry-gallery .entry-photo:first-child .entry-photo-open img,
.k-social-post + .entry-gallery .entry-photo:not(:first-child) .entry-photo-open img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}

/* Reference-photo consent: submission creates only a private review candidate. */
.k-reference-image-submit { width: 100%; min-height: 2.2rem; margin-top: .5rem; border: 1px solid #d7c4b7; border-radius: 999px; background: #fffaf5; color: #7b4050; font: 700 .68rem var(--font-ui); }
.k-reference-image-submit:disabled { opacity: .7; }
.detail-gallery > .k-reference-image-card { display: grid; min-width: 0; gap: .42rem; }
.k-reference-image-card .detail-gallery-photo { width: 100%; }
.k-reference-image-card .k-reference-image-submit { margin-top: 0; }
.k-reference-consent-layer { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgb(45 31 27 / .58); }
.k-reference-consent-dialog { position: relative; width: min(100%, 32rem); max-height: min(44rem, calc(100dvh - 2rem)); overflow: auto; padding: 1.35rem; border-radius: 1.1rem; background: #fffaf5; color: #382923; }
.k-reference-consent-close { position: absolute; top: .65rem; right: .75rem; border: 0; background: transparent; color: #725e54; font-size: 1.8rem; }.k-reference-consent-kicker { margin: 0; color: #8f3347; font: 800 .62rem var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }.k-reference-consent-dialog h2 { margin: .4rem 2rem .6rem 0; font: 400 1.45rem Prata, Georgia, serif; }.k-reference-consent-copy,.k-reference-consent-controls small { color: #725e54; font: .78rem/1.5 var(--font-ui); }
.k-reference-consent-check { display: flex; gap: .6rem; margin: 1rem 0; font: 700 .78rem/1.4 var(--font-ui); }.k-reference-consent-check input { margin-top: .15rem; accent-color: #8f3347; }.k-reference-consent-controls { display: grid; gap: .65rem; }.k-reference-consent-controls label { display: grid; gap: .3rem; font: 800 .72rem var(--font-ui); }.k-reference-consent-search { width: 100%; min-height: 2.8rem; border: 1px solid #ddcec3; border-radius: .7rem; padding: 0 .75rem; background: #fff; font: 1rem var(--font-ui); }
.k-reference-consent-results { max-height: 11rem; overflow: auto; border: 1px solid #eadfd6; border-radius: .7rem; background: #fff; }.k-reference-consent-results button { display: grid; width: 100%; gap: .12rem; border: 0; border-bottom: 1px solid #f0e7e0; padding: .65rem .75rem; background: transparent; text-align: left; }.k-reference-consent-results b { font: 700 .78rem var(--font-ui); }.k-reference-consent-results span,.k-reference-consent-results p { color: #80695e; font: .68rem var(--font-ui); }.k-reference-consent-results p { padding: .65rem .75rem; }.k-reference-consent-choice { margin: 0; color: #7b4050; font: 700 .75rem var(--font-ui); }.k-reference-consent-error { min-height: 1rem; margin: 0; color: #9a3e45; font: .72rem var(--font-ui); }.k-reference-consent-submit { min-height: 2.8rem; border: 0; border-radius: 999px; background: #8f3347; color: #fffaf5; font: 800 .78rem var(--font-ui); }.k-reference-consent-submit:disabled { opacity: .5; }
@media (max-width: 520px) { .k-reference-consent-layer { align-items: end; padding: .45rem; }.k-reference-consent-dialog { width: 100%; max-height: calc(100dvh - .9rem); border-radius: 1rem 1rem .65rem .65rem; padding: 1.15rem; }.k-reference-image-submit { min-height: 2.5rem; font-size: .72rem; } }

/* Published reference images only. Candidates and private photos never render here. */
.k-reference-published-images { margin: .9rem 0 1rem; }.k-reference-published-images > p { margin: 0 0 .45rem; color: #8a7062; font: 800 .64rem var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }.k-reference-published-images > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .42rem; }.k-reference-published-images figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #eadfd7; border-radius: .55rem; background: #f0e5dc; }.k-reference-published-images img { display: block; width: 100%; aspect-ratio: .78; object-fit: cover; }.k-reference-published-images figcaption { overflow: hidden; padding: .35rem .38rem; color: #765f55; font: 700 .58rem var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .k-reference-published-images > div { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Reference catalog v1 — official/reference model cards on brand pages */
.encyclopedia-brand-page.k-reference-catalog-active > .encyclopedia-reference-section { display: none; }
.k-reference-catalog { margin-top: 1.35rem; padding: 1.2rem; border: 1px solid #e7d9cf; border-radius: 1rem; background: #fffaf5; }
.k-reference-catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.k-reference-catalog-heading p { margin: 0 0 .28rem; color: #8a7062; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.k-reference-catalog-heading h3 { margin: 0; color: #4b352e; font-family: var(--font-display); font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 400; }
.k-reference-catalog-heading > span { color: #81685c; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.k-reference-catalog-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
.k-reference-catalog-tab { min-height: 2.45rem; padding: .48rem .78rem; border: 1px solid #e3d3c7; border-radius: 999px; background: #f8eee7; color: #72584d; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.k-reference-catalog-tab.active { border-color: #8f3347; background: #8f3347; color: #fffaf5; }
.k-reference-catalog-filters { display: grid; grid-template-columns: minmax(12rem, 1.6fr) repeat(5, minmax(7.5rem, 1fr)) auto; gap: .55rem; margin-top: 1rem; padding: .85rem; border-radius: .8rem; background: #f7eee7; }
.k-reference-catalog-filter, .k-reference-catalog-search { display: grid; gap: .3rem; min-width: 0; }
.k-reference-catalog-filter > span, .k-reference-catalog-search > span { color: #8a7062; font-size: .6rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.k-reference-catalog-filter select, .k-reference-catalog-search input { min-width: 0; width: 100%; height: 2.4rem; border: 1px solid #dcc9bb; border-radius: .55rem; background: #fffaf5; color: #4f3b33; padding: 0 .65rem; font-size: .76rem; }
.k-reference-catalog-search input { font-size: 16px; }
.k-reference-catalog-reset { align-self: end; height: 2.4rem; border: 0; border-radius: .55rem; background: #6e554a; color: #fffaf5; padding: 0 .72rem; font-size: .7rem; font-weight: 800; }
.k-reference-catalog-reset:disabled { opacity: .35; cursor: default; }
.k-reference-catalog-results { margin-top: 1rem; }
.k-reference-catalog-count { margin-bottom: .7rem; color: #80695e; font-size: .72rem; font-weight: 700; }
.k-reference-model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.k-reference-model-card { min-width: 0; overflow: hidden; border: 1px solid #eadfd7; border-radius: .9rem; background: #fff; }
.k-reference-model-card > button { width: 100%; height: 100%; border: 0; background: transparent; padding: 0; text-align: left; display: grid; grid-template-rows: auto 1fr; color: inherit; }
.k-reference-model-photo { aspect-ratio: 4 / 5; overflow: hidden; background: #efe3da; }
.k-reference-model-photo > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.k-reference-catalog-placeholder { width: 100%; height: 100%; min-height: 7rem; display: grid; place-items: center; background: linear-gradient(145deg,#eadfd7,#f7efe9); color: #9b7a69; font-family: var(--font-display); font-size: 2.4rem; }
.k-reference-model-copy { min-width: 0; padding: .7rem .72rem .78rem; }
.k-reference-model-copy h4 { margin: 0; color: #4c372f; font-family: var(--font-display); font-size: .95rem; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.k-reference-model-copy > p { margin: .35rem 0 0; color: #846d62; font-size: .68rem; line-height: 1.35; }
.k-reference-model-meta { display: flex; flex-wrap: wrap; gap: .28rem; margin-top: .58rem; }
.k-reference-model-meta span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; background: #f4e7de; color: #73584c; padding: .26rem .42rem; font-size: .58rem; font-weight: 700; }
.k-reference-catalog-section-heading { margin-bottom: .8rem; }
.k-reference-catalog-section-heading h3 { margin: 0; color: #4b352e; font-family: var(--font-display); font-weight: 400; }
.k-reference-catalog-section-heading p { max-width: 48rem; margin: .4rem 0 0; color: #7b655b; font-size: .75rem; line-height: 1.5; }
.k-reference-facet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.k-reference-facet-card { min-width: 0; border: 1px solid #eadfd7; border-radius: .85rem; background: #fff; overflow: hidden; }
.k-reference-facet-card > button { width: 100%; border: 0; background: transparent; color: inherit; padding: 0; text-align: left; display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); align-items: center; }
.k-reference-facet-photo { position: relative; width: 5.25rem; height: 5.25rem; overflow: hidden; background: #efe3da; }
.k-reference-facet-photo img, .k-reference-facet-photo .k-reference-catalog-placeholder { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.k-reference-facet-card > button > div:last-child { min-width: 0; padding: .65rem .7rem; }
.k-reference-facet-card h4 { margin: 0; color: #4f3a32; font-size: .86rem; overflow-wrap: anywhere; }
.k-reference-facet-card p { margin: .22rem 0 0; color: #8a7062; font-size: .66rem; }
.k-reference-facet-card.is-tone .k-reference-facet-photo { display: grid; place-items: center; background: #faf4ef; }
.k-reference-tone-swatch { width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--tone); box-shadow: inset 0 0 0 1px #674d4230, 0 0 0 6px #fff8; }
.k-reference-facet-card.is-tone .k-reference-facet-photo img { position: absolute; inset: auto .3rem .3rem auto; width: 1.7rem; height: 2.1rem; border: 2px solid #fffaf5; border-radius: .4rem; object-fit: cover; box-shadow: 0 2px 8px #5c413528; }

.k-reference-release-open { overflow: hidden; }
.k-reference-release-layer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; background: #1a1110c7; backdrop-filter: blur(7px); }
.k-reference-release-card { position: relative; width: min(62rem, 100%); max-height: min(90dvh, 52rem); overflow: auto; display: grid; grid-template-columns: minmax(15rem, .92fr) minmax(0, 1.08fr); border-radius: 1rem; background: #fffaf5; box-shadow: 0 24px 70px #0006; }
.k-reference-release-close { position: absolute; z-index: 2; top: .65rem; right: .65rem; width: 2.45rem; height: 2.45rem; border: 1px solid #ffffff9c; border-radius: 50%; background: #33231fd9; color: #fff; font-size: 1.4rem; line-height: 1; }
.k-reference-release-media { min-width: 0; background: #eadfd7; }
.k-reference-release-media > .k-reference-catalog-placeholder { min-height: 100%; }
.k-reference-release-gallery { display: grid; gap: 1px; background: #d8c5b7; }
.k-reference-release-gallery figure { margin: 0; background: #efe3da; }
.k-reference-release-gallery img { display: block; width: 100%; max-height: 35rem; object-fit: contain; background: #eadfd7; }
.k-reference-release-gallery figcaption { padding: .4rem .55rem; color: #70594f; background: #fffaf5; font-size: .62rem; }
.k-reference-release-copy { align-content: start; padding: 2.2rem 2rem 1.8rem; }
.k-reference-release-kicker { margin: 0 0 .45rem; color: #8f3347; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.k-reference-release-copy h2 { margin: 0; color: #3f2d27; font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 400; line-height: 1.08; }
.k-reference-release-series { margin: .65rem 0 0; color: #796157; font-size: .82rem; }
.k-reference-release-copy dl { display: grid; gap: 0; margin: 1.4rem 0 0; border-top: 1px solid #eadfd7; }
.k-reference-release-copy dl > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .7rem; padding: .72rem 0; border-bottom: 1px solid #eadfd7; }
.k-reference-release-copy dt { color: #8a7062; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.k-reference-release-copy dd { margin: 0; color: #4d3931; font-size: .8rem; }
.k-reference-release-copy dd button { border: 0; background: transparent; color: #8f3347; padding: 0; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.k-reference-release-source { display: inline-flex; margin-top: 1.2rem; color: #6e4c40; font-size: .76rem; font-weight: 800; text-underline-offset: 3px; }

@media (max-width: 1180px) {
  .k-reference-catalog-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .k-reference-catalog-search { grid-column: span 2; }
  .k-reference-model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .k-reference-catalog { padding: .9rem; }
  .k-reference-catalog-heading { align-items: start; }
  .k-reference-catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .7rem; }
  .k-reference-catalog-search { grid-column: 1 / -1; }
  .k-reference-catalog-reset { width: 100%; }
  .k-reference-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .k-reference-facet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-reference-release-card { grid-template-columns: 1fr; width: min(36rem, 100%); }
  .k-reference-release-copy { padding: 1.2rem 1rem 1.4rem; }
  .k-reference-release-gallery img { max-height: 52dvh; }
}
@media (max-width: 430px) {
  .k-reference-catalog { margin-inline: -.1rem; padding: .75rem; }
  .k-reference-catalog-heading { display: grid; gap: .35rem; }
  .k-reference-catalog-filters { grid-template-columns: 1fr; }
  .k-reference-catalog-search { grid-column: auto; }
  .k-reference-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-reference-model-copy { padding: .58rem; }
  .k-reference-model-copy h4 { font-size: .83rem; }
  .k-reference-model-meta span { font-size: .55rem; }
  .k-reference-facet-grid { grid-template-columns: 1fr; }
  .k-reference-facet-card > button { grid-template-columns: 4.75rem minmax(0, 1fr); min-height: 4.75rem; }
  .k-reference-facet-photo { width: 4.75rem; height: 4.75rem; }
  .k-reference-release-layer { padding: max(.4rem, env(safe-area-inset-top)) max(.4rem, env(safe-area-inset-right)) max(.4rem, env(safe-area-inset-bottom)) max(.4rem, env(safe-area-inset-left)); align-items: end; }
  .k-reference-release-card { max-height: calc(100dvh - max(.8rem, env(safe-area-inset-top) + env(safe-area-inset-bottom))); border-radius: 1rem 1rem .4rem .4rem; }
  .k-reference-release-copy dl > div { grid-template-columns: 5.6rem minmax(0, 1fr); }
}
