/* KBIBLE V89 — unified service UX: no sideways scrolling, readable independent controls */
:root{--kb-v89-gap:clamp(10px,2vw,18px)}
html,body{max-width:100%;overflow-x:hidden!important}
body.kb-has-site-header main,body.kb-has-site-header .suite-shell,body.kb-has-site-header .sp-page,body.kb-has-site-header .prayer-shell,body.kb-has-site-header .plan-shell,body.kb-has-site-header .memory-shell{max-width:100%}
body.kb-has-site-header *{box-sizing:border-box;min-width:0}
body.kb-has-site-header img,body.kb-has-site-header video,body.kb-has-site-header canvas,body.kb-has-site-header iframe{max-width:100%}
body.kb-has-site-header input,body.kb-has-site-header textarea,body.kb-has-site-header select,body.kb-has-site-header button{max-width:100%}
body.kb-has-site-header p,body.kb-has-site-header li,body.kb-has-site-header span,body.kb-has-site-header strong,body.kb-has-site-header small{overflow-wrap:anywhere}

@media(max-width:760px){
  /* global page rhythm */
  body.kb-has-site-header main{padding-left:10px!important;padding-right:10px!important}
  body.kb-has-site-header section,body.kb-has-site-header article{max-width:100%}
  body.kb-has-site-header .kb-study-bridge,body.kb-has-site-header .quick-bar-inner{overflow-x:visible!important;flex-wrap:wrap!important}
  body.kb-has-site-header .kb-study-bridge__actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;max-width:none!important;overflow:visible!important}
  body.kb-has-site-header .kb-study-bridge__actions a{white-space:normal!important;text-align:center!important;justify-content:center!important}

  /* speaking */
  .kb-speaking-studio .sp-control-row,.kb-speaking-studio .sp-source-grid,.kb-speaking-studio .sp-voice-grid,.kb-speaking-studio .sp-metric-grid,.kb-speaking-studio .sp-result-grid{grid-template-columns:1fr!important}
  .kb-speaking-studio .sp-segment,.kb-speaking-studio .sp-version-tabs,.kb-speaking-studio .sp-record-actions,.kb-speaking-studio .sp-nav-buttons,.kb-speaking-studio .sp-target-toolbar>div:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important;flex-wrap:wrap!important;width:100%!important}
  .kb-speaking-studio .sp-segment button,.kb-speaking-studio .sp-version-tabs button,.kb-speaking-studio .sp-record-actions button,.kb-speaking-studio .sp-nav-buttons button,.kb-speaking-studio .sp-target-toolbar button{width:100%!important;white-space:normal!important}
  .kb-speaking-studio .sp-training-modes{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important}
  .kb-speaking-studio .sp-record-options{display:grid!important;grid-template-columns:1fr!important}
  .kb-speaking-studio .sp-target-toolbar{display:grid!important;gap:12px!important}
  .kb-speaking-studio .sp-memory-controls{display:grid!important;gap:10px!important}
  .kb-speaking-studio .sp-hero-badges{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* prayer */
  .kb-prayer-studio .prayer-jumpbar,.kb-prayer-studio .prayer-segments,.kb-prayer-studio .prayer-category-filter,.kb-prayer-studio .prayer-view-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;margin-right:0!important;padding-right:0!important;gap:8px!important}
  .kb-prayer-studio .prayer-jumpbar a,.kb-prayer-studio .prayer-segments button,.kb-prayer-studio .prayer-category-filter button,.kb-prayer-studio .prayer-view-tabs button{width:100%!important;white-space:normal!important;text-align:center!important}

  /* plan/read-through */
  .page-plan-workspace .course-quick-nav,.page-plan-workspace .plan-choice-group,.page-plan-workspace .plan-verse__actions,.page-plan-workspace .plan-verse-picker__track,.page-plan-workspace .course-pref-controls,.page-plan-workspace .course-voice-control{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;flex-wrap:wrap!important;width:100%!important;max-width:100%!important;gap:8px!important}
  .page-plan-workspace .course-quick-nav button,.page-plan-workspace .course-quick-nav a,.page-plan-workspace .plan-choice-button,.page-plan-workspace .plan-verse-btn,.page-plan-workspace .plan-verse-choice,.page-plan-workspace .course-voice-btn{width:100%!important;min-width:0!important;white-space:normal!important}
  .page-plan-workspace .course-bookmap-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* memory */
  .kb-memory-studio .memory-tabs,.kb-memory-studio .memory-mode-tabs,.kb-memory-studio .memory-action-row,.kb-memory-studio .voice-control-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}
  .kb-memory-studio .memory-tabs button,.kb-memory-studio .memory-mode-tabs button,.kb-memory-studio .memory-action-row button,.kb-memory-studio .voice-control-row button{width:100%!important;white-space:normal!important}

  /* vocab */
  .page-vocab .vocab-jump,.page-vocab .vocab-filter-row,.page-vocab .vocab-form-actions,.page-vocab .vocab-pron-actions,.page-vocab .vocab-review-actions,.page-vocab .vocab-review-rating{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}
  .page-vocab .vocab-jump a,.page-vocab .vocab-filter-row button,.page-vocab .vocab-form-actions button,.page-vocab .vocab-pron-actions button,.page-vocab .vocab-review-actions button,.page-vocab .vocab-review-rating button{width:100%!important;white-space:normal!important}
  .page-vocab .vocab-grid{grid-template-columns:1fr!important}

  /* QT */
  .qt-studio .qt-tabs,.qt-studio .qt-question-chips,.qt-studio .qt-actions,.qt-studio .writing-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}
  .qt-studio button{white-space:normal!important}

  /* media */
  .page-ccm .ccm-tabs,.page-ccm .ccm-controls,.page-video .video-tabs,.page-video .video-controls{flex-wrap:wrap!important;overflow:visible!important}
  .page-ccm .ccm-controls>* ,.page-video .video-controls>*{min-width:0!important}

  /* favorite/toon/mypage */
  .kb-favorite-verses .fav-actions,.toon-page .toon-actions,.page-mypage .mypage-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}
}
@media(max-width:390px){
  .kb-speaking-studio .sp-training-modes,.kb-speaking-studio .sp-segment,.kb-speaking-studio .sp-record-actions,.kb-prayer-studio .prayer-jumpbar,.kb-prayer-studio .prayer-segments,.kb-prayer-studio .prayer-category-filter,.page-plan-workspace .course-quick-nav,.page-plan-workspace .plan-choice-group,.kb-memory-studio .memory-tabs,.kb-memory-studio .memory-action-row,.page-vocab .vocab-jump,.page-vocab .vocab-pron-actions,.qt-studio .qt-tabs,.qt-studio .qt-question-chips{grid-template-columns:1fr!important}
}
.sp-spelling-line,.sp-correction-detail{margin-top:10px;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.025);line-height:1.65}.sp-spelling-line b{display:block;margin-bottom:6px}.sp-spelling-line p{margin:0;font-size:.82rem}.sp-correction-detail{font-size:.84rem}.sp-saved-recording-list{display:grid;gap:10px}.sp-saved-recording-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.7fr);gap:12px;align-items:center;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.025)}.sp-saved-recording-item strong,.sp-saved-recording-item small{display:block}.sp-saved-recording-item small{margin-top:4px;opacity:.72}.sp-saved-recording-item p{margin:8px 0 0}.sp-saved-recording-item>div:last-child{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.sp-saved-recording-item audio{width:100%}.sp-saved-recording-item button{min-height:42px;border-radius:12px}
@media(max-width:760px){.sp-saved-recording-item{grid-template-columns:1fr}.sp-saved-recording-item>div:last-child{grid-template-columns:1fr}.sp-saved-recording-item button{width:100%}}
.vocab-pron-saved{margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.09)}.vocab-pron-saved>strong{display:block;margin-bottom:4px}.vocab-pron-saved>p{margin:0 0 10px;opacity:.7;font-size:.82rem}.vocab-pron-saved #vocabPronSavedList{display:grid;gap:8px}.vocab-pron-saved article{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.8fr) auto;gap:8px;align-items:center;padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:12px}.vocab-pron-saved article strong,.vocab-pron-saved article span{display:block}.vocab-pron-saved article span{font-size:.78rem;opacity:.76}.vocab-pron-saved audio{width:100%}.vocab-pron-saved button{min-height:40px;border-radius:10px}@media(max-width:760px){.vocab-pron-saved article{grid-template-columns:1fr}.vocab-pron-saved button{width:100%}}
@media(max-width:760px){
  .kb-memory-studio .memory-primary-tabs,.kb-memory-studio .practice-modes,.kb-memory-studio .target-version,.kb-memory-studio .review-rating,.kb-memory-studio .library-filters,.kb-memory-studio .theme-grid,.kb-memory-studio .theme-setting-grid,.kb-memory-studio .kb-page-theme-switch{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}
  .kb-memory-studio .memory-primary-tabs button,.kb-memory-studio .practice-modes button,.kb-memory-studio .target-version button,.kb-memory-studio .review-rating button,.kb-memory-studio .library-filters button,.kb-memory-studio .theme-grid button,.kb-memory-studio .theme-setting-grid button{width:100%!important;min-width:0!important;white-space:normal!important}
  .kb-memory-studio .memory-today-layout,.kb-memory-studio .review-dashboard-grid{grid-template-columns:1fr!important}
  .kb-memory-studio .saved-grid{grid-template-columns:1fr!important}
  .kb-memory-studio .practice-badges{flex-wrap:wrap!important}

  .page-plan-workspace .course-simple-steps,.page-plan-workspace .course-stat-grid,.page-plan-workspace .course-setup-grid,.page-plan-workspace .course-form-grid,.page-plan-workspace .course-preset-row,.page-plan-workspace .course-action-row,.page-plan-workspace .course-calendar-nav,.page-plan-workspace .course-highlight-swatches{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}
  .page-plan-workspace .course-today-section,.page-plan-workspace .plan-stack,.page-plan-workspace .course-panel,.page-plan-workspace .plan-review-workspace{max-width:100%!important;overflow:visible!important}
  .page-plan-workspace .course-reader-preferences{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .page-plan-workspace .course-btn,.page-plan-workspace .course-preset{white-space:normal!important;min-width:0!important}

  .kb-prayer-studio .prayer-compose-grid,.kb-prayer-studio .prayer-hero__stats,.kb-prayer-studio .prayer-guide-grid{grid-template-columns:1fr!important}
  .kb-prayer-studio .prayer-compose-actions,.kb-prayer-studio .prayer-focus-times,.kb-prayer-studio .prayer-focus-actions,.kb-prayer-studio .prayer-hero__actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .kb-prayer-studio .prayer-compose-actions button,.kb-prayer-studio .prayer-focus-times button,.kb-prayer-studio .prayer-focus-actions button,.kb-prayer-studio .prayer-hero__actions>*{width:100%!important;white-space:normal!important}
}
.speak-saved-box{margin-top:14px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.025)}.speak-saved-box>b{display:block}.speak-saved-box>p{margin:5px 0 10px;font-size:.78rem;opacity:.72}.speak-saved-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.8fr) auto;gap:8px;align-items:center;padding:9px 0;border-top:1px solid rgba(255,255,255,.07)}.speak-saved-item:first-child{border-top:0}.speak-saved-item strong,.speak-saved-item span{display:block}.speak-saved-item span{font-size:.74rem;opacity:.75}.speak-saved-item audio{width:100%}.speak-saved-item button{min-height:38px;border-radius:10px}@media(max-width:760px){.speak-saved-item{grid-template-columns:1fr}.speak-saved-item button{width:100%}}

