/* «حكاية» البرنامج: الشرح بيتغيّر مع السكرول وشاشة البرنامج ثابتة جنبه.
   كل شاشة (.sc) حركتها بتبدأ من الأول لما تبقى .play (story.js). */

.story { position: relative; padding-top: 120px; }
.story-head { text-align: center; max-width: 920px; }
.story-head .lead { margin-inline: auto; }
.story-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 72px; align-items: stretch; }

/* ---------- الشرح ---------- */
.story-steps { padding-block: 6vh 22vh; }
.st-step { min-height: 82vh; display: flex; align-items: center; }
.st-in { max-width: 31em; opacity: .18; transform: translateY(22px); transition: opacity .55s var(--ease), transform .7s var(--ease); }
.st-step.on .st-in { opacity: 1; transform: none; }
.st-num { display: inline-block; font-family: var(--display); font-size: .92rem; font-weight: 700; color: var(--lime); border: 1px solid rgba(212, 255, 58, .38); border-radius: 999px; padding: .12em .85em; margin-bottom: 18px; }
.st-step h3 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 800; line-height: 1.25; margin-bottom: .45em; letter-spacing: -.01em; }
.lang-en .st-step h3 { line-height: 1.1; }
.st-step p { color: var(--ink-2); font-size: 1.1rem; line-height: 1.85; }
.st-tags { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-tags li { font-size: .85rem; padding: .35em .95em; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.st-step.on .st-tags li { animation: tagIn .5s var(--ease) both; }
.st-step.on .st-tags li:nth-child(2) { animation-delay: .08s; }
.st-step.on .st-tags li:nth-child(3) { animation-delay: .16s; }
@keyframes tagIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- الشاشة الثابتة ---------- */
.story-stage { position: relative; }
.stage-sticky { position: sticky; top: max(150px, calc(50vh - 270px)); }
.stage-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.stage-count { font-family: var(--display); color: var(--muted); font-size: .92rem; white-space: nowrap; }
.stage-count b { color: var(--ink); font-size: 1.35rem; font-weight: 800; }
.stage-rail { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.stage-rail b { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--lime)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .15s linear; }
[dir="rtl"] .stage-rail b { transform-origin: right; background: linear-gradient(-90deg, var(--violet), var(--lime)); }
.story-win { position: relative; }
.story-win::after { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(closest-side, color-mix(in srgb, var(--app, var(--violet)) 30%, transparent), transparent); z-index: -1; filter: blur(30px); }
.story-screen { position: relative; height: 450px; overflow: hidden; font-size: .9rem; }
.stage-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.stage-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: var(--line-2); cursor: pointer; transition: width .35s var(--ease), background .3s; }
.stage-dots button.on { width: 26px; background: var(--lime); }

.sc { position: absolute; inset: 0; padding: 22px; display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .45s var(--ease), transform .6s var(--ease); pointer-events: none; }
.sc.on { opacity: 1; transform: none; }

/* عناصر مشتركة */
.s-label { color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.s-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.s-row b { color: var(--ink); font-weight: 600; }
.s-row em { font-style: normal; margin-inline-start: auto; color: var(--muted); font-size: .76rem; }
.s-row .box { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes press { 50% { transform: scale(.88); } }
@keyframes shake { 0%, 100% { rotate: 0deg; } 20% { rotate: -16deg; } 40% { rotate: 13deg; } 60% { rotate: -9deg; } 80% { rotate: 5deg; } }

/* 1. الإضافة */
.s-adder { display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 15px; border: 1px solid color-mix(in srgb, var(--violet) 60%, transparent); background: var(--surface); box-shadow: 0 0 0 4px rgba(124, 92, 255, .12); }
.s-type { flex: 1; min-width: 0; padding-inline: 8px; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; display: flex; align-items: center; }
.s-type span { display: inline-block; overflow: hidden; max-width: 0; }
.sc.play .s-type span { animation: typing 1.5s steps(24) .35s forwards; }
@keyframes typing { to { max-width: 100%; } }
.s-caret { width: 2px; height: 18px; background: var(--lime); animation: blink 1s steps(2) infinite; margin-inline-end: auto; }
.s-pill, .s-add { padding: 6px 11px; border-radius: 10px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.s-pill { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.s-add { background: var(--lime); color: var(--bg); }
.sc.play .s-add { animation: press .35s 1.95s; }
.s-when { display: flex; gap: 6px; flex-wrap: wrap; }
.s-when span { font-size: .74rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.s-when .on { color: var(--ink); border-color: rgba(212, 255, 58, .4); background: rgba(212, 255, 58, .08); }
.s-pop { opacity: 0; border-color: rgba(212, 255, 58, .5); background: rgba(212, 255, 58, .07); margin-top: 6px; }
.sc.play .s-pop { animation: pop .55s var(--ease) 2.15s forwards; }
.s-old { opacity: .6; }

/* 2. الخطوات */
.s-row.parent { border-color: color-mix(in srgb, var(--violet) 50%, transparent); }
.s-caretd { color: var(--muted); font-size: .8rem; }
.s-kids { display: flex; flex-direction: column; gap: 8px; margin-inline-start: 24px; border-inline-start: 1px dashed var(--line-2); padding-inline-start: 12px; }
.s-row.kid { opacity: 0; }
.s-row.deep { margin-inline-start: 26px; }
.sc.play .s-row.kid { animation: pop .5s var(--ease) calc(.3s + var(--i) * .4s) forwards; }
.s-addstep { margin-inline-start: 36px; padding: 9px 13px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: .82rem; opacity: 0; }
.sc.play .s-addstep { animation: rise .5s 2s forwards; }

/* 3. العدّاد */
.s-focus { flex: 1; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--app, var(--violet)) 70%, #fff 0%), color-mix(in srgb, var(--app, var(--violet)) 35%, #0b0b12)); }
.s-focus small { opacity: .75; font-size: .78rem; }
.s-focus > b { font-family: var(--display); font-size: 1.15rem; }
.s-ringbox { position: relative; width: 168px; height: 168px; display: grid; place-items: center; margin-block: 8px; }
.s-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.s-ring circle { fill: none; stroke-width: 8; }
.s-ring .bg { stroke: rgba(255, 255, 255, .16); }
.s-ring .fg { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 0; }
.sc.play .s-ring .fg { animation: drain 9s linear forwards; }
@keyframes drain { to { stroke-dashoffset: 230; } }
.s-time { font-family: var(--display); font-size: 2.3rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.s-ctrls { display: flex; gap: 8px; margin-top: 6px; }
.s-ctrls span { padding: 7px 13px; border-radius: 11px; background: rgba(255, 255, 255, .14); font-size: .8rem; font-weight: 700; }
.s-ctrls .ok { background: var(--lime); color: var(--bg); }
.s-next { text-align: center; color: var(--muted); font-size: .82rem; }

/* 4. المنبّه */
.sc[data-sc="3"] { justify-content: center; background: repeating-linear-gradient(0deg, transparent 0 52px, rgba(255, 255, 255, .025) 52px 98px); }
.s-alarm { position: relative; align-self: center; width: min(340px, 100%); padding: 20px; border-radius: 20px; text-align: center; background: #191926; border: 1px solid var(--line-2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9); display: flex; flex-direction: column; gap: 7px; }
.s-alarm .s-bell { font-size: 2rem; line-height: 1; }
.sc.play .s-bell { animation: shake 1s ease 2; }
.s-alarm small { color: var(--muted); font-size: .76rem; }
.s-alarm > b { font-family: var(--display); font-size: 1.2rem; }
.s-alarm p { margin: 0 0 4px; color: var(--ink-2); font-size: .86rem; }
.s-opt { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: .82rem; text-align: start; transition: none; }
.sc.play .s-opt.hl { animation: pick .35s 1.75s forwards; }
@keyframes pick { to { background: rgba(212, 255, 58, .14); border-color: var(--lime); color: var(--ink); transform: scale(1.02); } }
.s-cursor { position: absolute; top: 72%; inset-inline-start: 62%; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); opacity: 0; }
.sc.play .s-cursor { animation: cursor 1.9s var(--ease) .3s forwards; }
@keyframes cursor { 0% { opacity: 0; transform: translate(70px, 90px); } 30% { opacity: 1; } 75% { transform: none; } 85% { transform: scale(.7); } 100% { opacity: .9; transform: none; } }

/* 5. المجموعات */
.s-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.s-chips span { font-size: .78rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; }
.s-chips em { font-style: normal; opacity: .7; }
.s-chips .c-all { color: var(--ink); border-color: var(--violet); background: rgba(124, 92, 255, .16); }
.sc.play .s-chips .c-all { animation: chipOff .3s 1s forwards; }
.sc.play .s-chips .c-goal { animation: chipOn .3s 1s forwards; }
@keyframes chipOff { to { color: var(--muted); border-color: var(--line); background: var(--surface); } }
@keyframes chipOn { to { color: var(--ink); border-color: #8b6cff; background: rgba(139, 108, 255, .2); } }
.s-goal { display: grid; grid-template-columns: minmax(0, 1fr) 38% auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.s-goal b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-goal em { font-style: normal; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.s-gbar { height: 7px; border-radius: 7px; background: var(--line); overflow: hidden; }
.s-gbar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--violet), var(--lime)); }
[dir="rtl"] .s-gbar i { background: linear-gradient(-90deg, var(--violet), var(--lime)); }
.sc.play .s-gbar i { animation: fill 1.2s var(--ease) 1.3s forwards; }
.sc.play .s-goal:nth-of-type(4) .s-gbar i { animation-delay: 1.45s; }
.sc.play .s-goal:nth-of-type(5) .s-gbar i { animation-delay: 1.6s; }
@keyframes fill { to { width: var(--w); } }
.s-tolday { align-self: flex-start; margin-top: 4px; padding: 8px 14px; border-radius: 12px; background: var(--lime); color: var(--bg); font-weight: 700; font-size: .8rem; opacity: 0; }
.sc.play .s-tolday { animation: rise .5s 2.5s forwards; }

/* 6. المواعيد والتذكيرات */
.sc[data-sc="5"] { padding-top: 22px; }
.s-tm { padding: 3px 9px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.s-remind { position: absolute; top: 18px; inset-inline: 22px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(212, 255, 58, .5);
  background: linear-gradient(135deg, rgba(212, 255, 58, .16), rgba(124, 92, 255, .14)), #191926; box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(-120%); }
.sc.play .s-remind { animation: drop .7s var(--ease) .9s forwards; }
@keyframes drop { to { opacity: 1; transform: none; } }
.s-rbell { font-size: 1.5rem; line-height: 1.1; }
.sc.play .s-rbell { animation: shake 1s ease 1.4s 2; }
.s-remind b { display: block; font-family: var(--display); font-size: 1rem; }
.s-remind small { color: var(--ink-2); font-size: .75rem; }
.s-rb { display: flex; gap: 6px; margin-top: 8px; }
.s-rb i { font-style: normal; font-size: .75rem; font-weight: 700; padding: 5px 11px; border-radius: 9px; background: rgba(255, 255, 255, .1); }
.s-rb .ok { background: var(--lime); color: var(--bg); }

/* 7. الصلاة */
.s-pstrip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.s-pstrip span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.s-pstrip small { color: var(--muted); font-size: .72rem; }
.s-pstrip b { font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-pstrip .nx { border-color: var(--lime); background: rgba(212, 255, 58, .1); animation: glowp 2s ease-in-out infinite; }
.s-pstrip .nx small { color: var(--lime); }
@keyframes glowp { 50% { box-shadow: 0 0 0 5px rgba(212, 255, 58, .1); } }
.s-pnext { text-align: center; color: var(--ink-2); font-size: .9rem; margin-block: 8px; }
.s-pnext b { font-family: var(--display); font-size: 1.25rem; color: var(--ink); margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
.s-pcard { align-self: center; width: min(330px, 100%); padding: 18px; border-radius: 20px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center;
  background: linear-gradient(160deg, rgba(200, 245, 61, .14), rgba(14, 165, 233, .12)), #191926; border: 1px solid rgba(200, 245, 61, .35); opacity: 0; }
.sc.play .s-pcard { animation: rise .7s var(--ease) .8s forwards; }
.s-mosque { font-size: 2rem; line-height: 1.1; }
.s-pcard b { font-family: var(--display); font-size: 1.1rem; }
.s-pcard small { color: var(--ink-2); font-size: .78rem; }
.s-pcard i { font-style: normal; margin-top: 8px; padding: 9px 16px; border-radius: 12px; background: var(--lime); color: var(--bg); font-weight: 700; font-size: .82rem; }

/* 8. التقارير */
.s-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.s-stats div { padding: 11px 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.s-stats small { display: block; color: var(--muted); font-size: .72rem; }
.s-stats b { font-family: var(--display); font-size: 1.35rem; font-weight: 800; }
.s-stats b em { font-style: normal; font-size: .8rem; color: var(--ink-2); }
.s-bars { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; padding: 12px 6px 0; min-height: 140px; }
.s-bars span { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.s-bars i { width: 100%; max-width: 34px; height: var(--h); border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, var(--violet), rgba(124, 92, 255, .35)); transform: scaleY(0); transform-origin: bottom; }
.s-bars .best i { background: linear-gradient(180deg, var(--lime), rgba(212, 255, 58, .35)); }
.sc.play .s-bars i { animation: bar .8s var(--ease) calc(.25s + var(--k) * .09s) forwards; }
@keyframes bar { to { transform: scaleY(1); } }
.s-bars small { color: var(--muted); font-size: .7rem; }
.s-where { padding: 12px 14px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.s-where > small { color: var(--muted); font-size: .74rem; }
.s-split { display: flex; height: 10px; border-radius: 10px; overflow: hidden; margin-block: 8px; background: var(--line); gap: 2px; }
.s-split i { width: 0; background: var(--c); }
.sc.play .s-split i { animation: fill 1s var(--ease) 1.1s forwards; }
.s-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .75rem; color: var(--ink-2); }

/* 9. كل الأجهزة */
.s-devs { flex: 1; display: flex; align-items: center; justify-content: center; gap: 22px; direction: ltr; }
.s-laptop .scr { width: 230px; height: 146px; border-radius: 12px 12px 4px 4px; border: 6px solid #2a2a3a; background: #13131e; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.s-laptop { display: flex; flex-direction: column; align-items: center; }
.s-laptop .base { width: 280px; height: 10px; border-radius: 0 0 10px 10px; background: #2a2a3a; }
.s-phone .scr { width: 92px; height: 176px; border-radius: 18px; border: 5px solid #2a2a3a; background: #13131e; padding: 16px 8px 8px; display: flex; flex-direction: column; gap: 7px; }
.s-devs .r { display: block; height: 18px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.s-devs .r.done { background: rgba(212, 255, 58, .2); border-color: rgba(212, 255, 58, .4); }
.s-devs .r.new { background: var(--surface-2); }
.sc.play .s-laptop .r.new { animation: lit .4s .4s forwards; }
.sc.play .s-phone .r.new { animation: lit .4s 1.7s forwards; }
@keyframes lit { to { background: rgba(124, 92, 255, .35); border-color: var(--violet); } }
.s-sync { display: flex; gap: 6px; }
.s-sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); opacity: .2; animation: syncd 1.2s ease-in-out infinite; }
.s-sync i:nth-child(2) { animation-delay: .2s; }
.s-sync i:nth-child(3) { animation-delay: .4s; }
@keyframes syncd { 50% { opacity: 1; transform: translateY(-4px); } }
.s-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.s-badges span { font-size: .78rem; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- آخر الحكاية ---------- */
.story-end { position: relative; overflow: hidden; text-align: center; padding-block: 140px 120px; border-top: 1px solid var(--line); }
.story-end .wrap { position: relative; z-index: 1; }
.story-end .lead { margin-inline: auto; }
.story-end .btn { margin-top: 10px; font-size: 1.05rem; padding: 1em 2em; }

/* أزرار الهيرو + علامة «انزل» */
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.scroll-cue i { width: 22px; height: 34px; border-radius: 12px; border: 2px solid var(--line-2); position: relative; }
.scroll-cue i::after { content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--lime); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 1; transform: none; } 80% { opacity: 0; transform: translateY(10px); } 100% { opacity: 0; } }

/* ---------- الموبايل: الشاشة فوق ثابتة والشرح بيعدّي تحتها ---------- */
@media (max-width: 900px) {
  .story { padding-top: 80px; }
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-stage { order: -1; position: sticky; top: 138px; z-index: 5; padding-block: 10px 18px; margin-inline: -24px; padding-inline: 24px;
    background: linear-gradient(180deg, var(--bg) 82%, rgba(11, 11, 18, 0)); }
  .stage-sticky { position: static; }
  .stage-top { margin-bottom: 8px; }
  .story-win { zoom: .74; }
  .story-screen { height: 430px; }
  .stage-dots { margin-top: 8px; }
  .story-steps { padding-block: 0 30vh; }
  .st-step { min-height: 62vh; align-items: flex-start; padding-top: 4vh; }
  .st-in { opacity: .25; }
  .st-step h3 { font-size: 1.6rem; }
  .st-step p { font-size: 1rem; }
  .scroll-cue { display: none; }
}
@media (max-width: 420px) { .story-win { zoom: .66; } }

/* من غير حركة: كل شاشة بتظهر في شكلها الأخير */
@media (prefers-reduced-motion: reduce) {
  .story .sc *, .story .sc { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .st-in { transition: none; }
}

/* ---------- خطوة الراحة (الترفيه والنوم) ---------- */
.s-restchips { display: flex; gap: 8px; flex-wrap: wrap; }
.s-restchips span { font-size: .8rem; font-weight: 700; padding: 7px 13px; border-radius: 999px; }
.s-restchips .sl { background: rgba(124, 92, 255, .16); color: #b9a6ff; }
.s-restchips .fn { background: rgba(212, 255, 58, .12); color: var(--lime); }
.s-bed { margin-top: 14px; text-align: center; padding: 18px 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); opacity: 0; }
.sc.play .s-bed { animation: rise .7s var(--ease) .7s forwards; }
.s-bed .moon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(135deg, #3b2f8f, #7c5cff); }
.sc.play .s-bed .moon { animation: shake 1.2s ease 1.5s 2; }
.s-bed b { display: block; font-size: 1.05rem; color: var(--ink); }
.s-bed small { color: var(--muted); font-size: .78rem; }
.s-bedbtns { display: grid; gap: 7px; margin-top: 12px; }
.s-bedbtns i { font-style: normal; font-size: .8rem; font-weight: 700; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.s-bedbtns .go { border-color: rgba(212, 255, 58, .45); color: var(--lime); }

/* ---------- خطوة الأرشيف ---------- */
.s-tick { width: 17px; height: 17px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .66rem; font-weight: 800; color: #0b0b12; background: var(--lime); }
.s-arch-out b { text-decoration: line-through; color: var(--muted); }
.sc.play .s-arch-out { animation: archOut .8s var(--ease) 1.2s forwards; }
@keyframes archOut { to { opacity: 0; transform: translateY(60px) scale(.9); height: 0; padding-block: 0; margin-block: -5px; border-width: 0; } }
.s-archline { margin-top: 8px; display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: .8rem; color: var(--muted); opacity: 0; }
.s-archline span { margin-inline-start: auto; font-size: .72rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); }
.sc.play .s-archline { animation: rise .5s var(--ease) 1.9s forwards; }

/* ---------- وضع «خطوة بنزلة»: الجزء بياخد الشاشة تحت الهيدر، والشرح والشاشة بيتغيّروا مكانهم ----------
   (من غير جافاسكربت الصفحة بتفضل زي ما هي فوق: الشرح بيعدّي والشاشة ثابتة) */
.story.paged .story-grid {
  height: calc(100vh - var(--hdr, 130px));
  height: calc(100svh - var(--hdr, 130px));
  min-height: 520px; align-items: center;
}
.story.paged .story-steps { position: relative; height: min(100%, 560px); padding: 0; }
.story.paged .st-step { position: absolute; inset: 0; min-height: 0; pointer-events: none; }
.story.paged .st-step.on { pointer-events: auto; }
.story.paged .st-in { opacity: 0; transform: translateY(34px); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.story.paged .st-step.above .st-in { transform: translateY(-34px); }
.story.paged .st-step.on .st-in { opacity: 1; transform: none; transition-delay: .12s; }
.story.paged .stage-sticky { position: static; }
.story.paged .story-stage { align-self: center; }
.stage-hint { display: none; }
.story.paged .stage-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .82rem; }
.story.paged .stage-hint i { width: 16px; height: 24px; border-radius: 9px; border: 2px solid var(--line-2); position: relative; }
.story.paged .stage-hint i::after { content: ""; position: absolute; top: 4px; left: 50%; width: 3px; height: 5px; margin-left: -1.5px; border-radius: 2px; background: var(--lime); animation: wheel 1.6s ease-in-out infinite; }

@media (max-width: 900px) {
  .story.paged .story-grid { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 480px; }
  .story.paged .story-stage { position: static; order: -1; margin: 0; padding: 6px 0 0; background: none; align-self: stretch; }
  .story.paged .story-steps { flex: 1; min-height: 0; height: auto; width: 100%; }
  .story.paged .st-step { align-items: flex-start; padding-top: 4px; }
  .story.paged .st-step h3 { font-size: 1.45rem; }
  .story.paged .st-step p { font-size: .97rem; line-height: 1.75; }
  .story.paged .st-tags { margin-top: 12px; }
  .story.paged .stage-hint { display: none; }
}
@media (max-width: 900px) and (max-height: 760px) {
  .story.paged .story-win { zoom: .6; }
  .story.paged .st-step p { font-size: .92rem; }
  .story.paged .st-tags { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .story.paged .st-in { transition: opacity .2s; transform: none !important; }
}
