/* ═══════════════════════════════════════════════════════════════════
   Vitrina — iOS "Liquid Glass" uslubi
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --accent: #0A84FF;
  --accent-rgb: 10, 132, 255;

  --page: #eef1f7;
  --ink: #0b0c10;
  --ink-2: rgba(60, 60, 67, .72);
  --ink-3: rgba(60, 60, 67, .42);

  --glass: rgba(255, 255, 255, .52);
  --glass-strong: rgba(255, 255, 255, .74);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-hi: rgba(255, 255, 255, .95);
  --glass-sheen: linear-gradient(145deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.06) 30%, transparent 55%, rgba(255,255,255,.12) 100%);
  --rim-opacity: .8;
  --shadow: 0 8px 28px rgba(31, 41, 80, .10), 0 1px 2px rgba(31, 41, 80, .06);

  --sep: rgba(60, 60, 67, .14);
  --fill: rgba(120, 120, 128, .12);
  --seg: #ffffff;
  --scrim: rgba(10, 12, 20, .26);

  --orb-a: rgba(var(--accent-rgb), .42);
  --orb-b: rgba(255, 128, 181, .40);
  --orb-c: rgba(255, 196, 92, .38);
  --orb-d: rgba(80, 220, 180, .34);
  --art-l1: 64%;
  --art-l2: 40%;

  --spring: cubic-bezier(.32, .72, 0, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --serif: "New York", "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --page: #05060a;
  --ink: #f5f5f7;
  --ink-2: rgba(235, 235, 245, .68);
  --ink-3: rgba(235, 235, 245, .38);

  --glass: rgba(40, 42, 56, .46);
  --glass-strong: rgba(30, 32, 44, .76);
  --glass-border: rgba(255, 255, 255, .10);
  --glass-hi: rgba(255, 255, 255, .22);
  --glass-sheen: linear-gradient(145deg, rgba(255,255,255,.13) 0%, transparent 35%, transparent 70%, rgba(255,255,255,.05) 100%);
  --rim-opacity: .35;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);

  --sep: rgba(84, 84, 88, .5);
  --fill: rgba(118, 118, 128, .24);
  --seg: rgba(120, 120, 128, .62);
  --scrim: rgba(0, 0, 0, .5);

  --orb-a: rgba(var(--accent-rgb), .34);
  --orb-b: rgba(200, 60, 140, .28);
  --orb-c: rgba(200, 130, 40, .22);
  --orb-d: rgba(30, 170, 140, .24);
  --art-l1: 50%;
  --art-l2: 28%;
  color-scheme: dark;
}

/* ── Asos ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--page); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }

/* ── Fon: suzuvchi rangli sharlar (shisha shular ustida "tiriladi") ── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; width: 72vmax; height: 72vmax; border-radius: 50%; will-change: transform; }
.o1 { background: radial-gradient(circle, var(--orb-a), transparent 62%); top: -28vmax; left: -22vmax; animation: drift1 22s ease-in-out infinite alternate; }
.o2 { background: radial-gradient(circle, var(--orb-b), transparent 62%); top: 18vh; right: -34vmax; animation: drift2 27s ease-in-out infinite alternate; }
.o3 { background: radial-gradient(circle, var(--orb-c), transparent 62%); bottom: -34vmax; left: -14vmax; animation: drift3 31s ease-in-out infinite alternate; }
.o4 { background: radial-gradient(circle, var(--orb-d), transparent 62%); bottom: 4vh; right: -26vmax; width: 52vmax; height: 52vmax; animation: drift1 25s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(14vmax, 18vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-18vmax, 10vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(16vmax, -14vmax) scale(1.2); } }

/* ── Liquid glass ─────────────────────────────────────────────────── */
.glass, .glass-strong {
  position: relative;
  isolation: isolate;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(185%);
  backdrop-filter: blur(20px) saturate(185%);
  border: .5px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(255, 255, 255, .06), var(--shadow);
}
.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  backdrop-filter: blur(32px) saturate(200%);
}
/* Yuzadagi yorug'lik aksi */
.glass::before, .glass-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--glass-sheen);
  pointer-events: none;
}
/* Qirradagi yaltiroq hoshiya (specular rim) */
.glass::after, .glass-strong::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.12) 30%, rgba(255,255,255,0) 60%, rgba(255,255,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: var(--rim-opacity);
  pointer-events: none;
}

