.assembly-reference { padding: 72px 0 90px; border-top: 1px solid var(--line); }
.reference-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 30px; }
.reference-heading h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.2; letter-spacing: -.045em; font-weight: 500; margin: 0 0 14px; }
.reference-heading p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; }
.reference-systems { display: flex; gap: 5px; flex-wrap: wrap; flex-shrink: 0; }
.reference-systems button { border: 1px solid transparent; border-radius: 5px; padding: 10px 14px; color: var(--muted); background: transparent; font-size: 12px; }
.reference-systems button:hover { border-color: var(--line); }
.reference-systems button[aria-pressed="true"] { color: white; background: var(--ink); }
.reference-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 32px; align-items: start; }
.reference-figure { grid-column: span 8; min-width: 0; margin: 0; }
.reference-image-open { position: relative; display: block; width: 100%; padding: 0; background: #e7e9e5; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.reference-image-open img { width: 100%; height: auto; max-height: 540px; object-fit: contain; display: block; transition: filter .3s; }
.reference-image-open:hover img { filter: contrast(1.05); }
.reference-image-hint { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-size: 11px; background: var(--white); color: var(--ink); border-top: 1px solid var(--line); }
.reference-figure figcaption { margin-top: 12px; font-size: 10px; color: var(--muted); line-height: 1.7; }
.reference-context { grid-column: span 4; min-width: 0; padding: 8px 0 0; }
.reference-context .reference-label { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.reference-context h3 { margin: 0 0 18px; font-size: 24px; font-weight: 500; letter-spacing: -.035em; }
.reference-context p { font-size: 12px; line-height: 1.9; color: var(--muted); }
.reference-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.reference-actions a { justify-content: center; text-align: center; }
.reference-actions .text-link { padding: 12px; font-size: 12px; text-underline-offset: 5px; }
.reference-disclaimer { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; font-size: 11px !important; }
.reference-empty { grid-column: span 8; border-left: 3px solid #adb69e; padding: 18px 22px; background: var(--soft); align-self: start; }
.reference-empty p { margin: 0 0 14px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.reference-layout.is-empty .reference-context { padding-top: 0; }
.reference-dialog { width: min(1400px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--paper); color: var(--ink); }
.reference-dialog::backdrop { background: #141b16b8; backdrop-filter: blur(4px); }
.reference-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.reference-dialog h3 { font-size: 16px; margin: 0; font-weight: 550; }
.reference-dialog button { color: var(--ink); background: var(--white); border: 1px solid var(--line); padding: 9px 13px; border-radius: 4px; font-size: 12px; min-height: 38px; }
.reference-dialog button:hover { background: var(--soft); }
.reference-dialog button:disabled { opacity: .4; cursor: default; }
.reference-pan { overflow: auto; max-height: calc(100dvh - 200px); min-height: 180px; background: #e7e9e5; }
.reference-pan img { display: block; height: auto; max-width: none; margin-inline: auto; }
.reference-zoom-tools { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 12px; }
.reference-zoom-tools output { min-width: 46px; text-align: center; font-size: 12px; }
.accessory-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; margin: 6px 0 20px; border-block: 1px solid var(--line); }
.accessory-overview p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.7; }
.accessory-overview a { font-size: 12px; flex-shrink: 0; text-underline-offset: 4px; }
.accessory-section { margin-top: 28px; }
.accessory-section h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.accessory-section > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.accessory-group { margin-top: 12px; background: transparent; }
.accessory-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; list-style: none; }
.accessory-group > summary::-webkit-details-marker { display: none; }
.accessory-group > summary::after { content: '+'; color: var(--accent); font-size: 20px; font-weight: 400; }
.accessory-group[open] > summary::after { content: '−'; }
.accessory-group > summary .accessory-group-count { margin-left: auto; font-size: 10px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.accessory-group .accessory-note { font-size: 11px; color: var(--muted); line-height: 1.9; }
.accessory-group .accessory-note.is-warning { color: #8a431d; }
.accessory-group .accessory-select { color: var(--ink); border: 1px solid var(--line); border-radius: 4px; background: var(--soft); padding: 9px 12px; font-size: 11px; margin: 0 0 14px; }
.accessory-group .accessory-select:hover { border-color: var(--ink); }
.accessory-group .part-role { color: var(--ink); font-weight: 550; }
.accessory-status { color: #4d6142; font-size: 11px; display: inline-block; margin-bottom: 12px; }
@media (max-width: 980px) {
  .reference-heading { flex-direction: column; align-items: start; }
  .reference-layout { gap: 22px; }
  .reference-figure, .reference-empty { grid-column: span 7; }
  .reference-context { grid-column: span 5; }
}
@media (max-width: 760px) {
  .assembly-reference { padding: 44px 0 50px; }
  .reference-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .reference-figure, .reference-empty, .reference-context { grid-column: 1; }
  .reference-context h3 { font-size: 22px; }
  .reference-heading { gap: 20px; margin-bottom: 22px; }
  .reference-systems button { padding: 10px 12px; }
  .reference-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .reference-dialog header { padding: 12px; }
  .reference-dialog h3 { font-size: 14px; }
  .accessory-overview { align-items: start; }
  .accessory-group { padding: 14px; }
  .accessory-group .qty-tag { white-space: normal; max-width: 90px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reference-figure, .reference-context { transform: none !important; opacity: 1 !important; }
}
