/* ============================================================
   SHAHZOD ABDUJABBOROV — "POCKET THEATER"
   Hand-rolled. Zero frameworks. View source — it's the point.
   ============================================================ */

:root {
  --void: #05060A;
  --surface: #0E1116;
  --surface-2: #161B22;
  --hairline: rgba(255, 255, 255, 0.08);
  --text: #F4F6FB;
  --text-2: #8A94A6;
  --text-3: #808A9B;
  --lime: #CCF836;
  --bezel: linear-gradient(145deg, #3A4150, #12151B 40%, #2A303B);
  --app: var(--lime);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: "Syne", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--lime); color: #05060A; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
b { font-weight: 600; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--font-mono); }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--lime); color: #05060A; padding: 10px 18px; border-radius: 100px;
  font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.sr-status {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
#work:focus { outline: none; }

/* ---------- type & reveals ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 0.98; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
h3 { font-size: clamp(2rem, 4vw, 3.2rem); }

.kicker { font-size: 12px; letter-spacing: 0.14em; color: var(--app); display: flex; align-items: center; gap: 12px; }
.section-head { margin-bottom: clamp(48px, 8vh, 88px); }
.section-head .kicker { margin-bottom: 20px; }
.section-sub { color: var(--text-2); max-width: 560px; margin-top: 20px; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.split .wi { display: inline-block; transform: translateY(112%); transition: transform 0.9s var(--ease-out); }
.split.in .wi { transform: translateY(0); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 100px; font-weight: 600; font-size: 15px;
  transition: transform 0.35s var(--spring), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--lime); color: #05060A; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(204, 248, 54, 0.25); }
.btn-ghost { border: 1px solid var(--hairline); color: var(--text); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ============================================================
   DYNAMIC ISLAND NAV
   ============================================================ */
.island { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; }

.island-pill {
  display: flex; align-items: center; gap: 9px;
  background: #000; border: 1px solid var(--hairline); border-radius: 100px;
  padding: 9px 18px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s;
}
.island-pill:hover { border-color: rgba(255, 255, 255, 0.2); }

.island-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--island-accent, var(--lime));
  transition: background 0.6s; animation: island-pulse 2.4s ease-in-out infinite;
}
@keyframes island-pulse { 50% { opacity: 0.4; } }

.island-label { font-family: var(--font-mono); font-size: 12px; color: var(--text); white-space: nowrap; transition: opacity 0.15s; }
.island.swapping .island-label { opacity: 0; }
.island-chevron { color: var(--text-3); transition: transform 0.3s; }
.island.open .island-chevron { transform: rotate(180deg); }

.island-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.92); transform-origin: top center;
  background: rgba(14, 17, 22, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--hairline); border-radius: 22px; padding: 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 240px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s, transform 0.35s var(--spring), visibility 0.3s;
}
.island.open .island-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }
.island-menu a { padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; transition: background 0.2s, color 0.2s; }
.island-menu a:hover { background: var(--surface-2); color: var(--lime); }

/* ============================================================
   PHONE (shared frame)
   ============================================================ */
.phone {
  position: relative; z-index: 1;
  height: min(680px, 74svh); aspect-ratio: 9 / 19.2; width: auto;
  border-radius: 54px; padding: 11px;
  background: var(--bezel);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 40px 90px rgba(0, 0, 0, 0.65),
    0 0 120px color-mix(in srgb, var(--app) 9%, transparent);
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 43px; overflow: hidden; background: #0B0D12;
  /* iOS Safari: force clipping of transformed children (lockscreen/homescreen)
     — otherwise composited layers ignore the rounded clip at the corners */
  transform: translateZ(0);
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}
.lockscreen, .homescreen { border-radius: inherit; overflow: hidden; }
.home-indicator {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.35); z-index: 5;
}
.hero-phone .home-indicator, .chapter.playing .home-indicator { animation: hi-pulse 2.6s ease-in-out infinite; }
@keyframes hi-pulse { 50% { opacity: 0.5; } }

.screen-island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 25px; border-radius: 100px; background: #000; z-index: 6;
}

.demo-statusbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 24px 0; font-size: 13px; font-weight: 600; color: #fff;
}
.sb-icons { color: #fff; }

/* ============================================================
   01 · HERO — LOCK SCREEN
   ============================================================ */
.hero { height: 175vh; }
.hero-sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4vw; align-items: center; }

.overline { font-size: 11.5px; letter-spacing: 0.12em; color: var(--text-2); display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: island-pulse 2s ease-in-out infinite; flex-shrink: 0; }

.hero-copy .lead { color: var(--text-2); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 480px; margin-top: 28px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-hint { font-size: 11px; color: var(--text-3); margin-top: 48px; letter-spacing: 0.1em; }

.hero-device {
  position: relative; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.hero-phone {
  transform: rotateX(var(--rx, 2deg)) rotateY(var(--ry, -8deg));
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}

.hero-name { position: absolute; font-family: var(--font-display); font-weight: 800; white-space: nowrap; letter-spacing: 0.01em; pointer-events: none; user-select: none; left: 50%; }
.hero-name-front { z-index: 3; bottom: 7%; font-size: clamp(1.5rem, 3vw, 2.6rem); color: transparent; -webkit-text-stroke: 1px rgba(244, 246, 251, 0.6); transform: translateX(-56%); }

/* lock screen */
.lockscreen {
  position: absolute; inset: 0; z-index: 4;
  transform: translateY(calc(var(--unlock, 0) * -104%));
  will-change: transform;
}
.lock-wallpaper {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  filter: contrast(1.06) saturate(0.88) brightness(0.92);
}
.lock-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.45) 0%, transparent 22%, transparent 45%, rgba(5, 6, 10, 0.88) 100%);
}
.lock-top { position: absolute; top: 9%; left: 0; right: 0; text-align: center; color: #fff; }
.lock-date { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.82); }
.lock-clock { font-family: var(--font-mono); font-weight: 400; font-size: clamp(44px, 5.4svh, 58px); line-height: 1.1; letter-spacing: -0.03em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45); }

