/* DUXA SHOP — wow layer for gifts + stronger site ornaments */
.wow-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2147483000; }
dialog > .wow-canvas { position: absolute; z-index: 5; }
:root { --wow-accent: #c98f86; }

/* ---------- cover ---------- */
.gift-stage.wow-cover { position: relative; isolation: isolate; }
.gift-stage.wow-cover::before {
  content: ""; position: absolute; left: 50%; top: 34%; width: min(520px, 92vw); aspect-ratio: 1; translate: -50% -50%; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--wow-accent) 55%, transparent), transparent 30%, rgba(242,200,121,.55), transparent 60%, color-mix(in srgb, var(--wow-accent) 45%, transparent), transparent);
  filter: blur(34px); opacity: .7; animation: wowSpin 14s linear infinite;
}
.gift-stage.wow-cover .gift-art {
  animation: wowFloat 5.5s ease-in-out infinite;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out; filter: drop-shadow(0 26px 30px rgba(60, 40, 40, .22));
}
.gift-stage.wow-cover .story-wax { animation: wowPulse 2.6s ease-in-out infinite; }
.gift-stage.wow-cover h1 { animation: wowRise .9s both .1s; }
.gift-stage.wow-cover button:not(.wow-skip) { position: relative; overflow: hidden; animation: wowRise .9s both .3s, wowBreath 3.2s ease-in-out 1.4s infinite; }
.gift-stage.wow-cover button:not(.wow-skip)::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); translate: -120% 0; animation: wowSweep 3.4s ease-in-out 1.2s infinite;
}
.gift-stage.wow-cover .art-burst i { animation-duration: 3.4s; }
.wow-skip { display: block; margin: 16px auto 0; background: transparent; border: 0; color: inherit; opacity: .55; font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wow-skip:hover { opacity: 1; }

/* ---------- reveal ---------- */
.gift-stage.wow-reveal .gift-face { position: relative; overflow: hidden; animation: wowPop .9s cubic-bezier(.2, .9, .25, 1.15) both; box-shadow: 0 30px 70px rgba(60,40,40,.18), 0 0 0 1px color-mix(in srgb, var(--wow-accent) 35%, transparent); }
.gift-stage.wow-reveal .gift-face::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.5) 50%, transparent 62%); translate: -130% 0; animation: wowSweep 5.5s ease-in-out 1s infinite;
}
.gift-stage.wow-reveal .gift-face > * { position: relative; z-index: 1; }
.wow-rise { opacity: 0; animation: wowRise .85s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 140ms + 250ms); }
.gift-stage.wow-reveal .gift-face h1 { text-shadow: 0 0 28px color-mix(in srgb, var(--wow-accent) 45%, transparent); }
.gift-stage.wow-reveal .gift-face img { animation: wowImage 1.1s cubic-bezier(.2, .8, .2, 1) .6s both; }
#gift.has-accent .gift-face { border-color: var(--wow-accent); }
#gift.has-accent .gift-face h1, #gift.has-accent .gift-signature { color: var(--wow-accent); }

/* countdown */
.wow-count { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 6px; }
.wow-cell { display: grid; place-items: center; min-width: 58px; padding: 8px 6px; border-radius: 14px; background: color-mix(in srgb, var(--wow-accent) 14%, #fff); border: 1px solid color-mix(in srgb, var(--wow-accent) 40%, transparent); }
.wow-cell b { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1; }
.wow-cell small { font-size: .7rem; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.wow-count em { flex-basis: 100%; text-align: center; font-style: normal; opacity: .7; font-size: .85rem; }

/* voice */
.voice-visual { position: relative; isolation: isolate; }
.wow-viz { position: absolute; left: 50%; top: 50%; width: 112%; max-width: 420px; translate: -50% -50%; z-index: -1; pointer-events: none; opacity: .0; transition: opacity .5s; }
.voice-visual.wow-live .wow-viz { opacity: 1; }
.wow-aurora { position: absolute; left: 50%; top: 50%; width: 90%; aspect-ratio: 1; translate: -50% -50%; z-index: -2; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--wow-accent) 70%, transparent), transparent 55%), radial-gradient(circle at 70% 65%, rgba(242,200,121,.7), transparent 55%); filter: blur(26px); opacity: .55; animation: wowSpin 18s linear infinite; }
.voice-visual.wow-live .wow-aurora { opacity: .95; animation-duration: 6s; }