.pressable { transition: transform .4s var(--spring); }
.pressable:active { transform: scale(.965); transition-duration: .12s; }

/* ── Karkas ───────────────────────────────────────────────────────── */
#app {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 14px) 16px calc(112px + var(--safe-bottom));
  transition: opacity .5s ease;
}
body:not(.revealed) #app { opacity: 0; }
.revealed .view:not([hidden]) { animation: viewIn .6s var(--spring) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.navbar {
  position: fixed;
  z-index: 40;
  left: 0; right: 0;
  top: calc(var(--safe-top) + 8px);
  margin: 0 auto;
  width: fit-content;
  max-width: calc(100% - 32px);
  height: 40px;
  padding: 0 16px 0 7px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-18px) scale(.88);
  pointer-events: none;
  transition: opacity .3s ease, transform .5s var(--spring);
}
.navbar b { overflow: hidden; text-overflow: ellipsis; }
.nav-logo { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: rgba(var(--accent-rgb), .15); }
.scrolled .navbar { opacity: 1; transform: none; }
.sheet-open .navbar { opacity: 0; }

/* ── Sarlavha va qidiruv ──────────────────────────────────────────── */
.hero { padding-top: 8px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.eyebrow { margin: 0 0 3px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.large-title { margin: 0; font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
.logo { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 50% { translate: 0 -5px; } }

.notice { margin-bottom: 12px; padding: 10px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; color: #ff9500; }

.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 10px 0 14px; border-radius: 23px; color: var(--ink-3); }
.search svg { width: 19px; height: 19px; flex: 0 0 auto; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); color: var(--page); }
.search-clear svg { width: 12px; height: 12px; stroke-width: 3.2; }

/* ── Kategoriyalar ────────────────────────────────────────────────── */
.cats {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px -16px 0;
  padding: 4px 16px 8px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.chip {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 15px 0 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .3s ease, background .3s ease;
}
.chip .cnt { font-size: 12px; color: var(--ink-3); transition: color .3s; }
.chip.glass.active { color: #fff; background: transparent; box-shadow: none; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.chip.active::before, .chip.active::after { opacity: 0; }
.chip.active .cnt { color: rgba(255, 255, 255, .78); }
.cats-lens {
  position: absolute;
  z-index: 0;
  top: 4px;
  left: 0;
  width: var(--w, 0);
  height: 40px;
  border-radius: 20px;
  transform: translateX(var(--x, 0));
  background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0) 60%), var(--accent);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), .38), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.08);
  opacity: 0;
  transition: transform .6s var(--spring), width .6s var(--spring);
}

/* ── Filtrlar ─────────────────────────────────────────────────────── */
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 4px -16px 0; padding: 4px 16px; scrollbar-width: none; }
.fchip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--fill);
  transition: background .25s, color .25s, box-shadow .25s, transform .35s var(--spring);
}
.fchip svg { width: 15px; height: 15px; }
.fchip:active { transform: scale(.93); }
.fchip.on { color: var(--accent); background: rgba(var(--accent-rgb), .15); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .38); }
.fsep { flex: 0 0 1px; margin: 7px 3px; background: var(--sep); }

/* ── Mahsulot kartalari ───────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; margin-top: 12px; }
.card { border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.grid.animate .card { animation: cardIn .7s var(--spring) backwards; animation-delay: calc(var(--i) * 45ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(22px) scale(.95); } }

.card-cover { position: relative; margin: 6px 6px 0; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: var(--fill); }
.card-cover img, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card.out .card-cover { filter: grayscale(.8); opacity: .7; }

/* Rasmsiz mahsulot uchun chiroyli "muqova" */
.art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 12px 12px 19px;
  color: #fff;
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(255,255,255,.34), transparent 50%),
    linear-gradient(160deg, hsl(var(--h) 72% var(--art-l1)), hsl(calc(var(--h) + 38) 62% var(--art-l2)));
}
.art::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.12));
  box-shadow: 3px 0 6px rgba(0,0,0,.14);
}
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.16) 48%, transparent 56%);
  pointer-events: none;
}
.art-emoji { font-size: 28px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.22)); }
.card-cover .art-emoji { align-self: flex-end; } /* chap tepada belgi (badge) turadi */
.card.out .card-cover .art-emoji { opacity: 0; }
.art-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.12;
  text-shadow: 0 1px 8px rgba(0,0,0,.2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.badge {
  position: absolute;
  z-index: 2;
  top: 13px; left: 13px;
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 59, 48, .92);
  box-shadow: 0 4px 12px rgba(255, 59, 48, .35), inset 0 1px 0 rgba(255,255,255,.45);
}
.soldout { position: absolute; z-index: 2; top: 13px; right: 13px; height: 24px; padding: 0 9px; border-radius: 12px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; }