.notif-stack { position: absolute; left: 12px; right: 12px; bottom: 15%; display: grid; gap: 8px; }
.notif {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(22, 27, 34, 0.68); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 18px; padding: 10px 12px;
  opacity: 0; transform: translateY(-14px) scale(0.96);
}
body.loaded .notif { animation: notif-in 0.7s var(--spring) forwards; animation-delay: calc(var(--nd) + 0.5s); }
@keyframes notif-in { to { opacity: 1; transform: none; } }
.notif-ico {
  width: 27px; height: 27px; flex-shrink: 0; border-radius: 8px;
  background: color-mix(in srgb, var(--ico) 24%, #0B0D12); color: var(--ico);
  display: grid; place-items: center; font-size: 13px;
}
.notif-body { font-size: 11.5px; line-height: 1.35; color: rgba(255, 255, 255, 0.85); }
.notif-body b { display: block; font-size: 11px; color: #fff; }
.notif-time { margin-left: auto; font-size: 9px; color: rgba(255, 255, 255, 0.6); flex-shrink: 0; }

.unlock-hint {
  position: absolute; bottom: 20px; left: 0; right: 0; text-align: center;
  font-size: 10px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.55);
  animation: hint-bob 2s ease-in-out infinite;
}
@keyframes hint-bob { 50% { transform: translateY(-5px); } }

/* home screen behind lock */
.homescreen {
  position: absolute; inset: 0; z-index: 1; padding: 54px 20px 20px;
  background:
    radial-gradient(120% 80% at 50% 0%, #1A2130 0%, #0B0D12 60%),
    #0B0D12;
  display: flex; flex-direction: column;
  transform: scale(calc(0.92 + var(--unlock, 0) * 0.08));
  opacity: calc(0.4 + var(--unlock, 0) * 0.6);
}
.hs-greeting { font-size: 10px; color: var(--text-3); margin: 10px 4px 22px; }
.hs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 10px; }
.hs-icon { display: grid; justify-items: center; gap: 7px; }
.hs-glyph {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 23px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ico) 38%, #10131A), color-mix(in srgb, var(--ico) 12%, #0B0D12));
  border: 1px solid color-mix(in srgb, var(--ico) 30%, transparent);
  transition: transform 0.3s var(--spring);
  overflow: hidden;
}
.hs-glyph img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.notif-ico { overflow: hidden; }
.notif-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hs-icon:hover .hs-glyph { transform: scale(1.1); }
.hs-label { font-size: 10px; color: rgba(255, 255, 255, 0.75); }
.hs-dock {
  margin-top: auto; display: flex; justify-content: center; gap: 16px;
  background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 26px; padding: 11px; margin-bottom: 8px;
}
.hs-dock-icon .hs-glyph { width: 46px; height: 46px; font-size: 19px; }
.dock-real {
  background: linear-gradient(180deg, var(--g1), var(--g2));
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.dock-real svg { width: 54%; height: 54%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)); }

/* ============================================================
   02 · TICKER + SHIP ROWS
   ============================================================ */
.ship { padding: clamp(60px, 10vh, 110px) 0 0; }
.marquee { position: relative; overflow: hidden; border-block: 1px solid var(--hairline); padding: 22px 0 22px; margin-bottom: clamp(48px, 7vh, 80px); }
.marquee-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; font-size: 12px;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text-2);
}
.marquee-toggle:hover { border-color: var(--lime); color: var(--lime); }
.marquee-track { display: inline-flex; white-space: nowrap; animation: marquee 30s linear infinite paused; }
.marquee.live .marquee-track { animation-play-state: running; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused !important; }
body.paused .marquee-track, body.paused .chapter.playing * { animation-play-state: paused !important; }

/* offscreen chapters freeze mid-frame instead of restarting on return */
.chapter.idle *, .chapter.idle *::before, .chapter.idle *::after { animation-play-state: paused !important; }
.marquee-track span {
  font-family: var(--font-mono); font-size: clamp(1.3rem, 2.8vw, 2.1rem); font-weight: 500;
  color: var(--text-2); text-transform: uppercase; letter-spacing: 0.02em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.ship-rows li { border-bottom: 1px solid var(--hairline); }
.ship-rows li:first-child { border-top: 1px solid var(--hairline); }
.ship-rows a {
  display: flex; align-items: baseline; gap: clamp(16px, 3vw, 40px);
  padding: clamp(20px, 3.4vh, 34px) 8px;
  transition: background 0.3s, padding-left 0.4s var(--ease-out);
}
.ship-rows a:hover { background: var(--surface); padding-left: 28px; }
.idx { font-size: 12px; color: var(--text-3); }
.row-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.5rem); letter-spacing: -0.01em; }
.row-arrow { margin-left: auto; font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--text-3); transition: transform 0.4s var(--ease-out), color 0.3s; }
.ship-rows a:hover .row-arrow { transform: translateX(10px); color: var(--lime); }

/* ============================================================
   03 · DEVICE THEATER
   ============================================================ */
.theater { padding: clamp(60px, 10vh, 120px) 0 0; }

.chapter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; align-items: center;
  padding: clamp(70px, 12vh, 130px) 0;
}
.chapter-flip .chapter-copy { order: 2; }
.chapter-flip .chapter-stage { order: 1; }

.chapter-copy .kicker { margin-bottom: 18px; }
.chapter-copy h3 { margin-bottom: 22px; }
.chapter-copy p { color: var(--text-2); max-width: 460px; }
.chapter-copy p b { color: var(--text); }

.solo-tag {
  font-size: 10px; letter-spacing: 0.1em; color: var(--lime);
  border: 1px solid color-mix(in srgb, var(--lime) 50%, transparent);
  background: color-mix(in srgb, var(--lime) 10%, transparent);
  padding: 3px 10px; border-radius: 100px;
}
.chapter-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chapter-meta li {
  font-size: 11px; color: var(--text-2); letter-spacing: 0.04em;
  border: 1px solid var(--hairline); border-radius: 100px; padding: 6px 13px;
}

.chapter-stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
.demo-phone { height: min(620px, 70svh); }

.ghost-phone {
  position: absolute; z-index: 0;
  height: min(540px, 60svh); aspect-ratio: 9 / 19.2;
  border: 1.5px dashed color-mix(in srgb, var(--app) 40%, transparent);
  border-radius: 48px; opacity: 0;
  display: grid; place-items: center;
  transition: opacity 0.9s var(--ease-out) 0.3s, transform 0.9s var(--ease-out) 0.3s;
}
.ghost-phone span { font-size: 11px; color: var(--app); letter-spacing: 0.08em; opacity: 0.85; }
.ghost-a { transform: translateX(-10%) rotate(-4deg) scale(0.94); }
.ghost-b { transform: translateX(10%) rotate(4deg) scale(0.94); }
.chapter.playing .ghost-a { opacity: 0.5; transform: translateX(-58%) rotate(-6deg) scale(0.92); }
.chapter.playing .ghost-b { opacity: 0.5; transform: translateX(58%) rotate(6deg) scale(0.92); }

