/* V3 round 2, lane I (Nov 1): the phone takeover. The document ends at #glazePhone; everything after
   What Happens Next lives in its screens (v4/r2/lane-i.js moves the existing nodes in, untouched).
   Variants: html[data-v-lziphone] a Bottom half, b Full height, c Frameless (wide screens; phones are always full screen).
   The phone is never taller than the space under the nav: 100dvh (100vh fallback) minus --lzi-top, minus a fixed
   order bar (--lzi-bottom) when one is showing. html.glz-static / reduced motion: no transitions. */
.lzi-stage { --lzi-top: 70px; --lzi-bottom: 0px; --lzi-ink: #2D1928; --lzi-bezel: #24141C;
  --lzi-bleed-l: 0px; --lzi-bleed-r: 0px;
  position: relative; box-sizing: border-box; overflow: hidden;
  width: calc(100% + var(--lzi-bleed-l) + var(--lzi-bleed-r)); max-width: none; margin: 0 calc(-1 * var(--lzi-bleed-r)) 0 calc(-1 * var(--lzi-bleed-l));
  height: calc(100vh - var(--lzi-top)); height: calc(100dvh - var(--lzi-top));
  padding: 14px 20px calc(14px + var(--lzi-bottom));
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: clamp(1.5rem, 4vw, 4rem);
  background: radial-gradient(120% 90% at 50% 100%, #F6E7CF 0%, var(--cream, #FDF8F0) 62%); color: var(--lzi-ink); }
.lzi-stage > .glzv { position: absolute; top: 10px; right: 12px; z-index: 3; }

/* side note (wide screens) */
.lzi-side { grid-column: 1; justify-self: end; max-width: 19rem; text-align: right; }
.lzi-kicker { margin: 0 0 .4rem; font: 700 .72rem/1 'DM Sans', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--plum, #4A1942); opacity: .8; }
.lzi-side-title { margin: 0 0 .6rem; font: 400 clamp(1.6rem, 2.4vw, 2.3rem)/1.05 'Glaze Display', Georgia, serif; color: var(--lzi-ink); }
.lzi-side-line { margin: 0 0 1.1rem; font: 500 .95rem/1.45 'DM Sans', system-ui, sans-serif; color: var(--text-muted, #6B5563); }
.lzi-back { font: 700 .9rem/1 'DM Sans', system-ui, sans-serif; cursor: pointer; }
.lzi-back-side { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0 1.15rem; border: 1.5px solid var(--lzi-ink); border-radius: 999px; background: transparent; color: var(--lzi-ink); transition: transform .2s; }
.lzi-back-side:hover { background: var(--lzi-ink); color: var(--cream, #FDF8F0); }
.lzi-back-side:active { transform: translateY(1px); }

/* the device */
.lzi-phone { grid-column: 2; box-sizing: border-box; height: 100%; max-height: 100%; min-height: 0;
  width: clamp(300px, calc((100dvh - var(--lzi-top) - var(--lzi-bottom) - 28px) * .52), 430px); }
.lzi-bezel { box-sizing: border-box; height: 100%; padding: 10px; border-radius: 48px; background: linear-gradient(150deg, #3D2632, var(--lzi-bezel) 55%, #120A0E);
  box-shadow: 0 0 0 1.5px #0C0609, inset 0 0 0 1.5px rgba(255,255,255,.08), 0 34px 60px -30px rgba(45,25,40,.6), 0 12px 24px -16px rgba(45,25,40,.4); }
.lzi-screen { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 38px; background: var(--cream, #FDF8F0); isolation: isolate; }
.lzi-status { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 24px 0 28px; font: 700 .8rem/1 'DM Sans', system-ui, sans-serif; color: var(--lzi-ink); }
.lzi-island { width: 88px; height: 24px; border-radius: 14px; background: #0C0609; }
.lzi-bars { display: flex; gap: 3px; align-items: flex-end; }
.lzi-bars i { display: block; width: 4px; border-radius: 1px; background: var(--lzi-ink); }
.lzi-bars i:nth-child(1) { height: 6px; } .lzi-bars i:nth-child(2) { height: 9px; } .lzi-bars i:nth-child(3) { height: 12px; }
.lzi-appbar { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .75rem .35rem; border-bottom: 1px solid var(--linen, #EFE3D3); }
.lzi-back-app { justify-self: start; display: inline-flex; align-items: center; gap: .2rem; min-height: 36px; padding: 0 .55rem 0 .3rem; border: 0; border-radius: 999px; background: rgba(45,25,40,.06); color: var(--plum, #4A1942); font-size: .82rem; }
.lzi-back-app:hover { background: rgba(45,25,40,.12); }
.lzi-apptitle { font: 700 .92rem/1.1 'DM Sans', system-ui, sans-serif; color: var(--lzi-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lzi-appbar img { justify-self: end; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px var(--cream, #FDF8F0), 0 0 0 3.5px var(--honey-gold, #D4A843); }

/* screens: a horizontal snap track of panels; each panel is its own vertical scroller */
.lzi-track { flex: 1 1 auto; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: auto; }
.lzi-track::-webkit-scrollbar { display: none; }
.lzi-panel { flex: 0 0 100%; width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; overscroll-behavior: auto contain; scroll-snap-align: start; scroll-snap-stop: always;
  -webkit-overflow-scrolling: touch; container-type: inline-size; outline: none; scrollbar-width: thin; padding-bottom: 1.25rem; }
html.lzi-docked .lzi-panel { overflow: hidden auto; }
.lzi-panel:focus-visible { box-shadow: inset 0 0 0 3px var(--honey-gold, #D4A843); }

/* tab bar */
.lzi-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: .3rem .4rem calc(.45rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--linen, #EFE3D3); background: rgba(253,248,240,.96); }
.lzi-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 50px; padding: .2rem 0; border: 0; border-radius: 14px; background: none;
  color: rgba(45,25,40,.55); font: 700 .66rem/1 'DM Sans', system-ui, sans-serif; letter-spacing: .01em; cursor: pointer; }
.lzi-tab svg { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.lzi-tab:hover { color: var(--lzi-ink); }
.lzi-tab:active svg { transform: scale(.9); }
.lzi-tab[aria-selected="true"] { color: var(--plum, #4A1942); background: rgba(212,168,67,.18); }
.lzi-tab[aria-selected="true"] svg { transform: translateY(-1px); }
.lzi-tab:focus-visible { outline: 2px solid var(--plum, #4A1942); outline-offset: -2px; }

/* the arrival: the phone rises in once (0.85 s, ease-out) */
html:not(.glz-static) .lzi-stage.lzi-pre .lzi-phone, html:not(.glz-static) .lzi-stage.lzi-pre .lzi-side { transition: opacity .85s ease-out, transform .85s cubic-bezier(.22,1,.36,1); }
html:not(.glz-static) .lzi-stage.lzi-pre:not(.lzi-in) .lzi-phone { opacity: 0; transform: translate3d(0, 48px, 0) scale(.94); }
html:not(.glz-static) .lzi-stage.lzi-pre:not(.lzi-in) .lzi-side { opacity: 0; transform: translate3d(0, 24px, 0); }
html:not(.glz-static) .lzi-tab[aria-selected="true"]::after { animation: lzi-dot .35s ease-out; }
.lzi-tab[aria-selected="true"]::after { content: ""; position: absolute; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--honey-gold, #D4A843); }
@keyframes lzi-dot { from { transform: scale(0); } to { transform: scale(1); } }

/* variants on wide screens */
@media (min-width: 700px) {
  html[data-v-lziphone="a"] .lzi-stage, html:not([data-v-lziphone]) .lzi-stage { height: max(min(56vh, 100vh - var(--lzi-top)), min(520px, 100vh - var(--lzi-top))); height: max(min(56dvh, 100dvh - var(--lzi-top)), min(520px, 100dvh - var(--lzi-top))); }
  html[data-v-lziphone="a"] .lzi-phone, html:not([data-v-lziphone]) .lzi-phone { width: clamp(320px, calc(max(56dvh, 520px) * .68), 430px); }
  html[data-v-lziphone="c"] .lzi-phone { width: min(520px, calc(100vw - 3rem)); }
  html[data-v-lziphone="c"] .lzi-bezel { padding: 0; border-radius: 28px; background: none; box-shadow: 0 30px 60px -28px rgba(45,25,40,.5), 0 0 0 1px rgba(45,25,40,.1); }
  html[data-v-lziphone="c"] .lzi-screen { border-radius: 28px; }
  html[data-v-lziphone="c"] .lzi-status { display: none; }
  html[data-v-lziphone="c"] .lzi-appbar { padding-top: .45rem; }
}
@media (min-width: 700px) and (max-width: 1023.98px) {
  .lzi-stage { grid-template-columns: minmax(0, 1fr) auto; }
  .lzi-side { grid-column: 1; }
  .lzi-phone { grid-column: 2; }
}
/* phones: the phone IS the screen */
@media (max-width: 699.98px) {
  .lzi-stage { display: block; padding: 0 0 var(--lzi-bottom); background: var(--cream, #FDF8F0); }
  .lzi-side { display: none; }
  .lzi-phone { width: 100%; height: 100%; }
  .lzi-bezel { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .lzi-screen { border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -18px rgba(45,25,40,.35); }
  .lzi-status { display: none; }
  .lzi-appbar { padding-top: .4rem; }
}

/* ---------- the moved sections, sized for a phone screen ---------- */
.lzi-panel > * { box-sizing: border-box; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
.lzi-panel > .ld-chapter { display: none !important; }
.lzi-panel .hfx-ch { opacity: 1 !important; transform: none !important; }
.lzi-panel .hfx-ch h2 { clip-path: none !important; }
.lzi-panel [data-reveal], .lzi-panel .reveal, .lzi-panel .rv { opacity: 1 !important; transform: none !important; visibility: visible !important; }
.lzi-panel [data-parallax] { transform: none !important; }
.lzi-panel section, .lzi-panel footer { min-height: 0 !important; }
.lzi-panel h2 { font-size: clamp(1.55rem, 8.5cqi, 2.2rem) !important; line-height: 1.05 !important; }
.lzi-panel .tail-eyebrow, .lzi-panel .kitchen-band .tail-eyebrow { font-size: .7rem !important; letter-spacing: .14em !important; }
.lzi-panel h3 { font-size: clamp(1.1rem, 6cqi, 1.45rem) !important; }
.lzi-panel .tail-heading, .lzi-panel .section-inner, .lzi-panel .glz-story-copy { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.lzi-panel > section, .lzi-panel > footer { padding: 1.4rem 1rem 1.6rem !important; width: 100% !important; }
/* story + gallery */
.lzi-panel .glz-story { display: flex !important; flex-direction: column; gap: 1rem; text-align: left; }
.lzi-panel .glz-story-media { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
.lzi-panel .glaze-gallery-row { margin-inline: -1rem !important; padding-inline: 1rem !important; }
.lzi-panel .glaze-gallery-row li { flex-basis: 72cqi !important; }
/* Through Their Eyes: lane F's phone frame flattens into this screen (same rail, same items, same order) */
.lzi-panel .tte-phone { width: 100% !important; margin: .4rem 0 .8rem !important; transform: none !important; }
.lzi-panel .tte-bezel { padding: 0; border-radius: 22px; background: none; box-shadow: 0 0 0 1px rgba(45,25,40,.12); }
.lzi-panel .tte-screen { border-radius: 22px; }
.lzi-panel .tte-status, .lzi-panel .tte-dock::after { display: none; }
.lzi-panel #kitchen.tte-framed { display: block !important; text-align: center; }
html[data-v-tte-frame="b"] .lzi-panel .tte-framed .tte-rail-slot .creator-filmstrip li { flex-basis: 74% !important; }
/* pickup band + Quick Answers (lane D's frame is off while the phone is on) */
.lzi-panel .kitchen-band { border-radius: 18px; overflow: hidden; margin: .75rem !important; width: auto !important; max-width: calc(100% - 1.5rem) !important; }
.lzi-panel .kitchen-band-copy { padding: 1.2rem 1rem !important; max-width: none !important; }
.lzi-panel #faq .ld-phone-bar, .lzi-panel .ld-phone-home { display: none !important; }
.lzi-panel #faq > .glzv[aria-label="Preview variants: Quick Answers"] { display: none !important; }
.lzi-panel .faq-question { padding: 1rem .25rem !important; font-size: 1rem !important; }
.lzi-panel .faq-answer-inner { padding: 0 .25rem 1rem !important; font-size: .92rem !important; }
/* weekly club */
.lzi-panel .weekly-discovery { display: flex !important; flex-direction: column; gap: 1rem; text-align: left; overflow: hidden; }
.lzi-panel .weekly-discovery > * { grid-column: auto !important; grid-row: auto !important; max-width: 100% !important; }
.lzi-panel .weekly-box-object { width: 100% !important; height: 15rem !important; }
.lzi-panel .weekly-price { font-size: 1.6rem !important; }
/* footer */
.lzi-panel .glaze-footer { display: flex !important; flex-direction: column; gap: 1.2rem; }
.lzi-panel .glaze-footer > * { grid-column: auto !important; }
.lzi-panel .footer-practical { display: flex !important; flex-direction: column; gap: 1rem; }
.lzi-panel .footer-practical nav, .lzi-panel .footer-contact { display: flex !important; flex-wrap: wrap; gap: .5rem .9rem; }
.lzi-panel .footer-wordmark { font-size: clamp(2.4rem, 16cqi, 3.4rem) !important; }

/* while the phone is docked, the page's floating helpers step aside so nothing sits on the tab bar */
html.lzi-docked .core-smart, html.lzi-docked .core-edge, html.lzi-docked .core-peek, html.lzi-docked .hfx-bonbon { opacity: 0 !important; pointer-events: none !important; visibility: hidden; }

/* still: no animated transitions anywhere in the phone */
html.glz-static .lzi-stage *, html.glz-static .lzi-stage { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  .lzi-stage *, .lzi-stage { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .lzi-stage .lzi-phone, .lzi-stage .lzi-side { opacity: 1 !important; transform: none !important; }
}

/* Codex must-fix: the cart and pick-bar styles pad the body bottom, which would add page below the phone.
   The stage reserves that clearance itself (--lzi-bottom), so the document still ends at the phone. */
html.lzi-on body, html.lzi-on body.composition-active, html.lzi-on body.glz-pickbar-on,
html.lzi-on body.composition-active.cart-empty.glz-pickbar-on { padding-bottom: 0 !important; }