.card-body { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.card-title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { margin: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.price { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.price b { font-size: 16px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; }
.price b small { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.price > small { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.price s { font-size: 12px; color: var(--ink-3); }
.add-btn {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0) 55%), var(--accent);
  box-shadow: 0 6px 14px rgba(var(--accent-rgb), .4), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .45s var(--bounce);
}
.add-btn svg { width: 18px; height: 18px; }
.add-btn:active { transform: scale(.82) rotate(90deg); transition-duration: .15s; }

.fly-dot {
  position: fixed;
  z-index: 300;
  width: 18px; height: 18px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(var(--accent-rgb), .95) 60%);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), .6);
}

/* ── Bo'sh holatlar, tugmalar ─────────────────────────────────────── */
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 24px; }
.empty-emoji { display: inline-block; font-size: 64px; line-height: 1.1; margin-bottom: 6px; animation: floaty 4s ease-in-out infinite; }
.empty h3 { margin: 6px 0 4px; font-size: 20px; }
.empty p { margin: 0 0 20px; color: var(--ink-2); }
.fatal { max-width: 340px; margin: 26vh auto 0; padding: 28px 22px; border-radius: 30px; text-align: center; }
.fatal h2 { margin: 4px 0; }
.fatal p { color: var(--ink-2); margin: 0 0 18px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 55%), var(--accent);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), .35), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.1);
}
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.loading { color: transparent; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--accent); font-size: 16px; font-weight: 500; padding: 6px 0; }

/* ── Pastki tab bar ───────────────────────────────────────────────── */
.tabbar {
  position: fixed;
  z-index: 50;
  left: 0; right: 0;
  bottom: calc(12px + var(--safe-bottom));
  margin: 0 auto;
  width: min(calc(100% - 40px), 360px);
  height: 64px;
  padding: 6px;
  border-radius: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  transition: transform .5s var(--spring), opacity .3s ease;
}
.revealed .tabbar { animation: tabIn .9s var(--bounce) .25s backwards; }
@keyframes tabIn { from { transform: translateY(150%) scale(.8); opacity: 0; } }
.sheet-open .tabbar { transform: translateY(160%); opacity: 0; }
.tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 26px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: color .3s ease;
}
.tab svg { width: 24px; height: 24px; transition: transform .45s var(--bounce); }
.tab.active { color: var(--accent); }
.tab.active svg { transform: scale(1.08); }
.tab.bump svg { animation: bump .6s var(--bounce); }
@keyframes bump { 40% { transform: scale(1.38) rotate(-10deg); } }
.tab-lens {
  position: absolute;
  z-index: 0;
  top: 6px; bottom: 6px; left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 26px;
  background: rgba(var(--accent-rgb), .13);
  box-shadow: inset 0 0 0 .5px rgba(var(--accent-rgb), .28), inset 0 1px 0 rgba(255,255,255,.5);
  transform: translateX(calc(var(--x, 0) * 100%));
  transition: transform .6s var(--spring);
}
.tab-lens.stretch { animation: lensStretch .6s var(--spring); }
@keyframes lensStretch { 35% { scale: 1.24 .86; } }
.tab-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 5px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  color: #fff;
  background: #ff3b30;
  box-shadow: 0 0 0 2px var(--page);
}
.tab-badge.pop { animation: pop .45s var(--bounce); }
@keyframes pop { from { transform: scale(.4); } }

