/* WKAU polish layer — loaded last. Layout and presentation only; no behaviour. */

/* ---------- Home: دعاء hero ---------- */
#home-view .home-hero:has(.hero-duaa){grid-template-columns:1fr!important;min-height:0!important;padding:34px 40px 30px!important;justify-items:center}
#home-view .hero-main{width:100%;display:flex;flex-direction:column;align-items:center}
#home-view .home-hero .hero-duaa{position:relative;width:100%;max-width:720px;margin:0 auto;padding:26px 30px 22px!important;border-radius:22px;background:#ffffffa8;border:1px solid #e3dcf3;box-shadow:inset 0 0 0 6px #ffffff8c,0 10px 30px #6f63a614}
#home-view .home-hero .hero-duaa::before,#home-view .home-hero .hero-duaa::after{content:"";position:absolute;left:50%;width:46px;height:2px;border-radius:2px;background:linear-gradient(90deg,transparent,#d6a249,transparent);transform:translateX(-50%)}
#home-view .home-hero .hero-duaa::before{top:10px}
#home-view .home-hero .hero-duaa::after{bottom:10px}
#home-view .duaa-kicker{margin-bottom:6px!important;font-size:16px!important;letter-spacing:0}
#home-view .home-hero .duaa-heading{margin:4px 0 12px!important;font-size:clamp(26px,2.6vw,36px)!important;line-height:1.5!important}
#home-view .home-hero .duaa-text{margin:0 0 6px!important;font-size:clamp(17px,1.45vw,20px)!important;line-height:1.95!important}
#home-view .home-hero .duaa-closing{margin:12px 0 0!important;padding-top:12px;border-top:1px dashed #d9cfee;font-size:clamp(18px,1.6vw,22px)!important;line-height:1.8!important}

#home-view .hero-start{width:100%;max-width:720px;margin:20px auto 0;text-align:center}
#home-view .hero-start #home-session-context{margin:0 0 12px!important;text-align:center}
#home-view .hero-start #home-session-context:empty{display:none}
#home-view .hero-start .hero-buttons{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:0}
#home-view .hero-start .hero-buttons button{min-height:48px;padding:12px 22px!important;font-size:15px!important;border-radius:14px!important}

/* ---------- Home: merged progress card ---------- */
#home-view .home-progress{margin:16px 0 34px!important;padding:20px 24px!important;border-radius:20px!important;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 32px;align-items:center}
.home-progress-head{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-progress-head h2{margin:0;font-size:17px!important;letter-spacing:-.01em;white-space:nowrap}
#home-view .home-progress-head select{width:auto!important;flex:0 1 190px;min-width:0;max-width:60%;margin:0!important;padding:8px 32px 8px 12px;font-size:14px;border-radius:10px}
.home-progress-main{display:flex;align-items:center;gap:18px;min-width:0}
.home-progress-main strong{font:850 40px/1 Inter,-apple-system,sans-serif;letter-spacing:-.04em;font-variant-numeric:tabular-nums;color:#263e49;min-width:3ch}
.home-progress-bar{flex:1;min-width:0}
.home-progress-bar .hero-progress-track{height:10px;border-radius:99px;background:#ece8f6;overflow:hidden}
.home-progress-bar .hero-progress-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#2f8a73,#7a63c4)}
.home-progress-bar #home-progress-label{display:block;margin-top:7px;font-size:13px;color:#6a7785}
.home-progress-stats{display:grid;grid-template-columns:repeat(4,auto);gap:4px 26px;margin:0}
.home-progress-stats div{display:flex;flex-direction:column-reverse;align-items:flex-start}
.home-progress-stats dt{font-size:12px;color:#6a7785;font-weight:600}
.home-progress-stats dd{margin:0;font:800 21px/1.25 Inter,-apple-system,sans-serif;font-variant-numeric:tabular-nums;color:#263e49}

/* ---------- Home: modules and quick practice ---------- */
#home-view .home-section-head{margin-bottom:14px}
#home-view .home-module-note{margin:10px 2px 26px}
#home-view .home-quick-panel .quick-action{min-height:56px}

/* ---------- Phone ---------- */
@media (max-width:700px){
  #home-view .home-hero:has(.hero-duaa){padding:16px 12px 18px!important;border-radius:20px!important}
  #home-view .home-hero .hero-duaa{padding:20px 14px 16px!important;border-radius:16px;box-shadow:inset 0 0 0 4px #ffffff8c}
  #home-view .duaa-kicker{font-size:15px!important;gap:10px!important}
  #home-view .home-hero .duaa-heading{font-size:24px!important;margin-bottom:8px!important}
  #home-view .home-hero .duaa-text{font-size:17px!important;line-height:1.85!important}
  #home-view .home-hero .duaa-closing{font-size:18px!important;margin-top:10px!important;padding-top:10px}
  #home-view .hero-start{margin-top:16px}
  #home-view .hero-start .hero-buttons{flex-direction:column}
  #home-view .hero-start .hero-buttons button{width:100%}
  #home-view .home-progress{grid-template-columns:1fr;padding:16px!important;margin:12px 0 26px!important;gap:14px}
  .home-progress-main strong{font-size:32px}
  .home-progress-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding-top:12px;border-top:1px solid #ece8f3}
  .home-progress-stats div{align-items:center}
  .home-progress-stats dd{font-size:18px}
  .home-progress-stats dt{font-size:11px}
  #home-view .home-section-head h2{font-size:26px!important}

  /* Study tabs: show that the row scrolls sideways */
  .study-tools:not(.hidden){-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent);scroll-snap-type:x proximity;scrollbar-width:none}
  .study-tools::-webkit-scrollbar{display:none}
  .study-tools button{scroll-snap-align:start}
}

/* ---------- Keyboard hints only where there is a keyboard ---------- */
@media (hover:none) and (pointer:coarse){
  .ai-shortcut-hint{display:none!important}
}

/* ---------- Flashcard settings ---------- */
.settings-more{margin:-4px 0 12px}
.settings-more summary{cursor:pointer;font-size:13px;font-weight:600;color:#5c6b78}
.settings-more p{margin:6px 0 0}

/* ---------- Dark mode ---------- */
[data-theme=dark] #home-view .home-hero .hero-duaa{background:#16232d99;border-color:#41455b;box-shadow:inset 0 0 0 6px #ffffff08,0 10px 30px #0003}
[data-theme=dark] #home-view .home-hero .duaa-closing{border-top-color:#4a4566}
[data-theme=dark] .home-progress-main strong,[data-theme=dark] .home-progress-stats dd{color:#eff5fa}
[data-theme=dark] .home-progress-stats dt,[data-theme=dark] .home-progress-bar #home-progress-label,[data-theme=dark] .settings-more summary{color:#adbfce}
[data-theme=dark] .home-progress-bar .hero-progress-track{background:#3d4557}
[data-theme=dark] .home-progress-stats{border-top-color:#334353}
