/* _fs-app.css: First Steps as a phone app (list.html), 2026-11-11.
   Jesse: "make the first steps optimized for mobile and make it like an app so
   users can interact with it easy - dont change anything in laptop, computer
   and tablet mode", then "implement some jtek design like our website".
   Everything below sits inside max-width:640px and only acts once _fs-app.js
   has put .fsapp on <body>, so laptops and tablets render exactly as before.
   Phones held sideways (short and touch: max-height 500px, coarse pointer)
   get the app too, with the landscape tune-ups further down. No tablet or
   laptop matches that: an iPad sideways is 744px tall or more.
   The one desktop addition is the QR card at the end.
   Design language is jtek.app's own (index.html): beige ground, Newsreader
   serif headings with an italic accent, Inter for UI, the sky hero card with
   its clouds, the glass pill nav, black pill buttons, layered soft shadows. */

@media (max-width:640px), (pointer:coarse) and (max-height:500px){
  body.fsapp{
    --fs-beige:#FCF9F7; --fs-ink:#030302; --fs-ink75:rgba(3,3,2,.75); --fs-ink65:rgba(3,3,2,.65); --fs-ink45:rgba(3,3,2,.45);
    --fs-line:rgba(3,3,2,.09); --fs-sky-a:#9ED4EF; --fs-sky-b:#D1EEF9; --fs-blue:#0057FF; --fs-green:#16A34A;
    --fs-serif:"Newsreader",Georgia,"Times New Roman",serif;
    --fs-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
    --fs-shadow:0 50px 40px rgba(0,0,0,.01),0 20px 40px rgba(0,0,0,.05),0 3px 10px rgba(0,0,0,.04);
    background:var(--fs-beige);
  }
  body.fsapp .container{padding:0 !important;max-width:none}
  body.fsapp .onb-shell{display:block;padding:0;margin:0;gap:0}
  /* the page's .container sits at z-index 999; the app chrome and the status
     bar cap go above it, below the toast (1500) and the modals (2000) */
  body.fsapp .sb-cap{z-index:1190;background:var(--fs-beige)}
  /* Safari colours the area behind the clock from the topmost fixed layer at
     the top edge. The page keeps three empty full-screen layers above the
     status bar strip (confetti, video pop-up, celebration), so Safari found
     nothing to colour with: the list showed behind the clock and the strip
     looked like a loose band. Idle layers now get out of the way. */
  body.fsapp .confetti-container:empty{display:none}
  body.fsapp .video-modal-overlay:not(.open){visibility:hidden;transition:opacity .25s ease,visibility 0s linear .25s}
  body.fsapp .celebrate-overlay:not(.visible){visibility:hidden;transition:opacity .28s ease,visibility 0s linear .28s}
  body.fsapp .onb-mobilenav,
  body.fsapp .onb-sidebar{display:none !important}

  /* ── Home screen ── */
  body.fsapp.fs-home .onb-main{display:none !important}
  body.fsapp.fs-step #fsHome{display:none}
  #fsHome{padding:calc(30px + env(safe-area-inset-top,0px)) 14px calc(36px + env(safe-area-inset-bottom,0px));font-family:var(--fs-sans);color:var(--fs-ink)}

  /* the site's sky card, clouds and all, as a compact strip (Jesse picked
     option 4 of 8, 2026-11-11): title left, setup ring right. Keeps the step
     list high on the first screen. */
  .fs-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:14px;border-radius:28px;padding:24px 18px 24px 22px;margin-bottom:26px;
    background:linear-gradient(180deg,var(--fs-sky-a) 0%,#B9E1F4 55%,var(--fs-sky-b) 100%);box-shadow:var(--fs-shadow)}
  .fs-cloud{position:absolute;pointer-events:none;width:200px;height:auto;opacity:.95}
  .fs-cloud.l{left:-74px;top:-22px}
  .fs-cloud.r{right:-84px;top:36px;width:220px}
  .fs-hero-t{position:relative;min-width:0}
  .fs-eyebrow{position:relative;font-size:13px;line-height:20px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--fs-ink75);margin:0 0 4px}
  .fs-h1{position:relative;font-family:var(--fs-serif);font-weight:400;font-size:40px;line-height:1;letter-spacing:-.03em;margin:0;text-wrap:balance}
  .fs-h1 em{font-style:italic}
  .fs-chip{position:relative;flex:none;padding:8px;border-radius:999px;background:rgba(255,255,255,.78);
    -webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);box-shadow:0 10px 24px -14px rgba(20,60,110,.45)}
  .fs-ring{position:relative;width:48px;height:48px}
  .fs-ring svg{width:48px;height:48px;transform:rotate(-90deg)}
  .fs-ring circle{fill:none;stroke-width:5}
  .fs-ring .tr{stroke:rgba(3,3,2,.08)}
  .fs-ring .fg{stroke:var(--fs-blue);stroke-linecap:round;transition:stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1)}
  .fs-ring span{position:absolute;inset:0;display:grid;place-items:center;font-size:12.5px;font-weight:600;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
  .fs-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

  .fs-grp{margin-bottom:24px}
  .fs-grp-h{display:flex;justify-content:space-between;align-items:baseline;margin:0 8px 10px;font-size:13px;line-height:20px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--fs-ink65)}
  .fs-grp-h span{letter-spacing:0;font-variant-numeric:tabular-nums}
  .fs-list{background:#fff;border-radius:24px;overflow:hidden;box-shadow:var(--fs-shadow);border:1px solid rgba(3,3,2,.04)}
  .fs-row{display:flex;align-items:center;gap:14px;width:100%;min-height:64px;padding:10px 16px;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;position:relative}
  .fs-row+.fs-row::before{content:"";position:absolute;top:0;left:62px;right:0;height:1px;background:var(--fs-line)}
  .fs-row:active{background:rgba(3,3,2,.03)}
  .fs-num{width:32px;height:32px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:13.5px;font-weight:600;color:var(--fs-ink);background:rgba(3,3,2,.05);font-variant-numeric:tabular-nums}
  .fs-row.is-done .fs-num{background:var(--fs-green);color:#fff}
  .fs-row.is-locked .fs-num{color:var(--fs-ink45)}
  .fs-num svg{width:15px;height:15px}
  .fs-row-t{flex:1;min-width:0}
  .fs-row-t b{display:block;font-size:15.5px;font-weight:500;letter-spacing:-.01em;line-height:1.3}
  .fs-row-t small{font-size:13px;color:var(--fs-ink45)}
  .fs-row.is-done .fs-row-t b{color:var(--fs-ink65)}
  .fs-row.is-locked .fs-row-t b{color:var(--fs-ink45)}
  .fs-chev{width:16px;height:16px;flex:none;color:rgba(3,3,2,.25)}

  /* Up next: the one row that matters, so it carries the start action */
  .fs-row.is-next{min-height:80px;background:linear-gradient(180deg,#EEF7FC,#E1F1FA)}
  .fs-row.is-next+.fs-row::before,.fs-row+.fs-row.is-next::before{display:none}
  .fs-row.is-next .fs-num{background:#fff;color:var(--fs-blue);box-shadow:0 2px 8px rgba(0,87,255,.16)}
  .fs-row.is-next .fs-row-t b{font-weight:600;font-size:16px}
  .fs-row.is-next .fs-row-t small{color:var(--fs-blue);font-weight:500}
  .fs-start{width:42px;height:42px;flex:none;border-radius:50%;background:var(--fs-ink);color:#fff;display:grid;place-items:center;box-shadow:0 8px 16px -8px rgba(0,0,0,.55);transition:transform .15s ease}
  .fs-row.is-next:active .fs-start{transform:scale(.94)}
  .fs-start svg{width:18px;height:18px}

  .fs-skip{display:block;width:100%;margin-top:12px;min-height:48px;border:0;border-radius:999px;background:#fff;color:var(--fs-ink);font:inherit;font-size:15px;font-weight:500;cursor:pointer;box-shadow:0 8px 16px -10px rgba(0,0,0,.2),0 1px 2px rgba(0,0,0,.05)}
  .fs-lockinfo{margin:10px 8px 0;font-size:13px;color:var(--fs-ink45);line-height:1.45}
  .fs-foot{margin:4px 8px 0;font-size:13px;line-height:1.5;color:var(--fs-ink45);text-align:center}

  /* ── Step screen ── */
  #fsTop,#fsBar{display:none}
  body.fsapp.fs-step #fsTop{display:flex}
  body.fsapp.fs-step #fsBar{display:flex}
  #fsTop{position:sticky;top:0;z-index:1150;padding:calc(30px + env(safe-area-inset-top,0px)) 14px 12px;
    background:linear-gradient(var(--fs-beige) 70%,rgba(252,249,247,0));font-family:var(--fs-sans);color:var(--fs-ink)}
  .fs-top-in{flex:1;display:flex;align-items:center;gap:8px;height:56px;padding:0 8px;border-radius:999px;position:relative;overflow:hidden;
    background:rgba(255,255,255,.82);-webkit-backdrop-filter:saturate(1.6) blur(16px);backdrop-filter:saturate(1.6) blur(16px);
    box-shadow:0 12px 24px -12px rgba(0,0,0,.18),0 2px 4px -1px rgba(0,0,0,.05)}
  .fs-back{display:flex;align-items:center;gap:2px;height:40px;padding:0 12px 0 6px;border:0;border-radius:999px;background:rgba(3,3,2,.05);color:var(--fs-ink);font:inherit;font-size:15px;font-weight:500;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .fs-back svg{width:20px;height:20px}
  .fs-top-c{flex:1;text-align:center;min-width:0}
  .fs-top-c b{display:block;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
  .fs-top-c small{display:block;font-size:12.5px;color:var(--fs-ink65);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .fs-top-r{width:78px;display:flex;justify-content:flex-end;padding-right:4px}
  .fs-mini{position:relative;width:40px;height:40px;display:grid;place-items:center}
  .fs-mini svg{position:absolute;inset:0;width:40px;height:40px;transform:rotate(-90deg)}
  .fs-mini circle{fill:none;stroke-width:3.5}
  .fs-mini .tr{stroke:rgba(3,3,2,.08)}
  .fs-mini .fg{stroke:var(--fs-blue);stroke-linecap:round;transition:stroke-dashoffset .5s cubic-bezier(.2,.8,.2,1)}
  .fs-mini b{position:relative;font-size:11px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}

  body.fsapp.fs-step .onb-main{display:block;padding:0 0 calc(104px + env(safe-area-inset-bottom,0px))}
  body.fsapp.fs-step .onb-main .step.is-current{margin:4px 14px 0;border-radius:28px;box-shadow:var(--fs-shadow);border:1px solid rgba(3,3,2,.04)}
  body.fsapp.fs-step .onb-main .step.is-current .step-header{padding:24px 20px 8px}
  body.fsapp.fs-step .onb-main .step.is-current .step-title{font-family:var(--fs-serif);font-weight:400;font-size:32px;line-height:1.05;letter-spacing:-.025em}
  body.fsapp.fs-step .onb-main .step.is-current .step-body-inner{padding:6px 20px 24px}
  /* Video poster. At 16:9 a phone card is ~170px tall, too short for the
     label, a two-line title and a 68px play button, so flex squeezed the
     button into an oval (68x26). Taller card, the site's round white play
     button that never shrinks, tighter type. */
  body.fsapp.fs-step .onb-main .step.is-current .step-video-wrap{aspect-ratio:4/3;border-radius:22px}
  body.fsapp.fs-step .step-video-poster{padding:22px 20px;gap:12px}
  body.fsapp.fs-step .step-video-poster-eyebrow{font-family:var(--fs-sans);font-size:11.5px;font-weight:600;letter-spacing:.14em}
  body.fsapp.fs-step .step-video-poster-title{font-family:var(--fs-serif);font-weight:400;font-size:28px;line-height:1.08;letter-spacing:-.02em;max-width:16ch}
  body.fsapp.fs-step .step-video-play{flex:none;width:60px;height:60px;background:#fff;color:var(--fs-ink);box-shadow:0 12px 28px -10px rgba(0,0,0,.6),0 0 0 8px rgba(255,255,255,.12)}
  body.fsapp.fs-step .step-video-play svg{width:22px;height:22px;margin-left:3px}

  /* video steps hide their title (the poster carries it), but the empty
     header kept 32px of padding, an empty band above the video */
  body.fsapp.fs-step .onb-main .step.is-current.has-video .step-header{padding:0;min-height:0;height:0;overflow:hidden}
  body.fsapp.fs-step .onb-main .step.is-current.has-video .step-body-inner{padding-top:16px}

  /* Video pop-up: the close button sat on the player's own volume control in
     the top-right corner. On phones it sits just above the video instead. */
  body.fsapp .video-modal{overflow:visible;background:transparent;box-shadow:none}
  body.fsapp .video-modal video{border-radius:18px;box-shadow:0 32px 80px rgba(0,0,0,.5)}
  body.fsapp .video-modal-close{top:-56px;right:0;width:44px;height:44px;background:rgba(255,255,255,.94);color:#030302;border:0;box-shadow:0 8px 20px -8px rgba(0,0,0,.5)}

  /* the bottom bar carries the action; the in-card button would repeat it */
  body.fsapp.fs-step .onb-main .step.is-current .btn-complete{display:none !important}
  body.fsapp.fs-step .onb-main.fs-anim-l .step.is-current{animation:fsInL .28s cubic-bezier(.2,.8,.2,1)}
  body.fsapp.fs-step .onb-main.fs-anim-r .step.is-current{animation:fsInR .28s cubic-bezier(.2,.8,.2,1)}
  @keyframes fsInL{from{opacity:.2;transform:translateX(36px)}to{opacity:1;transform:none}}
  @keyframes fsInR{from{opacity:.2;transform:translateX(-36px)}to{opacity:1;transform:none}}

  /* a floating glass pill, like the site nav, holding a black pill button */
  #fsBar{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:1200;align-items:center;gap:8px;padding:8px;border-radius:999px;
    background:rgba(255,255,255,.84);-webkit-backdrop-filter:saturate(1.6) blur(16px);backdrop-filter:saturate(1.6) blur(16px);
    box-shadow:0 16px 32px -14px rgba(0,0,0,.28),0 2px 4px -1px rgba(0,0,0,.06);font-family:var(--fs-sans)}
  #fsBar{transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .2s ease}
  body.fsapp.fs-bar-off #fsBar{transform:translateY(calc(100% + 28px));opacity:0;pointer-events:none}
  .fs-nav{width:48px;height:48px;flex:none;border-radius:50%;border:0;background:rgba(3,3,2,.05);color:var(--fs-ink);display:grid;place-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .fs-nav:disabled{opacity:.3}
  .fs-nav svg{width:20px;height:20px}
  .fs-done{flex:1;height:48px;border:0;border-radius:999px;background:var(--fs-ink);color:#fff;font:inherit;font-size:16px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .15s ease,background-color .2s ease}
  .fs-done:active,.fs-nav:active{transform:scale(.97)}
  .fs-done svg{width:17px;height:17px}
  .fs-done.is-locked{background:rgba(3,3,2,.06);color:var(--fs-ink65)}
  /* done state says how to undo, so a stray tap is not a surprise */
  .fs-done.is-done{background:#E7F7EC;color:#15803D;flex-direction:column;gap:0;line-height:1.15}
  .fs-done-l{display:flex;align-items:center;gap:7px;font-weight:600}
  .fs-done small{font-size:11.5px;font-weight:500;opacity:.75}
  .fs-done:focus-visible,.fs-nav:focus-visible,.fs-row:focus-visible,.fs-back:focus-visible,.fs-skip:focus-visible{outline:3px solid rgba(0,87,255,.45);outline-offset:2px}
  .fs-h1:focus,.onb-main .step-title:focus{outline:none}

  /* The "First Steps complete" card was taller than short screens and the
     overlay could not scroll, so its buttons sat out of reach. It scrolls now,
     and the card still centres when it fits. */
  body.fsapp .celebrate-overlay{overflow-y:auto;-webkit-overflow-scrolling:touch;align-items:flex-start;padding:16px 14px}
  body.fsapp .celebrate-card{margin:auto}

  /* the page's "1 down, 7 to go" toast: above the bar, never catching taps */
  body.fsapp .step-toast{pointer-events:none}
  body.fsapp.fs-step .step-toast{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
  body.fsapp.fs-step .step-toast:not(.visible){transform:translateX(-50%) translateY(200px)}

  @media (prefers-reduced-motion:reduce){
    .fs-ring .fg,.fs-mini .fg{transition:none}
    body.fsapp.fs-step .onb-main .step.is-current{animation:none !important}
    #fsBar{transition:none}
  }
}

/* ── Phone held sideways: a centered column, a two-column hero, slimmer
   bars, and a video that fits the short screen. ── */
@media (pointer:coarse) and (max-height:500px) and (orientation:landscape){
  /* iOS Safari inflates small text when a phone turns sideways ("Up next"
     came out bigger than the step name). The app sets its own sizes. */
  html,body.fsapp{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  /* iOS hides the status bar sideways, so its tint strip would only cover the top bar */
  body.fsapp .sb-cap{display:none}
  #fsHome{max-width:720px;margin:0 auto;padding:14px 18px 28px}
  .fs-hero{padding:20px 20px 20px 26px;margin-bottom:22px}
  .fs-h1{font-size:38px}
  .fs-row.is-next{min-height:72px}

  #fsTop{justify-content:center;padding:10px 18px 8px}
  .fs-top-in{max-width:684px;height:48px;padding:0 6px}
  .fs-back{height:36px}
  body.fsapp.fs-step .onb-main{padding-bottom:78px}
  body.fsapp.fs-step .onb-main .step.is-current{width:calc(100% - 36px);max-width:684px;margin:2px auto 0}
  body.fsapp.fs-step .onb-main .step.is-current .step-header{padding:20px 22px 6px}
  body.fsapp.fs-step .onb-main .step.is-current .step-title{font-size:30px}
  body.fsapp.fs-step .onb-main .step.is-current .step-body-inner{padding:6px 22px 22px}
  /* Sideways the screen can be ~290pt tall while Safari shows its address
     bar and tabs, so a tall video card hid its play button behind the
     bottom bar. Here it is a compact row: play button left, title beside. */
  body.fsapp.fs-step .onb-main .step.is-current .step-video-wrap{aspect-ratio:auto;height:112px;border-radius:20px}
  body.fsapp.fs-step .step-video-poster{display:grid;grid-template-columns:auto minmax(0,1fr);align-content:center;justify-items:start;text-align:left;column-gap:18px;row-gap:4px;padding:16px 22px}
  body.fsapp.fs-step .step-video-play{grid-column:1;grid-row:1 / span 2;width:56px;height:56px}
  body.fsapp.fs-step .step-video-poster-eyebrow{grid-column:2;grid-row:1}
  body.fsapp.fs-step .step-video-poster-title{grid-column:2;grid-row:2;font-size:24px;max-width:none}

  #fsBar{left:12px;right:12px;max-width:520px;margin:0 auto;bottom:10px;padding:6px}
  .fs-nav{width:44px;height:44px}
  .fs-done{height:44px}
  /* sideways the note would sit on the video's play button: it drops in at
     the top instead, over the top bar for its two seconds */
  body.fsapp.fs-step .step-toast{top:12px;bottom:auto}
  body.fsapp.fs-step .step-toast:not(.visible){transform:translateX(-50%) translateY(-120px)}

  /* "First Steps complete" sideways: a compact card, stats in one row */
  body.fsapp .celebrate-card{width:min(640px,calc(100vw - 48px));padding:20px 28px 14px}
  body.fsapp .celebrate-trophy{width:44px;height:44px;border-radius:14px;margin-bottom:10px}
  body.fsapp .celebrate-trophy svg{width:26px;height:26px}
  body.fsapp .celebrate-eyebrow{margin-bottom:8px}
  body.fsapp .celebrate-title{font-size:24px;margin-bottom:8px}
  body.fsapp .celebrate-desc{font-size:13.5px;line-height:1.5;margin-bottom:12px;max-width:560px}
  body.fsapp .celebrate-stats{flex-direction:row;flex-wrap:nowrap;margin-bottom:14px}
  body.fsapp .celebrate-secondary{padding:6px 14px}

  /* the pop-up video: sized by the short side, close button beside it */
  body.fsapp .video-modal{max-width:min(calc(100vw - 132px),calc(84vh * 16 / 9));max-width:min(calc(100vw - 132px),calc(84svh * 16 / 9))}
  body.fsapp .video-modal-close{top:0;right:-56px}
  /* Safari fills the side bands beside the Dynamic Island with the page
     colour, so they stayed beige around the dark video backdrop */
  html:has(body.fsapp .video-modal-overlay.open),
  body.fsapp:has(.video-modal-overlay.open){background:#383736}
}

/* The app's own pieces exist only while the phone view runs. A laptop window
   narrowed under 640px builds them; widened again they must not linger. */
body:not(.fsapp) #fsHome,body:not(.fsapp) #fsTop,body:not(.fsapp) #fsBar{display:none !important}

/* ── Laptop and desktop: "Follow along on your phone" QR card under the
   sidebar steps. Shown only when the page knows the account (locationId), so
   the code always opens that user's own checklist. ── */
.fs-qr{display:none}
@media (min-width:960px){
  .fs-qr{display:flex;align-items:center;gap:12px;margin:14px 6px 2px;padding:12px;border-radius:16px;background:rgba(255,255,255,.72);border:1px solid rgba(20,30,20,.06)}
  .fs-qr-code{width:84px;height:84px;flex:none;border-radius:10px;background:#fff;padding:5px;box-shadow:0 1px 2px rgba(20,30,20,.06)}
  .fs-qr-code svg{display:block;width:100%;height:100%}
  .fs-qr-t b{display:block;font-size:13px;font-weight:700;color:#141613;letter-spacing:-.01em;margin-bottom:3px}
  .fs-qr-t span{display:block;font-size:11.5px;line-height:1.4;color:#5B6157}
}

/* Bottom bar: docked toolbar (Jesse picked option 2 of 8, 2026-11-11). Full
   width, flush on the line where Safari's own toolbar starts, so the beige runs
   straight into Safari's controls. Sideways, the buttons stay centered. */
@media (max-width:640px), (pointer:coarse) and (max-height:500px){
  body.fsapp #fsBar{left:0;right:0;bottom:0;max-width:none;margin:0;border-radius:0;padding:8px 14px calc(8px + env(safe-area-inset-bottom,0px));gap:10px;
    background:rgba(252,249,247,.92);box-shadow:0 -1px 0 rgba(3,3,2,.08)}
  body.fsapp #fsBar .fs-nav{background:transparent;width:44px;height:44px}
  body.fsapp #fsBar .fs-done{height:46px}
}
@media (pointer:coarse) and (max-height:500px) and (orientation:landscape){
  body.fsapp #fsBar{padding:6px max(18px,calc((100vw - 560px) / 2))}
  body.fsapp #fsBar .fs-done{height:42px}
}