/* --- generic app screen --- */
.app-screen { background: linear-gradient(180deg, color-mix(in srgb, var(--app) 10%, #0B0D12) 0%, #0B0D12 55%); font-size: 13px; }

.demo-island {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  background: #000; border-radius: 100px; padding: 6px 14px;
  font-size: 10.5px; font-weight: 500; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--app); }
.chapter.playing .pulse-dot { animation: island-pulse 1.6s ease-in-out infinite; }

/* --- DOKON (real courier-tracking screen from Figma) --- */
.dokon-screen { background: #F7F7FC; }
.dk-header { position: absolute; top: 0; left: 0; right: 0; height: 76px; background: #FF8200; z-index: 5; }
.dk-title { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; font-weight: 700; font-family: var(--font-body); }
.dk-back { position: absolute; left: 14px; top: -3px; font-size: 17px; font-weight: 600; }
.dokon-map { position: absolute; top: 76px; left: 0; right: 0; width: 100%; height: calc(100% - 76px - 172px); }
.dk-navi {
  position: absolute; left: 0; right: 0; bottom: 138px; height: 34px;
  background: #E5EBFE; color: #032596; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 10.5px; font-weight: 700;
}
.dk-navi svg { width: 15px; height: 15px; }
.dk-eta {
  position: absolute; left: 0; right: 0; bottom: 84px; height: 54px; background: #fff;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
}
.dk-clock { width: 26px; height: 26px; color: #00CC67; }
.dk-time { display: inline-grid; font-size: 24px; font-weight: 800; color: #00CC67; letter-spacing: 0.02em; }
.dk-time span { grid-area: 1 / 1; }
.dk-time .e2 { opacity: 0; }
.chapter.playing .dk-time .e1 { animation: wcnt-a 8s ease infinite; }
.chapter.playing .dk-time .e2 { animation: wcnt-b 8s ease infinite; }
.dk-call {
  margin-left: auto; width: 36px; height: 36px; border-radius: 11px; background: #00CC67;
  display: grid; place-items: center;
}
.dk-call svg { width: 17px; height: 17px; }
.dk-card {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: #FCFCFC; border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(78, 75, 102, 0.08); font-family: var(--font-body);
}
.dk-card > b { font-size: 12.5px; font-weight: 700; color: #4E4B66; }
.dk-note { font-size: 9px; color: #FF312E; margin: 4px 0 7px; line-height: 1.35; }
.dk-grid { display: flex; justify-content: space-between; gap: 8px; }
.dk-grid b { display: block; font-size: 9.5px; font-weight: 600; color: #4E4B66; }
.dk-grid small { display: block; font-size: 8px; color: #A0A3BD; margin-top: 1px; }
.dk-grid .r { text-align: right; }

/* --- HOMETASKER (real widget designs from Figma) --- */
.ht-screen { padding: 52px 13px 13px; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 20% 0%, #3A4A6B 0%, #232B42 38%, #171C2C 72%, #10131E 100%); }
.ht-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.widget { background: #fff; border-radius: 18px; padding: 12px 13px; color: #000; box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
.w-med { grid-column: 1 / -1; }
.w-head { display: flex; justify-content: space-between; align-items: flex-start; }
.w-head b { display: block; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.w-head small { display: block; font-size: 10px; color: #8E8E93; margin-top: 1px; }
.w-plus {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: #00BB8B; color: #fff; font-style: normal; font-size: 15px; font-weight: 600;
  display: grid; place-items: center; line-height: 1;
}
.w-cnt { font-style: normal; font-size: 17px; font-weight: 700; color: #00BB8B; }
.w-cnt.zero { color: #8E8E93; }
.widget ul { margin-top: 9px; display: grid; gap: 7px; }
.widget li { display: flex; align-items: center; gap: 9px; }
.widget li i {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid #C7C7CC; position: relative;
}
.widget li i::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10px; color: #fff; opacity: 0;
}
.widget li span { display: block; font-size: 11.5px; font-weight: 500; color: #000; }
.widget li small { display: block; font-size: 9.5px; color: #8E8E93; }
.w-yay { margin-top: 10px; font-size: 10px; line-height: 1.45; color: #8E8E93; }
.chapter.playing .widget li i { animation: ht-tick 8s ease infinite; }
.chapter.playing .widget li i::after { animation: task-check 8s ease infinite; }
.chapter.playing .widget li span { animation: ht-dim 8s ease infinite; }
.chapter.playing .t1 i, .chapter.playing .t1 i::after, .chapter.playing .t1 span { animation-delay: 0.4s; }
.chapter.playing .t2 i, .chapter.playing .t2 i::after, .chapter.playing .t2 span { animation-delay: 1.7s; }
.chapter.playing .t3 i, .chapter.playing .t3 i::after, .chapter.playing .t3 span { animation-delay: 3s; }
@keyframes ht-tick {
  0%, 8% { background: transparent; border-color: #C7C7CC; }
  13%, 82% { background: #00BB8B; border-color: #00BB8B; }
  90%, 100% { background: transparent; border-color: #C7C7CC; }
}
@keyframes ht-dim { 0%, 8% { opacity: 1; } 13%, 82% { opacity: 0.4; } 90%, 100% { opacity: 1; } }

.ht-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 0; justify-items: center; margin-top: 26px; padding: 0 8px; }
.ht-icons i, .ht-dock i {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; font-style: normal;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ico) 78%, #fff 4%), color-mix(in srgb, var(--ico) 92%, #000 30%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 3px 8px rgba(0,0,0,0.3);
}
.ht-dock {
  margin-top: auto; display: flex; justify-content: space-around; padding: 10px 12px;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 26px;
}

/* --- APPLE WATCH (real HomeTasker watch app) --- */
.watch { position: absolute; bottom: 4%; left: max(-30px, -4vw); z-index: 2; width: clamp(104px, 9.5vw, 128px); filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6)); }
.watch-case {
  position: relative; aspect-ratio: 1 / 1.18; border-radius: 32%;
  background: var(--bezel); padding: 7px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.watch-crown { position: absolute; right: -4px; top: 26%; width: 5px; height: 16px; border-radius: 3px; background: #3A4150; }
.watch-sidebtn { position: absolute; right: -3px; top: 52%; width: 3.5px; height: 22px; border-radius: 3px; background: #2A303B; }
.watch-screen {
  width: 100%; height: 100%; border-radius: 28%; background: #000; overflow: hidden;
  position: relative; padding: 7px 7px 6px; display: flex; flex-direction: column;
}
.watch-time { text-align: right; font-size: 8px; color: #fff; }
.watch-title { font-size: 12px; font-weight: 500; color: #fff; margin: 0 0 4px 2px; font-family: var(--font-body); }
.wbtn {
  display: flex; align-items: center; gap: 3px;
  border-radius: 7px; padding: 5px 7px; margin-bottom: 3px;
  font-size: 8.5px; font-weight: 600; color: #fff;
}
.wbtn span { flex: 1; }
.wbtn b { font-weight: 600; opacity: 0.7; position: relative; }
.wbtn i { font-style: normal; opacity: 0.55; font-size: 9px; }
.wb-today { background: linear-gradient(180deg, #4A8BDE, #3470C5); }
.wb-all { background: linear-gradient(180deg, #43A8B6, #0A8292); }
.wb-done { background: linear-gradient(180deg, #33AC4E, #2CA246); margin-bottom: 0; }
.wcnt { display: inline-grid; }
.wcnt span { grid-area: 1 / 1; transition: opacity 0.3s; }
.wcnt .n2 { opacity: 0; }
.chapter.playing .wcnt .n1 { animation: wcnt-a 8s ease infinite; }
.chapter.playing .wcnt .n2 { animation: wcnt-b 8s ease infinite; }
@keyframes wcnt-a { 0%, 38% { opacity: 1; } 42%, 88% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes wcnt-b { 0%, 38% { opacity: 0; } 42%, 88% { opacity: 1; } 94%, 100% { opacity: 0; } }
.watch-fab {
  position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px;
  border-radius: 50%; background: #4DC16C; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.watch-fab svg { width: 11px; height: 11px; }

/* --- NASIYAH (real "Оплаты" screen from Figma) --- */
.app-screen.light { background: #F9FAFB; }
.app-screen.light .demo-statusbar { color: #101828; }
.app-screen.light .sb-icons { color: #101828; }
.nas-screen { padding: 46px 12px 0; display: flex; flex-direction: column; font-family: var(--font-body); }
.nas-title { text-align: center; font-size: 14px; font-weight: 600; color: #101828; padding: 4px 0 10px; background: #fff; margin: 0 -12px; }
.nas-seg { display: flex; background: #F9FAFB; border: 1px solid #E4E7EC; border-radius: 10px; padding: 3px; margin-top: 10px; }
.seg { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: #667085; padding: 6px 0; border-radius: 7px; }
.seg.on { background: #fff; color: #344054; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12); }
.seg i { font-style: normal; font-size: 8.5px; font-weight: 600; color: #F04438; background: #FEF3F2; border-radius: 100px; padding: 1px 6px; }
.nas-search { display: flex; gap: 8px; margin: 9px 0 10px; }
.nas-input { flex: 1; border: 1px solid #D0D5DD; border-radius: 8px; padding: 6px 10px; font-size: 10.5px; color: #98A2B3; background: #fff; }
.nas-fbtn { width: 30px; border: 1px solid #D0D5DD; border-radius: 8px; display: grid; place-items: center; color: #667085; background: #fff; }
.nas-fbtn svg { width: 14px; height: 14px; }
.nas-card { background: #fff; border: 1px solid #E4E7EC; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.07); }
.nas-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 500; color: #344054; border: 1px solid #D0D5DD; border-radius: 100px; padding: 2px 8px; margin-bottom: 9px; }
.nas-chip i { width: 5px; height: 5px; border-radius: 50%; background: #2E90FA; }
.nas-chip i.red { background: #F04438; }
.nas-card2 { border-color: #F04438; margin-top: 9px; opacity: 0.94; }
.nas-bar i.red { background: #F04438; }
.nas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 8px; margin-bottom: 7px; }
.nas-lbl { font-size: 8.5px; color: #667085; }
.nas-grid b { font-size: 10.5px; font-weight: 600; color: #101828; }
.nas-grid .r { text-align: right; }
.nas-date em { font-style: normal; color: #101828; display: block; font-size: 8.5px; font-weight: 500; }
.nas-item { font-size: 10px; font-weight: 500; color: #101828; margin-bottom: 5px; }
.nas-bar { height: 5px; border-radius: 5px; background: #E4E7EC; overflow: hidden; }
.nas-bar i { display: block; height: 100%; width: 100%; border-radius: 5px; background: #1D7A32; transform: scaleX(0.167); transform-origin: left; }
.chapter.playing .nas-bar i { animation: nas-fill 9s ease infinite; }
@keyframes nas-fill { 0%, 42% { transform: scaleX(0.167); } 48%, 92% { transform: scaleX(0.25); } 98%, 100% { transform: scaleX(0.167); } }
.nas-cnt { display: grid; font-size: 8.5px; color: #667085; margin: 3px 0 8px; }
.nas-cnt span { grid-area: 1 / 1; }
.nas-cnt .c2 { opacity: 0; }
.chapter.playing .nas-cnt .c1 { animation: wcnt-a 9s ease infinite; }
.chapter.playing .nas-cnt .c2 { animation: wcnt-b 9s ease infinite; }
.nas-pay {
  display: block; text-align: center; background: #079455; color: #fff;
  font-size: 10.5px; font-weight: 600; border-radius: 8px; padding: 8px 0; margin-top: 2px;
}
.chapter.playing .nas-pay { animation: nas-press 9s ease infinite; }
@keyframes nas-press { 0%, 40% { transform: scale(1); } 42% { transform: scale(0.96); } 44%, 100% { transform: scale(1); } }
.nas-ok {
  display: block; text-align: center; font-size: 9px; font-weight: 600; font-style: italic; color: #1D7A32;
  background: #CAF2D2; border: 1px solid rgba(23, 178, 106, 0.4); border-radius: 8px;
  padding: 0; margin-top: 0; max-height: 0; opacity: 0; overflow: hidden;
}
.chapter.playing .nas-ok { animation: nas-ok 9s ease infinite; }
@keyframes nas-ok {
  0%, 46% { max-height: 0; opacity: 0; padding: 0; margin-top: 0; }
  52%, 90% { max-height: 30px; opacity: 1; padding: 6px 0; margin-top: 8px; }
  97%, 100% { max-height: 0; opacity: 0; padding: 0; margin-top: 0; }
}
.nas-nav {
  margin-top: auto; display: flex; justify-content: space-around; align-items: end;
  background: #fff; border-top: 1px solid #E4E7EC; margin-left: -12px; margin-right: -12px;
  padding: 7px 8px 14px;
}
.nas-nav span { position: relative; display: grid; justify-items: center; gap: 2px; color: #98A2B3; }
.nas-nav svg { width: 16px; height: 16px; }
.nas-nav small { font-size: 7.5px; }
.nas-nav .on { color: #079455; }
.nas-nav .dot { position: absolute; top: -2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: #F04438; }

/* --- DAYLIST (real "Groceries" list from Figma) --- */
.dl-screen { padding: 46px 0 0; background: #fff; display: flex; flex-direction: column; font-family: var(--font-body); }
.dl-nav { display: flex; align-items: center; padding: 4px 14px 8px; }
.dl-back { color: #007AFF; font-size: 12px; font-weight: 500; flex: 1; }
.dl-nav b { font-size: 13px; font-weight: 600; color: #000; }
.dl-ic { flex: 1; display: flex; justify-content: flex-end; gap: 10px; color: #007AFF; }
.dl-ic svg { width: 15px; height: 15px; }
.dl-prog { height: 4px; background: #E5E5EA; }
.dl-prog i { display: block; height: 100%; width: 100%; background: #34C759; transform: scaleX(0.25); transform-origin: left; }
.chapter.playing .dl-prog i { animation: dl-prog 9s ease infinite; }
@keyframes dl-prog {
  0%, 8% { transform: scaleX(0.25); }
  12%, 22% { transform: scaleX(0.45); }
  26%, 34% { transform: scaleX(0.65); }
  38%, 90% { transform: scaleX(0.85); }
  96%, 100% { transform: scaleX(0.25); }
}
.dl-list { padding: 6px 0 0 14px; }
.dl-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px 9px 0; border-bottom: 1px solid #E5E5EA; }
.dl-list li i {
  width: 19px; height: 19px; flex-shrink: 0; border-radius: 50%; margin-top: 1px;
  border: 1.5px solid #C7C7CC; position: relative;
}
.dl-list li i::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: #fff; opacity: 0; }
.dl-list li span { position: relative; display: inline-block; font-size: 12.5px; color: #000; }
.dl-list li span::after { content: ""; position: absolute; left: 0; top: 55%; height: 1.5px; width: 100%; background: #8E8E93; transform: scaleX(0); transform-origin: left; }
.dl-list li small { display: block; font-size: 10px; color: #8E8E93; line-height: 1.35; margin-top: 2px; }
.dl-list li em { display: flex; align-items: center; gap: 4px; font-style: normal; font-size: 10px; font-weight: 500; color: #8E8E93; margin-top: 3px; }
.dl-list li em svg { width: 10px; height: 10px; }
.dl-av { margin-left: auto; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: #8D94F0; color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.chapter.playing .dl-list li:not(.dl-new) i { animation: dl-check 9s ease infinite; }
.chapter.playing .dl-list li:not(.dl-new) i::after { animation: task-check 9s ease infinite; }
.chapter.playing .dl-list li:not(.dl-new) span { animation: dl-gray 9s ease infinite; }
.chapter.playing .dl-list li:not(.dl-new) span::after { animation: dl-strike 9s ease infinite; }
.chapter.playing .d1 i, .chapter.playing .d1 i::after, .chapter.playing .d1 span, .chapter.playing .d1 span::after { animation-delay: 0.6s; }
.chapter.playing .d2 i, .chapter.playing .d2 i::after, .chapter.playing .d2 span, .chapter.playing .d2 span::after { animation-delay: 1.9s; }
.chapter.playing .d3 i, .chapter.playing .d3 i::after, .chapter.playing .d3 span, .chapter.playing .d3 span::after { animation-delay: 3.2s; }
@keyframes dl-check {
  0%, 6% { background: transparent; border-color: #C7C7CC; }
  11%, 84% { background: #34C759; border-color: #34C759; }
  92%, 100% { background: transparent; border-color: #C7C7CC; }
}
@keyframes dl-gray { 0%, 6% { color: #000; } 11%, 84% { color: #8E8E93; } 92%, 100% { color: #000; } }
@keyframes dl-strike { 0%, 6% { transform: scaleX(0); } 11%, 84% { transform: scaleX(1); } 92%, 100% { transform: scaleX(0); } }
.done-static i { background: #34C759 !important; border-color: #34C759 !important; }
.done-static i::after { opacity: 1 !important; }
.done-static span { color: #8E8E93; }
.done-static span::after { transform: scaleX(1); }
.dl-new { opacity: 0; transform: translateY(8px); }
.chapter.playing .dl-new { animation: dl-new 9s var(--spring) infinite; }
@keyframes dl-new { 0%, 48% { opacity: 0; transform: translateY(8px); } 55%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
.dl-siri {
  margin: auto 14px 14px; display: flex; align-items: center; gap: 11px;
  background: #F2F2F7; border-radius: 100px; padding: 9px 16px;
}
.dl-siri p { font-size: 10px; color: #8E8E93; }
.siri-wave { display: flex; align-items: center; gap: 2.5px; height: 16px; }
.siri-wave i { width: 3px; border-radius: 3px; background: #007AFF; height: 100%; transform: scaleY(0.3); transform-origin: center; }
.chapter.playing .siri-wave i { animation: siri 1.1s ease-in-out infinite alternate; }
.siri-wave i:nth-child(1) { animation-delay: 0s; }
.siri-wave i:nth-child(2) { animation-delay: 0.15s; }
.siri-wave i:nth-child(3) { animation-delay: 0.3s; }
.siri-wave i:nth-child(4) { animation-delay: 0.45s; }
.siri-wave i:nth-child(5) { animation-delay: 0.6s; }
@keyframes siri { from { transform: scaleY(0.22); } to { transform: scaleY(1); } }

/* --- USTABOR (real masters-list screen from Figma) --- */
.ub-screen { padding: 44px 12px 0; font-family: var(--font-body); display: flex; flex-direction: column; }
.ub-top { display: flex; gap: 8px; margin-bottom: 12px; }
.ub-filter {
  position: relative; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  background: #fff; box-shadow: 0 3px 10px rgba(92, 107, 192, 0.18);
  display: grid; place-items: center; color: #00A82D;
}
.ub-filter svg { width: 17px; height: 17px; }
.ub-filter i { position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: #FF3A44; }
.ub-search {
  flex: 1; display: flex; align-items: center; border-radius: 9px;
  background: #fff; box-shadow: 0 3px 10px rgba(92, 107, 192, 0.14);
  font-size: 10.5px; color: #9E9E9E; padding-left: 12px; overflow: hidden;
}
.ub-search b { margin-left: auto; width: 34px; height: 34px; background: #00A82D; display: grid; place-items: center; border-radius: 8px; }
.ub-search svg { width: 15px; height: 15px; }
.ub-head { font-size: 12.5px; font-weight: 700; color: #4A4A4A; margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.ub-head span { font-size: 10px; font-weight: 600; background: #F2F2F2; border-radius: 100px; padding: 1px 8px; }

.ub-ad {
  position: relative; background: #fff; border: 1.5px solid #FFC87A; border-radius: 12px;
  padding: 11px; margin-bottom: 11px; overflow: hidden;
}
.ub-ad-tag {
  position: absolute; top: 0; right: 0; font-style: normal; font-size: 7px; font-weight: 700;
  color: #fff; background: #FFB64E; padding: 3px 9px; border-bottom-left-radius: 8px; letter-spacing: 0.04em;
}
.ub-adsub { display: block; font-style: normal; font-size: 9px; color: #9E9E9E; margin-top: 2px; }
.ub-av.av3 { background: linear-gradient(160deg, #90A4AE, #546E7A); }
.ub-card {
  position: relative; background: #fff; border-radius: 12px; padding: 11px;
  box-shadow: 0 6px 20px rgba(92, 107, 192, 0.16); margin-bottom: 11px;
}
.ub-row { display: flex; align-items: flex-start; gap: 9px; }
.ub-av {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(160deg, #D7CCC8, #A1887F); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.ub-av.av2 { background: linear-gradient(160deg, #B0BEC5, #78909C); }
.ub-who { min-width: 0; }
.ub-who > b { display: block; font-size: 12px; font-weight: 600; color: #4A4A4A; }
.ub-stars { display: block; font-style: normal; font-size: 10px; color: #FFB346; letter-spacing: 1px; margin-top: 2px; }
.ub-stars i { font-style: normal; color: #E0E0E0; }
.ub-stars u { text-decoration: none; color: #4A4A4A; font-weight: 600; margin-left: 4px; letter-spacing: 0; }
.ub-stars { white-space: nowrap; }
.ub-stars, .ub-stars u + text { font-size: 10px; }
.ub-badges { display: flex; gap: 5px; margin-top: 4px; }
.ub-badges i {
  font-style: normal; font-size: 7.5px; font-weight: 700; color: #fff;
  border-radius: 4px; padding: 2px 6px; letter-spacing: 0.02em;
}
.b247 { background: #00A82D; }
.bsos { background: #FF3A44; }
.ub-call {
  margin-left: auto; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  background: #00A82D; display: grid; place-items: center;
}
.ub-call svg { width: 14px; height: 14px; }
.ub-chips { display: flex; gap: 6px; margin: 8px 0 7px; flex-wrap: wrap; }
.ub-chips span { font-size: 8.5px; color: #9E9E9E; background: #F2F2F2; border-radius: 7px; padding: 4px 9px; }
.ub-price { display: flex; align-items: baseline; gap: 5px; font-size: 9.5px; margin-bottom: 5px; }
.ub-price span { color: #4A4A4A; }
.ub-price i { flex: 1; border-bottom: 1.5px dotted #D5D5D5; }
.ub-price b { font-weight: 600; color: #4A4A4A; }
.ub-photos { display: flex; gap: 6px; margin-top: 8px; }
.ub-photos i {
  width: 42px; height: 30px; border-radius: 6px;
  background: linear-gradient(150deg, #E8E4DE, #CFC9C0);
}
.ub-photos .on { box-shadow: 0 3px 0 -1px #00A82D; }

.ub-skel {
  position: absolute; inset: 11px; z-index: 2; background: #fff;
  display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 1fr 1fr; gap: 6px 10px;
}
.ub-skel i { border-radius: 8px; background: linear-gradient(100deg, #F0F0F0 30%, #E2E2E2 50%, #F0F0F0 70%); background-size: 250% 100%; }
.chapter.playing .ub-skel i { animation: shimmer 1.3s linear infinite; }
.sk-av { grid-row: 1 / -1; width: 38px; border-radius: 50%; }
.sk-l1 { width: 70%; } .sk-l2 { width: 45%; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -130% 0; } }
.chapter.playing .ub-skel { animation: skel-cycle 7s ease infinite; }
.chapter.playing .c1 .ub-skel { animation-delay: 0s; }
.chapter.playing .c2 .ub-skel { animation-delay: 0.35s; }
@keyframes skel-cycle { 0%, 16% { opacity: 1; } 26%, 88% { opacity: 0; } 96%, 100% { opacity: 1; } }

.ub-tabbar {
  margin: auto -12px 0; display: flex; justify-content: space-around;
  background: #fff; box-shadow: 0 -4px 16px rgba(92, 107, 192, 0.12);
  padding: 8px 6px 16px; border-radius: 18px 18px 0 0;
}
.ub-tabbar span { display: grid; justify-items: center; gap: 2px; color: #565656; }
.ub-tabbar svg { width: 16px; height: 16px; }
.ub-tabbar small { font-size: 7.5px; }
.ub-tabbar .active { color: #00A82D; }

/* --- STORE STRIP: real App Store screenshots (restored) --- */
.store-strip { grid-column: 1 / -1; margin-top: clamp(20px, 4vh, 44px); display: grid; gap: 16px; min-width: 0; }
.rail-label { font-size: 10px; letter-spacing: 0.14em; color: var(--text-3); }
.rail-label::before { content: "●"; color: var(--app); margin-right: 8px; font-size: 8px; }
.store-card {
  display: inline-flex; align-items: center; gap: 14px; justify-self: start;
  padding: 12px 22px 12px 12px; border: 1px solid var(--hairline); border-radius: 20px;
  background: var(--surface); transition: border-color 0.3s, transform 0.35s var(--spring);
}
.store-card:hover { border-color: color-mix(in srgb, var(--app) 55%, transparent); transform: translateY(-3px); }
.store-icon { width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0; }
.store-meta b { display: block; font-size: 14.5px; line-height: 1.3; }
.store-stars { display: block; font-size: 12px; color: #FF9F0A; margin-top: 3px; }
.store-open { display: block; font-size: 10px; letter-spacing: 0.08em; color: var(--app); margin-top: 4px; }
.shot-rail {
  display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 16px;
  scroll-snap-type: x proximity; cursor: grab;
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.shot-rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.shot-rail::-webkit-scrollbar { height: 6px; }
.shot-rail::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 6px; }
.shot {
  height: clamp(250px, 36vh, 340px); width: auto; flex-shrink: 0;
  border-radius: 20px; border: 1px solid var(--hairline); background: var(--surface);
  scroll-snap-align: start; user-select: none; -webkit-user-drag: none;
  transition: transform 0.35s var(--ease-out), border-color 0.3s;
}
.shot:nth-child(odd) { transform: rotate(0.7deg); }
.shot:nth-child(even) { transform: rotate(-0.7deg); }
.shot:hover { transform: translateY(-6px) rotate(0deg); border-color: color-mix(in srgb, var(--app) 45%, transparent); }

/* ============================================================
   04 · APP LIBRARY
   ============================================================ */
.library { padding: clamp(80px, 14vh, 160px) 0 0; }
.lib-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lib-tile {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px;
  padding: 18px; min-width: 0;
  transition: transform 0.35s var(--ease-out), border-color 0.3s;
}
.lib-tile:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }
.lib-tile-wide { grid-column: span 2; }
.lib-ico { width: 52px; height: 52px; flex-shrink: 0; border-radius: 13px; }
.lib-glyph {
  display: grid; place-items: center; font-size: 22px; font-weight: 700; font-family: var(--font-display);
  background: color-mix(in srgb, var(--ico) 16%, transparent); color: var(--ico);
}
.lib-text { min-width: 0; }
.lib-text b { display: flex; align-items: center; gap: 8px; font-size: 15px; flex-wrap: wrap; }
.lib-text small { display: block; color: var(--text-2); font-size: 12.5px; line-height: 1.45; margin-top: 4px; }
.lib-text small b { display: inline; font-size: inherit; color: var(--text); }
.lib-meta { display: block; font-size: 9.5px; letter-spacing: 0.08em; color: #FF9F0A; margin-top: 9px; }
.lib-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.lib-links .lib-meta { color: var(--text-3); transition: color 0.25s; }
.lib-links .lib-meta:hover { color: var(--lime); }
.lib-tile .lib-meta { color: var(--text-3); }
.lib-tile:hover .lib-meta { color: var(--lime); }

@media (max-width: 1080px) { .lib-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .lib-grid { grid-template-columns: 1fr; }
  .lib-tile-wide { grid-column: auto; }
}

/* ============================================================
   05 · RELEASE NOTES
   ============================================================ */
.release { padding: clamp(80px, 14vh, 160px) 0 0; }
.timeline { position: relative; max-width: 720px; padding-left: 44px; }
.timeline-spine { position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--hairline); border-radius: 2px; overflow: hidden; }
.timeline-spine i { display: block; width: 100%; height: calc(var(--spine, 0) * 100%); background: linear-gradient(180deg, var(--lime), rgba(204, 248, 54, 0.25)); transition: height 0.2s linear; }

.rel-card {
  position: relative; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 26px 30px; margin-bottom: 26px;
}
.rel-card::before {
  content: ""; position: absolute; left: -41px; top: 34px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--void); border: 2px solid var(--text-3);
}
.rel-card.in::before { border-color: var(--lime); background: var(--lime); box-shadow: 0 0 14px rgba(204, 248, 54, 0.5); }
.rel-badge {
  display: inline-block; font-size: 11px; letter-spacing: 0.08em; color: var(--text-2);
  border: 1px solid var(--hairline); border-radius: 100px; padding: 4px 12px; margin-bottom: 14px;
}
.rel-card h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-bottom: 10px; }
.rel-card p:last-child { color: var(--text-2); font-size: 15px; }
.rel-card-edu { border-style: dashed; }
.rel-card-next { border-color: color-mix(in srgb, var(--lime) 45%, transparent); background: color-mix(in srgb, var(--lime) 5%, var(--surface)); }
.rel-card-next .rel-badge { color: var(--lime); border-color: color-mix(in srgb, var(--lime) 45%, transparent); }
.rel-card-next a { color: var(--lime); font-weight: 600; }
.rel-card-next a:hover { text-decoration: underline; }

/* ============================================================
   05 · SETTINGS
   ============================================================ */
.settings { padding: clamp(80px, 14vh, 160px) 0 0; }
.settings-groups { max-width: 760px; display: grid; gap: 30px; }
.group-label { font-size: 11px; letter-spacing: 0.12em; color: var(--text-3); padding: 0 20px 10px; }
.settings-group ul { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden; }
.s-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.s-row + .s-row { border-top: 1px solid var(--hairline); }
.s-ico {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px;
  background: color-mix(in srgb, var(--ico) 18%, transparent); color: var(--ico);
  display: grid; place-items: center; font-size: 15px;
}
.s-text b { display: block; font-size: 15px; }
.s-text small { color: var(--text-2); font-size: 13px; line-height: 1.4; display: block; margin-top: 2px; }
.s-toggle {
  margin-left: auto; flex-shrink: 0; width: 51px; height: 31px; border-radius: 100px;
  background: #39393D; position: relative; transition: background 0.35s;
}
.s-toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--spring);
}
.s-row.on .s-toggle { background: #30D158; }
.s-row.on .s-toggle::after { transform: translateX(20px); }

.platform-glyphs { display: flex; flex-wrap: wrap; gap: 9px; }
.pg {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
  border: 1px solid var(--hairline); border-radius: 100px; padding: 8px 15px;
  transition: border-color 0.25s, color 0.25s;
}
.pg svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-2); transition: color 0.25s; }
.pg:hover { border-color: color-mix(in srgb, var(--lime) 45%, transparent); color: var(--text); }
.pg:hover svg { color: var(--lime); }

/* ============================================================
   06 · ANALYTICS
   ============================================================ */
.analytics { padding: clamp(80px, 14vh, 160px) 0 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px;
  padding: 26px 26px 20px; transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover { border-color: rgba(204, 248, 54, 0.35); transform: translateY(-3px); }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 10.5px; letter-spacing: 0.12em; color: var(--text-3); margin: 10px 0 18px; }
.spark { width: 100%; height: 30px; }
.spark path { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; opacity: 0.85; }

/* ============================================================
   07 · TESTFLIGHT (GITHUB LAB)
   ============================================================ */
.lab { padding: clamp(80px, 14vh, 160px) 0 0; }
.lab-list { max-width: 760px; display: grid; gap: 12px; }
.lab-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px;
  padding: 16px 20px; transition: transform 0.35s var(--ease-out), border-color 0.3s;
}
.lab-row:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ico, #0D96F6) 40%, transparent); }
.lab-ico {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  background: color-mix(in srgb, var(--ico) 16%, transparent); color: var(--ico);
  display: grid; place-items: center; font-size: 19px; font-weight: 700;
}
.lab-text { min-width: 0; }
.lab-text b { display: flex; align-items: center; gap: 10px; font-size: 15.5px; }
.lab-text small { color: var(--text-2); font-size: 13px; line-height: 1.45; display: block; margin-top: 3px; }
.beta-tag {
  font-size: 9px; font-weight: 500; letter-spacing: 0.1em; color: #0D96F6;
  border: 1px solid rgba(13, 150, 246, 0.45); background: rgba(13, 150, 246, 0.1);
  padding: 2px 8px; border-radius: 100px; flex-shrink: 0;
}
.lab-get {
  margin-left: auto; flex-shrink: 0; font-size: 11px; letter-spacing: 0.06em;
  color: var(--text-2); border: 1px solid var(--hairline); border-radius: 100px;
  padding: 8px 16px; transition: color 0.25s, border-color 0.25s;
}
.lab-get:hover { color: var(--lime); border-color: var(--lime); }
.lab-foot { margin-top: 22px; font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); }

@media (max-width: 560px) {
  .lab-row { flex-wrap: wrap; padding: 14px 16px; }
  .lab-get { margin-left: 60px; }
}

/* ============================================================
   08 · APP STORE (SERVICES)
   ============================================================ */
.store { padding: clamp(80px, 14vh, 160px) 0 0; }
.iap-list { max-width: 760px; display: grid; gap: 14px; }
.iap {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 24px;
  padding: 20px 24px; transition: transform 0.35s var(--ease-out), border-color 0.3s;
}
.iap:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.16); }
.iap-ico {
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 15px;
  background: color-mix(in srgb, var(--ico) 15%, transparent); color: var(--ico);
  display: grid; place-items: center; font-size: 23px;
}
.iap-text b { display: block; font-size: 17px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.iap-text small { color: var(--text-2); font-size: 13.5px; display: block; margin-top: 3px; }
.iap-get {
  margin-left: auto; flex-shrink: 0; position: relative;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(204, 248, 54, 0.12); color: var(--lime);
  padding: 9px 24px; border-radius: 100px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}
.iap-get:active { transform: scale(0.94); }
.iap-ring {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
  margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid transparent; opacity: 0;
}
.iap-get.loading span { opacity: 0; }
.iap-get.loading .iap-ring {
  opacity: 1; border-top-color: var(--lime); border-right-color: var(--lime);
  animation: get-spin 0.7s linear infinite;
}
@keyframes get-spin { to { transform: rotate(360deg); } }
.iap-get.open { background: var(--lime); color: #05060A; }

/* ============================================================
   08+09 · CONTACT
   ============================================================ */
.contact { padding: clamp(90px, 15vh, 170px) 0 0; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: stretch; }

.poster { position: relative; border-radius: 28px; overflow: hidden; min-height: 480px; border: 1px solid var(--hairline); }
.poster img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
  filter: contrast(1.06) saturate(0.88) brightness(0.9);
  transition: transform 6s var(--ease-out);
}
.poster:hover img { transform: scale(1.05); }
.poster-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 10, 0.3) 0%, transparent 30%, transparent 50%, rgba(5, 6, 10, 0.92) 100%); }
.poster-greeting { position: absolute; top: 22px; left: 24px; font-size: 13px; color: var(--lime); letter-spacing: 0.08em; }
.poster-greeting span { display: inline-block; transition: opacity 0.3s, transform 0.3s; }
.poster-greeting span.swap { opacity: 0; transform: translateY(8px); }
.poster-name {
  position: absolute; bottom: 44px; left: 0; right: 0; text-align: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.6rem, 5.4vw, 4.2rem); letter-spacing: 0.04em; line-height: 1;
  color: rgba(244, 246, 251, 0.95); text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}
.poster-meta { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: 0.12em; color: var(--text-2); line-height: 1.7; }

.imessage { background: var(--surface); border: 1px solid var(--hairline); border-radius: 28px; display: flex; flex-direction: column; }
.im-head { display: flex; align-items: center; gap: 13px; padding: 18px 24px; border-bottom: 1px solid var(--hairline); }
.im-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(140deg, var(--lime), #2DD4BF); color: #05060A;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.im-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.im-name small { font-size: 10.5px; color: var(--text-3); font-weight: 400; letter-spacing: 0.04em; }

.im-thread { padding: 26px 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 250px; }
.im-bubble {
  max-width: 82%; padding: 11px 16px; border-radius: 20px; font-size: 14.5px; line-height: 1.45;
  opacity: 0; transform: translateY(12px) scale(0.92);
  transition: opacity 0.45s var(--spring), transform 0.45s var(--spring);
}
.im-bubble.show { opacity: 1; transform: none; }
.im-them { background: #26262B; border-bottom-left-radius: 6px; align-self: flex-start; }
.im-me { background: #0868C8; color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }

.im-typing {
  align-self: flex-end; display: none; gap: 4px; padding: 13px 16px;
  background: #26262B; border-radius: 20px; border-bottom-right-radius: 6px;
}
.im-typing.show { display: flex; }
.im-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1s ease-in-out infinite; }
.im-typing i:nth-child(2) { animation-delay: 0.15s; }
.im-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { transform: none; opacity: 0.5; } }

.im-status { align-self: flex-end; font-size: 10px; color: var(--text-3); opacity: 0; transition: opacity 0.4s; }
.im-status.show { opacity: 1; }

.im-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 24px 22px; border-top: 1px solid var(--hairline); }
.chip {
  font-size: 13.5px; font-weight: 500; padding: 11px 18px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  transition: border-color 0.25s, background 0.3s, color 0.3s, transform 0.2s;
}
.chip:hover { border-color: var(--lime); }
.chip:active { transform: scale(0.95); }
.chip-copy.copied { background: var(--lime); color: #05060A; border-color: var(--lime); font-weight: 600; }

/* ---------- footer ---------- */
.footer { margin-top: clamp(80px, 12vh, 140px); border-top: 1px solid var(--hairline); padding: 34px 0 42px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer .mono { font-size: 11.5px; line-height: 1.8; text-align: right; }
.footer kbd { border: 1px solid var(--hairline); border-radius: 5px; padding: 1px 6px; font-size: 10px; background: var(--surface); }

/* ---------- mobile thumb bar ---------- */
.thumb-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(5, 6, 10, 0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--hairline);
  transform: translateY(110%); visibility: hidden;
  transition: transform 0.45s var(--ease-out), visibility 0.45s;
  display: none;
}
.thumb-bar .btn { width: 100%; }
body.show-thumb .thumb-bar { transform: translateY(0); visibility: visible; }

/* ============================================================
   WIDGET INSPECTOR (press D)
   ============================================================ */
body.debug [data-widget], body.debug[data-widget] { outline: 1px dashed rgba(34, 211, 238, 0.65); outline-offset: -1px; }
body.debug section [data-widget]::before,
body.debug main [data-widget]::before {
  content: attr(data-widget);
  position: absolute; z-index: 150;
  font-family: var(--font-mono); font-size: 9px; color: #22D3EE;
  background: rgba(5, 6, 10, 0.85); border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 2px 7px; border-radius: 4px; margin: 4px;
  pointer-events: none;
}
.debug-badge {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); left: 18px; z-index: 160;
  font-family: var(--font-mono); font-size: 11px; color: #22D3EE;
  background: rgba(5, 6, 10, 0.9); border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 100px; padding: 8px 16px; display: none;
}
body.debug .debug-badge { display: block; }
body.debug.show-thumb .debug-badge { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .watch { left: -12px; }
  .chapter.playing .ghost-a { transform: translateX(-40%) rotate(-5deg) scale(0.9); }
  .chapter.playing .ghost-b { transform: translateX(40%) rotate(5deg) scale(0.9); }
}

@media (max-width: 900px) {
  .hero { height: auto; }
  .hero-sticky { position: static; height: auto; padding: 110px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-device { height: auto; padding: 40px 0 20px; }
  .hero-phone { height: min(600px, 72svh); transform: none; }
  .hero-hint, .unlock-hint { display: none; }

  .chapter { grid-template-columns: 1fr; gap: 44px; padding: clamp(56px, 9vh, 90px) 0; }
  .chapter-flip .chapter-copy { order: 0; }
  .chapter-flip .chapter-stage { order: 1; }
  .chapter-stage { min-height: 0; }

  .contact-grid { grid-template-columns: 1fr; }
  .poster { min-height: 440px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer .mono { text-align: left; }
  .footer-grid { flex-direction: column; }
}

@media (max-width: 768px) {
  /* the visitor's phone becomes the device: bezels off */
  .thumb-bar { display: block; }
  .debug-hint { display: none; }

  .demo-phone {
    height: auto; width: 100%; max-width: 420px; aspect-ratio: 9 / 15.5;
    padding: 0; background: none; border-radius: 26px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  }
  .demo-phone .phone-screen { border-radius: 26px; border: 1px solid var(--hairline); }
  .demo-phone .home-indicator { display: none; }

  .hero-phone { height: min(560px, 68svh); }
  .hero-name-front { bottom: 3%; }

  .ghost-phone { display: none; }
  .watch { position: static; margin: -46px 0 0 auto; }
  .chapter-stage { flex-direction: column; }

  .shot { height: 240px; }
  .store-card { justify-self: stretch; }

  .island-menu { grid-template-columns: 1fr 1fr; min-width: 230px; }
  .im-thread { min-height: 210px; }
  .stat-card { padding: 20px 18px 16px; }
  .s-text small { font-size: 12px; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 32px); }
  .poster-name { font-size: 2.2rem; letter-spacing: 0.03em; }
  .overline { font-size: 9.5px; letter-spacing: 0.08em; margin-bottom: 22px; }
  .btn { font-size: 14px; padding: 13px 18px; white-space: nowrap; }
  .hero-name { transform: translateX(-50%); }
  .stat-grid { gap: 10px; }
  .iap { padding: 16px; gap: 12px; }
  .iap-ico { width: 44px; height: 44px; font-size: 19px; }
  .iap-text b { font-size: 15px; }
  .iap-text small { font-size: 12px; }
  .iap-get { padding: 8px 16px; }
  .cta-row .btn { flex: 1; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .split .wi { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .notif { opacity: 1; transform: none; }
  .im-bubble { opacity: 1; transform: none; }
  .lockscreen { transform: none; filter: none; }
  .unlock-hint { display: none; }
  .dl-new { opacity: 1; transform: none; }
  .ub-skel { opacity: 0 !important; }
  .im-typing { display: none !important; }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switch {
  position: fixed; top: 14px; right: 16px; z-index: 101;
  display: flex; gap: 2px; padding: 4px;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hairline); border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--text-2); padding: 6px 11px; border-radius: 100px;
  transition: background 0.25s, color 0.25s;
}
.lang-btn .flag { font-size: 12px; line-height: 1; }
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active { background: var(--lime); color: #05060A; font-weight: 600; }
.lang-switch.busy { opacity: 0.6; pointer-events: none; }

@media (max-width: 560px) {
  .lang-switch { top: 12px; right: 10px; }
  .lang-btn { padding: 7px 8px; font-size: 0; gap: 0; }
  .lang-btn .flag { font-size: 14px; }
  .island { transform: translateX(-62%); }
}
body:not(.show-thumb) .lang-switch { }

.sub-link { color: var(--lime); font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .25s; }
.sub-link:hover { border-bottom-color: var(--lime); }