/* ---------- editor panel ---------- */
.wow-builder { margin: 14px 0; padding: 12px 14px; border: 1px dashed #c98f86; border-radius: 16px; background: rgba(255, 250, 247, .7); display: grid; gap: 10px; }
.wow-h { margin: 0; color: #305a4c; }
.wow-lab { color: #6f7975; }
.wow-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wow-chip { border: 1px solid #cfdcd5; background: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .9rem; cursor: pointer; color: #293c38; transition: transform .15s, background .2s; }
.wow-chip:hover { transform: translateY(-1px); }
.wow-chip.on { background: #305a4c; color: #fff; border-color: #305a4c; }
.wow-builder .wow-check { display: flex !important; flex-direction: row; align-items: center; gap: 10px; cursor: pointer; width: auto; }
.wow-builder .wow-check input { flex: none; width: 20px !important; height: 20px !important; margin: 0; appearance: auto; accent-color: #75a391; }
.wow-color { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wow-color input[type=color] { width: 44px; height: 34px; padding: 0; border: 1px solid #cfdcd5; border-radius: 8px; background: none; }

/* ---------- keyframes ---------- */
@keyframes wowFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes wowSpin { to { rotate: 360deg; } }
@keyframes wowPulse { 0%, 100% { scale: 1; } 50% { scale: 1.09; } }
@keyframes wowBreath { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wow-accent) 45%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
@keyframes wowRise { from { opacity: 0; transform: translateY(22px) scale(.98); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wowPop { from { opacity: 0; transform: translateY(40px) scale(.92) rotate(-1deg); } to { opacity: 1; transform: none; } }
@keyframes wowImage { from { opacity: 0; transform: scale(1.12); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wowSweep { 0% { translate: -130% 0; } 55%, 100% { translate: 130% 0; } }
@keyframes wowDrift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(3deg); } }

.wow-fast *, .wow-fast *::before, .wow-fast *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }

@media (prefers-reduced-motion: reduce) {
  .wow-rise { opacity: 1; animation: none; }
  .gift-stage.wow-cover::before, .gift-stage.wow-cover .gift-art, .gift-stage.wow-cover .story-wax, .wow-aurora { animation: none; }
}

/* ---------- stronger home-page ornaments (v5) ---------- */
html body .popular-gift, html body .catalog-section, html body .finder-section, html body .how-section, html body .shop-community, html body .studio-strip {
  background-image: var(--orn-leaf), var(--orn-flower), linear-gradient(180deg, rgba(255,255,255,.0), rgba(255,255,255,.0)) !important;
  background-size: 160px 160px, 240px 240px, auto !important; background-repeat: repeat !important; animation: wowBgDrift 60s linear infinite;
}
@keyframes wowBgDrift { to { background-position: 160px 160px, -240px 240px, 0 0; } }
html body .hero::after, html body .workshop-section::after, html body .last-section::after { animation: wowDrift 7s ease-in-out infinite; opacity: 1; }
html body .hero::before, html body .workshop-section::before, html body .last-section::before { animation: wowDrift 9s ease-in-out infinite reverse; opacity: .85; }
html body .catalog-section article, html body .popular-gift article { backdrop-filter: blur(2px); }

/* ---------- studio: sprites, photos, drawing ---------- */
.wow-sub { margin: 10px 0 0; color: #305a4c; font-size: 1rem; }
.wow-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.wow-tile { position: relative; width: 64px; height: 64px; border-radius: 12px; border: 1px solid #cfdcd5; overflow: hidden; display: grid; place-items: center;
  background: conic-gradient(#e9eeea 25%, #fff 0 50%, #e9eeea 0 75%, #fff 0) 0 0 / 14px 14px; }
.wow-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wow-addtile { cursor: pointer; font-size: 1.6rem; color: #75a391; background: #f6faf7; border-style: dashed; }
.wow-tilebtn { position: absolute; bottom: 2px; left: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(48, 90, 76, .9); color: #fff; font-size: .75rem; cursor: pointer; line-height: 1; padding: 0; }
.wow-tilebtn.wow-del { left: auto; right: 2px; background: rgba(160, 60, 60, .9); }
.wow-tol { display: flex !important; flex-direction: row; align-items: center; gap: 10px; font-size: .85rem; color: #6f7975; }
.wow-tol input { flex: 1; width: auto !important; }
.wow-pad { display: grid; gap: 8px; }
.wow-cv { width: 100%; max-width: 560px; aspect-ratio: 560 / 340; border-radius: 14px; border: 1px solid #cfdcd5; touch-action: none; cursor: crosshair;
  background: conic-gradient(#f0f4f1 25%, #fff 0 50%, #f0f4f1 0 75%, #fff 0) 0 0 / 18px 18px; }
.wow-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wow-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cfdcd5; cursor: pointer; padding: 0; }
.wow-tools input[type=color] { width: 30px; height: 28px; padding: 0; border: 0; background: none; }
.wow-tools input[type=range] { width: 90px; }

/* gift view: gallery + drawing */
.wow-gallery { position: relative; height: 270px; margin: 18px auto; width: min(280px, 82%); cursor: pointer; perspective: 900px; }
.wow-gallery img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; padding: 8px 8px 26px; background: #fff; border-radius: 6px; box-shadow: 0 14px 30px rgba(0,0,0,.22);
  transform: translate(calc(var(--d, 0) * 14px), calc(var(--d, 0) * -8px)) rotate(calc((var(--k, 0) - 1.5) * 4deg + var(--d, 0) * 3deg)) scale(calc(1 - var(--d, 0) * .05));
  opacity: calc(1 - var(--d, 0) * .25); transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .9s; object-fit: cover; }
.wow-drawing { margin: 14px auto; width: min(420px, 94%); }
.wow-drawing img { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.18)); animation: wowDraw 2.4s cubic-bezier(.5, 0, .2, 1) .9s both; }
@keyframes wowDraw { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.wow-viz.wow-viz-bar { z-index: 3; left: 0; top: auto; bottom: 0; translate: none; width: 100%; max-width: none; height: auto; aspect-ratio: 4 / 1; border-radius: 0 0 14px 14px; }
html, body, #gift { overflow-x: clip; }

/* Telegram sticker library picker */
.wow-lib{margin:8px 0;border:1px dashed #9fb4a3;border-radius:12px;padding:8px 10px;background:#fbfdfb}
.wow-lib summary{cursor:pointer;font-weight:650}
.wow-lib-body{display:grid;gap:8px;margin-top:8px}
.wow-libtile{padding:0;cursor:pointer;background:#fff}
.wow-libtile:hover,.wow-libtile:focus-visible{border-color:#315846;outline:none;box-shadow:0 0 0 2px #31584444}
.wow-libmore{justify-self:start;border:1px solid #a8beb0;border-radius:999px;background:#fff;color:#315846;padding:6px 14px;cursor:pointer;font:inherit}

.wow-libpack{width:100%;min-height:36px;border:1px solid #a8beb0;border-radius:8px;background:#faf9f0;color:#283e34;font:inherit;padding:4px 6px}
.wow-librow{display:flex;gap:8px;align-items:center}
.wow-libinput{flex:1;min-width:0;min-height:36px;border:1px solid #a8beb0;border-radius:8px;padding:4px 8px;font:inherit;background:#fff;color:#283e34}
.wow-libmore:disabled{opacity:.55;cursor:default}

.wow-tilebtn.wow-edit{left:26px}
