/* SmartMuslim Stories — unified single-story reader, 2026-09-20 */

#story-reader-overlay .unified-story-reader{
  --usr-green:var(--sm-green,#145f4b);
  --usr-deep:var(--sm-forest-deep,#0b4f3f);
  --usr-gold:var(--sm-gold,#c59a46);
  --usr-paper:var(--sm-surface,#fffdf8);
  --usr-soft:color-mix(in srgb,var(--sm-green-soft,#e9f4ef) 72%,#fff);
  --usr-line:color-mix(in srgb,var(--border-color,#ded7ca) 84%,transparent);
  width:min(100%,760px)!important;
  max-height:min(92dvh,980px)!important;
  border:1px solid var(--usr-line)!important;
  border-radius:24px!important;
  background:linear-gradient(180deg,#fffdf8,#fcf8ef)!important;
  color:var(--usr-deep)!important;
  box-shadow:0 24px 64px rgba(28,44,38,.20)!important;
  overflow:hidden!important;
}

#story-reader-overlay .unified-story-head{
  padding:18px 18px 16px!important;
  border-bottom:1px solid var(--usr-line)!important;
  background:rgba(255,253,248,.98)!important;
  align-items:flex-start!important;
}
#story-reader-overlay .unified-story-head>div:first-child{
  min-width:0;
  padding-right:8px;
}
#story-reader-overlay .unified-story-head .card-category{
  color:#c66d63!important;
  font-size:.68rem!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
#story-reader-overlay .unified-story-head h2{
  margin:8px 0 0!important;
  color:var(--usr-deep)!important;
  font:700 clamp(1.65rem,5.2vw,2.25rem)/1.08 var(--sm-serif,'Playfair Display',Georgia,serif)!important;
  letter-spacing:-.02em!important;
}
#story-reader-overlay .unified-story-head p{
  margin:7px 0 0!important;
  color:var(--text-muted,#777f7b)!important;
  font-size:.82rem!important;
  line-height:1.35!important;
}
#story-reader-overlay .unified-story-head .story-reader-head-actions{
  display:flex!important;
  gap:8px!important;
  flex:0 0 auto!important;
}
#story-reader-overlay .unified-story-head .story-reader-head-actions button{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid color-mix(in srgb,var(--usr-gold) 48%,var(--usr-line))!important;
  border-radius:14px!important;
  background:#f7eddd!important;
  color:var(--usr-deep)!important;
  font-size:1.3rem!important;
  line-height:1!important;
  box-shadow:none!important;
}
#story-reader-overlay .unified-story-head .unified-story-favorite{
  color:#a87922!important;
  font-size:1.15rem!important;
}
#story-reader-overlay .unified-story-head .unified-story-favorite.active{
  background:#fff7df!important;
  color:#d99e00!important;
  border-color:#d5b56d!important;
}

#story-reader-overlay .unified-story-body{
  padding:18px 20px calc(30px + env(safe-area-inset-bottom))!important;
  background:linear-gradient(180deg,#fffdf8 0%,#fbf7ee 100%)!important;
  color:var(--usr-deep)!important;
}
#story-reader-overlay .unified-story-cover{
  display:block!important;
  width:100%!important;
  aspect-ratio:16/8.2!important;
  object-fit:cover!important;
  margin:0 0 22px!important;
  border:1px solid color-mix(in srgb,var(--usr-gold) 36%,var(--usr-line))!important;
  border-radius:18px!important;
  box-shadow:0 10px 25px rgba(55,47,31,.08)!important;
}

#story-reader-overlay .unified-story-section,
#story-reader-overlay .unified-story-markdown{
  color:var(--usr-deep)!important;
}
#story-reader-overlay .unified-story-section h3,
#story-reader-overlay .unified-story-markdown h3,
#story-reader-overlay .unified-story-lessons h3,
#story-reader-overlay .unified-story-lessons h4{
  margin:24px 0 10px!important;
  color:var(--usr-green)!important;
  font:700 1.35rem/1.12 var(--sm-serif,'Playfair Display',Georgia,serif)!important;
  letter-spacing:-.01em!important;
}
#story-reader-overlay .unified-story-who h3,
#story-reader-overlay .unified-story-markdown h3:first-child{
  margin-top:0!important;
}

#story-reader-overlay .unified-story-who{
  margin:0 0 22px!important;
  padding:16px 18px!important;
  border-left:4px solid var(--usr-green)!important;
  border-radius:0 16px 16px 0!important;
  background:linear-gradient(90deg,#f3eddf,#f7f2e8)!important;
}
#story-reader-overlay .unified-story-who h3{
  margin:0 0 7px!important;
}
#story-reader-overlay .unified-story-who p{
  margin:0!important;
  color:var(--usr-deep)!important;
  font:600 1rem/1.62 var(--sm-serif,Georgia,serif)!important;
}

