/* The phone pass, shared parts (owner, 25 Nov; docs/DESIGN_TWEAKS_2026-11-25.md "Mobile pass").
   Phone = max-width 700px (the play screen's existing phone breakpoint). Nothing here touches the desktop.
   Shared pieces every page can use:
     .wfm-bar     a bar pinned to the bottom of the screen for the page's main button(s)
     WFM.sheet()  a bottom sheet (wf-mobile.js)
     --wfm-title  the size of a page title on a phone */
@media (max-width: 700px) {
  :root { --wfm-title: clamp(25px, 7.2vw, 30px); --wfm-bar-h: 76px; }

  /* page titles: one or two lines, never four */
  .wf-h1, .wf-h2.wf-picker-title, .forge-title, .wf-forge-title, .wf-forge-title--sm, .dials-title, .build-title, .wf-rv-title, .wf-auth-h1 {
    font-size: var(--wfm-title) !important; line-height: 1.08 !important; letter-spacing: 0.01em !important; }

  /* the breadcrumb trail folds to "<  previous page" and the page you are on */
  .wfu-crumbs { gap: 0; margin: 0 0 12px; font-size: 11px; }
  .wfu-crumbs li:not(:nth-last-child(-n+2)) { display: none; }
  .wfu-crumbs li:nth-last-child(2)::after { content: ""; margin: 0 8px; }
  .wfu-crumbs li:nth-last-child(2) a::before { content: "\2039"; margin-right: 8px; font-size: 18px; line-height: 1; color: var(--acc); }
  .wfu-crumbs li:nth-last-child(2) { padding-right: 6px; }
  .wfu-crumbs li:nth-last-child(2)::after { content: "\00b7"; color: var(--ink-dim); }
  .wfu-crumbs a { padding: 10px 2px; }

  /* the language switch lives in Settings and the play menu; only the signed-out pages keep it, as a small pill at the top */
  .wf-lang { display: none !important; }
  body:has(.wf-auth) .wf-lang { display: flex !important; left: auto; right: 12px; top: 12px; bottom: auto; }

  /* a bar pinned to the bottom of the screen for the page's main action(s) */
  .wfm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; align-items: center;
    padding: 22px 14px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, #08080c 58%, rgba(8, 8, 12, 0)); }
  .wfm-bar > * { flex: 1; min-height: 48px; }
  .wfm-bar .wf-btn { justify-content: center; }
  .wfm-pad { padding-bottom: calc(var(--wfm-bar-h) + 18px) !important; }

  /* every control is a finger-sized target */
  .wf-btn, button, .wf-pill, select { min-height: 40px; }
  input[type="text"], input[type="password"], input[type="email"], input:not([type]), textarea, select { font-size: 16px; }  /* 16px: iOS does not zoom the page when a field gets focus */


  /* the forge pages' header stays on ONE line: Home, (brand hidden), The Tavern, avatar */
  .wf-forge-head { flex-wrap: nowrap !important; gap: 8px !important; padding: 12px 14px !important; }
  .wf-forge-head .wf-brand { display: none !important; }
  .wf-forge-head .wf-spacer { flex: 1; }
  .wf-forge-head .wf-btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; min-height: 38px; }
  /* on the play screen a tap leaves a hover tooltip stuck over the header; the other pages keep their tap-for-help tips */
  body:has(.wf-play) .wf-tip { display: none !important; }

  /* bottom sheet (WFM.sheet) */
  .wfm-sheet-dim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.62); animation: wfm-fade 180ms ease both; }
  .wfm-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; display: flex; flex-direction: column; max-height: var(--wfm-sheet-h, 72vh);
    background: #0e0e14; border-top: 1px solid var(--bd-ctl, rgba(255, 255, 255, 0.22)); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7);
    padding: 0 16px calc(16px + env(safe-area-inset-bottom)); transform: translateY(0); animation: wfm-rise 240ms cubic-bezier(.2, .8, .2, 1) both; }
  .wfm-sheet.is-drag { animation: none; transition: none; }
  .wfm-grab { flex: none; padding: 10px 0 12px; cursor: grab; touch-action: none; }
  .wfm-grab::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 9px; background: #3a3a48; margin: 0 auto; }
  .wfm-sheet-head { flex: none; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; touch-action: none; }
  .wfm-sheet-title { flex: 1; font-family: var(--fm); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--acc); }
  .wfm-sheet-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--bd-ctl, rgba(255, 255, 255, 0.22)); background: none; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
  .wfm-sheet-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  .wfm-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 14px; margin: 0 0 8px; text-align: left; text-decoration: none; color: var(--ink-2);
    border: 1px solid var(--bd, rgba(255, 255, 255, 0.12)); border-radius: 14px; background: rgba(255, 255, 255, 0.035); font-size: 15px; }
  .wfm-row:active, .wfm-row:hover { color: var(--ink); border-color: var(--bd-ctl, rgba(255, 255, 255, 0.22)); }
  @keyframes wfm-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
  @keyframes wfm-fade { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .wfm-sheet, .wfm-sheet-dim { animation: none; } }