/* V89 — unified service UX: every service must fit the viewport without horizontal panning. */
:root{--kb-ux-gap:clamp(10px,2.2vw,16px);--kb-ux-radius:18px}
html,body{width:100%;max-width:100%;overflow-x:clip!important}
body :where(main,section,article,nav,header,footer,form,fieldset,details,dialog,.panel,.card,.modal,.drawer){min-width:0;max-width:100%}
body :where(img,video,canvas,svg,audio){max-width:100%}
body :where(input,textarea,select,button,a){min-width:0}
body :where(.kb-study-bridge,.kb-study-bridge__actions,.reader-toolbar-controls,.translation-key,.kbvf-examples,.ccm-filter-row,.ccm-main-controls,.ccm-focus-controls,.ccm-hero__actions,.video-filter-row,.video-now__actions,.ls-player-actions,.ls-writing-actions,.toon-filter,.fav-actions,.plan-tool-tabs,.plan-inline-actions,.course-quick-nav,.memory-primary-tabs,.practice-modes,.target-version,.review-rating,.prayer-view-tabs,.prayer-category-filter,.qt-question-chips,.vocab-filter-row){scrollbar-width:none}

/* Controls wrap into independent rows/cards instead of forcing side-scroll. */
@media(max-width:900px){
  .kb-study-bridge{display:grid!important;grid-template-columns:minmax(0,1fr)!important;left:10px!important;right:10px!important;width:auto!important;overflow:visible!important;gap:8px!important}
  .kb-study-bridge__actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:none!important;overflow:visible!important;gap:6px!important}
  .kb-study-bridge__actions>*{width:100%!important;min-width:0!important;white-space:normal!important}
  body.kb-bible-v5 .reader-toolbar-controls,body.kb-bible-v5 .translation-key{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important;gap:7px!important;padding-inline:0!important}
  body.kb-bible-v5 .reader-toolbar-controls>*,body.kb-bible-v5 .translation-key>*{min-width:0!important;width:100%!important;white-space:normal!important}
  .kbvf-examples{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:7px!important}
  .kbvf-examples button{width:100%!important;min-width:0!important;white-space:normal!important}

  .kb-listening-studio :where(.ls-player-actions,.ls-writing-actions,.ls-mode-tabs,.ls-version-tabs){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}
  .kb-listening-studio :where(.ls-player-actions,.ls-writing-actions,.ls-mode-tabs,.ls-version-tabs)>*{width:100%!important;min-width:0!important;white-space:normal!important}

  .page-ccm :where(.ccm-filter-row,.ccm-main-controls,.ccm-focus-controls,.ccm-hero__actions),.page-video :where(.video-filter-row,.video-now__actions){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}
  .page-ccm :where(.ccm-filter-row,.ccm-main-controls,.ccm-focus-controls,.ccm-hero__actions)>*,.page-video :where(.video-filter-row,.video-now__actions)>*{width:100%!important;min-width:0!important;white-space:normal!important}
  .toon-page .toon-filter{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}.toon-page .toon-filter>*{min-width:0!important;width:100%!important}
  .kb-favorite-verses .fav-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  .page-plan-workspace .plan-tool-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important;gap:7px!important}.page-plan-workspace .plan-tool-tabs button{width:100%!important;min-width:0!important;white-space:normal!important}
  .page-plan-workspace .plan-inline-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.page-plan-workspace .plan-inline-actions>*{width:100%!important;min-width:0!important;white-space:normal!important}

  .kb-memory-studio :where(.memory-primary-tabs,.practice-modes,.target-version,.review-rating,.library-filters,.voice-control-row){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}.kb-memory-studio :where(.memory-primary-tabs,.practice-modes,.target-version,.review-rating,.library-filters,.voice-control-row)>*{width:100%!important;min-width:0!important;white-space:normal!important}

  .kb-prayer-studio :where(.prayer-view-tabs,.prayer-category-filter,.prayer-segments,.prayer-jumpbar){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}.kb-prayer-studio :where(.prayer-view-tabs,.prayer-category-filter,.prayer-segments,.prayer-jumpbar)>*{width:100%!important;min-width:0!important;white-space:normal!important}

  .qt-studio :where(.qt-tabs,.qt-question-chips,.qt-actions,.writing-actions){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}.qt-studio :where(.qt-tabs,.qt-question-chips,.qt-actions,.writing-actions)>*{width:100%!important;min-width:0!important;white-space:normal!important}
  .page-vocab :where(.vocab-jump,.vocab-filter-row,.vocab-form-actions,.vocab-pron-actions,.vocab-review-actions,.vocab-review-rating){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important}.page-vocab :where(.vocab-jump,.vocab-filter-row,.vocab-form-actions,.vocab-pron-actions,.vocab-review-actions,.vocab-review-rating)>*{width:100%!important;min-width:0!important;white-space:normal!important}

  /* Common user-friendly hierarchy */
  :where(.kb-listening-studio,.kb-speaking-studio,.qt-studio,.page-plan-workspace,.kb-memory-studio,.kb-prayer-studio,.page-vocab,.page-ccm,.page-video,.toon-page,.kb-favorite-verses,.page-mypage) :where(button,a,input,select){min-height:44px}
  :where(.kb-listening-studio,.kb-speaking-studio,.qt-studio,.page-plan-workspace,.kb-memory-studio,.kb-prayer-studio,.page-vocab,.page-ccm,.page-video,.toon-page,.kb-favorite-verses,.page-mypage) :where(h1,h2,h3,p,small,strong,span,label){overflow-wrap:anywhere}
}
@media(max-width:430px){
  .kb-study-bridge__actions,body.kb-bible-v5 .reader-toolbar-controls,body.kb-bible-v5 .translation-key,.page-plan-workspace .plan-tool-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kbvf-examples,.kb-listening-studio :where(.ls-player-actions,.ls-writing-actions),.page-ccm :where(.ccm-filter-row,.ccm-main-controls,.ccm-focus-controls,.ccm-hero__actions),.page-video :where(.video-filter-row,.video-now__actions),.toon-page .toon-filter,.kb-favorite-verses .fav-actions,.page-plan-workspace .plan-inline-actions,.kb-memory-studio :where(.memory-primary-tabs,.practice-modes,.target-version,.review-rating,.library-filters,.voice-control-row),.kb-prayer-studio :where(.prayer-view-tabs,.prayer-category-filter,.prayer-segments,.prayer-jumpbar),.qt-studio :where(.qt-tabs,.qt-question-chips,.qt-actions,.writing-actions),.page-vocab :where(.vocab-jump,.vocab-filter-row,.vocab-form-actions,.vocab-pron-actions,.vocab-review-actions,.vocab-review-rating){grid-template-columns:1fr!important}
}
.memory-speech-eval,.plan-speech-eval{margin-top:12px;padding:14px;border:1px solid rgba(229,192,104,.2);border-radius:15px;background:rgba(229,192,104,.045);line-height:1.65}.memory-speech-eval strong,.plan-speech-eval strong{color:#f0cf76}.memory-speech-eval p,.plan-speech-eval p{margin:8px 0}.memory-speech-eval b,.plan-speech-eval b{color:#fff}


/* V91-1 hotfix — vocab mobile quick-nav must stay compact and must not collapse to a single vertical stack. */
@media(max-width:900px){
  .page-vocab .vocab-jump{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:8px!important;padding:6px!important;position:static!important;top:auto!important;margin:.7rem 0 .85rem!important}
  .page-vocab .vocab-jump>a{width:100%!important;min-width:0!important;min-height:42px!important;justify-content:center!important;text-align:center!important;white-space:nowrap!important;padding:0 .55rem!important;border:1px solid rgba(233,215,174,.16)!important;background:color-mix(in srgb,var(--v-panel) 92%,transparent)!important;border-radius:12px!important}
}
@media(max-width:430px){
  .page-vocab .vocab-jump{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-vocab .vocab-jump>a{font-size:.78rem!important}
}
@media(max-width:360px){
  .page-vocab .vocab-jump>a{font-size:.74rem!important;letter-spacing:-.02em!important}
}
