/* V3.5 — User-controlled reading and accessibility settings */
.reading-settings-panel{
  max-width:760px;
  margin:0 auto 24px;
}
.reading-settings-menu-btn .sheet-ico{
  font:900 1rem/1 system-ui,sans-serif;
  letter-spacing:-1px;
}
.reading-preview{
  margin:14px 0;
  padding:16px;
  border:1px solid rgba(15,45,53,.15);
  border-radius:16px;
  background:var(--card,#fff);
  box-shadow:0 5px 18px rgba(15,45,53,.07);
}
.reading-preview>span{
  display:inline-block;
  margin-bottom:10px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(245,158,11,.14);
  font-size:.74rem;
  font-weight:800;
}
.reading-preview h2{
  margin:0 0 12px;
  font-size:1.08rem;
  line-height:1.45;
}
.reading-preview-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid rgba(15,45,53,.15);
  border-radius:12px;
}
.reading-preview-option i{
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  flex:0 0 31px;
  border-radius:9px;
  background:rgba(15,45,53,.08);
  font-style:normal;
  font-weight:900;
}
.reading-preview-option p{margin:0;line-height:1.45;font-weight:600;}
.reading-setting-block{
  margin:14px 0;
  padding:14px;
  border:1px solid rgba(15,45,53,.12);
  border-radius:15px;
  background:var(--card,#fff);
}
.reading-setting-block h3{margin:0 0 10px;font-size:.96rem;}
.reading-setting-block>p{margin:9px 1px 0;font-size:.78rem;line-height:1.5;opacity:.72;}
.reading-choice-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.reading-choice-grid.two{grid-template-columns:repeat(2,minmax(0,1fr));}
.reading-choice-grid button{
  min-height:51px;
  padding:8px 6px;
  border:1px solid rgba(15,45,53,.17);
  border-radius:11px;
  background:transparent;
  color:inherit;
  font:800 .86rem/1.2 system-ui,sans-serif;
  cursor:pointer;
}
.reading-choice-grid button small{display:block;margin-top:3px;font-size:.68rem;opacity:.62;}
.reading-choice-grid button.active{
  border-color:#f59e0b;
  background:rgba(245,158,11,.14);
  box-shadow:0 0 0 2px rgba(245,158,11,.13);
}
.reading-switch-list{display:grid;gap:9px;margin:14px 0;}
.reading-switch{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:62px;
  padding:10px 12px;
  border:1px solid rgba(15,45,53,.14);
  border-radius:14px;
  background:var(--card,#fff);
  color:inherit;
  text-align:right;
  cursor:pointer;
}
.reading-switch span{display:grid;gap:3px;}
.reading-switch b{font-size:.9rem;}
.reading-switch small{font-size:.72rem;line-height:1.35;opacity:.68;}
.reading-switch strong{
  min-width:58px;
  padding:6px 8px;
  border-radius:999px;
  background:rgba(15,45,53,.08);
  text-align:center;
  font-size:.72rem;
}
.reading-switch.active{border-color:#f59e0b;background:rgba(245,158,11,.08);}
.reading-switch.active strong{background:#f59e0b;color:#18252a;}
.reading-reset{width:100%;margin-top:4px;}
.reading-settings-note{margin-top:12px;text-align:center;font-size:.72rem;line-height:1.45;opacity:.67;}
.reading-settings-toast{
  position:fixed;
  z-index:10050;
  left:50%;
  bottom:calc(22px + env(safe-area-inset-bottom));
  transform:translate(-50%,18px);
  max-width:calc(100vw - 28px);
  padding:9px 13px;
  border-radius:999px;
  background:#132f36;
  color:#fff;
  font:800 .8rem/1.3 system-ui,sans-serif;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
  box-shadow:0 8px 24px rgba(0,0,0,.22);
}
.reading-settings-toast.show{opacity:1;transform:translate(-50%,0);}

/* Reading size overrides remain readable even when the one-screen fitter uses dense modes. */
body.reading-size-large .qtext{font-size:1.18rem!important;line-height:1.48!important;}
body.reading-size-large .opt{font-size:1.04rem!important;line-height:1.48!important;padding-top:11px!important;padding-bottom:11px!important;}
body.reading-size-large .feedback{font-size:.94rem!important;line-height:1.52!important;}
body.reading-size-large .verified-note-he,
body.reading-size-large .verified-note-ar,
body.reading-size-large .notes-library-copy{font-size:1rem!important;line-height:1.55!important;}

body.reading-size-xl .qtext{font-size:1.32rem!important;line-height:1.52!important;}
body.reading-size-xl .opt{font-size:1.16rem!important;line-height:1.52!important;padding-top:13px!important;padding-bottom:13px!important;}
body.reading-size-xl .opt .letter{width:34px!important;height:34px!important;flex-basis:34px!important;font-size:.95rem!important;}
body.reading-size-xl .feedback{font-size:1.04rem!important;line-height:1.58!important;}
body.reading-size-xl .verified-note-he,
body.reading-size-xl .verified-note-ar,
body.reading-size-xl .notes-library-copy{font-size:1.1rem!important;line-height:1.62!important;}

body.reading-spacing-relaxed .qtext,
body.reading-spacing-relaxed .opt,
body.reading-spacing-relaxed .feedback,
body.reading-spacing-relaxed .verified-note-he,
body.reading-spacing-relaxed .verified-note-ar{line-height:1.65!important;}

body.reading-bold .qtext{font-weight:900!important;}
body.reading-bold .opt,
body.reading-bold .verified-note-he,
body.reading-bold .verified-note-ar,
body.reading-bold .notes-library-copy{font-weight:750!important;}

body.reading-reduce-motion *,
body.reading-reduce-motion *::before,
body.reading-reduce-motion *::after{
  scroll-behavior:auto!important;
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.001ms!important;
}

@media(max-width:760px){
  .reading-settings-panel{padding-bottom:calc(18px + env(safe-area-inset-bottom));}
  .reading-setting-block{padding:12px;}
  .reading-choice-grid{gap:6px;}
  .reading-choice-grid button{font-size:.8rem;}
}
