#catalog-reveal {
  display: grid;
  grid-column: 1 / -1;
  gap: clamp(20px, 3vw, 42px);
  min-width: 0;
  margin-block: clamp(28px, 4vw, 56px) 0;
  scroll-margin-block-start: 78px;
}

.ym-editions {
  --paper: #f5f3ef;
  --ink: #262527;
  --subtle: #5e5b5b;
  --rule: #cec9c5;
  --accent: #a32239;
  --inset: clamp(16px, 2.6vw, 34px);
  color-scheme: light;
  min-width: 0;
  padding: var(--inset);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  font-family: 'Instrument Sans', 'DM Sans', sans-serif;
}
.ym-edition-head, .ym-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ym-edition-head { margin-bottom: clamp(14px, 2vw, 22px); }
.ym-edition-head > div:first-child { min-width: 0; }
.ym-edition-head h2, .ym-panel-head h3 { margin: 0; color: var(--ink); text-wrap: balance; }
.catalog .ym-edition-head h2 {
  font-family: inherit;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.05;
}
.ym-edition-head p {
  margin: 7px 0 0;
  max-width: 55ch;
  color: var(--subtle);
  font-size: 1rem;
  line-height: 1.4;
}
.ym-rail-controls { display: none; flex: none; align-items: center; gap: 3px; }
.ym-rail-controls button, .ym-panel-close, .ym-add-photo {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 5px;
}
.ym-rail-controls button:disabled { opacity: .38; }
.ym-rail-controls .ico { width: 16px; height: 16px; }
.ym-rail-controls button:first-child .ico { transform: rotate(90deg); }
.ym-rail-controls button:last-child .ico { transform: rotate(-90deg); }
.ym-editions :is(button, summary, a, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ym-edition-rail {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: clamp(9px, 1.15vw, 17px);
}
.ym-edition-card {
  display: grid;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  text-align: start;
  font: inherit;
}
.ym-edition-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #e9e5e1;
}
.ym-edition-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  padding: 6px 2px;
  border-bottom: 2px solid var(--rule);
  font-size: 1rem;
  font-weight: 620;
  line-height: 1.2;
}
.ym-edition-caption i { position: relative; flex: 0 0 15px; height: 15px; color: var(--accent); }
.ym-edition-caption i::before, .ym-edition-caption i::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 2px;
  transform: translate(-50%, -50%);
  background: currentColor;
}
.ym-edition-caption i::after { transform: translate(-50%, -50%) rotate(90deg); }
.ym-edition-card[aria-expanded="true"] .ym-edition-caption { color: var(--accent); border-bottom-color: currentColor; }
.ym-edition-card[aria-expanded="true"] i::after { display: none; }

.ym-edition-panel {
  margin-top: clamp(16px, 2.4vw, 30px);
  padding: clamp(15px, 2.1vw, 26px);
  background: #fcfbf9;
  border: 1px solid var(--rule);
  border-radius: 5px;
  scroll-margin-top: 78px;
}
.ym-edition-panel[hidden] { display: none; }
.ym-panel-head { margin-bottom: 12px; }
.ym-panel-head h3 { font-size: clamp(1.35rem, 2.5vw, 2rem); font-weight: 620; line-height: 1.1; letter-spacing: -.035em; }
.ym-panel-close { gap: 6px; flex-shrink: 0; padding-inline: 10px; font-size: .875rem; }
.ym-panel-close .ico { width: 16px; height: 16px; }
.ym-department-switch { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 14px; }
.ym-department-switch button {
  min-height: 44px; padding-inline: 14px;
  border: 1px solid var(--rule); border-radius: 5px;
  color: var(--ink); background: transparent;
  font: inherit; font-size: .94rem; font-weight: 550;
}
.ym-department-switch button[aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }
.ym-reveal-brands { border-top: 1px solid var(--rule); }
.ym-reveal-brand { border-bottom: 1px solid var(--rule); }
.ym-reveal-brand-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 3px;
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
}
.ym-reveal-brand-head::-webkit-details-marker { display: none; }
.ym-reveal-brand-name { font-size: clamp(1.05rem, 1.6vw, 1.22rem); font-weight: 650; overflow-wrap: anywhere; }
.ym-reveal-models { color: var(--subtle); font-size: .88rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ym-reveal-brand-head .ico { width: 16px; height: 16px; color: var(--accent); }
.ym-reveal-brand[open] > .ym-reveal-brand-head .ico { transform: rotate(180deg); }
.ym-reveal-brand[open] > .ym-reveal-brand-head .ym-reveal-brand-name { color: var(--accent); }
.ym-reveal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, auto) auto;
  align-items: center;
  gap: 8px 20px;
  min-width: 0;
  padding: 13px 4px;
  border-top: 1px solid #e4e0dc;
}
.ym-reveal-info { display: grid; gap: 3px; min-width: 0; }
.ym-reveal-name { justify-self: start; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.35; font-weight: 630; }
.ym-reveal-code { color: var(--subtle); font-size: .81rem; font-variant-numeric: tabular-nums; }
.ym-reveal-info .variant-field { width: min(100%, 230px); margin: 5px 0 0; }
.ym-reveal-info .variant-axis { color: var(--subtle); }
.ym-reveal-info .variant-select {
  min-height: 44px; padding: 6px 8px;
  background: white; border: 1px solid #9a9490; border-radius: 4px;
  color: var(--ink); color-scheme: light; font-size: 1rem;
}
.ym-reveal-price { font-size: 1rem; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; }
.ym-reveal-actions { display: flex; align-items: center; gap: 6px; }
.ym-request-photo {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 6px 12px; background: #126f49; border-radius: 5px;
  color: white; font-size: .92rem; font-weight: 650;
}
.ym-reveal-actions .ico { width: 18px; height: 18px; }

@media (hover: hover) {
  .ym-edition-card:hover .ym-edition-caption { color: var(--accent); border-bottom-color: currentColor; }
  .ym-reveal-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
  .ym-panel-close:hover, .ym-add-photo:hover, .ym-rail-controls button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
  .ym-request-photo:hover { background: #0b5839; }
}
@media (max-width: 920px) {
  .ym-rail-controls { display: flex; }
  .ym-edition-rail {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 31%;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    padding: 3px 3px 8px; margin: -3px -3px 0;
    scrollbar-width: thin; scrollbar-color: #a69d99 transparent;
  }
  .ym-edition-card { scroll-snap-align: start; }
}
@media (max-width: 670px) {
  .ym-edition-head { align-items: flex-start; flex-wrap: wrap; gap: 3px; }
  .ym-edition-head > div:first-child { flex: 1 1 100%; }
  .ym-rail-controls { margin-left: auto; }
  .ym-edition-rail { grid-auto-columns: 62%; gap: 11px; }
  .ym-edition-panel { padding: 13px; }
  .ym-reveal-brand-head {
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 2px 8px;
    padding-block: 10px;
  }
  .ym-reveal-brand-head .ym-reveal-models { grid-column: 1; }
  .ym-reveal-brand-head .ico { grid-column: 2; grid-row: 1 / 3; }
  .ym-reveal-row { grid-template-columns: 1fr; gap: 7px; padding: 13px 1px; }
  .ym-reveal-price, .ym-reveal-actions { justify-self: start; }
  .ym-reveal-actions { margin-top: 2px; }
}
