/* Plain default styling (no design approved yet, L-022). Layout and usability only:
   the Menu bar sits in its own row, so it is always visible and never covers content (L-023). */
/* The pages are light only. Said out loud, so that a browser set to darken sites by itself
   (Chrome's automatic dark theme on Android) leaves the colors alone (L-118). */
:root { color-scheme: only light; }
html, body { height: 100%; margin: 0; }
body { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100vh; height: 100dvh; }
main { overflow-y: auto; overflow-x: hidden; }
/* On a phone or a narrow window the page itself scrolls (L-234; Chris: "Browser and top bar take up too
   much screen real estate"): Chrome slides its address bar away only when the page itself scrolls, and
   it never did while only <main> scrolled. The Menu bar stays at the bottom of the screen (sticky; at the
   end of the page it covers nothing). The top bar slides away while scrolling down and comes back when
   scrolling up (common.js phoneBars; Chris: "Yes, both bars"). A desktop (1,024 px and wider) keeps the
   rows above: its reading area scrolls under the fixed top bar. overflow-x: clip, not hidden: hidden
   would make <main> a scrolling box again, and the sticky bars would stick to it, not to the screen. */
/* "not all and (min-width: 1024px)": exactly the windows desktop.css leaves out, also at a zoom that gives a
   fractional width (second review 2026-11-26). A short page still fills the screen in its own color (main and
   .page as a column). Keyboard and find-in-page stop short of the sticky bars (scroll-padding). */
@media not all and (min-width: 1024px) {
  html, body { height: auto; }
  html { scroll-padding-bottom: calc(var(--menu-h, 60px) + 8px); } /* the top: the jump targets' own scroll-margin-top already clears the top bar */
  body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; height: auto; }
  main { flex: 1 0 auto; display: flex; flex-direction: column; overflow: visible; overflow-x: clip; }
  main > .page { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
  .menubar { position: sticky; bottom: 0; z-index: 7; }
  .topbar, .l-top { transition: transform 0.2s ease; }
  html.bar-away .topbar, html.bar-away .l-top { transform: translateY(-110%); }
}
@media (prefers-reduced-motion: reduce) { .topbar, .l-top { transition: none; } }
.page { max-width: 44rem; margin: 0 auto; padding: 0 16px 2rem; overflow-wrap: anywhere; }
/* Korean breaks between words, not in the middle of one (the Korean convention; without it a
   narrow screen breaks a word after any syllable). English is not changed by this. A word too
   long for its line is still broken (overflow-wrap above). L-118. */
.page { word-break: keep-all; }
.menubar { border-top: 1px solid; padding: 6px 16px; }
.menubar ul { margin: 0.5rem 0; }
/* The open Menu never grows past the screen (a phone on its side is about 330 px high, the
   owner's Menu about 400): its list scrolls instead, and the Menu button stays in view (L-118). */
.menubar ul { box-sizing: border-box; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; }
button, select, input, textarea { font-size: 1rem; }
button, select, input[type="checkbox"] + span, label.check { min-height: 44px; }
button { min-width: 44px; }
textarea, select { max-width: 100%; box-sizing: border-box; }
select { min-width: min(16rem, 100%); }
textarea { width: 100%; }
.hide-ko .ko { display: none; }
/* A link or small button that stands alone in a line: at least 44 px to press (spec 8). */
a.tap, button.tap { display: inline-flex; align-items: center; min-height: 44px; }
.dialog, .pair, .line-block { break-inside: avoid; }
.audio-controls button { margin-right: 0.5rem; }
.ko { margin-top: 0; }
.en { margin-bottom: 0.25rem; }
#inapp { border: 2px solid; padding: 0.5rem; }
#report-arrived { border: 2px solid; padding: 0 0.5rem; overflow-wrap: anywhere; }
/* Slice 3: large play and pause controls (spec 4 item 4, driving safety). */
.big { font-size: 1.4rem; min-height: 64px; width: 100%; margin: 0.25rem 0; }
#now-text .current { font-weight: bold; }
.items li { margin-bottom: 0.5rem; }
