.jp-gallery { min-width: 0; }
.jp-gallery h1 { margin-bottom: 8px; font-size: clamp(24px, 4vw, 36px); }
.jp-gallery-tabs { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; line-height: 1.3; }
.jp-gallery-tabs a { display: inline-flex; align-items: center; min-height: 40px; color: #67515f; text-decoration: none; }
.jp-gallery-tabs a[aria-current] { color: #843662; font-weight: 600; border-bottom: 2px solid #843662; }
.jp-gallery-tabs a + a { border-left: 1px solid #e6dfe4; padding-left: 10px; }
.jp-gallery-tabs .jp-gallery-create { margin-left: auto; padding: 0 9px; border: 1px solid #d4becb; border-radius: 8px; text-align: center; max-width: 145px; }
.jp-gallery-search { margin: 0; min-width: 0; }
.jp-gallery-query { position: relative; }
.jp-gallery-query input { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 0 50px 0 12px; border: 1px solid #bba8b4; border-radius: 10px; font: inherit; font-size: 16px; background: #fff; color: #302730; }
.jp-gallery-query button { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 0 10px 10px 0; background: transparent; color: #843662; cursor: pointer; }
.jp-gallery-query svg { fill: none; stroke: currentColor; stroke-width: 2; }
.jp-gallery-kinds { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; padding: 8px 0; scrollbar-width: thin; }
.jp-filter-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; min-height: 36px; padding: 6px 10px; border: 1px solid #dfd5dc; border-radius: 20px; background: #fff; font-size: 12px; line-height: 1.4; color: #51414b; text-decoration: none; }
.jp-gallery-kinds .jp-filter-chip { flex: 0 0 auto; white-space: nowrap; }
.jp-filter-chip.is-active { background: #f7eaf2; border-color: #9f577e; color: #783054; font-weight: 600; }
.jp-filter-chip:hover { border-color: #9f577e; }
.jp-filter-swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px #0002; }
.jp-gallery-controls { position: relative; min-height: 40px; }
.jp-gallery-details summary { box-sizing: border-box; width: fit-content; max-width: 45%; min-height: 40px; padding: 10px 0; font-size: 13px; font-weight: 600; cursor: pointer; color: #51414b; }
.jp-gallery-sort { position: absolute; right: 0; top: 0; max-width: 55%; }
.jp-gallery-sort select { box-sizing: border-box; max-width: 100%; height: 40px; padding: 0 28px 0 10px; border: 1px solid #dfd5dc; border-radius: 8px; background-color: white; font: inherit; font-size: 13px; color: #51414b; }
.jp-gallery-panel { padding: 12px; margin-top: 6px; border: 1px solid #e6dfe4; border-radius: 10px; background: #fcfafb; }
.jp-gallery-panel fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.jp-gallery-panel legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.jp-filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.jp-gallery-photo { display: flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13px; }
.jp-gallery-photo input { width: 18px; height: 18px; accent-color: #843662; }
.jp-gallery-apply { margin-top: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid #bba8b4; border-radius: 8px; background: white; color: #783054; cursor: pointer; }
.jp-gallery-search.is-enhanced .jp-gallery-apply { display: none; }
.jp-gallery-results { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; font-size: 12px; color: #67515f; }
.jp-gallery-results strong { margin-right: 4px; font-weight: 500; }
.jp-gallery-results .jp-filter-chip { max-width: 100%; overflow-wrap: anywhere; justify-content: flex-start; }
.jp-gallery-clear { color: #843662; padding: 8px 0; }
.jp-gallery .jp-pattern-grid { margin-top: 10px; }
.jp-gallery a:focus-visible, .jp-gallery button:focus-visible, .jp-gallery input:focus-visible, .jp-gallery select:focus-visible, .jp-gallery summary:focus-visible { outline: 2px solid #843662; outline-offset: 2px; }
.jp-filter-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 900px) {
    .jp-gallery-tabs { font-size: 14px; }
    .jp-gallery-tabs .jp-gallery-create { max-width: none; }
    .jp-gallery-panel { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
    .jp-gallery-photo { grid-column: 1 / -1; }
}