/* ── Savat ────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 8px; margin-bottom: 16px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 22px; }
.cart-item.removing { animation: itemOut .3s var(--spring) forwards; }
@keyframes itemOut { to { opacity: 0; transform: translateX(-30px) scale(.94); } }
.thumb { position: relative; flex: 0 0 auto; width: 60px; height: 76px; border-radius: 14px; overflow: hidden; }
.thumb:not(.art) { background: var(--fill); }
.thumb.art { padding: 8px 6px 8px 14px; justify-content: center; }
.thumb.art::before { left: 5px; }
.thumb .art-title { display: none; }
.thumb .art-emoji { font-size: 24px; }
.ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; cursor: pointer; }
.ci-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-var { font-size: 13px; color: var(--ink-2); }
.ci-price { margin-top: 3px; font-size: 15px; font-weight: 700; }

.stepper { flex: 0 0 auto; display: flex; align-items: center; height: 38px; padding: 0 3px; border-radius: 19px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); transition: background .2s, transform .3s var(--bounce); }
.stepper button svg { width: 15px; height: 15px; }
.stepper button:active { background: var(--fill); transform: scale(.85); }
.stepper span { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.summary { margin-top: 14px; padding: 14px 16px; border-radius: 22px; display: flex; flex-direction: column; gap: 9px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.row span { color: var(--ink-2); }
.row.total { font-size: 18px; font-weight: 750; }
.row.total span { color: var(--ink); }
.hint { font-size: 13.5px; color: var(--ink-2); }
.hint.ok { color: #34c759; font-weight: 600; }
.hint.warn { color: #ff9500; font-weight: 600; }
.meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .55), var(--accent)); transition: width .6s var(--spring); }
.cart-cta { position: sticky; bottom: calc(88px + var(--safe-bottom)); width: 100%; margin-top: 14px; }

/* ── Pastki varaq (sheet) ─────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .45s ease; }
.sheet-wrap.open .scrim { opacity: 1; }
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 620px;
  max-height: calc(100% - var(--safe-top) - 40px);
  display: flex;
  flex-direction: column;
  border-radius: 34px 34px 0 0;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  backdrop-filter: blur(40px) saturate(190%);
  border: .5px solid var(--glass-border);
  border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18), inset 0 1px 0 var(--glass-hi);
  transform: translateY(105%);
  transition: transform .55s var(--spring);
  will-change: transform;
}
.sheet-wrap.open .sheet { transform: translateY(0); }
.grabber { flex: 0 0 auto; height: 22px; display: grid; place-items: center; touch-action: none; }
.grabber i { width: 38px; height: 5px; border-radius: 3px; background: var(--ink-3); }
.sheet-close { position: absolute; z-index: 5; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.sheet-close svg { width: 15px; height: 15px; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px calc(20px + var(--safe-bottom)); }
.sheet-title { margin: 6px 44px 6px 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }

/* Mahsulot varag'i */
.gallery { display: flex; width: 100%; aspect-ratio: 1 / 1; max-height: 44vh; margin-top: 4px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 26px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.gallery.noimg { display: grid; place-items: center; overflow: visible; background: radial-gradient(55% 55% at 50% 48%, hsl(var(--h) 85% 65% / .38), transparent 72%); }
.book3d {
  width: 46%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: 4px 14px 14px 4px;
  padding: 16px 14px 16px 24px;
  box-shadow: 22px 28px 48px rgba(0,0,0,.28), inset -2px 0 0 rgba(0,0,0,.12);
  transform: perspective(900px) rotateY(-18deg) rotateX(4deg);
  animation: bookSway 6s ease-in-out infinite;
}
.book3d::before { left: 11px; width: 3px; }
.book3d .art-emoji { font-size: 40px; }
.book3d .art-title { font-size: clamp(17px, 5.2vw, 24px); }
@keyframes bookSway { 50% { transform: perspective(900px) rotateY(-7deg) rotateX(2deg) translateY(-8px); } }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--ink-3); transition: width .35s var(--spring), background .3s; }
.dots i.on { width: 18px; background: var(--accent); }