#story-reader-overlay .unified-story-markdown p,
#story-reader-overlay .unified-story-narrative .story-readable-line p{
  margin:0 0 1.05em!important;
  color:var(--usr-deep)!important;
  font:400 1rem/1.72 var(--sm-serif,Georgia,serif)!important;
}
#story-reader-overlay .unified-story-narrative .story-readable-line{
  padding:0!important;
  border:0!important;
  font:inherit!important;
}
#story-reader-overlay .unified-story-narrative .story-readable-line>button{
  display:none!important;
}

/* Donne body already contains "Chi era" and "La sua storia". */
#story-reader-overlay .women-story-reader .unified-story-markdown h3{
  position:relative;
  padding-top:3px!important;
}
#story-reader-overlay .women-story-reader .unified-story-markdown h3:first-child{
  padding:14px 18px 0!important;
  margin:0!important;
  border-left:4px solid var(--usr-green)!important;
  border-radius:0 16px 0 0!important;
  background:linear-gradient(90deg,#f3eddf,#f7f2e8)!important;
}
#story-reader-overlay .women-story-reader .unified-story-markdown h3:first-child + p{
  margin:0 0 22px!important;
  padding:7px 18px 16px!important;
  border-left:4px solid var(--usr-green)!important;
  border-radius:0 0 16px 0!important;
  background:linear-gradient(90deg,#f3eddf,#f7f2e8)!important;
  font-weight:600!important;
}

#story-reader-overlay .unified-story-lessons{
  margin:26px 0 0!important;
  padding:16px 18px!important;
  border:1px solid color-mix(in srgb,var(--usr-gold) 34%,var(--usr-line))!important;
  border-radius:17px!important;
  background:rgba(250,246,237,.88)!important;
}
#story-reader-overlay .unified-story-lessons h3,
#story-reader-overlay .unified-story-lessons h4{
  margin:0 0 10px!important;
}
#story-reader-overlay .unified-story-lessons ul{
  margin:0!important;
  padding-left:1.2em!important;
}
#story-reader-overlay .unified-story-lessons li{
  margin:.45em 0!important;
  color:var(--usr-deep)!important;
  font-size:.87rem!important;
  line-height:1.5!important;
}

#story-reader-overlay .unified-story-sources,
#story-reader-overlay .unified-story-reader .story-references{
  margin:16px 0 0!important;
  padding:12px 14px!important;
  border:1px solid var(--usr-line)!important;
  border-radius:14px!important;
  background:rgba(255,253,248,.70)!important;
}
#story-reader-overlay .unified-story-reader .story-references summary{
  color:var(--usr-green)!important;
  font-size:.76rem!important;
  font-weight:850!important;
}
#story-reader-overlay .unified-story-reader .story-references li,
#story-reader-overlay .unified-story-reader .story-references p{
  color:var(--text-muted,#777f7b)!important;
  font-size:.72rem!important;
  line-height:1.45!important;
}

#story-reader-overlay .unified-story-nav{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  margin-top:18px!important;
}
#story-reader-overlay .unified-story-nav button{
  min-height:42px!important;
  border:1px solid color-mix(in srgb,var(--usr-green) 35%,var(--usr-line))!important;
  border-radius:13px!important;
  background:rgba(255,253,248,.76)!important;
  color:var(--usr-green)!important;
  font-size:.72rem!important;
  font-weight:800!important;
}

@media(max-width:520px){
  #story-reader-overlay .unified-story-reader{
    width:calc(100% - 20px)!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 18px)!important;
    border-radius:20px!important;
  }
  #story-reader-overlay .unified-story-head{
    padding:16px 14px 14px!important;
  }
  #story-reader-overlay .unified-story-head h2{
    font-size:1.7rem!important;
  }
  #story-reader-overlay .unified-story-head .story-reader-head-actions button{
    width:41px!important;height:41px!important;min-width:41px!important;min-height:41px!important;
  }
  #story-reader-overlay .unified-story-body{
    padding:16px 16px calc(26px + env(safe-area-inset-bottom))!important;
  }
  #story-reader-overlay .unified-story-cover{
    margin-bottom:18px!important;
    border-radius:16px!important;
  }
  #story-reader-overlay .unified-story-section h3,
  #story-reader-overlay .unified-story-markdown h3,
  #story-reader-overlay .unified-story-lessons h3,
  #story-reader-overlay .unified-story-lessons h4{
    font-size:1.22rem!important;
  }
  #story-reader-overlay .unified-story-markdown p,
  #story-reader-overlay .unified-story-narrative .story-readable-line p{
    font-size:.96rem!important;
    line-height:1.68!important;
  }
}
