Previous order was (menu)(theme)(language). Swapped so the row reads
logo ... (theme)(language)(menu) and the hamburger sits flush against the
right padding edge, which is where the thumb menu is expected.
Measured 360/375/414px: brand starts at 14px, menu ends exactly on the
right padding edge, 8px gaps, no horizontal overflow.
On <640px the topbar used flex-wrap: wrap with no spacer, so the brand,
the hamburger and the theme/language buttons all piled up on the left.
- flex-wrap: nowrap at mobile
- .mu-menu gets margin-inline-start: auto and order 1, .mu-topbar-tools order 2
- .mu-brand flex: 1 1 auto with min-width: 0
Measured 360/375/414px: brand starts at 14px, tools end flush at the right
padding edge, 8px gaps, no horizontal overflow. 768/1280px unchanged.
The topbar carried five small buttons in a row (3 theme + 2 language).
Replaced with two single buttons that open their own popover menu:
- ThemeSwitch: single icon button showing the active mode, menu with
light/dark/auto as menuitemradio
- LangSwitch: new component showing the active code (ไทย / EN), menu
keeps the existing [data-i18n-switch] mechanism from i18n.ts
- .mu-topbar-tools wrapper, 8px gap (WCAG 2.5.8), 40px buttons / 44px on touch
- popovers close on select, outside click and Escape (focus returns to button)
Also fixed two bugs found on /stops:
- .mu-btn.outline had no CSS rule, so the browser painted a light grey
background that ignored the dark theme
- deleted the unused StopSearch component which still carried the old
number pad and its delete key, plus the now-unused stops.padDelete key
Verified at 375px: no horizontal overflow, buttons 40x40 and 59x40,
8px gap; menus open/close correctly in both themes.
Share button was themed only in pages/home.css, so /stops, /routes and
/check rendered an unstyled button. Moved to _shared.css and rebuilt as a
ghost variant of .mu-btn:
- radius 12px -> var(--radius) 8px, min-height 44px (48px on touch)
- focus ring #2b2f42 (near-black) -> var(--c-focus)
- LINE link green -> brand purple (DESIGN.md is single-accent)
- hover/active/transition states added
Global scale cleanup (DESIGN.md allows 4px/8px radii only):
- 16 distinct border-radius values -> var(--radius-sm) / var(--radius) / var(--radius-pill)
- 39 distinct font-sizes -> 13-step scale
- outline-offset 1px/2px/3px -> 2px everywhere
- radius and type scale documented in DESIGN.md as enforced tokens
Verified across 4 pages x 2 themes: identical 44x158 button, radius 8px,
contrast 5.80 light / 7.37 dark, no horizontal overflow.