[hidden] { display: none !important; }
.gallery-head .lead { max-width: 41em; }
.gallery-controls { display: grid; gap: 16px; margin: 24px 0 14px; }
.gallery-formats { margin: 0; padding: 0; min-width: 0; border: 0; }
.gallery-formats legend, .gallery-filters label { margin-bottom: 6px; color: #e5ca8d; font-size: .86em; font-weight: 650; }
.gallery-formats div { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-formats label { position: relative; cursor: pointer; }
.gallery-formats input { position: absolute; opacity: 0; }
.gallery-formats span, .gallery-filters input, .gallery-filters select, .gallery-player button, .gallery-buy, .gallery-purchase input:not([type=checkbox]) {
  border: 1px solid #8d729a; border-radius: 8px; background: #291d38; color: #f4ead6; padding: 8px 14px; font: inherit;
}
.gallery-formats span { display: block; }
.gallery-formats input:checked + span { background: #ffe091; border-color: #ffe091; color: #261a32; }
.gallery-formats input:focus-visible + span, .gallery-controls :is(input,select):focus-visible,
.gallery-player button:focus-visible { outline: 2px solid #ffe091; outline-offset: 3px; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.gallery-filters label { display: grid; gap: 6px; flex: 1 1 187px; }
.gallery-filters :is(input,select) { width: 100%; min-height: 44px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 228px),1fr)); gap: 14px; padding: 0; list-style: none; }
.gallery-grid li { min-width: 0; margin: 0; }
.gallery-grid article { height: 100%; border: 1px solid #614b6c; border-radius: 12px; background: #291d38; padding: 8px; }
.gallery-grid h2 { margin: 10px 4px 0; font-size: clamp(16px, 2.4vw, 20px); }
.gallery-grid p { margin: 4px; font-size: .8em; }
.gallery-video-id { color: #ead6ff; white-space: nowrap; }
.gallery-watch { display: block; position: relative; border-radius: 8px; text-decoration: none; }
.gallery-watch img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: inherit; }
.gallery-watch span { position: absolute; left: 5px; bottom: 5px; padding: 5px 8px; border-radius: 6px; background: #231830; font-size: .78em; }
.gallery-watch:hover span { background: #ffe091; color: #261a32; }
.gallery-note { font-size: .88em; }
.gallery-player { width: min(calc(100% - 24px), 526px); padding: 12px; border: 1px solid #8d729a; border-radius: 12px; background: #291d38; color: #f4ead6; }
.gallery-player::backdrop { background: #100b18d9; }
.gallery-player-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.gallery-player h2 { margin: 0; font-size: 1.05em; }
.gallery-player button { cursor: pointer; min-height: 44px; font-size: .82em; }
.gallery-player video { display: block; width: 100%; max-height: 65vh; aspect-ratio: 1; background: #100b18; }
.gallery-buy { min-height: 44px; max-width: 100%; cursor: pointer; font-size: .85em; border-color: #ddb776; color: #ffe091; }
.gallery-grid .gallery-buy { margin: 5px 4px; }
.gallery-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; margin: 4px; font-size: .85em; }
.gallery-reactions button { min-height: 44px; min-width: 44px; padding: 4px 7px; border: 1px solid #8d729a; border-radius: 8px; background: #231830; color: #ffd3eb; font: inherit; cursor: pointer; }
.gallery-reactions button[aria-pressed="true"] { background: #652c56; border-color: #e69fc7; }
.gallery-reactions button:focus-visible { outline: 2px solid #ffe091; outline-offset: 2px; }
.gallery-reactions .gallery-views { color: #ffe091; }
.gallery-reactions .gallery-sales { color: #ead6ff; }
.gallery-author-reward { flex-basis: 100%; color: #ead6ff; }
.gallery-copy { margin: 4px; font-size: .78em; }
.gallery-copy > button { min-height: 44px; max-width: 100%; padding: 5px 0; border: 0; background: transparent; color: #ffe091; font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }
.gallery-copy-feedback:not(:empty) { display: block; color: #f4ead6; }
.gallery-copy-url { box-sizing: border-box; width: 100%; min-height: 44px; margin-top: 4px; padding: 4px 6px; border: 1px solid #8d729a; border-radius: 6px; background: #231830; color: #f4ead6; font: inherit; }
.gallery-copy :is(button,input):focus-visible { outline: 2px solid #ffe091; outline-offset: 3px; }
#galleryPlayerRatings .gallery-reactions { margin-top: 9px; }
#galleryReactionStatus:empty, #galleryPlayerReactionStatus:empty { margin: 0; }
#galleryCards > li:target article { outline: 2px solid #ffe091; outline-offset: 2px; }
.gallery-purchase { padding: 16px; }
.gallery-purchase form:not([method=dialog]), .gallery-purchase label:not(.gallery-accept) { display: grid; gap: 8px; }
.gallery-purchase form:not([method=dialog]) { gap: 14px; }
.gallery-purchase input:not([type=checkbox]) { min-width: 0; width: 100%; min-height: 44px; }
.gallery-purchase .gallery-accept { display: flex; align-items: baseline; gap: 8px; font-size: .85em; }
.gallery-purchase input[type=checkbox] { accent-color: #ffe091; }
.gallery-purchase-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-purchase :is(button,input):disabled { opacity: .65; cursor: default; }
.gallery-buy:focus-visible, .gallery-purchase input:focus-visible { outline: 2px solid #ffe091; outline-offset: 3px; }
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}
