.order-gallery-section { padding-block: 32px 48px; }
.order-gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.order-album-card { display: flex; flex-flow: column; min-width: 0; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; }
.order-album-card:hover, .order-album-card:focus-visible { border-color: var(--blue); }
.album-cover-sheet { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); aspect-ratio: 16/9; gap: 2px; overflow: hidden; background: white; }
.album-cover-sheet img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.album-count, .photo-expand { position: absolute; inset: auto 10px 10px auto; background: #142a42e8; color: white; border-radius: 4px; padding: 3px 9px; font-size: 12px; font-weight: 600; }
.order-album-card-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 18px 20px; }
.order-album-card-body h2 { font-size: 22px; line-height: 1.28; overflow-wrap: anywhere; margin: 6px 0 10px; }
.album-meta { color: var(--navy); font-size: 13px; font-weight: 600; margin: 0; }
.album-card-summary { color: var(--muted); font-size: 15px; margin: 0 0 16px; line-height: 1.55; }
.album-open { display: flex; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--blue); font-weight: 600; }
.home-order-gallery { border-top: 1px solid var(--line); background: #f5f8fc; }
.home-order-inner { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 2.2fr); gap: clamp(20px, 3vw, 44px); align-items: center; padding-block: 28px; }
.home-order-intro h2 { margin: 0; font-size: 28px; line-height: 1.25; }
.home-order-intro p { margin: 10px 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.home-order-intro .action-link { margin-top: 6px; }
.home-order-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.home-destinations { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 13px; }
.home-destinations > span { font-weight: 600; color: var(--ink); }
.home-destinations > div { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.home-destinations a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.home-destinations a:hover, .home-destinations a:focus-visible { border-color: var(--blue); }
.home-album-caption { position: relative; padding: 11px 38px 13px 14px; overflow-wrap: anywhere; }
.home-album-caption h3 { margin: 4px 0 0; font-size: 17px; line-height: 1.35; }
.home-album-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--blue); font-size: 18px; }
@media (max-width: 850px) {
    .home-order-inner { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .home-order-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .home-order-intro p { margin: 5px 0 0; }
    .home-order-intro .action-link { flex: 0 0 auto; margin-top: 0; }
}
@media (max-width: 640px) {
    .home-order-inner { padding-block: 16px 20px; gap: 8px; }
    .home-order-intro h2 { font-size: 23px; }
    .home-order-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
    .home-order-intro > div { display: contents; }
    .home-order-intro p { grid-area: 2 / 1 / 3 / -1; margin: 0 0 5px; font-size: 14px; }
    .home-order-intro .action-link { grid-area: 1 / 2; font-size: 13px; gap: 8px; }
    .home-order-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .home-order-cards .order-album-card { display: grid; grid-template-columns: 42% minmax(0, 1fr); align-items: center; }
    .home-order-cards .album-cover-sheet { align-self: stretch; width: 100%; min-width: 0; min-height: 88px; }
    .home-order-cards .album-count { inset: auto 4px 4px auto; padding: 1px 5px; font-size: 11px; }
    .home-album-caption { padding: 8px 12px; }
    .home-album-caption h3 { font-size: 15px; }
    .home-album-caption .album-meta { font-size: 12px; }
    .home-album-arrow { display: none; }
}
.album-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 22px; }
.album-section-heading h2 { font-size: 22px; margin: 0; }
.album-section-heading h2 span { font-size: 15px; color: var(--muted); margin-left: 5px; }
.album-section-heading p { color: var(--muted); margin: 0; font-size: 14px; }
.order-photo-grid { display: flex; flex-wrap: wrap; align-items: start; gap: 24px 16px; }
.order-photo { margin: 0; min-width: 0; flex: var(--photo-ratio) 1 calc(300px * var(--photo-ratio)); max-width: min(100%, calc(460px * var(--photo-ratio))); }
.order-photo a { display: block; position: relative; border-radius: 5px; overflow: hidden; }
.order-photo img { display: block; width: 100%; height: auto; }
.order-photo figcaption { font-size: 14px; line-height: 1.45; margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.order-photo figcaption span { color: var(--blue); margin-right: 4px; font-size: 12px; font-weight: 700; }
.album-back { margin-top: 30px; }
.order-zoom { box-sizing: border-box; width: min(94vw,1100px); max-width: 100%; max-height: 95dvh; margin: auto; border: 0; border-radius: 6px; padding: 0; background: #142231; color: white; }
.order-zoom::backdrop { background: #081524e6; }
.order-zoom[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.order-zoom-head, .order-zoom-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; }
.order-zoom-head { font-size: 14px; }
.order-zoom img { width: 100%; height: min(70dvh, 800px); display: block; object-fit: contain; }
.order-zoom p { margin: 0; color: white; overflow-wrap: anywhere; font-size: 14px; text-align: center; }
.order-zoom button { background: #263b50; color: white; border: 1px solid #65788b; border-radius: 4px; padding: 7px 12px; min-width: 44px; min-height: 44px; flex-shrink: 0; cursor: pointer; }
.order-zoom button:disabled { opacity: .4; cursor: default; }
.album-admin-nav, .album-save-actions, .album-admin-item, .album-admin-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.album-admin-nav { justify-content: space-between; margin-bottom: 18px; }
.album-admin-nav .library-tabs { margin-bottom: 0; }
.album-admin-item { padding: 16px 0; border-top: 1px solid #dce3ea; }
.album-admin-cover img { display: block; width: 94px; height: 72px; object-fit: cover; border-radius: 3px; }
.album-admin-details { flex: 1; min-width: 120px; }
.album-admin-details h3, .album-admin-details p { margin: 0 0 6px; overflow-wrap: anywhere; }
.album-admin-details p, .album-editor .panel-intro { color: #526579; }
.album-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.album-editor .panel { margin-bottom: 18px; }
.album-file-label input { display: block; margin-top: 6px; padding: 12px; border: 1px dashed #9eafc0; background: #f5f8fb; width: 100%; }
.album-edit-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(185px,100%),1fr)); gap: 12px; }
.album-edit-tile { min-width: 0; border: 1px solid #dce3ea; border-radius: 5px; overflow: hidden; }
.album-edit-tile img { display: block; width: 100%; height: 146px; object-fit: contain; background: #f5f7f9; }
.album-edit-tile > div { padding: 10px; }
.album-edit-tile .checkbox { margin: 0; }
.album-edit-tile details { margin-top: 8px; }
.album-edit-tile summary, .album-trash summary { cursor: pointer; color: #235790; }
.album-edit-tile details label { margin-top: 8px; }
.album-trash .button { margin-top: 12px; }
@media (max-width:640px) {
    .order-gallery-section { padding-block: 22px 32px; }
    .order-gallery-grid { grid-template-columns: 1fr; gap: 18px; }
    .order-album-card-body { padding: 14px 16px; }
    .order-album-card-body h2 { font-size: 20px; }
    .order-photo-grid { gap: 18px 12px; }
    .order-photo { flex: 0 1 calc(50% - 6px); max-width: calc(50% - 6px); }
    .order-photo.is-landscape, .order-photo:only-child { flex-basis: 100%; max-width: 100%; }
    .order-zoom { width: 100vw; max-height: 100dvh; }
    .order-zoom img { height: min(67dvh, 680px); }
    .album-admin-cover img { width: 74px; height: 64px; }
    .album-admin-actions { flex-basis: 100%; }
    .album-edit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .album-edit-tile img { height: 126px; }
    .album-edit-tile input { font-size: 16px; }
}

.album-buying-guide { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.album-buying-guide p { max-width: 72ch; }
.album-buying-guide h3 { margin: 22px 0 6px; }
.album-buying-guide ul { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; list-style: none; }
.album-buying-guide li a { display: inline-flex; align-items: center; min-height: 44px; }

.order-model-links { display:flex; flex-wrap:wrap; gap:4px 14px; list-style:none; padding:0; }
.order-model-links a { display:inline-flex; align-items:center; min-height:44px; overflow-wrap:anywhere; }

.order-reference-list { list-style:none; padding:0; margin:1rem 0; }
.order-reference-list li { display:flex; align-items:center; flex-wrap:wrap; gap:0 1rem; padding:.35rem 0; border-bottom:1px solid #d7e1ed; }
.order-reference-list strong { overflow-wrap:anywhere; }
.order-reference-list a { display:inline-flex; align-items:center; min-height:44px; }
@media (max-width:600px) {
    .order-reference-list strong { flex-basis:100%; }
}

/* Gallery browsing: photos first, with model links below the album grid. */
.gallery-brand-nav { padding-top: 18px; }
.gallery-brand-scroll { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 2px 8px; scrollbar-width: thin; }
.gallery-chip, .gallery-model-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 15px; border: 1px solid #cbd8e5; border-radius: 24px; background: #fff; color: var(--navy); font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.gallery-chip { flex: 0 0 auto; white-space: nowrap; }
.gallery-chip span, .gallery-model-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 1px 5px; border-radius: 12px; background: #edf3f9; color: var(--navy); font-size: 12px; }
.gallery-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.gallery-chip:hover, .gallery-chip:focus-visible, .gallery-model-chip:hover, .gallery-model-chip:focus-visible { border-color: var(--blue); color: var(--blue); }
.gallery-chip.is-active:hover, .gallery-chip.is-active:focus-visible { color: #fff; }
.gallery-brand-nav + .order-gallery-section { padding-top: 12px; }
.gallery-models { margin-top: 42px; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: #f5f8fc; }
.gallery-models h2 { margin: 0 0 8px; font-size: 24px; }
.gallery-models p { margin: 0 0 16px; color: var(--muted); }
.gallery-model-list { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-model-chip { max-width: 100%; overflow-wrap: anywhere; }
.gallery-model-chip span { flex: 0 0 auto; }
.gallery-group-intro h1 { overflow-wrap: anywhere; }
.gallery-product-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; margin-top: 16px; padding: 10px 16px; border: 1px solid #aec7df; border-radius: 6px; background: #fff; color: var(--blue); font-weight: 700; text-decoration: none; }
.gallery-product-link:hover, .gallery-product-link:focus-visible { border-color: var(--blue); }
.gallery-records { border-top: 1px solid var(--line); }
.gallery-records h3 { margin: 22px 0 6px; }
.gallery-records p { max-width: 72ch; }
.gallery-directory { margin-top: 36px; font-size: 15px; }
@media (min-width: 1000px) {
    .order-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .gallery-brand-nav { padding-top: 12px; }
    .gallery-models { padding: 18px 16px; margin-top: 32px; }
    .gallery-models h2 { font-size: 21px; }
}

.gallery-heading-band { margin-bottom: 0; }
.gallery-heading-band .breadcrumb a { min-height: 44px; }
@media (max-width: 640px) {
    .gallery-heading-band .breadcrumb { padding-block: 4px; }
    .gallery-heading-band .page-intro { padding-bottom: 18px; }
    .gallery-heading-band .page-intro h1 { margin-bottom: 8px; }
    .gallery-heading-band .page-intro > p { line-height: 1.5; }
}
.gallery-brand-nav { position: relative; }
.gallery-brand-nav::after { content: ''; pointer-events: none; position: absolute; inset: 0 0 0 auto; width: 36px; background: linear-gradient(90deg, transparent, #fff); }
.gallery-brand-scroll { scrollbar-width: none; }
.gallery-brand-scroll::-webkit-scrollbar { display: none; }
.gallery-model-groups { display: grid; gap: 8px; }
.gallery-model-group { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.gallery-model-group summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; color: var(--navy); cursor: pointer; font-weight: 700; list-style: none; }
.gallery-model-group summary::-webkit-details-marker { display: none; }
.gallery-model-group summary span { color: var(--muted); font-size: 14px; font-weight: 400; }
.gallery-model-group summary::after { content: '+'; font-size: 22px; color: var(--blue); }
.gallery-model-group[open] summary::after { content: '−'; }
.gallery-model-group .gallery-model-list { display: flex; flex-wrap: wrap; padding: 4px 12px 14px; gap: 8px; }
.gallery-model-chip .model-code { display: inline-block; min-width: 0; max-width: 100%; overflow-x: auto; padding: 0; background: transparent; font-size: 15px; }
@media (max-width: 599px) {
    .order-gallery-section .order-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .order-gallery-grid .order-album-card-body { padding: 10px; }
    .order-gallery-grid .order-album-card-body h2 { font-size: 15px; line-height: 1.35; margin: 4px 0; }
    .order-gallery-grid .album-card-summary, .order-gallery-grid .album-open, .order-gallery-grid .album-mixed-explanation { display: none; }
    .order-gallery-grid .album-meta { font-size: 13px; line-height: 1.35; }
    .order-gallery-grid .album-mixed { margin-top: 5px; padding: 3px 6px; background: #edf3f9; border-radius: 4px; }
    .order-gallery-grid .album-count { right: 5px; bottom: 5px; }
}
.album-detail-intro > h2 { margin-top: 28px; }
.album-reference-cards, .related-albums { margin-top: 36px; }
.album-reference-cards details { border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; padding: 0 16px 12px; background: #fff; }
.album-reference-cards summary { min-height: 48px; display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; }
.album-reference-cards summary::after { content: '+'; margin-left: auto; color: var(--blue); font-size: 22px; }
.album-reference-cards details[open] summary::after { content: '−'; }
.album-reference-cards summary::-webkit-details-marker { display: none; }
.related-album-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.related-album-card { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.related-album-card img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.related-album-card span { min-width: 0; }
.related-album-card small { display: block; color: var(--muted); }

/* A compact secondary-reference line below the existing album title. */
.album-detail-intro > .album-listed-models { color: var(--muted); font-size: 14px; line-height: 1.55; margin: -4px 0 10px; }
.album-listed-models .model-code { max-width: 100%; }
