/* «عاداتي | My Habits» garden + «ميديا | Media» page */
.hb,.md{max-width:1150px;margin:0 auto;padding:14px 14px 30px}
.hb-head,.md-head{display:flex;align-items:center;gap:16px;margin:6px 0 14px}
.hb-head h1,.md-head h1{margin:0;font-size:2rem}.hb-head h1 small,.md-head h1 small{font-size:1rem;color:var(--muted);font-weight:600}
.hb-head p,.md-head p{margin:4px 0 0;color:var(--ink)}.hb-sub2,.md-sub2{color:var(--muted);font-size:.92rem}
.hb-girl{width:86px;height:86px;border-radius:50%;box-shadow:0 0 0 5px #fff,0 8px 20px rgba(59,42,30,.18);animation:hbBob 3.2s ease-in-out infinite;flex:none}
@keyframes hbBob{50%{transform:translateY(-6px) rotate(-3deg)}}
.hb-steps{list-style:none;margin:0 0 16px;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hb-steps li{position:relative;background:linear-gradient(160deg,#fff,#F3FBEA);border:3px solid #CDEBB8;border-radius:20px;padding:10px 8px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px}
.hb-steps li .e{font-size:1.9rem;animation:hbGrow 2.4s ease-in-out infinite}.hb-steps li.s1 .e{animation-delay:.4s}.hb-steps li.s2 .e{animation-delay:.8s}
.hb-steps li b{font-size:1.02rem}.hb-steps li i{font-style:normal;font-size:.78rem;color:var(--muted)}
.hb-steps li:not(:last-child)::after{content:'←';position:absolute;inset-inline-end:-12px;top:50%;transform:translateY(-50%);font-weight:800;color:#5DBB46;z-index:1}
@keyframes hbGrow{50%{transform:scale(1.15)}}
.hb-dash{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 2.2fr;gap:12px;margin-bottom:18px}
.hb-stat,.hb-week{background:#fff;border-radius:20px;padding:12px;box-shadow:var(--shadow);text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}
.hb-stat .e{font-size:1.7rem}.hb-stat b{font-size:1.6rem;line-height:1.1}.hb-stat small{color:var(--muted);font-size:.78rem}
.hb-week h2{margin:0 0 6px;font-size:1.05rem}.hb-week h2 small{color:var(--muted);font-size:.8rem}
.hb-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;width:100%}
.hb-day{display:flex;flex-direction:column;align-items:center;gap:2px}.hb-day i{font-style:normal;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#F4EFE6;font-size:1.15rem;color:#bbb}
.hb-day.on i{background:#E5F6DA;box-shadow:inset 0 0 0 2px #5DBB46}.hb-day.today i{outline:3px solid var(--lemon);outline-offset:1px}.hb-day small{font-size:.66rem;color:var(--muted)}
.hb-goal{width:100%;margin-top:8px;display:flex;flex-direction:column;gap:3px}.hb-goal small{font-size:.75rem;color:var(--muted)}
.hb-bar{display:block;height:8px;border-radius:99px;background:#EFE7DA;overflow:hidden;width:100%}.hb-bar.big{height:12px}.hb-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#9BE15D,#00C9A7);transition:width .6s}
.hb-garden{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;grid-auto-rows:1fr}
.hb-card{display:flex;flex-direction:column;background:#fff;border-radius:24px;overflow:hidden;border:4px solid color-mix(in srgb,var(--c) 60%,#fff);box-shadow:0 8px 22px rgba(59,42,30,.14);transition:transform .2s}
.hb-card.done{border-color:#7ACB5A;background:linear-gradient(#fff,#F2FBEC)}
.hb-cover{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:var(--c)}
.hb-cover img{width:100%;height:100%;object-fit:cover;object-position:50% 35%;display:block}
.hb-se{position:absolute;inset-inline-start:10px;bottom:-18px;width:52px;height:52px;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:1.7rem;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.hb-body{display:flex;flex-direction:column;gap:6px;padding:22px 14px 14px;flex:1}
.hb-body h3{margin:0;display:flex;flex-direction:column;font-size:1.15rem;line-height:1.3}
.hb-body h3 span{min-height:2.6em}
.hb-body h3 span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.hb-body h3 small{font-size:.82rem;color:var(--muted);font-weight:600;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.25;min-height:2.5em}
.hb-hint{margin:0;font-size:.8rem;color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:2.6em}
.hb-grow{display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:auto}
.hb-pot{position:relative;width:120px;height:104px;display:flex;align-items:flex-end;justify-content:center}
.hb-soil{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:84px;height:34px;background:linear-gradient(#C97B4A,#A85E33);border-radius:6px 6px 26px 26px;box-shadow:inset 0 6px 0 #8B4A24}
.hb-plant{position:relative;z-index:1;margin-bottom:22px;font-size:2.6rem;line-height:1;transform-origin:50% 100%;transition:font-size .4s}
.hb-plant.st0{font-size:1.6rem}.hb-plant.st1{font-size:2.2rem}.hb-plant.st2{font-size:2.6rem}.hb-plant.st3{font-size:3rem}.hb-plant.st4{font-size:3.2rem}.hb-plant.st5{font-size:3.6rem}
.hb-card.done .hb-plant{animation:hbSway 3s ease-in-out infinite}
.hb-plant.pop{animation:hbPop .8s cubic-bezier(.3,1.6,.5,1)!important}
@keyframes hbSway{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}
@keyframes hbPop{0%{transform:scale(.4)}60%{transform:scale(1.3)}100%{transform:scale(1)}}
.hb-sun{position:absolute;top:-2px;inset-inline-end:0;font-size:1.4rem;animation:hbGrow 2.6s ease-in-out infinite}
.hb-fruit{position:absolute;top:2px;left:0;right:0;text-align:center;font-size:.9rem;z-index:2}.hb-fruit b{font-size:.7rem}
.hb-stage{font-size:.8rem;color:var(--muted);text-align:center;width:100%}.hb-stage b{color:var(--ink)}.hb-stage .hb-bar{margin-top:4px}
.hb-water{margin-top:6px;border:0;border-radius:18px;padding:10px 12px;font:inherit;font-weight:800;font-size:1.05rem;color:#fff;background:linear-gradient(#4FB3E8,#2F8FD0);box-shadow:0 5px 0 #1F6FA8;cursor:pointer;display:flex;flex-direction:column;align-items:center;line-height:1.2}
.hb-water small{font-size:.72rem;font-weight:600;opacity:.9}
.hb-water:active{transform:translateY(3px);box-shadow:0 2px 0 #1F6FA8}
.hb-card.done .hb-water{background:linear-gradient(#7ACB5A,#4FA83A);box-shadow:0 5px 0 #3A8A2A}
.hb-undo{align-self:center;border:0;background:none;color:var(--muted);font:inherit;font-size:.78rem;cursor:pointer;text-decoration:underline}
.hb-note{text-align:center;color:var(--muted);font-size:.82rem;margin:18px 0 6px}.hb-end{text-align:center}
.hb-fx{position:fixed;z-index:9999;pointer-events:none;font-size:1.5rem;animation:hbFx 1.3s ease-out forwards}
@keyframes hbFx{0%{transform:translate(0,-40px) scale(.6);opacity:0}20%{opacity:1}100%{transform:translate(var(--dx),40px) scale(1.1);opacity:0}}
.hb-party{position:fixed;inset:0;z-index:9998;display:grid;place-items:center;background:rgba(255,251,239,.7);backdrop-filter:blur(3px);overflow:hidden;animation:hbIn .3s}
.hb-party>div{background:#fff;border-radius:28px;padding:22px 28px;text-align:center;box-shadow:0 14px 40px rgba(0,0,0,.2);display:flex;flex-direction:column;gap:6px;max-width:86vw;animation:hbPop .7s cubic-bezier(.3,1.6,.5,1)}
.hb-party>div span{font-size:4rem}.hb-party>div b{font-size:1.3rem}.hb-party>div i{font-style:normal;color:var(--muted)}
.hb-party em{position:absolute;top:-40px;font-style:normal;font-size:1.6rem;animation:hbFall 3s linear forwards}
@keyframes hbFall{to{transform:translateY(110vh) rotate(360deg)}}@keyframes hbIn{from{opacity:0}}
@media (prefers-reduced-motion:reduce){.hb *,.hb-party *{animation:none!important}}
@media (max-width:760px){
  .hb-head h1,.md-head h1{font-size:1.55rem}.hb-girl{width:64px;height:64px}
  .hb-dash{grid-template-columns:repeat(3,1fr)}.hb-week{grid-column:1/-1}
  .hb-garden{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .hb-body{padding:20px 10px 12px}.hb-hint{min-height:0}.hb-hint span[lang=en]{display:none}html[lang=en] .hb-hint span[lang=en]{display:inline}html[lang=en] .hb-hint span[lang=ar]{display:none}.hb-body h3{font-size:1rem}.hb-pot{width:96px;height:90px}.hb-water{font-size:.92rem;padding:9px 8px}
  .hb-steps li b{font-size:.86rem}.hb-steps li i{font-size:.68rem}.hb-day i{width:30px;height:30px;font-size:1rem}
}
/* media */
.md-he{font-size:2.6rem;width:72px;height:72px;border-radius:22px;display:grid;place-items:center;background:var(--lemon-l);flex:none}
.md-jump{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.md-jump a{padding:8px 14px;border-radius:999px;background:#fff;box-shadow:var(--shadow);text-decoration:none;color:var(--ink);font-weight:700;font-size:.92rem}
.md-sec{margin:22px 0}.md-sec h2{margin:0 0 4px}.md-sec h2 small{font-size:.9rem;color:var(--muted);font-weight:600}.md-p{color:var(--muted);margin:0 0 12px;font-size:.92rem}
.md-sgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;grid-auto-rows:1fr}
.md-story{display:flex;flex-direction:column;background:#fff;border-radius:22px;overflow:hidden;border:3px solid color-mix(in srgb,var(--c) 55%,#fff);box-shadow:0 6px 18px rgba(59,42,30,.12)}
.md-story.playing{border-color:var(--orange);box-shadow:0 0 0 4px var(--lemon)}
.md-scover{display:block;aspect-ratio:16/10;overflow:hidden}.md-scover img{width:100%;height:100%;object-fit:cover;object-position:50% 35%;display:block}
.md-sbody{padding:10px 12px 12px;display:flex;flex-direction:column;gap:8px;flex:1}
.md-sbody h3{margin:0;font-size:1.02rem;line-height:1.3;display:flex;flex-direction:column}
.md-sbody h3 span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:2.6em}
.md-sbody h3 small{font-size:.78rem;color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden}
.md-sbtns{display:flex;gap:8px;margin-top:auto}.md-play{flex:1;border:0;border-radius:14px;padding:8px 6px;font:inherit;font-weight:800;background:var(--orange);color:#fff;box-shadow:0 4px 0 var(--orange-d);cursor:pointer}
.md-play[data-play="en"]{background:#4FB3E8;box-shadow:0 4px 0 #2F8FD0}
.md-prog{display:flex;flex-direction:column;gap:3px;font-size:.78rem;color:var(--muted)}
.md-rgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.md-rec{background:linear-gradient(160deg,#fff,#EEF7F5);border:2px solid #CFE7E2;border-radius:18px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.md-rt{display:flex;flex-direction:column}.md-rt b{font-size:1.02rem}.md-rt small{color:var(--muted);font-size:.78rem}
.md-rec audio{width:100%;height:36px}
.md-nets{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.md-net{display:flex;align-items:center;gap:12px;background:#fff;border-radius:20px;padding:12px 14px;text-decoration:none;color:var(--ink);box-shadow:0 6px 16px rgba(59,42,30,.12);border:3px solid color-mix(in srgb,var(--bc) 35%,#fff);transition:transform .2s}
.md-net:hover{transform:translateY(-3px)}.md-ni{width:46px;height:46px;flex:none}.md-ni svg{width:100%;height:100%}
.md-nt{display:flex;flex-direction:column;line-height:1.25}.md-nt small{color:var(--muted);font-size:.8rem}.md-nt i{font-style:normal;font-size:.78rem;color:var(--muted)}
@media (max-width:760px){.md-sgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.md-sbtns{flex-direction:column;gap:6px}.md-rgrid{grid-template-columns:1fr}.md-nets{grid-template-columns:repeat(2,minmax(0,1fr))}.md-ni{width:38px;height:38px}}