.ps-body { padding: 14px 2px 0; }
.ps-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 27px; padding: 0 11px; border-radius: 14px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.pill.accent { color: #fff; background: #ff3b30; }
.ps-title { margin: 10px 0 2px; font-size: 27px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.ps-sub { margin: 0; font-size: 16px; color: var(--ink-2); }
.ps-price { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 12px; }
.ps-price b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.ps-price s { font-size: 16px; color: var(--ink-3); }
.ps-stock { margin: 10px 2px 0; font-size: 14px; font-weight: 600; color: #34c759; }
.ps-stock.low { color: #ff9500; }
.ps-stock.none { color: #ff3b30; }
.ps-desc { margin: 16px 4px 0; font-size: 16px; line-height: 1.5; white-space: pre-line; }
.ps-footer {
  position: sticky;
  bottom: calc(-20px - var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px -16px calc(-20px - var(--safe-bottom));
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  border-bottom: 0;
}
.ps-footer .stepper { height: 52px; border-radius: 26px; padding: 0 6px; }
.ps-footer .btn { flex: 1; min-width: 0; padding: 0 14px; overflow: hidden; text-overflow: ellipsis; }

.group { margin-top: 14px; border-radius: 20px; overflow: hidden; }
.group-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 46px; padding: 11px 16px; font-size: 15.5px; }
.group-row + .group-row, .field + .field { background: linear-gradient(var(--sep), var(--sep)) 16px 0 / calc(100% - 16px) .5px no-repeat; }
.group-row span { color: var(--ink-2); }
.group-row b { font-weight: 600; text-align: right; }
.group-label { margin: 20px 16px 7px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }

/* Segmentli tanlagich */
.segmented { position: relative; display: flex; padding: 3px; border-radius: 14px; background: var(--fill); }
.segmented button { position: relative; z-index: 1; flex: 1; min-height: 36px; padding: 6px 10px; border-radius: 11px; font-size: 14px; font-weight: 600; line-height: 1.15; color: var(--ink-2); transition: color .25s; }
.segmented button.on { color: var(--ink); }
.segmented button:disabled { opacity: .4; text-decoration: line-through; }
.seg-lens {
  position: absolute;
  z-index: 0;
  top: 3px; bottom: 3px; left: 0;
  width: var(--w, 0);
  border-radius: 11px;
  background: var(--seg);
  box-shadow: 0 3px 10px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04), inset 0 1px 0 rgba(255,255,255,.8);
  transform: translateX(var(--x, 0));
  opacity: 0;
  transition: transform .5s var(--spring), width .5s var(--spring);
}

/* Forma */
.field { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 8px 4px 16px; }
.field > span { flex: 0 0 72px; font-size: 16px; transition: color .2s; }
.field input, .field textarea { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); resize: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field.col { padding: 4px 16px; }
.field.invalid > span, .field.invalid input::placeholder, .field.invalid textarea::placeholder { color: #ff3b30; }
.mini-btn { flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 14px; font-weight: 600; color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px; }
.chips-wrap .fchip { height: 40px; padding: 0 18px; border-radius: 20px; font-size: 15px; }
.collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--spring), opacity .3s; }
.collapse > div { overflow: hidden; }
.collapse.closed { grid-template-rows: 0fr; opacity: 0; }
.summary-group { padding: 6px 0; margin-top: 22px; }
.summary-group .row { padding: 7px 16px; }
.co .btn { width: 100%; margin-top: 18px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ── Buyurtmalar ──────────────────────────────────────────────────── */
.orders { display: flex; flex-direction: column; gap: 12px; }
.order { padding: 14px 16px; border-radius: 24px; animation: cardIn .6s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-top b { display: block; font-size: 17px; }
.order-date { font-size: 13px; color: var(--ink-2); }
.status { flex: 0 0 auto; height: 28px; padding: 0 10px; border-radius: 14px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; color: rgb(var(--c)); background: rgba(var(--c), .14); }
.s-new { --c: 10, 132, 255; }
.s-accepted { --c: 40, 180, 80; }
.s-shipping { --c: 255, 149, 0; }
.s-done { --c: 40, 170, 75; }
.s-cancelled { --c: 142, 142, 147; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 12px 0; }
.steps i { height: 4px; border-radius: 2px; background: var(--fill); }
.steps i.on { background: var(--accent); }
.steps.cancelled i { background: rgba(255, 59, 48, .25); }
.order-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.order-items li { display: flex; justify-content: space-between; gap: 10px; }
.order-items li span:last-child { flex: 0 0 auto; color: var(--ink-2); }
.order-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--sep); font-size: 14px; color: var(--ink-2); }
.order-foot b { font-size: 17px; color: var(--ink); }
.skeleton { height: 150px; background: linear-gradient(100deg, var(--glass) 30%, var(--glass-hi) 50%, var(--glass) 70%) 0 0 / 300% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -150% 0; } }

/* ── Toast va muvaffaqiyat ekrani ─────────────────────────────────── */
.toast {
  position: fixed;
  z-index: 500;
  left: 0; right: 0;
  top: calc(var(--safe-top) + 10px);
  margin: 0 auto;
  width: fit-content;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-150%) scale(.9);
  transition: transform .55s var(--spring), opacity .3s ease;
}
.toast.show { opacity: 1; transform: none; }

.success { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 24px; overflow: hidden; background: var(--scrim); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity .35s ease; }
.success.show { opacity: 1; }
.success-card { width: min(100%, 340px); padding: 28px 22px 20px; border-radius: 34px; text-align: center; transform: scale(.8) translateY(30px); transition: transform .7s var(--bounce); }
.success.show .success-card { transform: none; }
.success h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.success p { margin: 0 0 20px; line-height: 1.45; color: var(--ink-2); }
.success .btn { width: 100%; }
.check-orb {
  width: 96px; height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.9), rgba(52,199,89,.92) 45%, rgb(34,150,66));
  box-shadow: 0 16px 34px rgba(52,199,89,.45), inset 0 -6px 14px rgba(0,0,0,.15), inset 0 4px 10px rgba(255,255,255,.6);
}
.check-orb svg { width: 54px; height: 54px; fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.success.show .check-orb { animation: orbPop .7s var(--bounce) .1s backwards; }
.success.show .check-orb svg { animation: draw .45s ease-out .5s forwards; }
@keyframes orbPop { from { transform: scale(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: absolute; top: -8vh; font-size: 26px; pointer-events: none; opacity: 0; }
.success.show .confetti { animation: fall var(--t) cubic-bezier(.25, .6, .4, 1) var(--d) forwards; }
@keyframes fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x), 112vh) rotate(var(--r)); }
}

