.cbb-gallery, .cbb-gallery * { box-sizing: border-box; }
.cbb-gallery { color: #222; font: 16px/1.5 Arial, Helvetica, sans-serif; }
.cbb-gallery [id] { scroll-margin-top: 12px; }
.cbb-gallery h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.2; }
.cbb-gallery section + section { margin-top: 32px; }
.cbb-gallery-paths { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.cbb-gallery-paths a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; background: #222; color: #fff; border-radius: 3px; font-weight: 700; text-decoration: none; }
.cbb-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cbb-gallery-record { background: #fff; border: 1px solid #d5d5d5; min-width: 0; }
.cbb-gallery-record summary { display: block; list-style: none; cursor: pointer; padding: 12px; font-weight: 700; }
.cbb-gallery-record summary::-webkit-details-marker { display: none; }
.cbb-gallery-record summary img { display: block; float: none; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #f0f0f0; margin: 0 0 10px; }
.cbb-gallery-title { font-size: 18px; }
.cbb-gallery-year { display: inline-block; margin-left: 8px; color: #505050; font-size: 14px; }
.cbb-gallery-listen { display: flex; align-items: center; min-height: 44px; margin-top: 4px; color: #23588f; font-size: 13px; letter-spacing: .03em; }
.cbb-gallery-close, .cbb-gallery-record details[open] .cbb-gallery-open { display: none; }
.cbb-gallery-record details[open] .cbb-gallery-close { display: inline; }
.cbb-gallery-panel { margin: 0 12px 4px; padding: 10px 12px; background: #f3f6f9; border-top: 1px solid #cbd7e2; }
.cbb-gallery-panel p { margin: 0 0 8px; }
.cbb-gallery-player iframe, .cbb-gallery-player audio { display: block; width: 100%; max-width: 100%; border: 0; }
.cbb-gallery-player iframe { border-radius: 12px; }
.cbb-gallery-player audio { margin: 4px 0 12px; }
.cbb-gallery-detail, .cbb-gallery-return a { display: inline-flex; align-items: center; min-height: 44px; color: #23588f; }
.cbb-gallery-detail { margin: 0 12px; text-decoration: underline; text-underline-offset: 3px; }
.cbb-gallery :focus-visible { outline: 3px solid #a41425; outline-offset: 2px; }
.cbb-gallery.has-return { display: block; max-height: none; }
.cbb-gallery.has-return .cbb-gallery-scroll { overflow: visible; }
.cbb-gallery-return { display: flex; justify-content: flex-end; min-height: 48px; padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) 8px; background: #f9fafb; border-top: 1px solid #d5d5d5; }
.cbb-gallery-return[hidden] { display: none; }
.cbb-gallery-return a { padding: 0 12px; font-size: 14px; font-weight: 700; text-decoration: none; }
@media (max-width: 760px) { .cbb-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .cbb-gallery-grid { grid-template-columns: 1fr; } .cbb-gallery-record summary img { max-width: 280px; margin-inline: auto; } }
@media (max-width: 767px) {
  .cbb-gallery-return { position: sticky; bottom: 0; z-index: 1; }
}
