/* ===== responsive prototype (not on staging) ===== */
/* 1) bottom tab bar never covers content */
@media (min-width:760px){.app{padding-bottom:calc(110px + env(safe-area-inset-bottom))!important}}
/* 2) desktop/board home: fixed 3-col grid, no auto-placed holes */
@media (min-width:1200px){
  .app{max-width:1600px!important}
  #v-home.on{grid-template-columns:1.2fr 1fr 1fr!important;grid-template-areas:"hero mkh mkh" "hero mks mks" "tl tl fd" "kd st fd"!important;align-items:stretch}
  #v-home .mk-h{grid-area:mkh;align-self:end;height:auto!important}
  #v-home .mk-strip{grid-area:mks;height:auto!important}
  #v-home .kidsc:not(.stc){grid-area:kd}#v-home .kidsc.stc{grid-area:st}
  #v-home .faida{grid-area:fd}
  #v-home .hm-tools{grid-area:tl}
  #v-home .hm-tools>*{grid-template-columns:repeat(4,1fr)!important}
}
/* 3) 4K = 1920 layout rendered at 2x (crisp, readable from distance) */
@media (min-width:2400px){html{zoom:2}}
/* 4) board mode (toggle, saved): bigger root scale + 64px targets */
html.board{zoom:1.3}
@media (min-width:2400px){html.board{zoom:2.5}}

#bd-tg{position:fixed;inset-inline-start:16px;bottom:16px;z-index:9999;width:56px;height:56px;border-radius:50%;border:2px solid #c9a24a;background:#0e4d3c;color:#f5e6b8;font:700 22px system-ui;box-shadow:0 6px 18px #0004;cursor:pointer}
html.board #bd-tg{background:#c9a24a;color:#0e4d3c}

/* ===== v2 ===== */
#bd-tg{display:none}
@media (min-width:760px){#bd-tg{display:block}}
/* 5) side rail on landscape tablet / desktop */
@media (min-width:900px) and (orientation:landscape){
  .tabs{top:50%!important;bottom:auto!important;left:auto!important;right:12px!important;transform:translateY(-50%)!important;width:92px!important;height:auto!important;display:flex!important;flex-direction:column;gap:8px;padding:10px 8px!important;border-radius:26px!important}
  .tabs a{min-height:72px;width:100%;padding:8px 2px}
  body{padding-right:112px}
  .app{padding-bottom:calc(40px + env(safe-area-inset-bottom))!important}
  body.playing .app{padding-bottom:180px!important}
  #bd-tg{bottom:16px;left:16px;inset-inline-start:auto}
}
@media (min-width:1200px) and (orientation:landscape) and (min-aspect-ratio:4/3){body{padding-right:136px}}
/* 6) tablet home: «يومك» header + strip span full width (no empty cell) */
@media (min-width:760px) and (max-width:1199.98px){
  #v-home .mk-h,#v-home .mk-strip{grid-column:1/-1}
  #v-home .mk-strip{margin-bottom:14px}
}
@media (min-width:1200px) and (max-aspect-ratio:4/3){#v-home .mk-h,#v-home .mk-strip{grid-column:1/-1}}
/* 7) multi-column lists */
@media (min-width:900px){
  #adk-now{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
  #adk-now>*{margin:0!important}
  #adk-groups{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;align-items:start}
  #adk-groups>*{margin:0!important}
  #q-list{display:grid;grid-template-columns:repeat(2,1fr);column-gap:14px}
}
@media (min-width:1500px){#adk-groups{grid-template-columns:repeat(3,1fr)}}
/* 8) two-page mushaf spread (wide landscape only; quran.js renders it) */
@media (min-width:1500px) and (min-aspect-ratio:4/3){
  #v-read.on{max-width:1500px!important}
  .mushaf.spread{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:22px 18px 16px!important}
  .mushaf.spread .sp-pg{padding:0 22px;display:flex;flex-direction:column}
  .mushaf.spread .sp-pg+.sp-pg{border-right:2px solid rgba(201,162,74,.45)}
  .mushaf.spread .ptxt{flex:1}
  .mushaf.spread>:not(.sp-pg){grid-column:1/-1}
}
/* 9) touch targets ≥44 on tablet+ (phones untouched), ≥64 in board mode */
@media (min-width:760px){
  .app button,.app [role=button],.app a.btn,.app .lnk,.app .pv,.app .seg3>*,.app .adk-tabs a,#v-home .card a[href^="#adhkar/c"],#v-home .wor a,.app .ic{min-height:44px}
  .app .ic{min-width:44px}
  .app .qsearch{min-height:48px}
}
html.board .app button,html.board .app .ic,html.board .app .seg3>*,html.board .app a.btn,html.board .app .lnk,html.board .tabs a,html.board .app .adk-tabs a,html.board #v-home .card a[href^="#adhkar/c"],html.board #v-home .wor a{min-height:64px}
html.board .app .ic{min-width:64px}
@media (min-width:760px) and (max-width:1199.98px){#v-home .obc{grid-column:1/-1}}
/* 10) settings / reminders sheet: wider + 2 columns on desktop, larger in board mode */
@media (min-width:900px) and (orientation:landscape){
  #settings .sh-card{width:min(1100px,calc(100vw - 260px))!important;max-width:none!important}
  #settings .sh-card{column-count:2;column-gap:22px}
  #settings .sh-card>*{break-inside:avoid}
}
#settings .rem label{min-height:44px}
html.board #settings .rem label{min-height:64px}
html.board #settings input[type=checkbox],html.board #settings input[type=radio]{width:28px;height:28px}