/* ═══════════════════════════════════════════════════════════════════
   6 soniyali kirish animatsiyasi (bosqichlar tartibida — keyingisi ustun)
   ═══════════════════════════════════════════════════════════════════ */
#splash { position: fixed; inset: 0; z-index: 1000; overflow: hidden; background: var(--page); transition: opacity .5s ease, transform .55s var(--spring), filter .5s ease; }
#splash.out { opacity: 0; transform: scale(1.14); filter: blur(16px); pointer-events: none; }

.sp-aurora {
  position: absolute;
  inset: -35%;
  background:
    radial-gradient(38% 34% at 30% 32%, rgba(var(--accent-rgb), .5), transparent 70%),
    radial-gradient(34% 30% at 74% 64%, rgba(255, 120, 180, .42), transparent 70%),
    radial-gradient(30% 30% at 62% 22%, rgba(255, 200, 90, .38), transparent 70%),
    radial-gradient(30% 30% at 28% 76%, rgba(80, 220, 180, .32), transparent 70%);
  animation: auroraSpin 14s linear infinite;
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }

.sp-stage { position: absolute; inset: 0; display: grid; place-items: center; perspective: 900px; }
.sp-stage > * { grid-area: 1 / 1; }

.sp-skip {
  position: absolute;
  top: calc(var(--safe-top) + 14px);
  right: 16px;
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.sp-progress { position: absolute; left: 50%; bottom: calc(30px + var(--safe-bottom)); width: 120px; height: 4px; margin-left: -60px; border-radius: 2px; overflow: hidden; background: rgba(127, 127, 127, .2); }
.sp-progress i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); animation: prog 5.55s linear forwards; }
@keyframes prog { to { transform: scaleX(1); } }

