/* css/main/body-states-and-spinner.css — part 15/31 of the app styles (was css/main.css; loaded in this order by index.html). */
      /* ⛔ The body of a notice MUST be able to scroll. Without this, a
         four-paragraph message on an iPhone gets cut off and what overflows
         doesn't exist for the user: no bar, no hint. Santi spent a whole afternoon
         unable to read the line that explained why a
         recovery failed, because it was at the end of the text (2026-08-10). It affects
         ALL the long notices in the app, not just that one. */
      /* ⛔ Divided by the frame's zoom, like `.modal` (Santi, final test
         2026-10-30): on the PC frame (×1.7) a plain 52vh box came out taller
         than the sheet itself and pushed the buttons out of view. And the
         wheel CHAINS to the sheet: with `contain`, a message that nearly
         filled the box swallowed the wheel and the buttons could only be
         reached by dragging the scrollbar. The sheet keeps `none`, so the
         page behind still never moves. */
      .modal .confirm-msg {
        max-height: calc(52vh / var(--tl-zoom, 1));   /* browsers without dvh */
        max-height: calc(52dvh / var(--tl-zoom, 1));
        overflow-y: auto;
        overscroll-behavior-y: auto;
      }

      /* Wait spinner. The app had none: long processes showed
         nothing and looked like a hang (recovering the identity takes
         several seconds of derivation). Respects prefers-reduced-motion. */
      .tl-spin {
        width: 30px; height: 30px; border-radius: 50%;
        border: 3px solid var(--border);
        border-top-color: var(--accent);
        animation: tl-spin 0.9s linear infinite;
      }
      @keyframes tl-spin { to { transform: rotate(360deg); } }
      @media (prefers-reduced-motion: reduce) {
        .tl-spin { animation-duration: 3s; }
      }

      /* ── Keyboard open: what isn't the form collapses ─────────────────────
         ⛔ It only kicks in on iOS. The class is set by `_applyAppH`
         (js/app.js) MEASURING how much the keyboard covers; on Android the layout already
         shrinks by itself and that measure gives 0, so none of this applies there.

         The problem: the competition wizard is a column with a shortcut bar to
         catalogs, a step header and the app's button bar. With the
         keyboard taking half the screen, the field you were filling in was left
         with a one-centimeter strip and you had to drag around
         blindly to know which field you were in (iPhone, 2026-08-10).

         What is NOT needed while typing is hidden: the shortcuts to catalogs. ⛔ The wizard's own button bar
         (Back / Next / Save) is NOT touched: hiding it would leave the
         user locked in the form with no way to advance or leave. */
      body.tl-teclado #view-wizard-cv > .filter-bar { display: none; }

      /* Profile lock: with no profile created we hide the header hamburger. Only the My Data screen stays operational
         until the user creates their profile. */
      body.tl-profile-locked #hdrMenuBtn { display: none !important; }
      /* ⛔ 6.3 (Santi, 2026-09-16): a MINOR has no chat, and the option isn't shown.
         The class is set by `_tlSetIdentityFromSelf` (js/app.js). Hiding it is courtesy: the server and
         the database rules close it. */
      body.tl-chat-menor .drawer-item[data-go="chat"] { display: none !important; }
      /* ⛔ FOCUS MODE WHILE A COMPETITION IS BEING CREATED OR EDITED (Santi,
         2026-10-18): every way out that would lose what was typed goes away —
         the side menu, the quick menu, the profile chip and reload.
         The help «?» and the header back arrow stay. Set by `goTo` through
         `tlWizFoco` (js/views/competition-wizard/load-competition-state.js). */
      body.tl-wiz-foco #hdrMenuBtn,
      body.tl-wiz-foco #hdrRapidoBtn,
      body.tl-wiz-foco #hdrPerfil,
      body.tl-wiz-foco #hdrReloadBtn,
      body.tl-wiz-foco #backupBtn { display: none !important; }
      /* And on a phone the title goes up to the buttons' row: with the menu,
         the quick menu and the profile line gone, the two-row header of
         profile-switcher-and-drawer-footer.css only wasted a line. */
      @media (max-width: 599px) {
        /* The sides take what they hold (back arrow, «?») and share the rest
           equally: the title keeps the true centre and gets all the room left.
           ⛔ Not a fixed 96 px a side: it cut «FICHAS D…» (2026-11-16) and
           «EDITAR C…» in the wizard with room to spare (Santi, 2026-11-17). */
        body.tl-wiz-foco header.app-hdr {
          grid-template-areas: "izq tit der";
          grid-template-columns: minmax(min-content, 1fr) minmax(0, max-content) minmax(min-content, 1fr);
        }
      }
      /* ...except BACKUP, which stays reachable on purpose: it is the only way to
         recover a profile after reinstalling or changing device. There its
         notice card is shown with the back button, and what makes
         no sense without a profile is hidden — you can't back up what isn't there,
         nor export an identity that doesn't exist yet. */
      #backupRestoreGate { display: none; }
      body.tl-profile-locked #backupRestoreGate { display: block; }
      body.tl-profile-locked #backupStartBtn,
      body.tl-profile-locked #backupTargetHint,
      body.tl-profile-locked #backupNoneBanner,
      body.tl-profile-locked #idExportBtn { display: none !important; }
      .topbar-hamb:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
        border-radius: 6px;
      }

      /* Respects the system's reduced-motion preference. */
      @media (prefers-reduced-motion: reduce) {
        .drawer,
        .drawer-backdrop,
        .drawer-item {
          transition: none !important;
        }
      }


