/* =====================================================================
   سبزشهر - فاز ۴ (اسلایدر لمسی، شمارنده‌ها، بنر فانتزی، همکاران، سوالات،
   صفحه‌ی کتابی ورود، کد تأیید کودکانه، آواتارساز، داشبورد)
   ===================================================================== */

/* ---------- فوتر همیشه پایین صفحه بچسبد (حتی در صفحات کوتاه) ---------- */
body.sticky-foot { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.sticky-foot > main { flex: 1 0 auto; width: 100%; }
body.sticky-foot > footer, body.sticky-foot > .public-footer { flex-shrink: 0; }

/* ---------- هدر: نام سایت در یک خط ---------- */
.brand { min-width: 0; }
.brand span { min-width: 0; }
.brand b, .brand small { white-space: nowrap; }
.brand-public b { font-size: clamp(.98rem, 3.6vw, 1.25rem); }
@media (max-width: 380px) { .brand img { width: 38px; height: 38px; } .header-actions { gap: .3rem; } .header-actions .icon-btn { width: 40px; height: 40px; } }
.public-nav .nav-link { padding: .5rem .65rem !important; font-size: .92rem; white-space: nowrap; }
.site-header .burger { flex-shrink: 0; margin-inline-end: .5rem; }
/* دکمه‌ی واحد موسیقی/صدا */
.mute-toggle { position: relative; }
.mute-toggle .mt-slash { position: absolute; font-size: 1.5rem; display: none; color: var(--zy-danger); }
.mute-toggle.is-muted .mt-slash { display: block; }
.mute-toggle.is-muted .bi-music-note-beamed { opacity: .45; }
.mute-toggle:not(.is-muted) .bi-music-note-beamed { animation: musicBob 1.4s ease-in-out infinite; }

/* ---------- دکمه‌ی بازگشت ---------- */
.back-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .95rem .4rem 1.1rem; border-radius: 999px; background: var(--zy-surface);
  border: 1px solid var(--zy-border); color: var(--zy-text); font-weight: 700; font-size: .88rem; box-shadow: var(--zy-shadow-sm); transition: .2s; }
.back-btn .bi { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--zy-primary-soft); color: var(--zy-primary-ink); transition: transform .2s; }
.back-btn:hover { color: var(--zy-primary-ink); border-color: var(--zy-primary); }
.back-btn:hover .bi { transform: translateX(4px); }
[dir="ltr"] .back-btn .bi { transform: scaleX(-1); }

/* ---------- اسلایدر لمسی با اندازه‌ی ثابت ---------- */
.zr-slider { position: relative; max-width: var(--sw, 100%); margin-inline: auto; border-radius: 30px; overflow: hidden; background: linear-gradient(135deg, #dff2fb, #eefbf1);
  box-shadow: var(--zy-shadow); user-select: none; -webkit-user-select: none; }
:root[data-theme="dark"] .zr-slider { background: linear-gradient(135deg, #12291c, #0f1f16); }
.zs-viewport { overflow: hidden; height: var(--sh, 520px); touch-action: pan-y; cursor: grab; }
.zr-slider.is-dragging .zs-viewport { cursor: grabbing; }
.zs-track { display: flex; height: 100%; will-change: transform; }
[dir="rtl"] .zs-track { flex-direction: row; }
.zs-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.zs-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transform: scale(1.04); transition: transform 7s ease-out; }
.zs-slide.is-active > img { transform: scale(1); }
.zs-slide.has-text::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(240, 250, 244, .96) 0%, rgba(240, 250, 244, .82) 34%, rgba(240, 250, 244, 0) 62%); }
[dir="ltr"] .zs-slide.has-text::after { background: linear-gradient(to right, rgba(240, 250, 244, .96) 0%, rgba(240, 250, 244, .82) 34%, rgba(240, 250, 244, 0) 62%); }
:root[data-theme="dark"] .zs-slide.has-text::after { background: linear-gradient(to left, rgba(12, 26, 18, .95) 0%, rgba(12, 26, 18, .8) 34%, rgba(12, 26, 18, 0) 62%); }
.zs-text { position: absolute; z-index: 2; inset-block: 0; inset-inline-start: 0; width: min(48%, 560px); display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; padding: 2rem clamp(1.2rem, 4vw, 3.5rem); }
.zs-text h1 { font-weight: 900; font-size: clamp(1.4rem, 3.4vw, 2.8rem); line-height: 1.5; color: var(--zy-dark); margin: 0 0 .6rem; }
:root[data-theme="dark"] .zs-text h1 { color: #fff; }
.zs-text h1 .hl { color: var(--zy-primary-ink); }
.zs-text p { color: var(--zy-muted); font-size: clamp(.88rem, 1.6vw, 1.05rem); margin-bottom: 1rem; }
.zs-slide.is-active .zs-text > * { animation: zsIn .7s both; }
.zs-slide.is-active .zs-text > *:nth-child(2) { animation-delay: .12s; }
.zs-slide.is-active .zs-text > *:nth-child(3) { animation-delay: .24s; }
@keyframes zsIn { from { opacity: 0; transform: translateY(18px); } }
.zs-link { position: absolute; inset: 0; z-index: 1; }
.zs-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92);
  color: var(--zy-text); box-shadow: var(--zy-shadow); display: grid; place-items: center; font-size: 1.1rem; transition: .2s; }