/* 1-bosqich: shisha tomchi */
.sp-drop {
  width: 88px; height: 88px;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(-62vh);
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.95) 0 8%, rgba(255,255,255,.35) 22%, rgba(255,255,255,.06) 48%, rgba(var(--accent-rgb), .3) 78%, rgba(var(--accent-rgb), .6) 100%);
  box-shadow: inset -8px -12px 24px rgba(var(--accent-rgb), .35), inset 6px 8px 18px rgba(255,255,255,.7), 0 20px 40px rgba(var(--accent-rgb), .35);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  backdrop-filter: blur(6px) saturate(160%);
}
.s1 .sp-drop { animation: dropFall 1.35s forwards; }
@keyframes dropFall {
  0% { opacity: 1; transform: translateY(-62vh) scale(.62, .9); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  52% { opacity: 1; transform: translateY(0) scale(.8, 1.22); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  62% { transform: translateY(14px) scale(1.45, .6); }
  76% { transform: translateY(-34px) scale(.88, 1.14); }
  88% { transform: translateY(0) scale(1.1, .92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sp-ripples { position: relative; width: 88px; height: 88px; transform: translateY(42px) rotateX(72deg); }
.sp-ripples i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(var(--accent-rgb), .6); box-shadow: 0 0 18px rgba(var(--accent-rgb), .45); opacity: 0; }
.s1 .sp-ripples i { animation: ripple 1.3s cubic-bezier(.2, .7, .3, 1) forwards; }
.s1 .sp-ripples i:nth-child(1) { animation-delay: .72s; }
.s1 .sp-ripples i:nth-child(2) { animation-delay: .86s; }
.s1 .sp-ripples i:nth-child(3) { animation-delay: 1s; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(4.4); } }

/* 2-bosqich: kitob ochiladi */
.sp-book { --bw: 200px; position: relative; width: var(--bw); height: calc(var(--bw) * .7); transform-style: preserve-3d; opacity: 0; transform: rotateX(58deg) scale(.35); }
.sp-back, .sp-front, .sp-page { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; }
.sp-back { border-radius: 3px 14px 14px 3px; background: linear-gradient(90deg, #e6dfd0, #fbf8f1); box-shadow: 0 30px 50px rgba(0,0,0,.25), inset 3px 0 6px rgba(0,0,0,.12); }
.sp-page {
  top: 3px;
  height: calc(100% - 6px);
  width: calc(50% - 4px);
  border-radius: 2px 12px 12px 2px;
  background:
    repeating-linear-gradient(180deg, transparent 0 13px, rgba(0,0,0,.06) 13px 14px) 12px 18px / calc(100% - 24px) calc(100% - 36px) no-repeat,
    linear-gradient(90deg, #ece5d6, #fffdf8);
  box-shadow: inset 2px 0 4px rgba(0,0,0,.08);
  transform: translateZ(calc((5 - var(--i)) * 1px));
}
.sp-front {
  display: grid;
  place-items: center;
  border-radius: 3px 14px 14px 3px;
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.08) 45%), linear-gradient(160deg, var(--accent), rgba(var(--accent-rgb), .7));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 0 0 1px rgba(255,255,255,.35), 0 16px 30px rgba(var(--accent-rgb), .35);
  transform: translateZ(6px);
}
.sp-front-emoji { font-size: 44px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); backface-visibility: hidden; }
.sp-light {
  position: absolute;
  left: 50%; top: 50%;
  width: 360px; height: 360px;
  margin: -180px 0 0 -180px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 8%, rgba(255,255,255,.6) 10%, transparent 13% 30%, rgba(255,225,150,.55) 33%, transparent 36% 58%, rgba(255,255,255,.55) 61%, transparent 64% 82%, rgba(var(--accent-rgb), .5) 85%, transparent 88%);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 70%);
  mask: radial-gradient(circle, #000 0 18%, transparent 70%);
  opacity: 0;
  transform: translateZ(-20px) rotateX(-24deg) scale(.3);
}
.s2 .sp-drop { animation: dropMorph .55s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes dropMorph { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.6); filter: blur(8px); } }
.s2 .sp-book { animation: bookIn .8s var(--bounce) .1s forwards; }
@keyframes bookIn { to { opacity: 1; transform: rotateX(24deg) scale(1); } }
.s2 .sp-front { animation: coverOpen 1s cubic-bezier(.65, 0, .25, 1) .55s forwards; }
@keyframes coverOpen { to { transform: translateZ(0) rotateY(-178deg); } }
.s2 .sp-page { animation: pageFlip .85s cubic-bezier(.55, 0, .3, 1) forwards; animation-delay: calc(.85s + var(--i) * .13s); }
@keyframes pageFlip { to { transform: translateZ(calc((var(--i) + 1) * 1px)) rotateY(calc(-174deg + var(--i) * 10deg)); } }
.s2 .sp-light { animation: lightUp 1.1s ease-out 1.1s forwards; }
@keyframes lightUp { to { opacity: 1; transform: translateZ(-20px) rotateX(-24deg) scale(1); } }

/* 3-bosqich: kategoriya emojilari uchib chiqadi */
.sp-orbit { position: relative; width: 0; height: 0; }
.sp-emo { position: absolute; left: 0; top: 0; font-size: 34px; line-height: 1; opacity: 0; transform: translate(-50%, -50%) scale(0); filter: drop-shadow(0 6px 10px rgba(0,0,0,.2)); }
.s3 .sp-orbit { animation: orbitSpin 1.7s cubic-bezier(.3, 0, .3, 1) forwards; }
@keyframes orbitSpin { to { transform: rotate(34deg); } }
.s3 .sp-emo { animation: emoOut 1.1s var(--bounce) var(--d) forwards, emoBob 1.6s ease-in-out calc(var(--d) + 1s) infinite; }
@keyframes emoOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); }
  50% { opacity: 1; }
  100% { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(var(--s)) rotate(var(--r)); }
}
@keyframes emoBob { 50% { translate: 0 -8px; } }
.s3 .sp-light { animation: lightSpin 1.7s linear forwards; }
@keyframes lightSpin {
  from { opacity: 1; transform: translateZ(-20px) rotateX(-24deg) scale(1) rotate(0); }
  to { opacity: 1; transform: translateZ(-20px) rotateX(-24deg) scale(1.25) rotate(110deg); }
}

