.cfg-section { padding: 54px 20px; }
.cfg-intro { max-width: 800px; text-align: center; margin: -20px auto 30px; }
.cfg-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; align-items: start; }
.cfg-preview { position: sticky; top: calc(var(--header-height) + 14px); min-width: 0; border: 1px solid #d6e0eb; border-radius: 12px; background: #fff; overflow: hidden; }
.cfg-stage { aspect-ratio: 3 / 2; max-height: min(360px, 34vh); position: relative; background: #f0f3f6; isolation: isolate; }
.cfg-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#cfg-incoming { opacity: 0; z-index: 1; }
.cfg-picture-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #f6f8fb; }
#cfg-caption { font-size: .8rem; font-weight: 500; color: #253d59; }
.cfg-zoom { border: 1px solid #0D47A1; background: #fff; color: #0D47A1; border-radius: 7px; font-weight: 600; font-size: .78rem; padding: 8px 12px; min-height: 44px; }
.cfg-zoom:hover { background: #edf4ff; }
.cfg-accessory-example { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 14px; align-items: center; padding: 14px; margin: 0; border-top: 1px solid #dde5ee; }
.cfg-accessory-example[hidden] { display: none; }
.cfg-accessory-example img { width: 105px; height: 140px; object-fit: contain; }
.cfg-accessory-example figcaption { font-size: .84rem; font-weight: 600; color: #0D47A1; }
.cfg-accessory-example p { font-size: .73rem; line-height: 1.5; margin: 6px 0 9px; color: #4b5c70; }
.cfg-result { padding: 18px; border-top: 1px solid #dde5ee; }
.cfg-result h3 { font-size: 1.05rem; margin-bottom: 10px; }
.cfg-recap { display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 5px 12px; font-size: .77rem; line-height: 1.5; margin: 0 0 16px; }
.cfg-recap dt { color: #526276; }
.cfg-recap dd { margin: 0; color: #203c5a; font-weight: 500; overflow-wrap: anywhere; }
.cfg-result .cta-button { border-radius: 8px; padding: 12px 14px; width: 100%; font-size: .84rem; }
.cfg-fields { min-width: 0; }
.cfg-group { border: 1px solid #d6e0eb; border-radius: 10px; margin: 0 0 14px; background: #fff; }
.cfg-group > summary { cursor: pointer; color: #0D47A1; padding: 14px 16px; list-style-position: inside; font-size: .85rem; }
.cfg-group > summary strong { font-size: .79rem; font-weight: 500; color: #334e6b; }
.cfg-group > summary > span { font-weight: 600; }
.cfg-group[open] > summary { border-bottom: 1px solid #e3e9f0; }
.cfg-group-content { padding: 14px; }
.cfg-type-grid, .cfg-photo-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.cfg-choice { position: relative; display: block; width: 100%; min-width: 0; background: #fff; border: 2px solid #d9e3ef; color: #294561; border-radius: 8px; padding: 11px 9px; text-align: left; min-height: 48px; overflow: hidden; }
.cfg-choice-title { display: block; font-size: .78rem; font-weight: 500; line-height: 1.45; }
.cfg-choice[aria-pressed='true'] { border-color: #0D47A1; background: #edf4ff; }
.cfg-choice[aria-pressed='true']::after { content: '✓'; position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0D47A1; color: #fff; font-size: 14px; font-weight: 700; }
.cfg-choice:hover { border-color: #0D47A1; }
.cfg-type { padding: 0; }
.cfg-type .cfg-choice-title { padding: 9px 11px; }
.cfg-type-image { width: 100%; height: 102px; object-fit: contain; background: #f2f5f8; }
.cfg-color-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.cfg-color { text-align: center; padding: 10px 4px; }
.cfg-swatch { display: block; width: 35px; height: 35px; border-radius: 50%; border: 1px solid #bbc3cc; margin: 0 auto 7px; }
.cfg-color .cfg-choice-title { font-size: .73rem; }
.cfg-color small { font-size: .66rem; display: block; margin-top: 2px; }
.cfg-accessories { display: grid; gap: 9px; }
.cfg-accessories label { display: flex; align-items: center; gap: 10px; border: 2px solid #d9e3ef; border-radius: 8px; padding: 12px; font-size: .85rem; cursor: pointer; }
.cfg-accessories label.is-selected { border-color: #0D47A1; background: #edf4ff; }
.cfg-accessories input { accent-color: #0D47A1; width: 21px; height: 21px; flex-shrink: 0; }
.cfg-photo-card { min-width: 0; }
.cfg-photo-card > .cfg-choice { padding: 0 0 8px; height: calc(100% - 47px); }
.cfg-option-image { width: 100%; height: 130px; object-fit: contain; background: #f2f5f8; }
.cfg-photo-card .cfg-choice-title { padding: 9px 9px 0; }
.cfg-photo-card > .cfg-zoom { width: 100%; margin-top: 3px; }
.cfg-photo-grid > .cfg-choice { align-self: start; }
.cfg-install-field { padding: 0; border: 0; margin: 0 0 20px; min-width: 0; }
.cfg-install-field:last-child { margin-bottom: 0; }
.cfg-install-field legend { color: #0D47A1; font-size: .92rem; font-weight: 600; margin-bottom: 10px; }
.cfg-footnote { color: #586b80; font-size: .75rem; line-height: 1.6; }
.cfg-viewer { margin: auto; width: min(1120px,96vw); max-width: 96vw; max-height: 94svh; border: 0; border-radius: 12px; padding: 16px; background: #fff; }
.cfg-viewer::backdrop { background: rgba(7,20,37,.82); }
.cfg-viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cfg-viewer h3 { font-size: 1rem; }
.cfg-viewer [data-close] { border: 0; border-radius: 7px; background: #0D47A1; color: #fff; padding: 10px 14px; min-height: 44px; flex-shrink: 0; }
.cfg-viewer img { display: block; width: 100%; height: auto; max-height: 76svh; object-fit: contain; }
.cfg-viewer p { font-size: .75rem; color: #526276; margin-top: 8px; }
@media (min-width: 901px) { .cfg-group > summary { list-style: none; } }
@media (max-width: 900px) {
 .cfg-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
 .cfg-preview { position: static; }
 .cfg-stage { max-height: 340px; }
 .cfg-group > summary { padding: 15px 12px; }
 .cfg-group > summary strong { font-size: .75rem; }
 .cfg-recap { font-size: .75rem; grid-template-columns: 112px minmax(0,1fr); }
 .cfg-result { padding: 14px; }
 .cfg-section { padding: 42px 16px; }
 .cfg-viewer { padding: 12px; }
}
@media (max-width: 420px) {
 .cfg-option-image { height: 108px; }
 .cfg-choice-title { font-size: .73rem; }
 .cfg-group-content { padding: 11px; }
 .cfg-color-grid { gap: 7px; }
 .cfg-picture-tools { padding: 8px 10px; }
 #cfg-caption { font-size: .73rem; }
}
@media (prefers-reduced-motion: reduce) { #cfg-incoming { transition: none !important; } }
