/* Quiet shared preferences; native controls keep complete hit areas. */
#galleryPreferences {
  box-sizing:border-box;
  width:min(472px,calc(100vw - 32px));
  max-width:none;
  max-height:calc(100dvh - 40px);
  margin:auto;
  padding:0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  border:1px solid var(--line,rgb(243 244 246/.18));
  border-radius:2px;
  background:var(--surface,#151719);
  color:var(--ink,#f3f4f6);
  box-shadow:0 28px 96px rgb(0 0 0/.28);
  font:400 15px/1.55 var(--font,Inter,Arial,sans-serif);
  color-scheme:dark;
}
#galleryPreferences[data-theme=light]{color-scheme:light}
#galleryPreferences::backdrop{background:rgb(13 10 12/.56)}
#galleryPreferences *,#galleryPreferences *::before,#galleryPreferences *::after{box-sizing:border-box}
#galleryPreferences button,#galleryPreferences input{font:inherit}
#galleryPreferences button{color:inherit;cursor:pointer}
#galleryPreferences button:focus-visible,
#galleryPreferences input[type=color]:focus-visible,
#galleryPreferences summary:focus-visible,
#galleryPreferences .gp-theme-choice:has(input:focus-visible),
#galleryPreferences .gp-preset:has(input:focus-visible),
[data-preferences-open]:focus-visible{outline:2px solid var(--accent-indicator,var(--ink));outline-offset:4px}
[data-preferences-open]{min-width:44px;min-height:44px}
#galleryPreferences .gp-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 20px 12px 32px;background:var(--surface,#151719)}
#galleryPreferences .gp-header h2{margin:0;font-size:26px;font-weight:500;letter-spacing:-.045em;line-height:1.25}
#galleryPreferences .gp-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:12px;border:0;border-radius:4px;background:transparent}
#galleryPreferences .gp-close:hover{background:var(--surface-raised,#23262b)}
#galleryPreferences .gp-close-icon{display:block;width:20px;height:20px;filter:invert(1)}
html[data-theme=light] #galleryPreferences .gp-close-icon{filter:none}
#galleryPreferences .gp-body{padding:0 32px 24px}
#galleryPreferences .gp-section{min-width:0;margin:0;padding:16px 0 24px;border:0}
#galleryPreferences .gp-section legend{float:left;width:100%;margin:0 0 12px;padding:0;color:var(--muted,#b3b8c1);font-size:13px;font-weight:500;line-height:1.55;letter-spacing:.015em}
#galleryPreferences .gp-theme-options{display:grid;clear:both;grid-template-columns:1fr 1fr;gap:8px}
#galleryPreferences .gp-theme-choice{position:relative;min-height:48px;cursor:pointer}
#galleryPreferences .gp-theme-choice input,#galleryPreferences .gp-preset input{position:absolute;z-index:1;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
#galleryPreferences .gp-theme-choice>span{display:grid;min-height:48px;place-items:center;padding:10px 16px;border-bottom:1px solid var(--line);color:var(--muted,#b3b8c1)}
#galleryPreferences .gp-theme-choice input:checked+span{border-bottom-color:var(--accent-indicator,var(--ink));background:transparent;color:var(--ink,#f3f4f6);font-weight:500}
#galleryPreferences .gp-theme-choice:hover>span{color:var(--ink,#f3f4f6)}
#galleryPreferences .gp-palette{display:grid;clear:both;grid-template-columns:repeat(6,minmax(44px,1fr));gap:4px}
#galleryPreferences .gp-preset{position:relative;display:grid;place-items:center;min-width:44px;min-height:48px;cursor:pointer}
#galleryPreferences .gp-preset::after{position:absolute;top:50%;left:50%;width:36px;height:36px;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%;content:''}
#galleryPreferences .gp-preset:has(input:checked)::after{border-color:var(--ink,#f3f4f6)}
#galleryPreferences .gp-preset:hover::after{border-color:var(--muted,#b3b8c1)}
#galleryPreferences .gp-swatch{display:block;width:26px;height:26px;border:1px solid rgb(0 0 0/.16);border-radius:50%;background:var(--swatch)}
#galleryPreferences .gp-custom-accent{display:flex;align-items:center;gap:16px;min-height:44px;margin-top:10px}
#galleryPreferences .gp-custom-accent label{margin-right:auto;color:var(--muted,#b3b8c1);font-size:14px;cursor:pointer}
#galleryPreferences .gp-custom-accent output{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
#galleryPreferences input[type=color]{flex:0 0 44px;width:44px;height:44px;margin:0;padding:9px;border:0;border-radius:50%;background:transparent;cursor:pointer}
#galleryPreferences input[type=color]::-webkit-color-swatch-wrapper{padding:0}
#galleryPreferences input[type=color]::-webkit-color-swatch{border:1px solid var(--line);border-radius:50%}
#galleryPreferences input[type=color]::-moz-color-swatch{border:1px solid var(--line);border-radius:50%}
#galleryPreferences .gp-accessibility{padding:0;border-top:1px solid var(--line)}
#galleryPreferences .gp-accessibility summary{display:flex;align-items:center;gap:12px;min-height:64px;padding-block:16px;list-style:none;cursor:pointer;font-weight:500}
#galleryPreferences .gp-accessibility summary::-webkit-details-marker{display:none}
#galleryPreferences .gp-accessibility summary::after{content:'+';margin-left:auto;width:20px;text-align:center;font-size:22px;font-weight:400;line-height:1}
#galleryPreferences .gp-accessibility[open] summary::after{content:'−'}
#galleryPreferences .gp-accessibility-count{color:var(--muted,#b3b8c1);font-size:12px;font-weight:400}
#galleryPreferences .gp-toggles{display:grid;gap:0;padding-bottom:8px}
#galleryPreferences [data-gallery-a11y]{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;min-height:52px;padding:12px 0;border:0;border-radius:0;background:transparent;text-align:left;font-size:14px}
#galleryPreferences [data-gallery-a11y]:hover>span:first-child{text-decoration:underline;text-underline-offset:5px}
#galleryPreferences .gp-toggle-state{position:relative;flex:0 0 32px;width:32px;height:18px;border:1px solid var(--muted,#b3b8c1);border-radius:12px;font-size:0}
#galleryPreferences .gp-toggle-state::after{content:'';position:absolute;top:3px;left:3px;width:10px;height:10px;border-radius:50%;background:var(--muted,#b3b8c1);transition:translate .15s ease-out}
#galleryPreferences [aria-pressed=true] .gp-toggle-state{border-color:var(--accent-indicator,var(--ink));background:color-mix(in srgb,var(--accent) 14%,transparent)}
#galleryPreferences [aria-pressed=true] .gp-toggle-state::after{translate:14px 0;background:var(--accent-indicator,var(--ink))}
#galleryPreferences .gp-footer{padding-top:12px}
#galleryPreferences .gp-reset{min-width:44px;min-height:44px;padding:10px 0;border:0;background:transparent;color:var(--muted,#b3b8c1);font-size:13px}
#galleryPreferences .gp-reset:hover{color:var(--ink,#f3f4f6);text-decoration:underline;text-underline-offset:5px}
#galleryPreferences .gp-status{margin:0;color:var(--muted,#b3b8c1);font-size:13px;line-height:1.6}
#galleryPreferences .gp-status:empty{display:none}
#galleryPreferences[data-large-text=true]{font-size:18px}
#galleryPreferences[data-large-text=true] :is(button,legend,summary){font-size:18px}
#galleryPreferences[data-large-text=true] .gp-custom-accent label{font-size:18px}
#galleryPreferences[data-high-contrast=true]{--muted:var(--ink);--line:currentColor}
@media(max-width:479px){
 #galleryPreferences{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);scrollbar-gutter:auto}
 #galleryPreferences .gp-header{padding:20px 12px 8px 20px}
 #galleryPreferences .gp-body{padding:0 20px 20px}
 #galleryPreferences .gp-palette{gap:0}
 #galleryPreferences .gp-section{padding-bottom:20px}
}
@media(max-width:359px){#galleryPreferences .gp-header{padding-left:16px}#galleryPreferences .gp-body{padding-inline:15px}}
@media(prefers-reduced-motion:reduce){#galleryPreferences .gp-toggle-state::after{transition:none}}
.a11y-reduce-motion #galleryPreferences .gp-toggle-state::after{transition:none}
@media(forced-colors:active){
 #galleryPreferences{box-shadow:none}
 #galleryPreferences .gp-close-icon,html[data-theme=light] #galleryPreferences .gp-close-icon{filter:none}
 #galleryPreferences .gp-preset .gp-swatch{forced-color-adjust:none}
 #galleryPreferences .gp-theme-choice input:checked+span{outline:2px solid Highlight;outline-offset:-4px}
 #galleryPreferences .gp-preset:has(input:checked)::after{border:2px solid Highlight}
 #galleryPreferences .gp-toggle-state{border-color:ButtonText}
 #galleryPreferences .gp-toggle-state::after{background:ButtonText;forced-color-adjust:none}
 #galleryPreferences [aria-pressed=true] .gp-toggle-state{border-color:Highlight}
 #galleryPreferences [aria-pressed=true] .gp-toggle-state::after{background:Highlight}
}
@media(forced-colors:active) and (prefers-color-scheme:dark){#galleryPreferences .gp-close-icon,html[data-theme=light] #galleryPreferences .gp-close-icon{filter:invert(1)}}
