/* Menu layout of the reader (2026-11-22, package 5 of the correction list).
   One place for what every settings menu has in common (.filter-popover: content types, period, formats "Welche Beiträge?", reading style, evidence; language list; design panel):

   1. HEIGHT AND SCROLLING. A menu never grows over the bottom edge of the window. menu-layout.js sets --menu-max-h on every open menu
      (visible window height - fixed footer/ticker stack (--app-stack-h) - the menu's own top - a gap); the menu scrolls inside, and what is scrolled
      in the menu never scrolls the page behind it (overscroll-behavior here, wheel and touch containment in menu-layout.js).
   2. TOPIC SEPARATORS. A new topic inside a menu starts with ONE rule, always built the same way, never drawn by single settings:
        a) every section block (see SECTIONS below, or an element with class .menu-section) except the first child of its menu, and
        b) the element that follows a CLOSING HINT: a hint text (.popover-intro, .mix-note, .menu-hint) that explains the setting above it.
           A hint directly under a heading (strong, .popover-heading, .mix-heading, .mix-mode, .reader-section-label, .menu-head) is an INTRO to what follows:
           no rule after it. Put class .menu-intro on a hint to force "intro", .menu-hint on any element to force "closing hint".
      Rows that other parts insert later (switch-row + hint, a slider, a sub-section) get their separator from these rules without any markup of their own.

   Tokens: --menu-gap (space above and below a separator), --menu-rule (the line). Change them here, nowhere else. */
:root{--menu-gap:12px;--menu-rule:1px solid var(--line);--menu-edge-gap:12px}

/* 1. height and scrolling */
.filter-popover,.design-panel{max-height:var(--menu-max-h,calc(100dvh - 240px))!important;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.language-popover{overflow-y:hidden}
.language-popover .language-options{overscroll-behavior:contain}
.filter-popover .format-options,.filter-popover #kind-options{overscroll-behavior:contain}

/* 2. topic separators: sections */
.filter-popover :is(.media-visibility,.text-style,.spatial-options,.reader-display-section,.mix-section,.content-label-section,.expand-width,.seen-settings,.rating-weights,.menu-section):not(:first-child),
/* 2b. the element after a closing hint */
.filter-popover :is(.popover-intro,.mix-note,.menu-hint):not([hidden],.menu-intro):not(:is(strong,.popover-heading,.mix-heading,.mix-mode,.reader-section-label,.menu-head)+*)+:not(.popover-intro,.mix-note,.menu-hint,[hidden]){
 margin-top:var(--menu-gap);padding-top:var(--menu-gap);border-top:var(--menu-rule)}
/* a closing hint does not add its own space below: the separator below it already does */
.filter-popover :is(.popover-intro,.mix-note,.menu-hint):not([hidden],.menu-intro):not(:is(strong,.popover-heading,.mix-heading,.mix-mode,.reader-section-label,.menu-head)+*):has(+:not(.popover-intro,.mix-note,.menu-hint,[hidden])){margin-bottom:0}
/* a list whose rows draw their own lines does not end with a line of its own: the separator of the next topic is the only one */
.filter-popover #kind-options>.kind-option:last-child{border-bottom:0}
