/* smooth page-to-page transitions (the animation itself is in ../glide.js); the opt-in has to be in a <head> stylesheet */
@view-transition { navigation: auto; }
.bg { view-transition-name: sky; } /* the sky only cross-fades in place; the page content glides */
::view-transition-old(root) { animation: vt-out .32s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .5s cubic-bezier(.2, .8, .2, 1) .08s both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-18px) scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01s; } }
:root {
  --green: #7c5cf5; --green-d: #5a3fd6; --lime: #8f7bff; --brown: #a78bfa;
  --ink: #1e1a4a; --muted: #57567f;
  --head: "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--body); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
.bg { position: fixed; inset: 0; z-index: -1; background: #8d86d6; overflow: hidden; }
.bg-video { width: 100%; height: 100%; object-fit: cover; }
.loading { text-align: center; padding: 30vh 20px; color: #1e1a4a; font-weight: 700; font-size: 18px; }

.ed { max-width: 1120px; margin: 18px auto 110px; padding: 0 18px 24px; background: rgba(251, 246, 238, .6); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); border-radius: 32px; border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 30px 80px rgba(30, 80, 140, .2); }
.ed-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 8px; }
.back { font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .85); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 800; font-size: 19px; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(145deg, var(--lime), #4f8dff); box-shadow: 0 3px 0 #4b33b8; }
.logo-mark svg { width: 18px; height: 18px; fill: #ffffff; }

.ed-head { text-align: center; padding: 8px 10px 22px; }
.kicker { display: inline-block; padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .65); font-size: 13px; font-weight: 700; }
.ed-head h1 { font-family: var(--head); font-weight: 800; font-size: clamp(34px, 5vw, 52px); line-height: 1.15; margin: 10px 0 6px; }
.ed-head p { color: var(--muted); font-size: 15px; line-height: 1.8; }

.ed-grid { display: grid; grid-template-columns: 360px 1fr; gap: 26px; align-items: start; }
.preview { position: sticky; top: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone { direction: ltr; width: 100%; aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #111; border: 6px solid #fff; box-shadow: 0 24px 50px rgba(30, 60, 90, .25); }
.replay { border: 0; cursor: pointer; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; background: rgba(255, 255, 255, .7); }

.form { display: flex; flex-direction: column; gap: 14px; }
.group { border: 1px solid rgba(255, 255, 255, .85); border-radius: 22px; padding: 16px 16px 18px; background: rgba(255, 255, 255, .5); }
.group h3 { font-family: var(--head); font-weight: 800; font-size: 19px; margin-bottom: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rows .field:has(input[maxlength="70"]), .rows .field:has(input[maxlength="40"]) { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field input { width: 100%; min-width: 0; }
.ed-grid > * { min-width: 0; }
.field span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input { height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .85); outline: 0; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(124, 92, 245, .18); }

.designs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 520px) { .designs { gap: 6px; } .ds { font-size: 12px; padding: 4px 4px 6px; border-radius: 14px; } }
.ds-new { position: absolute; top: 2px; left: 50%; translate: -50% 0; padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #5a3d00; background: linear-gradient(135deg, #f7e08a, #e0b23f); box-shadow: 0 2px 6px rgba(120, 80, 0, .25); white-space: nowrap; }
.ds { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 8px; border-radius: 18px; cursor: pointer; border: 2.5px solid transparent; background: rgba(255, 255, 255, .75); font-weight: 700; font-size: 14px; transition: transform .2s, border-color .2s; }
.ds img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.ds:hover { transform: translateY(-3px); }
.ds.on { border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(124, 92, 245, .18); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sw { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; padding-inline: 8px 14px; border-radius: 999px; cursor: pointer; border: 2px solid transparent; background: rgba(255, 255, 255, .8); font-weight: 700; font-size: 14px; }
.sw i { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sw.on { border-color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.knob { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #c9c4bb; transition: background .2s; }
.knob::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: right .2s; }
.toggle input:checked + .knob::after { right: 23px; }
.toggle input:focus-visible + .knob { outline: 3px solid var(--green); outline-offset: 2px; }

.quality { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 600; }
.quality button { border: 2px solid transparent; cursor: pointer; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .8); font-weight: 700; font-size: 13px; }
.quality button.on { border-color: var(--ink); }

/* premium voice-over toggle */
.toggle.pro { margin-top: 12px; }
.pro-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: #5a3d00; background: linear-gradient(135deg, #f7e08a, #e0b23f); }
.premium-note { display: block; margin: 6px 56px 0 0; font-size: 12px; font-weight: 700; color: #c62828; }
/* ---- one gliding highlight per option group (../glide.js moves .glider to the picked option, like one block) ---- */
/* cards with pictures: a green frame slides over them */
.designs > .glider, .kd-costumes > .glider { z-index: 3; border: 2.5px solid var(--green); box-shadow: 0 0 0 4px rgba(124, 92, 245, .2), 0 10px 24px rgba(70, 40, 190, .18); }
.designs .ds.on, .kd-costumes .cos.on { border-color: transparent; box-shadow: none; }
/* pills: one glass track, the white pill slides under the labels */
.swatches, .seg { background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .95); box-shadow: inset 0 1px 0 #fff; }
.swatches { padding: 5px; gap: 4px; border-radius: 26px; width: fit-content; max-width: 100%; }
.swatches > .glider, .seg > .glider { z-index: 0; background: #fff; box-shadow: 0 6px 16px rgba(40, 30, 90, .14), inset 0 0 0 2px var(--ink); }
.swatches .sw, .seg button { position: relative; z-index: 1; background: transparent; border-color: transparent !important; }
.seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; }
.seg .q-pro { position: relative; z-index: 1; }
.seg .q-pro .pro-badge { position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; margin: 0; white-space: nowrap; }
.quality { margin-bottom: 26px; }
/* voices: one track, a violet pill slides under the picked voice */
.voices { padding: 5px; gap: 4px; border-radius: 20px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .95); box-shadow: inset 0 1px 0 #fff; }
.voices > .glider { z-index: 0; background: linear-gradient(135deg, #9b6bff, #6d5cf6 55%, #4f8dff); box-shadow: 0 10px 24px rgba(109, 92, 246, .45), 0 0 18px rgba(240, 196, 90, .35); }
/* a thin gold frame with a light running round the picked voice (it rides on the sliding pill) */
@property --vga { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.voices > .glider::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--vga), #a8791f, #e9c66a 10%, #fff6d2 16%, #e9c66a 22%, #a8791f 38%, #d9b04f 60%, #a8791f 82%, #a8791f);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: vgold 2.8s linear infinite; }
@keyframes vgold { to { --vga: 360deg; } }
/* the crown that replaces the lock on the picked voice: shining gold, tap → subscription */
.vcrown { position: absolute; top: 4px; left: 4px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, rgba(255, 236, 170, .35), rgba(255, 236, 170, 0) 70%);
  animation: crown-in .55s cubic-bezier(.3, 1.6, .5, 1) both, crown-glow 2.2s ease-in-out .55s infinite; }
.vcrown svg { width: 24px; height: 24px; overflow: visible; }
.vcrown .shine { animation: crown-shine 2.4s ease-in-out infinite; }
.vcrown .spark { transform-origin: 20px 4px; animation: crown-spark 2.4s ease-in-out infinite; }
.vcrown:hover, .vcrown:focus-visible { outline: none; transform: scale(1.12); }
@keyframes crown-in { 0% { opacity: 0; transform: scale(0) rotate(-35deg); } 100% { opacity: 1; transform: none; } }
@keyframes crown-glow { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 214, 110, .7)); } 50% { filter: drop-shadow(0 0 7px rgba(255, 220, 120, 1)) drop-shadow(0 0 14px rgba(255, 190, 60, .55)); } }
@keyframes crown-shine { 0% { transform: translateX(-26px); } 55%, 100% { transform: translateX(26px); } }
@keyframes crown-spark { 0%, 40%, 100% { opacity: 0; transform: scale(.2); } 55% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(.3) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .voices > .glider::before, .vcrown, .vcrown .shine, .vcrown .spark { animation: none; } }
.voices .vc { z-index: 1; background: transparent; border-color: transparent; transition: color .35s, transform .2s; }
.voices .vc.on { background: transparent; box-shadow: none; }

/* three sample voices under the premium toggle: glass lock in the corner, the picked one turns violet with moving bars */
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.vc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px 10px; border-radius: 16px; cursor: pointer; font: inherit;
  border: 1.5px solid rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .72); color: var(--ink); transition: background .25s, color .25s, box-shadow .25s, transform .2s; }
.vc:hover { transform: translateY(-2px); }
.vc b { font-size: 15px; font-weight: 800; }
.vc small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.vc .wave { display: flex; align-items: flex-end; gap: 3px; height: 18px; margin-bottom: 2px; color: #7c5cf5; }
.vc .wave i { width: 3px; height: 6px; border-radius: 2px; background: currentColor; opacity: .5; }
.vc .wave i:nth-child(2), .vc .wave i:nth-child(4) { height: 10px; }
.vc .wave i:nth-child(3) { height: 14px; }
.vc.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, #9b6bff, #6d5cf6 55%, #4f8dff); box-shadow: 0 10px 24px rgba(109, 92, 246, .45), 0 0 0 3px rgba(155, 107, 255, .28); }
.vc.on small { color: rgba(255, 255, 255, .85); }
.vc.on .wave { color: #fff; }
.vc.on .wave i { opacity: 1; animation: wv .9s ease-in-out infinite; }
.vc.on .wave i:nth-child(2) { animation-delay: .15s; } .vc.on .wave i:nth-child(3) { animation-delay: .3s; } .vc.on .wave i:nth-child(4) { animation-delay: .45s; } .vc.on .wave i:nth-child(5) { animation-delay: .6s; }
@keyframes wv { 50% { height: 18px; } }
.vlk { position: absolute; top: 6px; left: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .35); border: 1px solid rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 6px rgba(30, 20, 90, .15); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.vlk svg { width: 12px; height: 12px; fill: none; stroke: #6d5cf6; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.vc.on .vlk { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .6); }
.vc.on .vlk svg { stroke: #fff; }
/* 1080p download is premium: a small glass lock inside the button and «بريميوم» in gold under it */
.q-pro { display: inline-flex; flex-direction: column; align-items: center; }
.quality { align-items: flex-start; } /* the label sits on its own line, then 720p and 1080p side by side (Amer) */
.quality > span:first-child { flex-basis: 100%; }
.quality button.locked { display: inline-flex; align-items: center; gap: 6px; }
.quality .vlk { position: static; width: 18px; height: 18px; }
.quality .vlk svg { width: 10px; height: 10px; }
.q-pro .pro-badge { margin-top: 5px; }
/* a voice being prepared from the customer's own text: the bars pulse slowly; a button to read the edited text again */
.vc.busy { cursor: progress; }
.vc.busy .wave i { animation: wv .6s ease-in-out infinite; opacity: 1; }
.vc.busy .wave i:nth-child(2) { animation-delay: .1s; } .vc.busy .wave i:nth-child(3) { animation-delay: .2s; } .vc.busy .wave i:nth-child(4) { animation-delay: .3s; } .vc.busy .wave i:nth-child(5) { animation-delay: .4s; }
.vc-refresh { display: block; margin: 10px auto 0; padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; font-size: 13.5px; color: #fff;
  background: linear-gradient(135deg, #9b6bff, #6d5cf6 55%, #4f8dff); box-shadow: 0 8px 20px rgba(109, 92, 246, .4); animation: plan-item .4s ease both; }
.voice-tip { display: block; margin-top: 8px; font-size: 12px; line-height: 1.6; font-weight: 600; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .vc.on .wave i { animation: none; } }

/* subscribe popup: a dark frosted-glass card with a glowing edge, coloured light blurred behind it */
.plan-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(8, 6, 30, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: pb-in .5s ease backwards; overflow: hidden; perspective: 1000px; }
.plan-glow { position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; translate: -50% -50%; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 35% 35%, #5aa9ff 0%, rgba(90, 169, 255, 0) 55%), radial-gradient(circle at 70% 65%, #9b6bff 0%, rgba(155, 107, 255, 0) 55%); filter: blur(30px); opacity: .9; animation: glow-in 1s cubic-bezier(.2, .8, .2, 1) backwards, glow 8s ease-in-out 1s infinite alternate; }
@keyframes glow { to { transform: rotate(40deg) scale(1.08); } }
.plan { position: relative; width: min(380px, 100%); padding: 26px 24px 18px; border-radius: 30px; text-align: start; color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .04) 60%, rgba(120, 170, 255, .08) 100%), rgba(16, 14, 44, .42);
  backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 30px rgba(140, 190, 255, .12), 0 0 0 1px rgba(120, 180, 255, .25), 0 0 46px rgba(110, 150, 255, .35), 0 30px 70px rgba(0, 0, 0, .45);
  animation: plan-in .8s cubic-bezier(.16, 1.1, .3, 1) .05s backwards; transform-origin: 50% 100%; }
.plan-x { position: absolute; top: 14px; left: 14px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: #fff; font-size: 20px; line-height: 1; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); }
.plan-tag { display: inline-block; font-size: 14px; font-weight: 700; margin-bottom: 10px; padding: 5px 14px; border-radius: 999px; color: #ffe39a;
  background: linear-gradient(135deg, rgba(247, 224, 138, .22), rgba(224, 178, 63, .1)); border: 1px solid rgba(247, 224, 138, .5); box-shadow: 0 0 18px rgba(240, 200, 100, .25); }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-weight: 400; }
.plan-price b { font-family: "IBM Plex Sans Arabic", sans-serif; font-weight: 500; font-size: 54px; line-height: 1.05; letter-spacing: -1px; }
.plan-price span { font-size: 18px; font-weight: 500; opacity: .75; }
.plan-sub { font-size: 13.5px; line-height: 1.7; opacity: .78; margin-bottom: 16px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 0 0 22px; font-size: 14px; font-weight: 500; }
.plan li { display: flex; align-items: center; gap: 10px; }
.plan li i { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.plan-go { display: flex; align-items: center; justify-content: center; width: fit-content; min-width: 170px; margin: 0 auto; height: 46px; padding: 0 28px; border-radius: 999px; background: #fff; color: #15123a; font-weight: 700; font-size: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .2s, box-shadow .2s; }
.plan-go:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(110, 150, 255, .45); }
.plan-go:focus-visible { outline: 3px solid #9be7ff; outline-offset: 3px; }
/* subscription code inside the premium window, and the subscriber's status line */
.plan-code { display: flex; gap: 8px; margin: 14px 0 0; animation: plan-item .5s ease 1s backwards; }
.plan-code input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 14px; letter-spacing: .5px; text-align: center; }
.plan-code input::placeholder { color: rgba(255, 255, 255, .55); letter-spacing: 0; }
.plan-code button { height: 42px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; color: #5a3d00; background: linear-gradient(135deg, #f7e08a, #e0b23f); }
.plan-code-msg { display: block; margin-top: 6px; text-align: center; color: #ffb4b4; font-size: 12.5px; font-weight: 700; }
.pro-status { margin-top: 10px; padding: 9px 14px; border-radius: 14px; font-size: 13px; font-weight: 700; color: #5a3d00; text-align: center;
  background: linear-gradient(135deg, rgba(247, 224, 138, .55), rgba(224, 178, 63, .35)); border: 1px solid rgba(224, 178, 63, .6); }
.plan-later { display: block; margin: 10px auto 0; border: 0; background: none; cursor: pointer; color: rgba(255, 255, 255, .7); font-weight: 600; font-size: 13.5px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(16px); } }

/* premium popup entrance: the sky blurs in, the light blooms, the glass card rises with a tilt and a light sweep,
   gold sparks burst, then the badge, the price (focus-in), each feature with its check, and the button follow */
@keyframes pb-in { from { background-color: rgba(8, 6, 30, 0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); } }
@keyframes glow-in { from { opacity: 0; transform: scale(.25); } }
@keyframes plan-in { 0% { opacity: 0; transform: translateY(80px) rotateX(24deg) scale(.82); } 45% { opacity: 1; } }
.plan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .3) 45%, rgba(255, 255, 255, .06) 55%, transparent 70%) 140% 0 / 260% 100% no-repeat;
  animation: plan-shine 1.2s ease .5s both; }
@keyframes plan-shine { to { background-position: -70% 0; } }
.plan-back::before { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; opacity: 0; pointer-events: none;
  box-shadow: 150px -190px 1px 1px #fff, -160px -150px 1px 1px #ffd98a, 200px 40px 1px #c9b8ff, -210px 70px 1px 1px #fff, 60px 230px 1px #ffd98a,
    -90px 220px 1px #fff, 230px -60px 1px 1px #ffe9b0, -230px -40px 1px #c9b8ff, 20px -250px 1px 1px #ffd98a, -40px -230px 1px #fff, 120px 190px 1px 1px #fff, -170px 180px 1px #ffd98a;
  animation: spark 1.4s cubic-bezier(.2, .7, .3, 1) .25s both; }
@keyframes spark { 0% { opacity: 0; transform: scale(.25); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35) rotate(18deg); } }
.plan > * { animation: plan-item .55s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.plan > ul { animation: none; }
.plan-tag { animation-delay: .28s; }
.plan-x { animation-delay: .55s; }
.plan-price { animation: none; }
.plan-price b { display: inline-block; animation: price-in .75s cubic-bezier(.2, .9, .3, 1.25) .34s backwards; }
.plan-price span { display: inline-block; animation: plan-item .5s ease .5s backwards; }
.plan-sub { animation-delay: .44s; }
.plan li { --d: .5s; animation: li-in .5s cubic-bezier(.2, .9, .3, 1.2) var(--d) backwards; }
.plan li:nth-child(2) { --d: .58s; } .plan li:nth-child(3) { --d: .66s; } .plan li:nth-child(4) { --d: .74s; } .plan li:nth-child(5) { --d: .82s; }
.plan li i { animation: chk .55s cubic-bezier(.3, 1.8, .5, 1) calc(var(--d) + .12s) backwards; }
.plan-go { position: relative; overflow: hidden; animation: plan-item .55s cubic-bezier(.2, .9, .3, 1.2) .84s backwards, go-glow 2.6s ease-in-out 1.5s infinite; }
.plan-go::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(124, 92, 245, .28) 50%, transparent 65%) 140% 0 / 260% 100% no-repeat; animation: go-shine 3s ease-in-out 1.3s infinite; }
.plan-later { animation-delay: .94s; }
@keyframes plan-item { from { opacity: 0; transform: translateY(14px); } }
@keyframes price-in { from { opacity: 0; transform: scale(1.7); filter: blur(10px); } }
@keyframes li-in { from { opacity: 0; transform: translateX(26px); } }
@keyframes chk { from { transform: scale(0) rotate(-120deg); } }
@keyframes go-shine { from { background-position: 140% 0; } 55%, to { background-position: -70% 0; } }
@keyframes go-glow { 50% { box-shadow: 0 8px 24px rgba(0, 0, 0, .25), 0 0 0 6px rgba(255, 255, 255, .1), 0 0 32px rgba(160, 140, 255, .6); } }
/* closing: the card sinks back and the sky clears */
.plan-back.closing { animation: pb-out .28s ease forwards; }
.plan-back.closing .plan { animation: plan-out .28s ease forwards; }
@keyframes pb-out { to { opacity: 0; } }
@keyframes plan-out { to { opacity: 0; transform: translateY(30px) scale(.92); } }
@media (prefers-reduced-motion: reduce) { .plan-back, .plan-back *, .plan-back::before, .plan::after, .plan-go::after { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; } }

/* sticky download bar */
.dl-bar { position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 20; width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 26px; background: rgba(255, 255, 255, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 16px 40px rgba(30, 60, 90, .22); }
.dl { position: relative; overflow: hidden; width: 100%; height: 56px; border: 0; border-radius: 18px; cursor: pointer; background: var(--green); color: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 6px 0 var(--green-d); transition: transform .1s; }
.dl:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--green-d); }
/* free download with a voice still picked: a gentle shake and a smaller warning label */
.dl.shake { animation: dl-shake .5s cubic-bezier(.36, .07, .19, .97) both; }
.dl.shake .lbl { font-size: 14.5px; }
@keyframes dl-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .dl.shake { animation: none; } }
.dl .fill { position: absolute; inset: 0; background: var(--lime); transform-origin: right; transition: transform .25s; }
.dl.render { background: var(--green-d); }
.dl.render .lbl { color: #ffffff; mix-blend-mode: normal; }
.dl .lbl { position: relative; }
.dl.done { background: #2f6a2a; }
.dl-bar small { font-size: 13px; color: var(--muted); }
.dl-bar .err { color: #b3261e; font-weight: 600; text-align: center; }
.again { font-size: 13px; font-weight: 700; color: var(--green-d); text-decoration: underline; }

@media (max-width: 820px) {
  .ed { margin: 8px 8px 130px; padding: 0 12px 18px; border-radius: 24px; }
  .ed-grid { grid-template-columns: 1fr; gap: 18px; }
  .preview { position: static; }
  .phone { width: min(300px, 82vw); }
  .rows { grid-template-columns: 1fr; }
  .rows .field:has(input[maxlength="70"]), .rows .field:has(input[maxlength="40"]) { grid-column: auto; }
}

/* «💌 صفحة الدعوة وتأكيد الحضور» (Amer, 2026-12-03): publish the invite as a page (/i/?c=<id>) + links to share it */
.inv-p { margin: -4px 0 12px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.rows .field.wide { grid-column: span 2; }
.inv-go { position: relative; width: 100%; height: 52px; margin-top: 14px; border: 0; border-radius: 16px; cursor: pointer; background: var(--green); color: #fff; font-family: inherit; font-weight: 800; font-size: 16px; box-shadow: 0 5px 0 var(--green-d); transition: transform .1s; }
.inv-go:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--green-d); }
.inv-go:disabled { opacity: .75; cursor: wait; }
.inv-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.inv-links a, .inv-links button { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 10px; border-radius: 14px; border: 1.5px solid rgba(0, 0, 0, .1); background: rgba(255, 255, 255, .9); color: var(--ink); font-family: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; transition: transform .15s, border-color .15s; }
.inv-links a:hover, .inv-links button:hover { transform: translateY(-2px); border-color: var(--green); }
.inv-links .inv-new { grid-column: span 2; background: transparent; border-style: dashed; }
.inv-g .premium-note { margin: 8px 0 0; color: #2e7d32; }
.inv-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .rows .field.wide { grid-column: auto; } }
.music-pick { margin-top: 0; margin-bottom: 12px; }
.music-pick .seg { flex-wrap: wrap; border-radius: 22px; max-width: 100%; }
/* «ارفع أغنيتك»: the customer's own song (stays in the browser) */
.own-song { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.own-song .song-up { flex: 1 1 100%; padding: 14px 20px; border-radius: 18px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-size: 1.12em; font-weight: 800; cursor: pointer; box-shadow: 0 6px 18px rgba(40, 30, 90, .14); animation: song-up-glow 2.4s ease-in-out infinite; }
.own-song .song-up:active { transform: scale(.98); }
@keyframes song-up-glow { 0%, 100% { box-shadow: 0 6px 18px rgba(40, 30, 90, .14), 0 0 0 0 rgba(255, 122, 0, .45); } 50% { box-shadow: 0 6px 18px rgba(40, 30, 90, .14), 0 0 0 7px rgba(255, 122, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .own-song .song-up { animation: none; } }
.own-song .song-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.song-strip { flex-basis: 100%; }
.song-wave { position: relative; direction: ltr; display: flex; align-items: center; gap: 1px; height: 64px; padding: 6px 4px; border-radius: 14px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .95); touch-action: none; cursor: grab; user-select: none; outline: none; }
.song-wave:active { cursor: grabbing; }
.song-wave:focus-visible { box-shadow: 0 0 0 3px var(--ink); }
.song-wave i { flex: 1; min-width: 1px; border-radius: 2px; background: rgba(40, 30, 60, .22); }
.song-wave i.in { background: var(--ink); }
.song-wave .song-win { position: absolute; top: 2px; bottom: 2px; border-radius: 10px; border: 2.5px solid var(--ink); background: rgba(255, 255, 255, .25); box-shadow: 0 4px 14px rgba(40, 30, 90, .18); pointer-events: none; }
.song-times { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .8em; opacity: .85; direction: ltr; }
.song-times strong { direction: rtl; font-size: 1.05em; opacity: 1; }
.own-song .song-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .08); cursor: pointer; font: inherit; }
.own-song small { flex-basis: 100%; opacity: .7; font-size: .8em; line-height: 1.5; }

/* consent line under the kids photo upload (2026-12-03) */
.consent { display: block; margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; }
.consent a { color: inherit; text-decoration: underline; }

/* Amer (2026-12-03, «بضل معلق وطالع فوق ومزعج»): in the video editors the download bar sits under the editor card instead of floating
   over the page. The kids page keeps its floating bar (its main button «لبّسه الملابس» is #save there). */
.dl-bar:not(:has(#save)) { position: relative; left: auto; bottom: auto; translate: none; z-index: 1; margin: 0 auto 32px; }
body:not(:has(#save)) .ed { margin-bottom: 18px; }