.zs-arrow:hover { background: var(--zy-primary); color: var(--zy-on-primary); }
.zs-prev { inset-inline-start: 14px; }
.zs-next { inset-inline-end: 14px; }
.zs-dots { position: absolute; bottom: 14px; inset-inline: 0; display: flex; justify-content: center; gap: 7px; z-index: 3; }
.zs-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .7); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: width .3s, background .3s; }
.zs-dots button.active { width: 26px; background: var(--zy-primary); }
@media (max-width: 991.98px) { .zs-viewport { height: var(--sh-md, 400px); } }
@media (max-width: 767.98px) {
  .zr-slider { border-radius: 22px; }
  .zs-viewport { height: var(--sh-xs, 260px); }
  .zs-slide.has-text::after { background: linear-gradient(to top, rgba(240, 250, 244, .97) 0%, rgba(240, 250, 244, .85) 38%, rgba(240, 250, 244, 0) 70%) !important; }
  :root[data-theme="dark"] .zs-slide.has-text::after { background: linear-gradient(to top, rgba(12, 26, 18, .96) 0%, rgba(12, 26, 18, .8) 38%, rgba(12, 26, 18, 0) 70%) !important; }
  .zs-text { inset: auto 0 0 0; width: 100%; padding: 1rem 1rem 2.2rem; align-items: center; text-align: center; }
  .zs-text h1 { font-size: 1.15rem; margin-bottom: .3rem; }
  .zs-text p { font-size: .82rem; margin-bottom: .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .zs-text .btn { padding: .35rem 1rem; font-size: .85rem; }
  .zs-arrow { display: none; }
  .zs-dots { bottom: 8px; }
}

/* ---------- تصاویر برجسته و سه‌بعدی (مناسب کودکان) ---------- */
.img-3d, .zr-news .nc-img, .news-card > img, .news-card > .no-img, .course-card .thumb, .g-album, .live-card .lc-img, .zr-mayor-photo, .news-cover, .event-card img, .mission-row img, .badge-item img {
  box-shadow: 0 2px 0 rgba(255, 255, 255, .6) inset, 0 10px 22px -8px rgba(16, 74, 50, .35), 0 4px 0 -1px rgba(16, 74, 50, .12);
}
.img-3d, .zr-mayor-photo, .g-album { border: 4px solid #fff; transform: perspective(900px) rotateX(0) rotateY(0); transition: transform .35s, box-shadow .35s; }
:root[data-theme="dark"] .img-3d, :root[data-theme="dark"] .zr-mayor-photo, :root[data-theme="dark"] .g-album { border-color: var(--zy-surface-2); }
.img-3d:hover, .g-album:hover { transform: perspective(900px) rotateX(3deg) rotateY(-3deg) translateY(-4px); box-shadow: 0 22px 36px -14px rgba(16, 74, 50, .45); }
.zr-news .nc-img { margin: .6rem .6rem 0; border-radius: 18px; overflow: hidden; }
.zr-news .nc-img img, .zr-news .nc-img .no-img { border-radius: 18px; transition: transform .5s; }
.zr-news:hover .nc-img img { transform: scale(1.06) rotate(-.6deg); }
.course-card .thumb { margin: .55rem .55rem 0; border-radius: 16px; overflow: hidden; }
.news-cover { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.mission-row img, .event-card img { border: 3px solid #fff; }

/* تصویر جایگزین خبر بدون عکس */
.no-img { display: grid; place-items: center; width: 100%; height: 100%; min-height: 72px; color: #fff; font-size: 2.6rem; position: relative; overflow: hidden; }
.no-img::after { content: ""; position: absolute; width: 140%; height: 60%; bottom: -30%; inset-inline-start: -20%; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.no-img.g1 { background: linear-gradient(135deg, #34c26b, #1f8f4a); }
.no-img.g2 { background: linear-gradient(135deg, #2bb6d6, #2a7fd1); }
.no-img.g3 { background: linear-gradient(135deg, #f59f3a, #ea7414); }
.no-img.g4 { background: linear-gradient(135deg, #8b5cf6, #c044c9); }
.news-card > .no-img, .zr-news .nc-img .no-img { height: 190px; }
.news-item > .no-img { width: 92px; height: 72px; min-height: 0; border-radius: 12px; flex-shrink: 0; font-size: 1.6rem; }
.news-mini .no-img, .news-mini img { width: 60px; height: 44px; min-height: 0; border-radius: 10px; font-size: 1.1rem; flex-shrink: 0; object-fit: cover; }
.app-news .no-img { height: 140px; }

/* ---------- خبرها در ردیف (تعداد در هر ردیف از تنظیمات) ---------- */
.zr-grid { display: grid; gap: 1rem; grid-template-columns: repeat(var(--n-xs, 1), minmax(0, 1fr)); }
@media (min-width: 768px) { .zr-grid { grid-template-columns: repeat(var(--n-md, 2), minmax(0, 1fr)); } }
@media (min-width: 1200px) { .zr-grid { grid-template-columns: repeat(var(--n-lg, 3), minmax(0, 1fr)); } }
.zr-news { transition: transform .25s, box-shadow .25s; }
.zr-news:hover { transform: translateY(-4px); }
.zr-news.is-featured { border: 2px solid #f5b301; box-shadow: 0 0 0 4px #fff4d6; }
:root[data-theme="dark"] .zr-news.is-featured { box-shadow: 0 0 0 4px #3a2f0c; }
.zr-featured { position: absolute; top: 10px; inset-inline-start: 10px; background: linear-gradient(135deg, #ffd34d, #f5a300); color: #6b3d00; font-weight: 800; font-size: .74rem;
  padding: .22rem .65rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(245, 163, 0, .4); animation: featPulse 2.4s ease-in-out infinite; }
@keyframes featPulse { 50% { transform: scale(1.08); } }
.news-item.is-featured { border-color: #f5b301; background: linear-gradient(135deg, #fffaf0, var(--zy-surface)); }
:root[data-theme="dark"] .news-item.is-featured { background: linear-gradient(135deg, #2b2410, var(--zy-surface)); }

/* ---------- بنر باریک فانتزی ---------- */
.zr-fun-banner { margin-top: 1.4rem; height: var(--bh, 110px); border-radius: 26px; display: flex; align-items: center; justify-content: space-around; gap: .6rem;
  padding: .4rem 1rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; position: relative; box-shadow: var(--zy-shadow-sm); }
.zr-fun-banner::-webkit-scrollbar { display: none; }
.zr-fun-banner.bg-rainbow { background: linear-gradient(90deg, var(--zr-c1), #e8ffd9 30%, #fff1e2 70%, #ffe8e6); }
.zr-fun-banner.bg-sky { background: linear-gradient(180deg, #bfe7ff, #eaf8ff); }
.zr-fun-banner.bg-grass { background: linear-gradient(180deg, #eaffd9 0%, #c9f5a6 100%); }
.zr-fun-banner.bg-plain { background: var(--zy-surface); border: 1px solid var(--zy-border); }
:root[data-theme="dark"] .zr-fun-banner:not(.bg-plain) { background: linear-gradient(90deg, #16301f, #1d2a16 50%, #2b2012); }
.fb-item { flex: 0 0 auto; height: 100%; display: flex; align-items: center; padding: .2rem; cursor: default; }
a.fb-item { cursor: pointer; }
.fb-item img { height: calc(var(--bh, 110px) - 22px); width: auto; max-width: 180px; object-fit: contain; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .18)); transition: transform .35s, filter .35s; }
.fx-bounce:hover img, .fx-bounce:active img { animation: fbBounce .7s; }
@keyframes fbBounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px) scale(1.06); } 55% { transform: translateY(0) scale(.97); } 75% { transform: translateY(-5px); } }
.fx-wobble:hover img, .fx-wobble:active img { animation: fbWobble .8s; }
@keyframes fbWobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg) scale(1.05); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
.fx-spin:hover img, .fx-spin:active img { transform: rotate(360deg) scale(1.08); transition: transform .8s cubic-bezier(.3, 1.5, .5, 1); }
.fx-zoom:hover img, .fx-zoom:active img { transform: scale(1.22); }
.fx-glow:hover img, .fx-glow:active img { filter: drop-shadow(0 0 12px rgba(255, 220, 80, .95)) drop-shadow(0 0 4px #fff); transform: scale(1.08); }
.fx-float img { animation: fbFloat 3.2s ease-in-out infinite; }
.fx-float:nth-child(2n) img { animation-delay: -1.4s; }
@keyframes fbFloat { 50% { transform: translateY(-8px); } }
@media (max-width: 575.98px) { .zr-fun-banner { justify-content: flex-start; border-radius: 20px; } }

/* ---------- شمارنده‌های وسط صفحه ---------- */
.zr-counters { display: grid; gap: .9rem; margin-top: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.zc-item { position: relative; overflow: hidden; border-radius: 24px; padding: 1.2rem .8rem 1rem; text-align: center; background: var(--zy-surface); border: 1px solid var(--zy-border);
  box-shadow: var(--zy-shadow-sm); animation: zcIn .6s both; animation-delay: var(--d, 0ms); --c1: #34c26b; --c2: #1f8f4a; --cs: #e9f8ec; }
.zc-item::before { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; top: -70px; inset-inline-end: -50px; background: var(--cs); }
.zc-item::after { content: ""; position: absolute; width: 60px; height: 60px; border-radius: 50%; bottom: -34px; inset-inline-start: -18px; background: var(--cs); opacity: .7; }
:root[data-theme="dark"] .zc-item::before, :root[data-theme="dark"] .zc-item::after { opacity: .12; }
.zc-ico { position: relative; z-index: 1; width: 58px; height: 58px; margin: 0 auto .55rem; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px -6px var(--c2); transform: rotate(-6deg); transition: transform .3s; }
.zc-item:hover .zc-ico { transform: rotate(0) scale(1.08); }
.zc-item b { position: relative; z-index: 1; display: block; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; color: var(--zy-text); font-variant-numeric: tabular-nums; line-height: 1.3; }
.zc-label { position: relative; z-index: 1; font-size: .84rem; color: var(--zy-muted); font-weight: 600; }
.zc-green { --c1: #34c26b; --c2: #1f8f4a; --cs: #e9f8ec; }
.zc-purple { --c1: #a78bfa; --c2: #7c3aed; --cs: #f1ebff; }
.zc-blue { --c1: #60a5fa; --c2: #2563eb; --cs: #e7f0ff; }
.zc-orange { --c1: #fbab5b; --c2: #ea7414; --cs: #fff1e4; }
.zc-red { --c1: #f87171; --c2: #b90e06; --cs: #ffe9e9; }
.zc-teal { --c1: #2dd4bf; --c2: #0e8f84; --cs: #e0faf6; }
.zc-pink { --c1: #f472b6; --c2: #c02679; --cs: #fde8f3; }
.zc-yellow { --c1: #fcd34d; --c2: #d99100; --cs: #fff7d6; }
@keyframes zcIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }

/* آنلاین و بازدید - کارت‌های گرافیکی */
.zr-traffic-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-top: 1rem; }
.tc { position: relative; overflow: hidden; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem 1.4rem; border-radius: 22px; color: #fff; box-shadow: var(--zy-shadow-sm); }
.tc small { display: block; font-size: .8rem; opacity: .92; font-weight: 600; }
.tc b { display: block; font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.tc-online { background: linear-gradient(135deg, #ff6b6b, #c0262d); }
.tc-today { background: linear-gradient(135deg, #3cc4e6, #2563eb); }
.tc-total { background: linear-gradient(135deg, #3fcf7a, #187a42); }
.tc-ico, .tc-ring { width: 50px; height: 50px; flex-shrink: 0; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 1.45rem; }
.tc-ring { border-radius: 50%; border: 3px solid rgba(255, 255, 255, .55); animation: tcRing 2s ease-out infinite; }
.tc-ring .live-dot { width: 14px; height: 14px; background: #fff; box-shadow: none; }
@keyframes tcRing { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }
.tc-wave { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 26px; fill: rgba(255, 255, 255, .16); }
@media (max-width: 767.98px) {
  .zr-traffic-cards { grid-template-columns: 1fr 1fr; }
  .tc-online { grid-column: 1 / -1; }
  .tc { padding: .8rem .9rem 1.2rem; gap: .6rem; }
  .tc-ico, .tc-ring { width: 40px; height: 40px; font-size: 1.15rem; }
}

/* ---------- نوار افقی (همکاران، شهرداری‌ها، دوره‌ها) ---------- */
.zr-carousel { position: relative; --gap: 14px; }
.zc-viewport { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: .3rem .2rem .8rem; scrollbar-width: none; overscroll-behavior-x: contain; }
.zc-viewport::-webkit-scrollbar { display: none; }
.zc-viewport.grabbing { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.zc-cell { scroll-snap-align: start; flex: 0 0 calc((100% - (var(--n-xs, 2) - 1) * var(--gap)) / var(--n-xs, 2)); min-width: 0; }
@media (min-width: 768px) { .zc-cell { flex-basis: calc((100% - (var(--n-md, 4) - 1) * var(--gap)) / var(--n-md, 4)); } }
@media (min-width: 1200px) { .zc-cell { flex-basis: calc((100% - (var(--n-lg, 6) - 1) * var(--gap)) / var(--n-lg, 6)); } }
.zc-arrow { position: absolute; top: calc(50% - .25rem); transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--zy-border);
  background: var(--zy-surface); color: var(--zy-text); box-shadow: var(--zy-shadow); display: grid; place-items: center; transition: .2s; }
.zc-arrow:hover:not(:disabled) { background: var(--zy-primary); color: var(--zy-on-primary); border-color: var(--zy-primary); }
.zc-arrow:disabled { opacity: .35; cursor: default; }
.zc-prev { inset-inline-start: -14px; }
.zc-next { inset-inline-end: -14px; }
.zr-carousel.no-scroll .zc-arrow { display: none; }
@media (max-width: 575.98px) { .zc-prev { inset-inline-start: -6px; } .zc-next { inset-inline-end: -6px; } .zc-arrow { width: 34px; height: 34px; } }
.zr-carousel .partner-tile { flex-grow: 0; flex-shrink: 0; }
.zr-carousel .partner-tile img { height: var(--logo-h, 64px); max-width: 100%; }
.zr-carousel .partner-tile span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.city-tile { background: linear-gradient(180deg, var(--zy-primary-softer), var(--zy-surface)); }
.zr-carousel .course-card .pct { color: var(--zy-primary-ink); }

/* ---------- سوالات متداول ---------- */
.zr-faq { background: linear-gradient(135deg, var(--zy-surface), var(--zy-primary-softer)); }
.faq-list { display: flex; flex-direction: column; gap: .6rem; }
.faq-item { background: var(--zy-surface); border: 1px solid var(--zy-border); border-radius: 18px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--zy-primary); box-shadow: 0 6px 18px -10px rgba(16, 74, 50, .4); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; font-weight: 800; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .bi { margin-inline-start: auto; transition: transform .3s; color: var(--zy-primary-ink); }
.faq-item[open] summary .bi { transform: rotate(180deg); }
.fq-n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--zy-primary-soft); color: var(--zy-primary-ink); font-size: .85rem; }
.faq-item[open] .fq-n { background: var(--zy-primary); color: var(--zy-on-primary); }
.fq-a { padding: 0 1rem 1rem 1rem; padding-inline-start: 3.3rem; color: var(--zy-muted); font-size: .95rem; animation: fqIn .35s; }
.fq-a p:last-child { margin-bottom: 0; }
@keyframes fqIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- منوی پایین: دکمه‌ی ورود به سبزشهر ---------- */
.bottom-nav a.login-item { color: var(--zy-primary-ink); }
.bottom-nav a.login-item .bi { width: 40px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--zy-primary-soft); font-size: 1.25rem; }
.bottom-nav a.login-item span { font-weight: 800; font-size: .66rem; white-space: nowrap; }

/* متن ویرایشگر (خبر، مقاله) */
.article-body img { max-width: 100%; height: auto; border-radius: 14px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.article-body td, .article-body th { border: 1px solid var(--zy-border); padding: .5rem; }
.article-body figure { margin: 1rem 0; text-align: center; }
.article-body figcaption { font-size: .82rem; color: var(--zy-muted); }
.article-body iframe { max-width: 100%; border-radius: 14px; }
.tox-tinymce { border-radius: 16px !important; border-color: var(--zy-border) !important; }

/* تقویم شمسی هماهنگ با تم */
jdp-container { font-family: var(--zy-font) !important; border-radius: 18px !important; box-shadow: var(--zy-shadow) !important; }
jdp-container .jdp-day.selected, jdp-container .jdp-btn-today { background-color: var(--zy-primary) !important; color: var(--zy-on-primary) !important; }
input[data-jdp] { background-image: none; cursor: pointer; }
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .public-nav .nav-link { padding: .45rem .45rem !important; font-size: .84rem; }
  .public-header .brand img { width: 40px; height: 40px; }
  .public-header .brand b { font-size: 1.05rem; }
}
.public-nav { margin-inline: 1rem !important; }

/* =====================================================================
   صفحه‌ی کتابی ورود / ثبت‌نام
   ===================================================================== */
.book-wrap { flex-direction: column; gap: 1rem; background: radial-gradient(circle at 20% 10%, #e5f6ff 0, transparent 45%), radial-gradient(circle at 85% 90%, #eaffd9 0, transparent 45%), var(--zy-bg); }
:root[data-theme="dark"] .book-wrap { background: var(--zy-bg); }
.book-top { width: 100%; max-width: 1040px; display: flex; justify-content: space-between; align-items: center; }
.book { position: relative; width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr; perspective: 2400px; filter: drop-shadow(0 26px 40px rgba(16, 74, 50, .22)); }
.bk-page, .bk-face { background: var(--zy-surface); padding: 2rem 2.2rem; min-height: 580px; }
.bk-page { grid-row: 1; }
[dir="rtl"] .bk-under-right { grid-column: 1; border-radius: 0 28px 28px 0; }
[dir="rtl"] .bk-under-left { grid-column: 2; border-radius: 28px 0 0 28px; }
[dir="ltr"] .bk-under-right { grid-column: 2; border-radius: 28px 0 0 28px; }
[dir="ltr"] .bk-under-left { grid-column: 1; border-radius: 0 28px 28px 0; }
/* برگه‌ی کاغذی: سایه‌ی نزدیک عطف کتاب */
[dir="rtl"] .bk-under-right { background: linear-gradient(to left, var(--zy-surface) 85%, #e6ede9); background: linear-gradient(to left, var(--zy-surface) 85%, color-mix(in srgb, var(--zy-surface) 88%, #6b8f7a)); }
[dir="rtl"] .bk-under-left { background: linear-gradient(to right, var(--zy-surface) 85%, #e6ede9); background: linear-gradient(to right, var(--zy-surface) 85%, color-mix(in srgb, var(--zy-surface) 88%, #6b8f7a)); }
.bk-art { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem; }
.bk-art h2 { font-weight: 900; color: var(--zy-primary-ink); margin: .4rem 0 0; }
.bk-art p { color: var(--zy-muted); margin: 0; }
.bk-logo { width: 92px; height: 92px; object-fit: contain; animation: bkFloat 3.4s ease-in-out infinite; }
.bk-pic { width: 100%; max-width: 380px; max-height: 260px; object-fit: cover; border-radius: 22px; margin-top: 1rem; border: 5px solid #fff; box-shadow: 0 14px 26px -12px rgba(16, 74, 50, .45); }
.bk-pic-round { width: 210px; height: 210px; border-radius: 50%; margin: 0 0 .4rem; }
.bk-deco { display: flex; gap: 1.2rem; font-size: 1.6rem; margin-top: 1rem; }
.bk-deco span { animation: bkFloat 3s ease-in-out infinite; }
.bk-deco span:nth-child(2) { animation-delay: -1s; }
.bk-deco span:nth-child(3) { animation-delay: -2s; }
@keyframes bkFloat { 50% { transform: translateY(-7px); } }

/* برگه‌ی ورق‌خورنده (رو: ورود / پشت: ثبت‌نام) */
.bk-leaf { grid-row: 1; position: relative; z-index: 3; display: grid; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.55, .1, .25, 1); }
[dir="rtl"] .bk-leaf { grid-column: 2; transform-origin: right center; }
[dir="ltr"] .bk-leaf { grid-column: 1; transform-origin: right center; }
.bk-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; position: relative; overflow: hidden; }
[dir="rtl"] .bk-front { border-radius: 28px 0 0 28px; background: linear-gradient(to right, var(--zy-surface) 88%, #e6ede9); background: linear-gradient(to right, var(--zy-surface) 88%, color-mix(in srgb, var(--zy-surface) 90%, #6b8f7a)); }
[dir="rtl"] .bk-back { border-radius: 0 28px 28px 0; transform: rotateY(180deg); background: linear-gradient(to left, var(--zy-surface) 88%, #e6ede9); background: linear-gradient(to left, var(--zy-surface) 88%, color-mix(in srgb, var(--zy-surface) 90%, #6b8f7a)); }
[dir="ltr"] .bk-front { border-radius: 0 28px 28px 0; }
[dir="ltr"] .bk-back { border-radius: 28px 0 0 28px; transform: rotateY(180deg); }
.book.is-signup .bk-leaf { transform: rotateY(180deg); }
[dir="ltr"] .book.is-signup .bk-leaf { transform: rotateY(-180deg); }
.book.no-anim .bk-leaf { transition: none; }
/* سایه‌ی برگه هنگام ورق خوردن */
.bk-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 60%); }
.book.is-turning .bk-face::after { opacity: 1; }
.bk-spine { position: absolute; z-index: 4; top: 8px; bottom: 8px; left: 50%; width: 10px; transform: translateX(-50%); border-radius: 10px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .12), rgba(255, 255, 255, .5), rgba(0, 0, 0, .12)); pointer-events: none; }
.bk-face h1 { font-weight: 900; font-size: 1.45rem; display: flex; gap: .5rem; align-items: center; }
.bk-corner { position: absolute; bottom: 0; width: 46px; height: 46px; pointer-events: none; inset-inline-end: 0;
  background: linear-gradient(135deg, transparent 50%, var(--zy-primary-soft) 50%); border-start-start-radius: 14px; opacity: .9; }
.bk-turn { position: relative; overflow: hidden; }
.bk-turn:hover .bi-arrow-left-short { animation: bkNudge .6s ease-in-out infinite alternate; }
@keyframes bkNudge { to { transform: translateX(-5px); } }
.bk-mobile-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.bk-mobile-head b { font-weight: 900; color: var(--zy-primary-ink); font-size: 1.2rem; }
@media (max-width: 767.98px) {
  .book { grid-template-columns: 1fr; perspective: 1600px; max-width: 460px; }
  .bk-under-right, .bk-under-left, .bk-spine { display: none; }
  [dir] .bk-leaf { grid-column: 1; transform-origin: center center; }
  [dir] .bk-face { border-radius: 26px; min-height: 0; padding: 1.4rem 1.2rem; background: var(--zy-surface); }
  .bk-face h1 { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .bk-leaf { transition: none; } }

/* =====================================================================
   کد تأیید ۵ رقمی (افکت کودکانه)
   ===================================================================== */
.otp-card { width: 100%; max-width: 440px; background: var(--zy-surface); border-radius: 30px; padding: 2rem 1.6rem; box-shadow: var(--zy-shadow); }
.otp-mascot { width: 76px; height: 76px; margin: 0 auto .8rem; border-radius: 24px; display: grid; place-items: center; font-size: 2.3rem; color: #fff;
  background: linear-gradient(135deg, #ffb84d, var(--zr-c3)); box-shadow: 0 10px 20px -8px var(--zr-c3); animation: bkFloat 2.8s ease-in-out infinite; }
.otp-boxes { position: relative; display: flex; justify-content: center; gap: .6rem; height: 70px; }
.otp-box { width: 58px; height: 66px; border-radius: 18px; border: 2px solid var(--zy-border); background: var(--zy-surface-2); color: var(--zy-text);
  text-align: center; font-size: 1.8rem; font-weight: 900; outline: none; caret-color: var(--zy-primary); transition: transform .25s, border-color .2s, background .2s, box-shadow .2s;
  font-family: var(--zy-font); padding: 0; }
.otp-box:focus { border-color: var(--zy-primary); box-shadow: 0 0 0 4px var(--zy-primary-soft); transform: translateY(-3px); }
.otp-box.filled { background: var(--zy-primary-soft); border-color: var(--zy-primary); animation: otpPop .3s; }
@keyframes otpPop { 50% { transform: scale(1.15); } }
.otp-boxes .otp-box:nth-child(1).filled { background: #e3f6ff; border-color: #2bb6d6; }
.otp-boxes .otp-box:nth-child(2).filled { background: #eaffd9; border-color: #6cc23a; }
.otp-boxes .otp-box:nth-child(3).filled { background: #fff3d6; border-color: #f5b301; }
.otp-boxes .otp-box:nth-child(4).filled { background: #ffe9e2; border-color: #ea7414; }
.otp-boxes .otp-box:nth-child(5).filled { background: #f1ebff; border-color: #8b5cf6; }
:root[data-theme="dark"] .otp-boxes .otp-box.filled { background: var(--zy-surface-2); }
.otp-boxes.is-checking .otp-box { animation: otpWait .8s ease-in-out infinite; animation-delay: calc(var(--i) * .1s); }
@keyframes otpWait { 50% { transform: translateY(-8px); } }
/* درست بود: مربع‌ها به وسط جمع می‌شوند و یک دور می‌چرخند */
.otp-boxes.is-ok .otp-box { animation: otpGather 1s cubic-bezier(.6, -.2, .3, 1.2) forwards; pointer-events: none; }
.otp-boxes.is-ok .otp-box:nth-child(1) { --tx: 132px; }
.otp-boxes.is-ok .otp-box:nth-child(2) { --tx: 66px; }
.otp-boxes.is-ok .otp-box:nth-child(3) { --tx: 0px; }
.otp-boxes.is-ok .otp-box:nth-child(4) { --tx: -66px; }
.otp-boxes.is-ok .otp-box:nth-child(5) { --tx: -132px; }
@keyframes otpGather {
  0% { transform: translateX(0) rotate(0) scale(1); }
  45% { transform: translateX(var(--tx)) rotate(0) scale(.9); }
  100% { transform: translateX(var(--tx)) rotate(360deg) scale(.2); opacity: 0; }
}
.otp-done { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem; color: #fff; background: linear-gradient(135deg, #3fcf7a, #187a42); transform: scale(0) rotate(-180deg); opacity: 0; pointer-events: none; }
.otp-boxes.is-ok .otp-done { animation: otpDone .6s .75s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes otpDone { to { transform: scale(1) rotate(0); opacity: 1; } }
.otp-boxes.is-bad { animation: otpShake .5s; }
.otp-boxes.is-bad .otp-box { border-color: var(--zy-danger); background: #fde8e8; }
@keyframes otpShake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@media (max-width: 400px) { .otp-box { width: 48px; height: 58px; font-size: 1.5rem; border-radius: 15px; } .otp-boxes { gap: .45rem; }
  .otp-boxes.is-ok .otp-box:nth-child(1) { --tx: 106px; } .otp-boxes.is-ok .otp-box:nth-child(2) { --tx: 53px; }
  .otp-boxes.is-ok .otp-box:nth-child(4) { --tx: -53px; } .otp-boxes.is-ok .otp-box:nth-child(5) { --tx: -106px; } }

/* دکمه‌های خروجی Excel / Word / PDF */
.export-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; margin-bottom: .6rem; }
.export-bar .btn { padding: .25rem .65rem; font-size: .78rem; border-radius: 10px; }
@media print { .export-bar { display: none !important; } }

/* اعتبار سالانه */
.sub-gem { width: 84px; height: 84px; margin: 0 auto; border-radius: 26px; display: grid; place-items: center; font-size: 2.4rem; color: #fff;
  background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 12px 24px -10px #6d28d9; animation: bkFloat 3s ease-in-out infinite; }
.sub-gem.sm { width: 48px; height: 48px; border-radius: 16px; font-size: 1.4rem; margin: 0; animation: none; flex-shrink: 0; }
.sub-strip { display: flex; align-items: center; gap: .8rem; background: linear-gradient(135deg, #f5f0ff, var(--zy-surface)); border-color: #e2d6ff; }
.sub-strip.is-active { background: linear-gradient(135deg, var(--zy-primary-softer), var(--zy-surface)); border-color: var(--zy-primary-soft); }
:root[data-theme="dark"] .sub-strip { background: var(--zy-surface-2); }

/* نوار ورود به‌جای کاربر */
.imp-bar { position: sticky; top: 0; z-index: 1060; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; padding: .45rem 1rem;
  background: repeating-linear-gradient(45deg, #b45309, #b45309 14px, #c2620f 14px, #c2620f 28px); color: #fff; font-size: .85rem; }
.imp-bar .bi-incognito { font-size: 1.2rem; }
.imp-bar .btn { padding: .2rem .7rem; font-size: .8rem; }
.imp-bar + .site-header, .imp-bar ~ .panel .topbar { top: 38px; }

/* ---------- آواتارساز ---------- */
.av-stage { position: sticky; top: 90px; }
.av-main { width: min(240px, 70vw); margin: 0 auto; border-radius: 50%; box-shadow: 0 16px 30px -14px rgba(16, 74, 50, .5), 0 0 0 6px #fff; }
.av-main svg { width: 100%; height: auto; display: block; }
.av-main.pop { animation: avPop .4s; }
@keyframes avPop { 40% { transform: scale(1.06) rotate(-2deg); } }
.av-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: .6rem; border-bottom: 1px solid var(--zy-border); scrollbar-width: none; }
.av-tabs::-webkit-scrollbar { display: none; }
.av-tab { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .15rem; border: 1px solid var(--zy-border); background: var(--zy-surface);
  border-radius: 14px; padding: .45rem .7rem; font-size: .74rem; font-weight: 700; color: var(--zy-muted); }
.av-tab .bi { font-size: 1.15rem; }
.av-tab.active { background: var(--zy-primary); color: var(--zy-on-primary); border-color: var(--zy-primary); }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; }
.av-grid.is-colors { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.av-opt { position: relative; border: 2px solid var(--zy-border); background: var(--zy-surface-2); border-radius: 18px; padding: .4rem; display: flex; flex-direction: column;
  align-items: center; gap: .2rem; transition: transform .15s, border-color .15s; }
.av-opt:hover { transform: translateY(-2px); }
.av-opt.active { border-color: var(--zy-primary); background: var(--zy-primary-soft); box-shadow: 0 0 0 3px var(--zy-primary-soft); }
.av-opt small { font-size: .7rem; font-weight: 700; }
.av-tile-svg { width: 100%; max-width: 76px; height: auto; border-radius: 50%; }
.av-swatch { width: 40px; height: 40px; border-radius: 50%; display: block; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.av-lock { position: absolute; top: 4px; inset-inline-end: 6px; color: #8b5cf6; }
.avatar-kid { background: var(--zy-primary-soft); }
.av-edit-btn { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.kid-hero .kh-kid[src^="data:image/svg"] { object-fit: contain; mask-image: none; -webkit-mask-image: none; border-radius: 50%; background: #fff; height: auto; aspect-ratio: 1; align-self: center; box-shadow: 0 10px 22px -10px rgba(16,74,50,.5); }

/* ---------- مسیر من: گام‌ها ---------- */
.path-steps { position: relative; display: flex; flex-direction: column; gap: 1.2rem; }
.path-steps::before { content: ""; position: absolute; top: 20px; bottom: 20px; inset-inline-start: 23px; border-inline-start: 3px dashed var(--zy-primary-soft); }
.step-box { position: relative; padding-inline-start: 3.6rem; }
.step-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.step-badge { position: absolute; inset-inline-start: 0; top: 0; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem;
  background: var(--zy-primary); color: var(--zy-on-primary); box-shadow: 0 8px 16px -8px var(--zy-primary); z-index: 1; }
.step-box.is-done .step-badge { background: linear-gradient(135deg, #ffd34d, #f5a300); color: #6b3d00; }
.step-box.is-locked .step-badge { background: var(--zy-surface-2); color: var(--zy-muted); box-shadow: none; border: 2px solid var(--zy-border); }
.step-box.is-locked .course-card { filter: grayscale(.9); opacity: .6; }
.step-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; padding: 5px; background: conic-gradient(var(--zy-primary) calc(var(--p) * 1%), var(--zy-primary-soft) 0); flex-shrink: 0; }
.step-ring span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--zy-surface); font-size: .72rem; font-weight: 800; }
.course-card.course-locked { cursor: not-allowed; }
.course-card .thumb .pct.lock { background: var(--zy-surface-2); color: var(--zy-muted); border-color: var(--zy-border); }
.course-card.shake { animation: otpShake .45s; }
@media (max-width: 575.98px) { .step-box { padding-inline-start: 0; } .path-steps::before { display: none; } .step-badge { position: static; } }

/* ---------- جاده‌ی ماشل‌زا ---------- */
.mascot-road { position: fixed; inset-inline: 0; bottom: 84px; height: 12px; z-index: 1034; pointer-events: none; }
.mascot-road.road-road { background: linear-gradient(#5b6470, #48505a); border-top: 2px solid #3a4048; border-bottom: 2px solid #3a4048; }
.mascot-road.road-road::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: repeating-linear-gradient(90deg, #ffd23f 0 22px, transparent 22px 44px); }
.mascot-road.road-grass { height: 10px; background: linear-gradient(#8ee05a, #4caf50); border-radius: 6px 6px 0 0;
  -webkit-mask: radial-gradient(circle at 6px 0, transparent 4px, #000 4.5px) 0 0 / 12px 100% repeat-x; mask: radial-gradient(circle at 6px 0, transparent 4px, #000 4.5px) 0 0 / 12px 100% repeat-x; }
.mascot-road.road-line { height: 3px; background: var(--zy-primary); opacity: .55; border-radius: 3px; }
.mascot-walker { bottom: 94px; }
@media (min-width: 992px) { .mascot-road { bottom: 6px; } .mascot-walker { bottom: 16px; } }

/* =====================================================================
   داشبورد: کارت‌ها، نمودارها، مقایسه
   ===================================================================== */
.kpi-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kpi-anim { animation: zcIn .5s both; animation-delay: var(--d, 0ms); }
.ct-switch { display: inline-flex; background: var(--zy-surface-2); border: 1px solid var(--zy-border); border-radius: 12px; padding: 2px; }
.ct-switch button { border: 0; background: transparent; width: 30px; height: 28px; border-radius: 9px; color: var(--zy-muted); display: grid; place-items: center; }
.ct-switch button.active { background: var(--zy-primary); color: var(--zy-on-primary); }
.seg { display: inline-flex; background: var(--zy-surface-2); border: 1px solid var(--zy-border); border-radius: 12px; padding: 2px; margin: 0; }
.seg a, .seg button { border: 0; background: transparent; padding: .2rem .65rem; border-radius: 9px; font-size: .75rem; font-weight: 700; color: var(--zy-muted); }
.seg a.active, .seg button.active { background: var(--zy-surface); color: var(--zy-primary-ink); box-shadow: var(--zy-shadow-sm); }
.svg-chart .sc-val { font-size: 11px; font-weight: 800; fill: var(--zy-text); font-family: var(--zy-font); }
.svg-chart .sc-col { transition: opacity .2s; }
.svg-chart .sc-col:hover { opacity: .85; }
.sc-pie-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; }
.svg-pie { flex-shrink: 0; max-width: 100%; }
.svg-pie .sc-slice { stroke: var(--zy-surface); stroke-width: 2; transition: transform .2s; transform-origin: 120px 120px; }
.svg-pie .sc-slice:hover { transform: scale(1.04); }
.svg-pie .sc-pie-val { font-size: 12px; font-weight: 800; fill: #fff; font-family: var(--zy-font); paint-order: stroke; stroke: rgba(0,0,0,.25); stroke-width: 2px; }
.svg-pie .sc-pie-sum { font-size: 22px; font-weight: 900; fill: var(--zy-text); font-family: var(--zy-font); }
.svg-pie .sc-axis { fill: var(--zy-muted); font-size: 11px; font-family: var(--zy-font); }
.sc-pie-legend { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; min-width: 150px; }
.sc-pie-legend div { display: grid; grid-template-columns: 12px 1fr auto auto; gap: .45rem; align-items: center; }
.sc-pie-legend i { width: 12px; height: 12px; border-radius: 4px; }
.sc-pie-legend small { color: var(--zy-muted); min-width: 34px; text-align: end; }
.cmp-row { display: flex; gap: .7rem; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--zy-border); }
.cmp-row:last-of-type { border-bottom: 0; }
.cmp-bar { position: relative; height: 14px; margin-top: 4px; border-radius: 99px; background: var(--zy-surface-2); }
.cmp-bar span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; }
.cmp-bar span.p { background: #cbd5e1; }
.cmp-bar span.c { background: linear-gradient(90deg, var(--zy-accent), var(--zy-primary)); }
.cmp-bar em { position: absolute; inset-inline-end: 6px; top: -2px; font-style: normal; font-size: .7rem; font-weight: 800; }
.cmp-chg { font-size: .75rem; font-weight: 800; padding: .05rem .5rem; border-radius: 99px; }
.cmp-chg.up { background: var(--zy-primary-soft); color: var(--zy-primary-ink); }
.cmp-chg.down { background: #fde8e8; color: #c62828; }
.chart-box .zy-card-title { gap: .5rem; }
