/* ===========================================================================
   viewmode — the two presentations.

   PHONE mode puts the app inside an honest device frame so an audience sees it
   at the size a customer sees it. DESKTOP mode simply removes the 430px ceiling
   and lets the same markup breathe: wider column, larger type, the bottom tab
   bar becoming a side rail where one exists.

   Nothing here restyles an app's identity. Vouch stays cream-and-orange, Atrium
   stays green-and-brass, Luzzu stays navy-and-coral — this only changes the
   shape of the box they sit in.
   ========================================================================= */

/* ---------- the control ---------- */
#vmToggle{
  position:fixed;right:18px;top:18px;z-index:9999;
  display:flex;align-items:center;gap:8px;
  padding:9px 14px 9px 11px;border-radius:999px;
  font:600 13px/1 -apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.01em;
  background:rgba(20,20,24,.82);color:#fff;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 6px 20px -6px rgba(0,0,0,.45);
  backdrop-filter:blur(10px);cursor:pointer;
  transition:transform .18s cubic-bezier(.2,1.2,.35,1),background .2s;
}
#vmToggle:hover{transform:translateY(-1px);background:rgba(20,20,24,.92)}
#vmToggle:active{transform:scale(.96)}
#vmToggle .vm-ic{width:16px;height:16px;flex:none}
#vmToggle .vm-d{display:none}
#vmToggle[aria-pressed="true"] .vm-p{display:none}
#vmToggle[aria-pressed="true"] .vm-d{display:block}
@media print{#vmToggle{display:none}}

/* ---------- PHONE: the app in a device, on a stage ---------- */
@media (min-width:900px){
  body.vm-phone{
    min-height:100vh;
    display:grid;place-items:center;
    background:
      radial-gradient(900px 600px at 50% -10%, rgba(255,255,255,.06), transparent 60%),
      linear-gradient(160deg,#20222b,#121319);
    padding:34px 0;
  }
  body.vm-phone > .app,
  body.vm-phone > .deck{
    width:412px;max-width:412px;
    height:880px;max-height:88vh;
    overflow-y:auto;overflow-x:hidden;
    border-radius:44px;
    box-shadow:
      0 0 0 11px #1b1d24,
      0 0 0 13px #34373f,
      0 40px 90px -30px rgba(0,0,0,.85);
    position:relative;
    scrollbar-width:none;
  }
  body.vm-phone > .app::-webkit-scrollbar{display:none}
  /* a fixed action bar must sit inside the device, not the viewport */
  body.vm-phone .bar,
  body.vm-phone .tabbar,
  body.vm-phone .composer{position:absolute}
}

/* ---------- DESKTOP: the same app, no longer pretending to be 430px ---------- */
body.vm-desktop > .app{
  max-width:min(1180px,94vw)!important;
  padding-left:clamp(24px,4vw,64px);
  padding-right:clamp(24px,4vw,64px);
}
@media (min-width:900px){
  body.vm-desktop{font-size:17px}

  /* content that was a single narrow column becomes two, where it makes sense */
  body.vm-desktop .synd,
  body.vm-desktop .svcs,
  body.vm-desktop .rperks{max-width:640px}

  body.vm-desktop .slots{grid-template-columns:repeat(6,1fr)}
  body.vm-desktop .days{gap:12px}

  /* the action bar stops being a thumb-reach strip and becomes a real button */
  body.vm-desktop .bar{
    position:static;background:none;padding:26px 0 60px;max-width:420px;
  }
  body.vm-desktop .go,
  body.vm-desktop .cta{max-width:420px}

  /* a bottom tab bar becomes a side rail on a wide screen */
  body.vm-desktop .tabbar{
    position:fixed;left:0;top:0;bottom:0;right:auto;
    width:96px;height:100vh;
    grid-template-columns:1fr!important;
    grid-auto-rows:max-content;align-content:center;gap:6px;
    border-top:0;border-right:1px solid var(--a-line,rgba(255,255,255,.14));
  }
  body.vm-desktop .app{margin-left:96px}
  body.vm-desktop .appbar{padding-left:26px}
  body.vm-desktop .composer{left:96px}

  /* headline type earns more room on a big screen */
  body.vm-desktop .ask{font-size:clamp(48px,4.6vw,68px)}
  body.vm-desktop .display{font-size:clamp(42px,3.6vw,54px)}
  body.vm-desktop h2{letter-spacing:-.03em}
}

/* ---------- desktop refinement: composed, not just wider ---------- */
@media (min-width:900px){
  body.vm-desktop{display:flex;justify-content:center;min-height:100vh}
  body.vm-desktop > .app{
    width:min(1080px,92vw);
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:0 clamp(40px,5vw,80px);
    align-content:start;
    padding-top:clamp(28px,4vh,56px);
  }
  /* the app's own screens keep their internal flow; only the shell splits */
  body.vm-desktop > .app > *{grid-column:1/-1}

  /* a step-based app reads better as two columns: the ask, then the controls */
  body.vm-desktop .scr.on{
    display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    gap:clamp(32px,4vw,72px);align-items:start;
    padding-bottom:60px;min-height:0;
  }
  body.vm-desktop .scr.on > .top,
  body.vm-desktop .scr.on > .cover{grid-column:1/-1}
  body.vm-desktop .ask,
  body.vm-desktop .hd,
  body.vm-desktop .display,
  body.vm-desktop .lede,
  body.vm-desktop .eyebrow,
  body.vm-desktop .note{grid-column:1}
  body.vm-desktop .stars,
  body.vm-desktop .whereto,
  body.vm-desktop .synd,
  body.vm-desktop .consent,
  body.vm-desktop .tags,
  body.vm-desktop textarea,
  body.vm-desktop .count,
  body.vm-desktop .svcs,
  body.vm-desktop .days,
  body.vm-desktop .slots,
  body.vm-desktop .summary,
  body.vm-desktop .f,
  body.vm-desktop .fine{grid-column:2;margin-top:0}
  body.vm-desktop .stars{margin-top:6px}
  body.vm-desktop .bar{grid-column:2;justify-self:start;width:100%}
  body.vm-desktop .done,
  body.vm-desktop .fin{grid-column:1/-1;max-width:620px;margin:0 auto;text-align:center}
}
