/* v4 (2026-10-15): English name is the big title (Zen Antique), Persian name the smaller line below. v3/v2/v1 stay as rollbacks.
   v3 (2026-10-14): the call-to-action buttons use the "flame" look (dark pill, thin amber rim). v2 (modal rules) and v1 stay as rollbacks.
   v2 (2026-10-14): adds the manga-page modal rules at the bottom.
   Lantern purchase card ("چراغ") - template-parts/purchase-lantern.php + assets/js/purchase-lantern.js.
   Replaces the paper "reading pass" on the locked-chapter page. Ported from prototypes/chapter-purchase (design 2).
   Rules: no balance is ever shown; the real submit button stays in the DOM (visually hidden) so the purchase still works if JS
   fails; press feedback on pointer-down; ease-out < 300ms; hover only on real pointers; reduced-motion = fades; NO letter-spacing on Persian;
   no blur/backdrop-filter (low-end phones). Title font: Harmattan (SIL OFL), self-hosted. Arvan ignores ?v= - changed files get a NEW name. */
@font-face { font-family: 'Harmattan'; src: url('../fonts/harmattan-700.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

/* shell: the page's back link / chapter nav line up with the card */
.mzpt-shell:has(.mzpl) { width: min(100%, 400px); }
.mzpt-shell .mzpl { margin: 14px auto 0; }
.mzpl, .mzpl * { box-sizing: border-box; }
.mzpl { width: min(100%, 400px); font-family: Vazirmatn, Tahoma, system-ui, sans-serif; color: #eceff4; line-height: 1.7; text-align: right; }
.mzpl [hidden] { display: none !important; }
.mzpl button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
.mzpl a { color: inherit; text-decoration: none; }
.mzpl-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.mzpl-dots { display: inline-flex; gap: 4px; align-items: center; }
.mzpl-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: mzpl-dot 1s infinite ease-in-out; }
.mzpl-dots i:nth-child(2) { animation-delay: .15s; } .mzpl-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mzpl-dot { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.mzpl-tick path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: mzpl-draw .4s .05s ease-out forwards; }
@keyframes mzpl-draw { to { stroke-dashoffset: 0; } }
.mzpl-seg { position: relative; display: grid; padding: 2px; border-radius: 11px; }
.mzpl-seg-row { display: grid; grid-template-columns: 1fr 1fr; }
.mzpl-seg-row button { padding: 7px 4px; border-radius: 9px; font-size: 13px; font-weight: 700; transition: transform .1s ease-out; }
.mzpl-seg-row button:active { transform: scale(.97); }
.mzpl-seg-top { position: absolute; inset: 2px; pointer-events: none; transition: clip-path .28s var(--mzpl-out); }
.mzpl[data-mode="single"] .mzpl-seg-top { clip-path: inset(0 0 0 50% round 9px); }
.mzpl[data-mode="remaining"] .mzpl-seg-top { clip-path: inset(0 50% 0 0 round 9px); }
.mzpl-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 52px; border-radius: 15px; font-weight: 800; font-size: 15.5px; transition: transform .1s ease-out, opacity .2s, filter .15s; }
.mzpl-btn:active { transform: scale(.97); } .mzpl-btn svg { width: 18px; height: 18px; }
.mzpl { --lit: .25; --mzpl-out: cubic-bezier(.23, 1, .32, 1); }
.mzpl { position: relative; width: min(100%, 400px); padding: 0 24px 24px; border-radius: 28px; background: #0f1218; overflow: hidden; box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(255,255,255,.07); animation: mzpl-rise .3s var(--mzpl-out) both; }
.mzpl .mzpl-sky { position: relative; height: 188px; width: calc(100% + 48px); margin-inline: -24px; pointer-events: none; }
.mzpl .mzpl-lt { position: absolute; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); opacity: var(--lit); }
.mzpl .mzpl-lt i { position: absolute; inset: 0; border-radius: inherit; animation: mzpl-ember 3.7s ease-in-out infinite; }
.mzpl .mzpl-bloom { top: 104px; width: 240px; height: 240px; } .mzpl .mzpl-bloom i { background: radial-gradient(closest-side, rgba(255,240,205,.6) 0%, rgba(255,196,120,.32) 28%, rgba(255,140,60,.13) 56%, rgba(210,80,30,.04) 78%, transparent 100%); }
.mzpl .mzpl-pool { top: 190px; width: 540px; height: 340px; } .mzpl .mzpl-pool i { background: radial-gradient(closest-side, rgba(255,176,98,.24), rgba(255,140,60,.09) 52%, transparent 100%); animation-duration: 5.3s; animation-delay: -1.7s; }
@keyframes mzpl-ember { 0%, 100% { opacity: 1 } 16% { opacity: .965 } 34% { opacity: .99 } 53% { opacity: .945 } 71% { opacity: .985 } 86% { opacity: .96 } }
.mzpl .mzpl-sky { isolation: isolate; }
.mzpl .mzpl-green { top: 112px; width: 360px; height: 400px; border-radius: 0; opacity: 0; transform: translate(-50%, -50%) rotate(-7deg); transition: opacity 1.2s ease-out; }
.mzpl .mzpl-green i { border-radius: 0; animation: mzpl-breathe 4.6s ease-in-out infinite alternate;
  background:
    radial-gradient(ellipse 30% 46% at 44% 47%, transparent 22%, rgba(96,232,160,.10) 52%, rgba(96,232,160,.04) 76%, transparent 100%),
    radial-gradient(ellipse 38% 40% at 58% 56%, transparent 20%, rgba(80,220,150,.08) 54%, rgba(80,220,150,.03) 78%, transparent 100%),
    radial-gradient(ellipse 46% 54% at 50% 50%, transparent 34%, rgba(130,238,176,.06) 64%, transparent 100%); }
@keyframes mzpl-breathe { from { opacity: .72; } to { opacity: 1; } }
.mzpl.is-success .mzpl-green { opacity: 1; }
.mzpl.is-success .mzpl-bloom, .mzpl.is-success .mzpl-pool { opacity: calc(var(--lit) * .74); transition: opacity 1.6s ease-in-out; }
.mzpl .mzpl-gbloom { top: 104px; width: 240px; height: 240px; opacity: 0; transition: opacity 1.6s ease-in-out; }
.mzpl .mzpl-gbloom i { background: radial-gradient(closest-side, rgba(238,255,206,.46) 0%, rgba(176,236,138,.26) 30%, rgba(110,205,120,.10) 58%, transparent 100%); }
.mzpl .mzpl-gpool { top: 190px; width: 540px; height: 340px; opacity: 0; transition: opacity 1.6s ease-in-out; }
.mzpl .mzpl-gpool i { background: radial-gradient(closest-side, rgba(150,225,130,.16), rgba(110,205,120,.05) 55%, transparent 100%); animation-duration: 5.3s; animation-delay: -1.7s; }
.mzpl.is-success .mzpl-gbloom { opacity: calc(var(--lit) * .42); }
.mzpl.is-success .mzpl-gpool { opacity: calc(var(--lit) * .34); }
.mzpl.is-success .mzpl-lantern img { filter: brightness(calc(.42 + var(--lit) * .58)) saturate(calc(.55 + var(--lit) * .45)) hue-rotate(6deg); transition-duration: 1.6s; transition-timing-function: ease-in-out; }
.mzpl .mzpl-flies { position: absolute; inset: 0; pointer-events: none; }
.mzpl .mzpl-fly { position: absolute; left: 50%; top: 112px; z-index: 1; border-radius: 50%; will-change: transform, opacity; opacity: 0;
  background: radial-gradient(circle, #eafff0 0%, #8cf0aa 42%, rgba(120,235,160,0) 72%); box-shadow: 0 0 9px 2px rgba(110,235,160,.5); }
.mzpl .mzpl-fly.y { background: radial-gradient(circle, #fff9d2 0%, #ffe27a 42%, rgba(255,226,122,0) 72%); box-shadow: 0 0 9px 2px rgba(255,222,110,.5); }
.mzpl .mzpl-fly::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: inherit; animation: mzpl-twinkle var(--tw, 1s) ease-in-out infinite alternate; }
@keyframes mzpl-twinkle { from { opacity: .4; } to { opacity: 1; } }
.mzpl .mzpl-rig { position: absolute; z-index: 2; top: 0; left: 50%; width: 0; height: 100%; }
.mzpl .mzpl-rig::before { content: ""; position: absolute; top: 0; left: -.5px; width: 1px; height: 30px; background: linear-gradient(rgba(255,222,180,0), rgba(255,222,180,.55)); }
.mzpl .mzpl-lantern { position: absolute; top: 28px; left: 0; width: 60px; height: 138px; transform: translateX(-50%); }
.mzpl .mzpl-lantern img { display: block; width: 100%; height: 100%; object-fit: contain; filter: brightness(calc(.42 + var(--lit) * .58)) saturate(calc(.55 + var(--lit) * .45)); transition: filter .9s ease-out; }
.mzpl .mzpl-x { position: absolute; z-index: 3; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; color: #566073; font-size: 19px; display: grid; place-items: center; transition: transform .1s ease-out; }
.mzpl .mzpl-x:active { transform: scale(.9); }
.mzpl .mzpl-body { position: relative; z-index: 2; text-align: center; margin-top: -4px; }
.mzpl .mzpl-title { margin: 0 auto; max-width: 100%; padding-inline: 16px; font: 700 36px/1.25 var(--title-font, 'Harmattan'), 'Vazirmatn', sans-serif; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
/* long titles: step the size down by length (PHP does the same with mb_strlen) and clamp at 3 lines */
.mzpl .mzpl-title.t-m { font-size: 30px; line-height: 1.3; }
.mzpl .mzpl-title.t-l { font-size: 25px; line-height: 1.38; }
.mzpl .mzpl-en { margin: 2px auto 0; max-width: 100%; padding-inline: 16px; font-size: 12px; color: #6d7788; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mzpl .mzpl-meta { margin: 6px 0 0; font-size: 13px; color: #8993a4; }
.mzpl .mzpl-amount { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 16px 0 4px; }
.mzpl .mzpl-amount .mzpl-n { font: 400 54px/1.1 'Lalezar', 'Vazirmatn', sans-serif; color: #ffe3b8; text-shadow: 0 0 calc(10px + var(--lit) * 26px) rgba(255,170,80, calc(.15 + var(--lit) * .55)); }
.mzpl .mzpl-amount .mzpl-u { font-size: 14px; color: #8993a4; font-weight: 600; }
.mzpl .mzpl-seg { background: #0a0c10; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); margin: 14px 0 6px; }
.mzpl .mzpl-seg-row button { color: #7e8898; } .mzpl .mzpl-seg-top { background: #e9edf3; } .mzpl .mzpl-seg-top .mzpl-seg-row button { color: #11141a; }
.mzpl .mzpl-hint { margin: 10px 0 14px; min-height: 22px; font-size: 12.5px; color: #8993a4; }
.mzpl .mzpl-track { position: relative; height: 60px; border-radius: 999px; background: #2c2c2e; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; touch-action: none; user-select: none; }
.mzpl .mzpl-track .mzpl-fill { position: absolute; inset-block: 0; right: 0; width: 0; border-radius: 999px; background: linear-gradient(270deg, rgba(255,196,120,.42), rgba(255,170,90,.10)); }
.mzpl .mzpl-track .mzpl-lbl { position: absolute; inset: 0; display: grid; place-items: center; padding-inline-start: 44px; font-weight: 600; font-size: 16px; opacity: calc(1 - var(--p, 0) * 1.8); pointer-events: none;
  background: linear-gradient(100deg, #6c6c70 0%, #6c6c70 36%, #f2f2f7 50%, #6c6c70 64%, #6c6c70 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: mzpl-shimmer 2.8s linear infinite; }
@keyframes mzpl-shimmer { from { background-position: -100% 0; } to { background-position: 100% 0; } }
.mzpl .mzpl-knob { position: absolute; top: 4px; right: 4px; width: 52px; height: 52px; border-radius: 50%; background: #f2f2f7; color: #1c1c1e; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.45), 0 0 calc(var(--p, 0) * 22px) rgba(255,190,110, calc(var(--p, 0) * .8)); cursor: grab; touch-action: none; will-change: transform; transition: box-shadow .15s; }
.mzpl .mzpl-knob:active { cursor: grabbing; } .mzpl .mzpl-knob svg { width: 22px; height: 22px; }
.mzpl .mzpl-knob:focus-visible { outline: 2px solid #f2f2f7; outline-offset: 3px; }
.mzpl .mzpl-btn { background: linear-gradient(180deg, #f4802f, #e8681b); color: #fff; margin-top: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 20px -10px rgba(240,110,30,.7); }
.mzpl .mzpl-btn.alt { background: #1a1f29; color: #cfd6e2; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.mzpl .mzpl-cancel { display: block; margin: 8px auto 0; padding: 6px 12px; font-size: 13px; color: #6d7788; font-weight: 600; }
.mzpl .mzpl-done { display: flex; align-items: center; justify-content: center; gap: 10px; height: 60px; border-radius: 999px; background: #2c2c2e; color: #cfd6e2; font-weight: 700; transition: background-color .5s ease-out, color .5s ease-out, box-shadow .5s ease-out; }
.mzpl.is-success .mzpl-done { background: linear-gradient(180deg, #3bd96a, #2bb455); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 30px -8px rgba(52,199,89,.65), 0 0 22px rgba(52,199,89,.28); animation: mzpl-okpulse 1s var(--mzpl-out) 1; }
@keyframes mzpl-okpulse { from { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 30px -8px rgba(52,199,89,.65), 0 0 0 0 rgba(52,199,89,.45); } to { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 30px -8px rgba(52,199,89,.65), 0 0 0 14px rgba(52,199,89,0); } }
@media (prefers-reduced-motion: reduce) { .mzpl .mzpl-green i { animation: none; } .mzpl.is-success .mzpl-done { animation: none; } .mzpl .mzpl-fly::after { animation: none; } .mzpl .mzpl-lt i { animation: none; } .mzpl .mzpl-track .mzpl-lbl { animation: none; color: #8e8e93; background: none; -webkit-background-clip: border-box; } }

/* ---- actions ---- */
.mzpl-seg-row button { color: #7e8898; }
.mzpl-seg-row button:disabled { opacity: .6; cursor: wait; }
.mzpl-btn { margin-top: 4px; text-decoration: none; }
.mzpl-btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.mzpl-cancel { text-decoration: none; }
.mzpl-error { margin: 12px 0; padding: 12px 14px; border-radius: 16px; background: rgba(248,113,113,.1); box-shadow: inset 0 0 0 1px rgba(248,113,113,.28); color: #fca5a5; font-size: 12.5px; line-height: 1.9; text-align: right; }
.mzpl-error strong { display: block; font-size: 13px; color: #fecaca; }
.mzpl-link { text-decoration: underline; text-underline-offset: 4px; padding: 4px 0; min-height: 32px; color: #fecaca; }
.mzpl-hint.is-bad { color: #fca5a5; }
.mzpl-done[hidden], .mzpl-track[hidden] { display: none; }
.mzpl :focus-visible { outline: 2px solid rgba(255, 214, 160, .6); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .mzpl-btn:hover { filter: brightness(1.06); } .mzpl-x:hover { color: #eceff4; } }
@media (max-width: 440px) { .mzpl { border-radius: 24px; } }
@media (prefers-reduced-motion: reduce) { .mzpl { animation: none; } .mzpl-seg-top { transition: none; } }

/* ---- the manga-page buy modal still uses the old ticket markup: never show the balance there either ---- */
#mzc-buy-modal .mzpt-ledger { display: none; }

@keyframes mzpl-rise { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ---- manga-page buy modal (#mzc-buy-modal): the same card, centred in the page's modal overlay ---- */
#mzc-buy-modal { align-items: center; }                 /* the shared .mzc-modal--rating variant anchors to the top */
#mzc-buy-modal .mzpl { margin: auto; }                  /* auto margins centre it and still let a short viewport scroll */
.mzpl-meta .mzpl-sep { opacity: .5; padding: 0 4px; }

/* ---- v3: "شعله" button: a dark pill with a thin amber rim of light, lit like the lantern. Used for login, top-up and support. ---- */
.mzpl .mzpl-btn, .mzpl .mzpl-btn.alt {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 60px; margin-top: 4px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent; color: #ffe3b8; font-weight: 800; font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer;
  background: linear-gradient(#141821, #141821) padding-box, linear-gradient(180deg, rgba(255, 214, 150, .9), rgba(255, 150, 70, .45)) border-box;
  box-shadow: 0 0 26px -4px rgba(255, 170, 80, .28), inset 0 0 22px rgba(255, 170, 80, .08);
  transition: transform .12s var(--mzpl-out), box-shadow .25s ease-out, filter .2s;
}
.mzpl .mzpl-btn:active { transform: scale(.975); }
.mzpl .mzpl-btn .ic { display: grid; place-items: center; flex: none; color: #ffc683; }
.mzpl .mzpl-btn .ic svg { width: 20px; height: 20px; }
.mzpl .mzpl-btn[disabled] { opacity: .6; cursor: wait; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .mzpl .mzpl-btn:hover, .mzpl .mzpl-btn.alt:hover { filter: none; box-shadow: 0 0 34px -2px rgba(255, 170, 80, .42), inset 0 0 26px rgba(255, 170, 80, .14); }
}
/* the real submit button behind the slider stays invisible no matter what the button styles say */
.mzpl .mzpl-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; }

/* ---- v4: English name big on top (Zen Antique), Persian name smaller below ---- */
@font-face { font-family: 'Zen Antique'; src: url('../fonts/zen-antique-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
.mzpl--en .mzpl-en { margin: 0 auto; max-width: 100%; padding-inline: 26px; font: 400 calc(34px * .92)/1.15 'Zen Antique', Georgia, 'Times New Roman', serif; color: #eceff4; text-align: center; white-space: normal; text-wrap: balance;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.mzpl--en .mzpl-en.en-m { font-size: calc(28px * .92); line-height: 1.22; }
.mzpl--en .mzpl-en.en-l { font-size: calc(23px * .92); line-height: 1.38; padding-inline: 30px; color: #e3e7ef; -webkit-line-clamp: 3; line-clamp: 3; }
.mzpl--en .mzpl-en.en-xl { font-size: calc(19.5px * .92); line-height: 1.42; padding-inline: 30px; color: #e3e7ef; -webkit-line-clamp: 3; line-clamp: 3; }
.mzpl--en .mzpl-title { margin: 10px auto 0; padding-inline: 30px; font-size: 20px; line-height: 1.5; color: #aeb7c6; -webkit-line-clamp: 1; line-clamp: 1; }
.mzpl--en .mzpl-title.t-m, .mzpl--en .mzpl-title.t-l { font-size: 17.5px; line-height: 1.7; margin-top: 12px; -webkit-line-clamp: 2; line-clamp: 2; }
.mzpl--en .mzpl-meta { margin-top: 14px; }
.mzpl--en .mzpl-amount { padding-top: 22px; }
