/* =====================================================================
   سبزشهر / زیست‌راه - فاز ۲: سایت عمومی، انیمیشن، صدا، ماشل‌زا، گالری
   ===================================================================== */
:root {
  --zr-c1: #cefcf9;  /* فیروزه‌ای روشن */
  --zr-c2: #9efd63;  /* سبز روشن */
  --zr-c3: #ea7414;  /* نارنجی */
  --zr-c4: #b90e06;  /* قرمز */
}

/* ---------- نوار رنگی کنار صفحه (رنگ‌های برند) ---------- */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
.zy-ribbon { position: fixed; top: 90px; inset-inline-start: 0; z-index: 5; display: flex; flex-direction: column; pointer-events: none; }
.zy-ribbon i { display: block; width: 14px; height: 70px; border-start-end-radius: 14px; border-end-end-radius: 14px; margin-bottom: -18px; }
.zy-ribbon i:nth-child(1) { background: var(--zr-c1); }
.zy-ribbon i:nth-child(2) { background: var(--zr-c2); }
.zy-ribbon i:nth-child(3) { background: var(--zr-c3); }
.zy-ribbon i:nth-child(4) { background: var(--zr-c4); }
@media (max-width: 767.98px) { .zy-ribbon { display: none; } }

/* ---------- هدر سایت عمومی ---------- */
.public-header .nav-link.active { background: transparent; box-shadow: inset 0 -3px 0 var(--zy-primary); border-radius: 0; }
.brand-public img { width: 52px; height: 52px; }
.brand-public b { color: var(--zy-dark) !important; font-size: 1.15rem; max-width: 120px; line-height: 1.25; white-space: normal; }
:root[data-theme="dark"] .brand-public b { color: #e3efe6 !important; }

/* ---------- کارت‌های بخش‌ها ---------- */
.zr-card { background: var(--zy-surface); border: 1px solid var(--zy-border); border-radius: 28px; padding: 1.6rem; margin-top: 1.4rem; box-shadow: var(--zy-shadow-sm); position: relative; overflow: hidden; }
.zr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.zr-head h2 { font-size: 1.3rem; font-weight: 900; margin: 0; }
.zr-head a { font-weight: 700; font-size: .88rem; white-space: nowrap; }
.zr-kicker { color: var(--zy-primary-ink); font-weight: 700; font-size: .9rem; display: inline-flex; gap: .3rem; align-items: center; }

/* ---------- اسلایدر ---------- */
.zr-hero { border-radius: 30px; overflow: hidden; background: linear-gradient(135deg, #dff2fb 0%, #eefbf1 60%, #f6fff0 100%); box-shadow: var(--zy-shadow); position: relative; }
:root[data-theme="dark"] .zr-hero { background: linear-gradient(135deg, #12291c, #0f1f16); }
.zr-slide { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 340px; }
.zr-slide-text { padding: 2rem 3.5rem; }
.zr-slide-text h1 { font-weight: 900; font-size: clamp(1.7rem, 3.8vw, 2.9rem); line-height: 1.5; color: var(--zy-dark); }
:root[data-theme="dark"] .zr-slide-text h1 { color: #fff; }
.zr-slide-text h1 .hl { color: var(--zy-primary-ink); position: relative; }
.zr-slide-text p { color: var(--zy-muted); font-size: 1.02rem; max-width: 420px; }
.zr-slide-img { height: 100%; position: relative; }
.zr-slide-img img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; mask-image: linear-gradient(to left, #000 75%, transparent); -webkit-mask-image: linear-gradient(to left, #000 75%, transparent); }
[dir="rtl"] .zr-slide-img img { mask-image: linear-gradient(to right, #000 75%, transparent); -webkit-mask-image: linear-gradient(to right, #000 75%, transparent); }
.zr-hero .carousel-control-prev, .zr-hero .carousel-control-next { width: 60px; opacity: 1; }
.zr-arrow { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--zy-text); display: grid; place-items: center; box-shadow: var(--zy-shadow-sm); }
.zr-hero .carousel-indicators [data-bs-target] { width: 9px; height: 9px; border-radius: 50%; background: var(--zy-primary); border: 0; }
@media (max-width: 767.98px) {
  .zr-slide { grid-template-columns: 1fr; }
  .zr-slide-img { order: -1; }
  .zr-slide-img img { min-height: 200px; max-height: 230px; mask-image: linear-gradient(to top, transparent, #000 30%) !important; -webkit-mask-image: linear-gradient(to top, transparent, #000 30%) !important; }
  .zr-slide-text { padding: 1rem 1.4rem 2.4rem; text-align: center; }
  .zr-slide-text p { margin-inline: auto; }
  .zr-hero .carousel-control-prev, .zr-hero .carousel-control-next { display: none; }
}

/* ---------- معرفی + ویدیو ---------- */
.zr-intro { background: linear-gradient(135deg, var(--zy-surface), var(--zy-primary-softer)); }
.zr-intro h2 { font-weight: 900; font-size: 1.8rem; margin: .4rem 0 .8rem; }
.zr-intro p { color: var(--zy-muted); line-height: 2; }
.zr-video { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--zy-shadow); }
.zr-video img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform .5s; }
.zr-video:hover img { transform: scale(1.04); }
.zr-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.25); backdrop-filter: blur(4px);
  border: 3px solid #fff; color: #fff; display: grid; place-items: center; font-size: 2.4rem; animation: zrPulse 2s infinite; }
@keyframes zrPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 70% { box-shadow: 0 0 0 22px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* ---------- پیام شهردار ---------- */
.zr-mayor { background: linear-gradient(135deg, var(--zy-primary-softer), var(--zy-surface)); }
.zr-mayor::before { content: ""; position: absolute; top: -20px; inset-inline-start: -20px; width: 90px; height: 90px; border-radius: 0 0 90px 0; background: var(--zr-c2); opacity: .55; }
.zr-mayor::after { content: ""; position: absolute; bottom: -30px; inset-inline-end: -30px; width: 80px; height: 80px; border-radius: 50%; background: var(--zr-c3); opacity: .8; }
.zr-mayor-photo { width: 100%; aspect-ratio: 4/3.3; object-fit: cover; border-radius: 24px; box-shadow: var(--zy-shadow); }
.zr-mayor h3 { font-weight: 900; font-size: 1.2rem; }
.zr-mayor blockquote { color: var(--zy-text); line-height: 2.1; margin: .8rem 0; position: relative; padding-inline-start: 1.6rem; }
.zr-mayor blockquote .bi-quote { position: absolute; inset-inline-start: 0; top: -6px; color: var(--zy-primary-ink); font-size: 1.7rem; }
.zr-mayor-side { max-width: 100%; max-height: 220px; border-radius: 18px; }

/* ---------- آمار ---------- */
.zr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 1.4rem; }
@media (max-width: 767.98px) { .zr-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- همکاران ---------- */
.zr-partners { display: flex; gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; scrollbar-width: thin; }
.partner-tile { flex: 0 0 160px; scroll-snap-align: start; background: var(--zy-surface-2); border: 1px solid var(--zy-border); border-radius: 20px; padding: 1.1rem .6rem;
  text-align: center; color: var(--zy-text); display: flex; flex-direction: column; align-items: center; gap: .55rem; transition: .25s; }
.partner-tile:hover { transform: translateY(-4px); box-shadow: var(--zy-shadow); color: var(--zy-text); border-color: var(--zy-primary); }
.partner-tile img { height: 58px; max-width: 120px; object-fit: contain; }
.partner-tile > .bi { font-size: 2.6rem; color: var(--zy-primary-ink); }
.partner-tile span { font-size: .82rem; font-weight: 700; }

/* ---------- اخبار ---------- */
.zr-news img { height: 190px; }
.zr-news .body { display: flex; flex-direction: column; flex: 1; }
.zr-tag { position: absolute; bottom: 10px; inset-inline-end: 10px; background: var(--zy-primary); color: var(--zy-on-primary); font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }
.zr-news:nth-child(3n+2) .zr-tag { background: var(--zr-c3); color: #fff; }

/* ---------- آموزش‌های ما ---------- */
.zr-edu { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.zr-edu a { border-radius: 22px; padding: 1.4rem 1rem; text-align: center; color: var(--zy-text); display: flex; flex-direction: column; align-items: center; gap: .6rem; transition: .25s; border: 1px solid transparent; }
.zr-edu a:hover { transform: translateY(-4px); box-shadow: var(--zy-shadow); color: var(--zy-text); }
.zr-edu .bi { font-size: 2.2rem; }
.zr-edu b { font-size: .9rem; }
.zr-edu .t-green { background: #e9f8ec; } .zr-edu .t-green .bi { color: #2a9d4b; }
.zr-edu .t-blue { background: #e6f3fb; } .zr-edu .t-blue .bi { color: #1f8ac0; }
.zr-edu .t-orange { background: #fff1e4; } .zr-edu .t-orange .bi { color: var(--zr-c3); }
.zr-edu .t-red { background: #fde9ea; } .zr-edu .t-red .bi { color: var(--zr-c4); }
:root[data-theme="dark"] .zr-edu a { background: var(--zy-surface-2) !important; border-color: var(--zy-border); }
@media (max-width: 767.98px) { .zr-edu { grid-template-columns: repeat(2, 1fr); } }

/* ---------- گالری ---------- */
.zr-gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.g-album { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--zy-shadow-sm); }
.g-album img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.g-album:hover img { transform: scale(1.07); }
.g-album span { position: absolute; inset: auto 0 0 0; padding: 2rem .9rem .7rem; color: #fff; font-weight: 800; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.g-album span small { display: block; font-weight: 400; opacity: .85; font-size: .75rem; }
.g-album-lg { aspect-ratio: 16/11; }
.zr-masonry { columns: 3 240px; column-gap: .8rem; margin-top: 1rem; }
.zr-masonry .m-item { display: block; break-inside: avoid; margin-bottom: .8rem; border-radius: 18px; overflow: hidden; position: relative; }
.zr-masonry img { width: 100%; display: block; transition: transform .4s; }
.zr-masonry .m-item:hover img { transform: scale(1.04); }
.zr-masonry .m-item span { position: absolute; bottom: 0; inset-inline: 0; padding: 1.5rem .8rem .5rem; color: #fff; font-size: .85rem; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.zy-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(5,15,10,.92); display: none; align-items: center; justify-content: center; }
.zy-lightbox.open { display: flex; }
.zy-lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.zy-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 14px; }
.zy-lightbox figcaption { color: #fff; margin-top: .6rem; }
.zy-lightbox button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 16px; top: 50%; }
.lb-next { inset-inline-end: 16px; top: 50%; }

/* ---------- فوتر عمومی ---------- */
.public-footer { position: relative; background: var(--zy-dark); color: #d7e8de; margin-top: 4rem; padding: 2.4rem 0 1.2rem; }
.pf-wave { position: absolute; top: -48px; left: 0; width: 100%; height: 50px; fill: var(--zy-dark); }
.public-footer::before, .public-footer::after { content: ""; position: absolute; top: -70px; width: 180px; height: 26px; border-radius: 30px; }
.public-footer::before { inset-inline-start: -40px; background: linear-gradient(90deg, var(--zr-c4), var(--zr-c3)); transform: rotate(-8deg); }
.public-footer::after { inset-inline-end: -40px; background: linear-gradient(90deg, var(--zr-c2), var(--zr-c1)); transform: rotate(8deg); }
.pf-contact { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.pf-contact li { display: flex; gap: .5rem; margin-bottom: .4rem; }
.pf-contact .bi, .pf-slogan .bi { color: var(--zr-c2); }
.pf-slogan { font-size: .9rem; }
.pf-social { display: flex; gap: .5rem; }
.pf-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; font-size: 1.1rem; transition: .2s; }
.pf-social a:hover { background: var(--zr-c2); color: var(--zy-dark); }
.public-footer .copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 1.6rem; padding-top: 1rem; font-size: .8rem; color: #a9c4b3; }
.public-footer small { color: #a9c4b3; }

/* ---------- صفحه‌ی بارگذاری ---------- */
#zy-preloader { position: fixed; inset: 0; z-index: 3000; background: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .45s, visibility .45s; }
:root[data-theme="dark"] #zy-preloader { background: #0d1712; }
#zy-preloader.hide { opacity: 0; visibility: hidden; }
.pl-wrap { width: min(86vw, 420px); }
.pl-stage { height: 188px; display: flex; justify-content: center; align-items: flex-end; }
.pl-hero { width: 128px; height: 188px; background-repeat: no-repeat; background-size: 700% 100%; }
.pl-road { position: relative; height: 2px; background: linear-gradient(90deg, transparent, var(--zy-primary) 12%, var(--zy-primary) 88%, transparent); }
.pl-road::after { content: ""; position: absolute; left: 12%; right: 12%; top: 8px; height: 2px; opacity: .45; background: repeating-linear-gradient(90deg, var(--zy-primary) 0 14px, transparent 14px 40px); animation: plSlide .78s linear infinite; }
@keyframes plSlide { to { background-position-x: -40px; } }
.pl-bar { height: 3px; background: var(--zy-primary-soft); margin-top: 44px; overflow: hidden; border-radius: 3px; }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--zy-primary); transition: width .25s ease-out; }
.pl-row { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; color: var(--zy-muted); }
.pl-row b { color: var(--zy-text); font-variant-numeric: tabular-nums; }

/* ---------- انیمیشن دکمه‌ها (قابل تنظیم از پنل) ---------- */
.fx-btn-bounce .btn:active, .fx-btn-bounce .bottom-nav a:active, .fx-btn-bounce .icon-btn:active, .fx-btn-bounce .cat:active { animation: fxBounce .35s; }
@keyframes fxBounce { 0% { transform: scale(1); } 40% { transform: scale(.9); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
.fx-btn-jelly .btn:active, .fx-btn-jelly .bottom-nav a:active, .fx-btn-jelly .icon-btn:active, .fx-btn-jelly .cat:active { animation: fxJelly .5s; }
@keyframes fxJelly { 0%,100% { transform: scale(1,1); } 30% { transform: scale(1.18,.84); } 50% { transform: scale(.88,1.12); } 70% { transform: scale(1.06,.95); } }
.fx-btn-pulse .btn-primary, .fx-btn-pulse .bottom-nav a.center .circle { position: relative; }
.fx-btn-pulse .btn:active, .fx-btn-pulse .icon-btn:active { box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), .6); animation: fxPulse .6s; }
@keyframes fxPulse { to { box-shadow: 0 0 0 16px rgba(var(--bs-primary-rgb), 0); } }
.fx-btn-bounce .btn, .fx-btn-jelly .btn, .fx-btn-pulse .btn { transition: transform .15s, box-shadow .2s, background-color .2s; }
.fx-btn-bounce .btn:hover, .fx-btn-jelly .btn:hover, .fx-btn-pulse .btn:hover { transform: translateY(-2px); }
.bottom-nav a.center .circle { animation: centerFloat 3s ease-in-out infinite; }
@keyframes centerFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.fx-btn-none .bottom-nav a.center .circle { animation: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- موسیقی ---------- */
.music-fab { position: fixed; bottom: 110px; inset-inline-start: 14px; z-index: 1041; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--zy-primary); color: var(--zy-on-primary);
  box-shadow: var(--zy-shadow); display: grid; place-items: center; font-size: 1.2rem; }
.music-fab .bi-slash-lg { display: none; position: absolute; font-size: 1.7rem; }
.music-fab.off { background: var(--zy-surface); color: var(--zy-muted); border: 1px solid var(--zy-border); }
.music-fab.off .bi-slash-lg { display: block; }
.music-fab:not(.off) .bi-music-note-beamed { animation: musicBob 1.2s ease-in-out infinite; }
@keyframes musicBob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-8deg); } }
@media (min-width: 992px) { .music-fab { bottom: 24px; } }

/* ---------- کاغذ رنگی و مودال ---------- */
.confetti-canvas { position: fixed; inset: 0; z-index: 2500; pointer-events: none; }
.zy-modal { position: fixed; inset: 0; z-index: 2400; background: rgba(5,20,12,.55); display: none; align-items: center; justify-content: center; padding: 1rem; }
.zy-modal.show { display: flex; animation: fadeIn .3s; }
.zy-modal-box { background: var(--zy-surface); border-radius: 28px; padding: 2rem 1.6rem; max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: popIn .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.coin-spin { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe680, #f5b301 60%, #c98a00); color: #8a5a00;
  display: grid; place-items: center; font-size: 3rem; box-shadow: 0 8px 24px rgba(245,179,1,.5), inset 0 -6px 0 rgba(0,0,0,.12); animation: coinSpin 1.6s ease-in-out infinite; }
@keyframes coinSpin { 0%,100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
.coin-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; background: #fff6d6; color: #8a5a00; font-weight: 800; font-size: .85rem; }
.coin-pill .bi { color: #f5b301; }

/* ---------- ماشل‌زا ---------- */
.mascot-walker { position: fixed; bottom: 92px; left: 0; z-index: 1035; width: 64px; height: 94px; cursor: pointer; will-change: transform; }
.mw-sprite { width: 64px; height: 94px; background-repeat: no-repeat; background-size: 700% 100%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.15)); }
.mw-bubble { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) scale(.6); opacity: 0; min-width: 170px; max-width: 240px; background: var(--zy-surface); color: var(--zy-text);
  border: 2px solid var(--zy-primary); border-radius: 18px; padding: .55rem .8rem; font-size: .8rem; font-weight: 600; text-align: center; transition: .25s; pointer-events: none; box-shadow: var(--zy-shadow); }
.mw-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--zy-primary); }
.mascot-walker.talk .mw-bubble { opacity: 1; transform: translateX(-50%) scale(1); }
@media (min-width: 992px) { .mascot-walker { bottom: 14px; } }

/* ---------- تیکت: پاسخ ماشل‌زا ---------- */
.mascot-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: var(--zy-primary-soft); padding: 2px; }
.msg-mascot { background: linear-gradient(135deg, var(--zy-primary-softer), var(--zy-surface)); border: 1px solid var(--zy-primary-soft) !important; }

/* ---------- خانه‌ی اپ (طرح جدید) ---------- */
.kid-hero { position: relative; border-radius: 30px; overflow: hidden; background: linear-gradient(180deg, #cfeefc 0%, #e9f8ff 55%, #eaf7e6 100%); padding: 1.2rem; margin-top: .6rem; }
:root[data-theme="dark"] .kid-hero { background: linear-gradient(180deg, #12291c, #0f1f16); }
.kid-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60px; background: url('../img/hero/hero-city.jpg') center bottom / cover; opacity: .35; }
.kid-hero .kh-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 160px 1fr 1fr; gap: 1rem; align-items: end; }
.kid-hero .kh-kid { width: 160px; height: 170px; object-fit: cover; border-radius: 22px 22px 0 0; mask-image: linear-gradient(to top, transparent 0, #000 25%); -webkit-mask-image: linear-gradient(to top, transparent 0, #000 25%); }
.kh-bubble { background: var(--zy-surface); border-radius: 22px; padding: 1rem 1.1rem; box-shadow: var(--zy-shadow-sm); position: relative; align-self: center; }
.kh-bubble::before { content: ""; position: absolute; inset-inline-start: -10px; top: 40%; border: 10px solid transparent; border-inline-end-color: var(--zy-surface); }
.kh-bubble b { display: block; margin-bottom: .3rem; }
.kh-bubble p { margin: 0; font-size: .85rem; color: var(--zy-muted); line-height: 1.9; }
.kh-score { background: var(--zy-surface); border-radius: 22px; padding: 1rem 1.1rem; box-shadow: var(--zy-shadow-sm); align-self: center; }
.kh-score .big { font-size: 1.8rem; font-weight: 900; }
@media (max-width: 767.98px) {
  .kid-hero .kh-grid { grid-template-columns: 110px 1fr; }
  .kid-hero .kh-kid { width: 110px; height: 130px; }
  .kh-score { grid-column: 1 / -1; }
}
.path-row { display: flex; gap: .6rem; overflow-x: auto; padding: .4rem .1rem .8rem; scrollbar-width: none; align-items: stretch; }
.path-row::-webkit-scrollbar { display: none; }
.path-step { flex: 0 0 132px; background: var(--zy-surface); border: 1px solid var(--zy-border); border-radius: 20px; padding: .9rem .5rem; text-align: center; color: var(--zy-text); position: relative; }
.path-step:hover { color: var(--zy-text); border-color: var(--zy-primary); }
.path-step .ps-ico { width: 62px; height: 62px; margin: 0 auto .5rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.path-step b { display: block; font-size: .82rem; }
.path-step small { color: var(--zy-muted); font-size: .72rem; }
.path-step .ps-state { position: absolute; top: 8px; inset-inline-end: 10px; font-size: 1rem; }
.path-step.done { background: var(--zy-primary-softer); border-color: var(--zy-primary); }
.path-step.done .ps-state { color: var(--zy-primary-ink); }
.path-step.locked .ps-ico { filter: grayscale(.85); opacity: .65; }
.path-step.locked .ps-state { color: var(--zy-muted); }
.path-sep { align-self: center; color: var(--zy-primary-ink); font-size: 1.1rem; flex: 0 0 auto; }
.event-card { border-radius: 24px; padding: 1.2rem; display: grid; grid-template-columns: 1fr 110px; gap: .8rem; align-items: center; color: var(--zy-text); min-height: 160px; height: 100%; }
.event-card:hover { color: var(--zy-text); box-shadow: var(--zy-shadow); }
.event-card img { width: 110px; height: 110px; object-fit: cover; border-radius: 18px; }
.event-card h4 { font-weight: 900; font-size: 1.05rem; margin-bottom: .3rem; }
.event-green { background: linear-gradient(135deg, #e3f6ff, #e9f9e8); }
.event-pink { background: linear-gradient(135deg, #fbe8f1, #fff1e6); }
:root[data-theme="dark"] .event-green, :root[data-theme="dark"] .event-pink { background: var(--zy-surface-2); }
.badge-row { display: flex; gap: .7rem; overflow-x: auto; padding-bottom: .4rem; }
.badge-item { flex: 0 0 96px; text-align: center; font-size: .75rem; font-weight: 600; }
.badge-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 20px; display: block; margin: 0 auto .35rem; }
.badge-item.locked img { filter: grayscale(1); opacity: .45; }

/* ارتفاع ثابت کارت مأموریت در دسکتاپ */
@media (min-width: 576px) { .mission-card { grid-template-rows: 250px; } .mission-card img { height: 250px; } }

/* =====================================================================
   فاز ۳: پخش زنده، آمار، نمودار
   ===================================================================== */
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: liveDot 1.4s infinite; vertical-align: middle; }
@keyframes liveDot { 70% { box-shadow: 0 0 0 9px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.live-card { display: flex; flex-direction: column; height: 100%; border-radius: 22px; overflow: hidden; background: var(--zy-surface); border: 1px solid var(--zy-border); color: var(--zy-text); box-shadow: var(--zy-shadow-sm); transition: .25s; }
.live-card:hover { color: var(--zy-text); transform: translateY(-3px); box-shadow: var(--zy-shadow); }
.live-card.is-live { border-color: #ef4444; box-shadow: 0 0 0 3px #fde8e8; }
.lc-img { position: relative; }
.lc-img img { width: 100%; height: 160px; object-fit: cover; display: block; }
.lc-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: .3rem; flex-wrap: wrap; }
.lc-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.lc-body h4 { font-size: 1rem; font-weight: 800; margin: 0 0 .25rem; }
.live-hero { position: relative; min-height: 340px; background: center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.live-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,20,12,.25), rgba(5,20,12,.7)); }
.lh-over { position: relative; z-index: 1; text-align: center; color: #fff; padding: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.live-box { background: rgba(255,255,255,.95); color: var(--zy-text); border-radius: 22px; padding: 1.1rem 1.5rem; min-width: 260px; box-shadow: var(--zy-shadow); }
:root[data-theme="dark"] .live-box { background: rgba(21,34,26,.95); }
.countdown { display: flex; gap: .5rem; justify-content: center; margin-top: .4rem; }
.countdown span { background: var(--zy-primary-soft); color: var(--zy-primary-ink); border-radius: 14px; padding: .4rem .7rem; font-weight: 900; font-size: 1.4rem; min-width: 64px; }
.countdown small { display: block; font-size: .65rem; font-weight: 600; color: var(--zy-muted); }
.live-player { position: relative; background: #000; aspect-ratio: 16 / 9; }
.live-player iframe, .live-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.zr-traffic { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem; margin-top: 1.2rem; padding: .7rem 1rem; border-radius: 999px;
  background: var(--zy-surface); border: 1px solid var(--zy-border); box-shadow: var(--zy-shadow-sm); font-size: .9rem; color: var(--zy-muted); }
.zr-traffic b { color: var(--zy-text); font-weight: 900; margin-inline-start: .25rem; }
.zr-traffic .bi { color: var(--zy-primary-ink); }
/* نمودار SVG */
.svg-chart .sc-grid { stroke: var(--zy-border); stroke-width: 1; }
.svg-chart .sc-axis { fill: var(--zy-muted); font-size: 11px; font-family: var(--zy-font); }
.sc-legend { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; font-size: .8rem; color: var(--zy-muted); margin-top: .3rem; }
.sc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-inline-end: .35rem; vertical-align: -1px; }
.sc-bars { display: flex; flex-direction: column; gap: .45rem; }
.sc-bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 70px; gap: .6rem; align-items: center; font-size: .82rem; }
.sc-bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-bar-t { height: 10px; border-radius: 99px; background: var(--zy-primary-soft); overflow: hidden; }
.sc-bar-t i { display: block; height: 100%; border-radius: 99px; }
.sc-bar b { text-align: end; }

.kid-hero .kh-grid.kh-grid-2 { grid-template-columns: 160px 1fr; }
@media (max-width: 767.98px) { .kid-hero .kh-grid.kh-grid-2 { grid-template-columns: 110px 1fr; } }
