/* Layout is applied directly to the allowlist, before any JS enhancement.
   This preserves scroll restoration when a whole panel is replaced.
   One frame for each compact single-choice field. The decorative indicator
   follows the existing buttons/radios; focus and selection semantics stay native. */
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) {
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:repeat(var(--choice-count,3),minmax(0,1fr));
  gap:4px;
  padding:4px;
  min-width:0;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface);
}
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])) {
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:44px;
  margin:0;
  padding:9px 6px;
  border:1px solid transparent !important;
  border-radius:10px;
  background:transparent !important;
  box-shadow:none !important;
  color:var(--text);
  font-size:13px;
  line-height:20px;
  text-align:center;
  cursor:pointer;
  transition:color 140ms ease;
}
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])):is([aria-pressed="true"], :has(input:checked)) {
  color:var(--accent-text) !important;
  font-weight:650;
}
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > .choice-indicator {
  position:absolute;
  z-index:0;
  display:block;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:10px;
  background:var(--action-bg);
  box-shadow:0 2px 5px #00000014;
  pointer-events:none;
}
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > .choice-indicator[hidden] { display:none; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])):disabled { cursor:default; opacity:.5; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])):has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])) > span {
  min-height:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent !important;
  box-shadow:none !important;
  color:inherit !important;
}
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])) input:checked + span { border:0; box-shadow:none; }
.bc-people-options:has(> label:nth-of-type(2)) input { position:absolute; width:1px; height:1px; opacity:0; }
.finder-targets:has(> button:nth-of-type(2))::before { display:none; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)):has(> [data-custom-extra="maxPrice"], > [data-catalog-field="maxPrice"]) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.theme-options.theme-options:has(> button:nth-of-type(2)) > button[aria-pressed] { flex-direction:column; min-height:76px; gap:6px; }
.j-photo-options:has(> button:nth-of-type(2)) { max-width:420px; margin-inline:auto; }
.lb-seasons.lb-seasons:has(> button:nth-of-type(2)) { display:flex; margin-inline:0; }
.lb-seasons.lb-seasons:has(> button:nth-of-type(2)) > button[aria-pressed] { flex:1 0 auto; padding-inline:12px; font-size:12px; white-space:nowrap; }
@media(max-width:599px) {
  .j-atlas-filters.j-atlas-filters:has(> button:nth-of-type(2)) { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:359px) {
  :is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) { gap:2px; padding:3px; }
  :is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])) { padding-inline:3px; font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  :is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)) > :is(button[aria-pressed], label:has(input[type="radio"])) { transition:none; }
}

/* Structural counts make the initial render identical to the enhanced one. */
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)):has(> button:nth-of-type(2):last-of-type, > label:nth-of-type(2):last-of-type) { --choice-count:2; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)):has(> button:nth-of-type(3):last-of-type, > label:nth-of-type(3):last-of-type) { --choice-count:3; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)):has(> button:nth-of-type(4):last-of-type, > label:nth-of-type(4):last-of-type) { --choice-count:4; }
:is(.ic-options, .fv-tabs, .cs-options, .cs-regions, .cs-extra-options, .lc-regions, .lc-options, .lf-people, .finder-chips, .finder-targets, .theme-options, .location-sports, .request-levels, .request-people, .bc-people-options, .lb-seasons, .lb-quick-dates, .lb-choice > div, .j-date-options, .j-results fieldset > div, .j-photo-options, .j-atlas-filters, .j-scenarios > div):has(> button:nth-of-type(2), > label:nth-of-type(2)):has(> button:nth-of-type(5):last-of-type, > label:nth-of-type(5):last-of-type) { --choice-count:5; }
