/* The phone stage: a playlist of scenes (call, online order, room service, online shop, 08:00) on the home page and the
   byteAI, Ema and online shop pages. Loaded after mix-base.css and mix.css. */

/* ---------- stage: switcher above the phone, dot grid behind ---------- */
.stage { height: 760px; }
.stage::before { content: ""; position: absolute; inset: 60px -40px 0 -40px; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(22,24,29,.14) 1px, transparent 1.6px); background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(58% 52% at 38% 52%, #000 0%, transparent 100%); mask-image: radial-gradient(58% 52% at 38% 52%, #000 0%, transparent 100%); }
.ph-wrap { top: 72px; }
.scn { position: absolute; z-index: 3; top: 0; left: 6px; width: min(calc(var(--n, 4) * 135px), 100%); display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 8px; }
.scn button { display: flex; flex-direction: column; justify-content: space-between; gap: 9px; min-height: 48px; padding: 6px 0 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink-faint); }
.scn span { display: flex; align-items: baseline; gap: 7px; font: 500 12px/1.15 var(--font-mono); letter-spacing: .02em; }
.scn--many em { display: none; }
.scn em { font-style: normal; font-size: 10.5px; color: var(--aida); }
.scn s { position: relative; display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.scn i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--ink); transition: width 500ms var(--ease); }
.scn button[aria-selected="true"] { color: var(--ink); }
.scn button[aria-selected="true"] em { color: var(--thread); }
.scn button[aria-selected="true"] i { background: var(--thread); }
.scn button:hover { color: var(--ink); }

/* ---------- phone tilt + moving glare ---------- */
.tilt { width: 312px; height: 648px; transform: perspective(1800px) rotateY(var(--ry, -6deg)) rotateX(var(--rx, 2deg)); transition: transform 600ms var(--ease); }
.ph-glare { background: radial-gradient(120% 55% at var(--gx, 30%) -5%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%); }
.ph[data-state="web"] .sb, .ph[data-state="shop"] .sb { color: var(--ink); }

/* ---------- push: the dynamic island grows into a notification ---------- */
.push { position: absolute; z-index: 45; top: 9px; left: 9px; right: 9px; display: flex; flex-direction: column; gap: 3px; padding: 12px 16px 13px; border-radius: 26px; background: #000; color: #fff;
  font: 400 13px/1.35 var(--font-sans); opacity: 0; transform: scale(.4, .3); transform-origin: 50% 12px; transition: transform 420ms cubic-bezier(.2,.9,.3,1.15), opacity 220ms; pointer-events: none; }
.push.on { opacity: 1; transform: none; }
.push b { font: 600 11px/1 var(--font-mono); letter-spacing: .04em; color: var(--ema); text-transform: uppercase; }