/* 4-bosqich: hammasi yig'iladi, shisha kapsulada nom */
.s4 .sp-emo { animation: emoIn .6s cubic-bezier(.55, 0, .75, .3) calc(var(--d) * .4) forwards; }
@keyframes emoIn {
  from { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(var(--s)) rotate(var(--r)); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(.1) rotate(180deg); }
}
.s4 .sp-book { animation: bookOut .55s cubic-bezier(.55, 0, .75, .3) forwards; }
@keyframes bookOut { from { opacity: 1; transform: rotateX(24deg) scale(1); } to { opacity: 0; transform: rotateX(24deg) scale(.15); } }

.sp-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  padding: 12px 24px 12px 12px;
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  transform: scale(.5);
  filter: blur(10px);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  backdrop-filter: blur(28px) saturate(200%);
  border: .5px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 20px 50px rgba(var(--accent-rgb), .25), var(--shadow);
}
.sp-title::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%); transform: translateX(-120%); }
.sp-logo { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 60%), var(--accent); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .45), inset 0 1px 0 rgba(255,255,255,.6); }
.sp-name { font-size: clamp(19px, 6.4vw, 28px); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; }
.sp-ch { display: inline-block; opacity: 0; transform: translateY(18px) rotate(12deg); }
.sp-tag { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); opacity: 0; transform: translateY(66px); text-align: center; padding: 0 24px; }

.s4 .sp-title { animation: titleIn .9s var(--bounce) .25s forwards; }
@keyframes titleIn { 55% { opacity: 1; filter: blur(0); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
.s4 .sp-title::after { animation: shimmer .9s ease-in-out .95s forwards; }
@keyframes shimmer { to { transform: translateX(120%); } }
.s4 .sp-ch { animation: chIn .55s var(--bounce) calc(.45s + var(--i) * 30ms) forwards; }
@keyframes chIn { to { opacity: 1; transform: none; } }
.s4 .sp-tag { animation: tagIn .6s ease-out .85s forwards; }
@keyframes tagIn { to { opacity: 1; transform: translateY(54px); } }

.reduced .sp-title, .reduced .sp-ch, .reduced .sp-tag { animation-duration: .01s !important; animation-delay: 0s !important; }
.reduced .sp-progress, .reduced .sp-aurora { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .orb, .logo, .empty-emoji, .book3d { animation: none; }
}
