/* ONE bar at the foot of a phone screen (job S3-03, 20 Nov 2026). The repair plan: on a phone the action of the moment
   is in a bar at the foot of every screen, at the thumb (the wizard, the start screens, practice, the error pages).
   It is the practice page's bar (10 Nov 2026), made one part for every page. By width only (600px and less), so the
   app and a phone's browser get the same page; a tablet and a laptop keep the page as it was: nothing here applies there.

     <div class="sv-bar"> the page's buttons (css/buttons.css: sv-main, sv-second, sv-quiet) </div>

   Its place: the foot of the SCREEN, wherever the bar is in the page (a bar inside a card on the website leaves the
   card on a phone). The page keeps its own last lines clear of it with --sv-bar-room (a page whose bar has two rows
   says so). sv-bar-in: the bar is the last row of a page that is itself one screen (practice), in the flow.
   Its look: the page's fill (--sv-bar-bg; a page may set it), a hairline and a soft shade above, room under it for
   the phone's own gesture bar. Its buttons: the big size (css/buttons.css); main and second ones share the width, a
   quiet one (Back) keeps its own; sv-bar-wide gives a button a row of its own; sv-bar-stack puts one button on each
   row, the main one on top (a long label).
   js/util.js svBar() draws the buttons of a bar that PRESSES the page's own buttons (practice), into the bar or into a
   <div class="sv-bar-row"> inside it. Test u121. */
:root{ --sv-bar-bg:#fffdf8; --sv-bar-line:#e4dccc; --sv-bar-room:calc(73px + env(safe-area-inset-bottom, 0px)); }
body.dark-mode{ --sv-bar-bg:#23211f; --sv-bar-line:#3a3734; }
.sv-bar-marks{ display:none; }
@media (max-width:600px){
  .sv-bar{ position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; flex-wrap:wrap; align-items:center;
    justify-content:flex-start; gap:8px; box-sizing:border-box; margin:0; padding:8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background:var(--sv-bar-bg); border-top:1px solid var(--sv-bar-line); box-shadow:0 -12px 20px -16px rgba(40,28,12,.4); }
  .sv-bar[hidden]{ display:none; }
  .sv-bar.sv-bar-in{ position:relative; left:auto; right:auto; bottom:auto; z-index:auto; }
  .sv-bar-row{ display:contents; }   /* the buttons svBar() draws into a row of their own sit in the bar as its own */
  .sv-bar .sv-btn{ flex:1 1 0; min-width:0; margin:0 !important; padding-inline:.75rem; }   /* in the bar a button has no margin of its own, whatever its page gives it */
  .sv-bar .sv-quiet{ flex:0 0 auto; }
  .sv-bar .sv-bar-wide{ flex:1 1 100%; }
  .sv-bar .sv-bar-stack .sv-btn, .sv-bar.sv-bar-stack .sv-btn{ flex:1 1 100%; }
  .sv-bar .sv-bar-stack .sv-main, .sv-bar.sv-bar-stack .sv-main{ order:-1; }
  /* the guide's pages: a row of dots over the buttons */
  .sv-bar-marks{ order:-2; flex:1 1 100%; display:flex; justify-content:center; gap:7px; padding:1px 0 0; }
  .sv-bar-marks[hidden]{ display:none; }
  .sv-bar-marks i{ width:6px; height:6px; border-radius:50%; background:var(--sv-bar-line); }
  .sv-bar-marks i.is-on{ background:var(--sv-main); }
}
@media (max-width:600px) and (max-height:700px){
  .sv-bar{ padding-top:6px; padding-bottom:calc(6px + env(safe-area-inset-bottom, 0px)); }
}

/* the night look (job S6-01): the bar takes the night's card colour (css/buttons.css, --sv-night-*) */
body.dark-mode{ --sv-bar-bg:var(--sv-night-card, #23211f); --sv-bar-line:var(--sv-night-line, #3a3734); }