/* ---------- 2. byteai.food online order ---------- */
.s-web { background: #FBF4EC; color: #1E1712; }
.w-url { position: absolute; top: 50px; left: 14px; right: 14px; height: 30px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; background: rgba(19,14,8,.06); font: 500 11px/1 var(--font-mono); color: #6E625A; }
.w-url svg { width: 12px; height: 12px; }
.w-head { position: absolute; top: 92px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; }
.w-logo { font-style: normal; width: 36px; height: 36px; border-radius: 50%; background: #EE8A3C; color: #1E1712; display: grid; place-items: center; font: 800 16px/1 var(--font-display); flex: none; }
.w-head b { display: block; font: 700 15px/1.2 var(--font-display); letter-spacing: -.02em; }
.w-head div span { display: block; margin-top: 2px; font-size: 11.5px; color: #6E625A; }
.w-chat { position: absolute; top: 142px; bottom: 136px; left: 12px; right: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 40px); mask-image: linear-gradient(transparent, #000 40px); }
.w-me { align-self: flex-end; max-width: 82%; padding: 9px 13px 10px; border-radius: 16px 16px 5px 16px; background: rgba(238,138,60,.18); font-size: 14px; line-height: 1.38; animation: bub 380ms var(--ease) both; flex: none; }
.w-ai { display: flex; gap: 8px; align-items: flex-start; animation: bub 380ms var(--ease) both; flex: none; }
.w-av { width: 26px; height: 26px; border-radius: 50%; background: #1A3A2A; color: #fff; display: grid; place-items: center; font: 700 9.5px/1 var(--font-sans); flex: none; border: 1px solid rgba(19,14,8,.12); }
.w-ai p { margin: 0; padding-top: 3px; font-size: 14px; line-height: 1.42; }
.w-dots { display: inline-flex; gap: 4px; padding-top: 6px; }
.w-dots i { width: 6px; height: 6px; border-radius: 50%; background: #6E625A; opacity: .35; animation: dot 900ms infinite; }
.w-dots i:nth-child(2) { animation-delay: 150ms; } .w-dots i:nth-child(3) { animation-delay: 300ms; }
.w-recs { display: grid; gap: 8px; flex: none; }
.w-rec { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 10px 12px; border-radius: 14px; background: #fff; border: 1px solid rgba(19,14,8,.1); animation: bub 380ms var(--ease) both; }
.w-rec b { display: block; font: 650 13.5px/1.2 var(--font-sans); }
.w-rec span { display: block; margin-top: 2px; font-size: 11px; color: #6E625A; }
.w-rec em { display: block; margin-top: 4px; font: 600 12.5px/1 var(--font-sans); font-style: normal; color: #9B3E12; }
.w-add { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: #EE8A3C; color: #1E1712; font: 600 12.5px/1 var(--font-sans); white-space: nowrap; cursor: pointer; transition: background 200ms, transform 140ms; }
.w-add:active { transform: scale(.95); }
.w-add.done { background: var(--success-tint); color: var(--success); }
.w-add svg { width: 14px; height: 14px; }
.w-bar { position: absolute; left: 12px; right: 12px; bottom: 80px; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 7px 0 9px; border-radius: 16px; background: #1E1712; color: #fff;
  opacity: 0; transform: translateY(16px); transition: opacity 300ms var(--ease), transform 400ms var(--ease); pointer-events: none; }
.w-bar.on { opacity: 1; transform: none; }
.w-n { width: 26px; height: 26px; border-radius: 50%; background: #EE8A3C; color: #1E1712; display: grid; place-items: center; font: 700 12px/1 var(--font-mono); flex: none; animation: pop 300ms; }
.w-t { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: rgba(255,255,255,.65); }
.w-t b { font: 600 14px/1 var(--font-sans); color: #fff; }
.w-go { margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 12px; background: #EE8A3C; color: #1E1712; font: 600 13px/1 var(--font-sans); transition: transform 140ms; }
.w-go.pressed { transform: scale(.92); }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.w-in { position: absolute; left: 12px; right: 12px; bottom: 24px; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 16px; border-radius: 23px; background: #fff; border: 1px solid rgba(19,14,8,.14); }
.w-in span { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-in .ph-txt { color: #8A7D73; }
.w-in b { width: 34px; height: 34px; border-radius: 50%; background: #1E1712; color: #fff; display: grid; place-items: center; flex: none; }
.w-in b svg { width: 16px; height: 16px; }
.w-ok { padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid rgba(30,113,72,.28); animation: bub 380ms var(--ease) both; flex: none; }
.w-okh { display: flex; align-items: center; gap: 8px; color: var(--success); }
.w-okh svg { width: 18px; height: 18px; }
.w-okh b { font: 650 14px/1.2 var(--font-sans); }
.w-okr { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.w-okr span { color: #6E625A; }

/* ---------- 3. shop ---------- */
.s-shop { background: #fff; color: var(--ink); }
.sh-hd { position: absolute; top: 56px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; }
.sh-hd b { font: 700 16px/1.2 var(--font-display); letter-spacing: -.02em; }
.sh-hd svg { width: 22px; height: 22px; }
.sh-q { position: absolute; top: 92px; left: 14px; right: 14px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; background: #F2F2EE; }
.sh-q svg { width: 18px; height: 18px; color: var(--ink-faint); flex: none; }
.sh-q span { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-q .ph-txt { color: #8A8F98; }
.sh-ai { position: absolute; top: 150px; left: 16px; right: 16px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); animation: fadein 300ms var(--ease); }
.sh-ai:empty { display: none; }
.sh-ai span { display: inline-block; margin-right: 7px; padding: 2px 6px; border-radius: 5px; background: var(--thread); color: #fff; font: 600 10px/1.4 var(--font-mono); letter-spacing: .04em; }
.sh-res { position: absolute; top: 200px; left: 12px; right: 12px; margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sh-res li { display: flex; align-items: center; gap: 12px; padding: 9px 9px 9px 9px; border-radius: 16px; border: 1px solid #ECEBE6; animation: bub 380ms var(--ease) both; }
.sh-ic { width: 46px; height: 46px; border-radius: 12px; background: #F4F3EF; display: grid; place-items: center; flex: none; }
.sh-ic svg { width: 24px; height: 24px; }
.sh-res div { flex: 1; min-width: 0; }
.sh-res b { display: block; font: 600 13.5px/1.2 var(--font-sans); }
.sh-res em { display: block; margin-top: 4px; font: 600 12.5px/1 var(--font-sans); font-style: normal; color: var(--thread-deep); }
.sh-buy { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; font: 600 12.5px/1 var(--font-sans); cursor: pointer; transition: background 160ms, color 160ms, transform 140ms; }
.sh-buy.pressed, .sh-buy:hover { background: var(--ink); color: #fff; }
.sh-buy.pressed { transform: scale(.94); }
.sh-sk { height: 66px; border-radius: 16px; border: 0 !important; background: linear-gradient(90deg, #F1F0EC 25%, #F9F8F5 50%, #F1F0EC 75%); background-size: 200% 100%; animation: shimmer 1s linear infinite !important; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sh-pay { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding: 10px 18px 30px; border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -24px 50px -20px rgba(22,24,29,.35); transform: translateY(105%); transition: transform 460ms cubic-bezier(.2,.9,.3,1.05); }
.sh-pay.on { transform: none; }
.sh-grab { display: block; width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: #DCDBD5; }
.sh-pt { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 700 18px/1.2 var(--font-display); letter-spacing: -.02em; }
.sh-pay.paid .sh-pt { color: var(--success); }
.sh-pt svg { width: 22px; height: 22px; }
.sh-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #EEEDE8; font-size: 13.5px; }
.sh-row span { color: var(--ink-faint); }
.sh-btn { display: flex; align-items: center; justify-content: center; height: 50px; margin-top: 10px; border-radius: 14px; background: var(--ink); color: #fff; font: 600 15px/1 var(--font-sans); }
.sh-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; animation: ring-spin 800ms linear infinite; }
.sh-done { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }

/* ---------- 4. 08:00 lock screen ---------- */
.s-lock { background: radial-gradient(130% 80% at 50% 8%, #1F6064 0%, #0B2629 46%, #05090B 100%); color: #fff; }
.lk-t { position: absolute; top: 66px; left: 0; right: 0; text-align: center; }
.lk-t span { display: block; font: 500 15px/1 var(--font-sans); color: rgba(255,255,255,.8); }
.lk-t b { display: block; margin-top: 6px; font: 250 80px/1 var(--font-display); letter-spacing: -.04em; }
.lk-w { position: absolute; top: 196px; left: 20px; right: 20px; font: 600 12.5px/1 var(--font-sans); color: rgba(255,255,255,.7); }
.lk-st { position: absolute; top: 220px; left: 10px; right: 10px; display: grid; gap: 8px; }
.lk-n { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px; border: 0; border-radius: 20px; background: rgba(255,255,255,.14); color: #fff; text-align: left; cursor: pointer; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: lkin 500ms cubic-bezier(.2,.9,.3,1.1) both; font: inherit; }
.lk-n:hover { background: rgba(255,255,255,.2); }
@keyframes lkin { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
.lk-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.lk-ic svg { width: 18px; height: 18px; }
.lk-n--ema .lk-ic { background: var(--ema); color: var(--ema-ink); }
.lk-n--byteai .lk-ic { background: var(--byteai); color: #110C08; font: 800 18px/1 var(--font-display); }
.lk-n--shop .lk-ic { background: #fff; color: var(--ink); }
.lk-b { flex: 1; min-width: 0; }
.lk-h { display: flex; justify-content: space-between; gap: 8px; }
.lk-h b { font: 600 13px/1.2 var(--font-sans); }
.lk-h em { font-style: normal; font-size: 11px; color: rgba(255,255,255,.6); }
.lk-b > span:last-child { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: rgba(255,255,255,.92); }
.lk-bar { position: absolute; left: 50%; bottom: 9px; width: 120px; height: 5px; margin-left: -60px; border-radius: 3px; background: rgba(255,255,255,.8); }

/* ---------- responsive ---------- */
@media (max-width: 1239px) {
  .stage { height: 846px; }
  .scn { left: 50%; transform: translateX(-50%); width: min(calc(var(--n, 4) * 128px), 100%); }
  .caption { top: 738px; }
}
@media (max-width: 900px), (hover: none) {
  .tilt { transform: none; }
}
@media (max-width: 900px) { .stage { height: 856px; } }
@media (max-width: 560px) {
  .stage { height: 838px; }
  .scn { width: calc(100% - 32px); gap: 6px; }
  .scn button { justify-content: space-between; }
  .scn span { font-size: 11px; gap: 5px; white-space: normal; line-height: 1.15; }
  .scn em { display: none; }
  .ph-wrap { top: 66px; }
  .caption { top: 730px; }
}
@media (prefers-reduced-motion: reduce) { .tilt { transform: none; } }
