/* ITDA v30.76 · mobile readability first
   Keeps v30.75 responsive behavior, then raises type size and changes dense data tables into readable cards. */
/* ITDA v30.75 · responsive/mobile parity layer
   Loaded after every page stylesheet. Desktop layout is untouched. */
.server-mobile-nav-backdrop{display:none}

@media(max-width:1050px){
  /* Header / navigation parity */
  .main-nav{display:none!important}
  .mobile-menu{display:grid!important;place-items:center;flex:0 0 auto}
  .server-mobile-nav{
    display:none!important;
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    top:64px!important;
    bottom:8px!important;
    z-index:10020!important;
    min-width:0!important;
    max-height:none!important;
    padding:0!important;
    overflow:hidden!important;
    flex-direction:column;
    background:#fff!important;
    border:1px solid #e2e8f0!important;
    border-radius:18px!important;
    box-shadow:0 24px 70px rgba(15,23,42,.24)!important;
  }
  .server-mobile-nav.open{display:flex!important}
  .server-mobile-nav-backdrop{
    position:fixed;inset:64px 0 0;z-index:10010;
    background:rgba(15,23,42,.36);backdrop-filter:blur(2px)
  }
  body.mobile-nav-open .server-mobile-nav-backdrop{display:block}
  body.mobile-nav-open{overflow:hidden!important}
  .server-mobile-nav-scroll{
    flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;padding:10px
  }
  .mobile-nav-main-link,.mobile-nav-section-title{
    min-height:48px;display:flex!important;align-items:center;gap:10px;
    padding:0 13px!important;border-radius:11px;color:#1e293b!important;
    font-size:14px;font-weight:800;text-decoration:none!important
  }
  .mobile-nav-main-link:hover,.mobile-nav-section-title:hover{background:#f8fafc}
  .mobile-nav-main-link.active{background:#eff6ff;color:#1d4ed8!important}
  .mobile-nav-main-icon{
    width:28px;height:28px;display:grid;place-items:center;flex:0 0 auto;
    border-radius:9px;background:#f1f5f9;color:#475569;font-size:15px
  }
  .mobile-nav-main-link.active .mobile-nav-main-icon{background:#dbeafe;color:#1d4ed8}
  .mobile-nav-section{
    margin:6px 0;padding:5px;border:1px solid #eef2f7;border-radius:13px;background:#fbfdff
  }
  .mobile-nav-section.active{border-color:#bfdbfe;background:#f8fbff}
  .mobile-nav-section-title{justify-content:space-between;min-height:44px;padding:0 9px!important}
  .mobile-nav-section-title b{font-size:20px;color:#94a3b8;font-weight:500}
  .mobile-nav-section.active .mobile-nav-section-title{color:#1d4ed8!important}
  .mobile-nav-subgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:3px 4px 5px}
  .mobile-nav-subgrid a{
    min-height:42px;display:flex!important;align-items:center;padding:0 10px!important;
    border:1px solid #eef2f7;border-radius:9px;background:#fff;color:#475569!important;
    font-size:12px;font-weight:750;text-decoration:none!important;white-space:normal;line-height:1.25
  }
  .mobile-nav-subgrid a.active{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8!important;font-weight:850}
  .server-mobile-nav-foot{
    flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));
    border-top:1px solid #e2e8f0;background:#fff
  }
  .mobile-nav-user{min-width:0;flex:1;display:flex;align-items:center;gap:9px}
  .mobile-nav-user>span:last-child{min-width:0;display:flex;flex-direction:column;gap:1px}
  .mobile-nav-user b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#0f172a}
  .mobile-nav-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#94a3b8}
  .mobile-nav-logout{min-height:42px;display:flex;align-items:center;padding:0 12px;border:1px solid #e2e8f0;border-radius:9px;color:#475569!important;font-size:12px;font-weight:800;text-decoration:none!important;background:#fff}
  .server-mobile-nav-foot .mobile-login-link{width:100%!important;min-height:46px!important;justify-content:center!important;background:var(--primary)!important;color:#fff!important;border:1px solid var(--primary)!important}

  /* sub navigation remains usable on phones/tablets */
  .subbar{position:sticky!important;top:64px!important;z-index:48!important;overflow:hidden}
  .subbar-inner{overflow-x:auto!important;overscroll-behavior-x:contain;scrollbar-width:none!important;-webkit-overflow-scrolling:touch}
  .subbar-inner::-webkit-scrollbar,.sub-nav::-webkit-scrollbar{display:none!important}
  .sub-nav{width:max-content;min-width:100%;padding-right:8px}
  .sub-nav .sub-item{min-height:40px;height:40px;padding:0 13px!important;flex:0 0 auto}
}

@media(max-width:760px){
  /* Global viewport / touch ergonomics */
  html,body{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden}
  body{font-size:13px!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  img,video,canvas,svg{max-width:100%;height:auto}
  button,a,input,select,textarea{touch-action:manipulation}
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px!important;max-width:100%}
  .btn{min-height:44px;height:auto;padding-top:9px;padding-bottom:9px;line-height:1.25}
  .btn-sm{min-height:40px;height:40px;padding-top:0;padding-bottom:0}
  .icon-btn{width:44px;height:44px;min-width:44px;min-height:44px}

  /* Header */
  .topbar{height:58px!important;padding:0 12px!important;gap:8px!important}
  .brand{min-width:0!important;max-width:56px}
  .original-itda-brand img,.brand img{width:46px!important;max-width:46px!important;height:46px!important;object-fit:contain}
  .header-actions{gap:6px!important}
  .header-member-actions .profile-btn{display:none!important}
  .desktop-logout{display:none!important}
  .header-actions>.btn-primary{min-height:40px;height:40px;padding:0 12px;font-size:12px}
  .server-mobile-nav{top:58px!important}
  .server-mobile-nav-backdrop{inset:58px 0 0!important}
  .subbar{top:58px!important}
  .subbar-inner{height:46px!important;padding-left:12px!important;padding-right:12px!important}

  /* Page rhythm */
  .page-shell{width:100%!important;max-width:none!important;margin:0!important;padding:16px 12px calc(34px + env(safe-area-inset-bottom,0px))!important}
  .page-head,.itda-page-head{align-items:flex-start!important;flex-direction:column!important;gap:10px!important;margin-bottom:15px!important}
  .page-head h1,.itda-page-head h1{font-size:22px!important;line-height:1.25!important}
  .page-desc{font-size:11px!important;line-height:1.55!important}
  .eyebrow,.itda-eyebrow{font-size:10px!important}
  .section-head{align-items:flex-start!important;flex-direction:column!important;gap:8px!important;margin:21px 0 11px!important}
  .section-head>*,.section-head>div{max-width:100%}

  /* Actions and filters: no tiny side-by-side controls */
  .page-actions{width:100%;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important}
  .page-actions>*{min-width:0!important;max-width:100%}
  .page-actions form{display:contents}
  .page-actions .btn,.page-actions>a,.page-actions>button{width:100%;justify-content:center}
  .toolbar,.toolbar-left,.toolbar-right,.filter-row,.filters,.filter-bar,.search-row{max-width:100%;min-width:0}
  .toolbar{align-items:stretch!important;flex-wrap:wrap!important;gap:8px!important}
  .toolbar-left,.toolbar-right{width:100%!important;display:flex;flex-wrap:wrap;gap:7px}
  .search-wrap{min-width:0!important;width:100%!important;flex:1 1 100%}
  .control,.input,.textarea{min-width:0!important;max-width:100%!important}
  select.control,input.control{min-height:44px;height:44px}

  /* Home */
  .hero,.hero-grid{grid-template-columns:1fr!important;gap:10px!important}
  .hero-main{min-height:218px!important;padding:19px 17px!important;border-radius:16px!important}
  .hero-main h2{font-size:23px!important;margin-top:17px!important;max-width:100%!important}
  .hero-main p{font-size:12px;line-height:1.6}
  .hero-buttons{display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important;margin-top:18px!important}
  .hero-buttons .btn{width:100%;min-width:0}
  .hero-side{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .quick-card{min-height:94px!important;padding:13px!important;border-radius:13px!important}
  .quick-card strong{font-size:12px!important}.quick-card span:last-child{font-size:10px!important}
  .quick-icon{width:31px;height:31px;border-radius:9px}
  .home-notice-focus{align-items:flex-start!important;flex-wrap:wrap!important}
  .home-notice-focus .btn{width:100%!important}
  .events-grid,.cards-grid,.ad-grid,.prep-list-grid,.ad-card-container{grid-template-columns:1fr!important;gap:12px!important}
  .event-cover{height:154px!important}.event-body{padding:13px!important}

  /* Common cards / panels */
  .panel,.itda-panel,.event-card,.settings-card,.stat-card{max-width:100%;min-width:0}
  .panel-head{min-height:54px;padding:12px 13px!important;gap:8px!important;flex-wrap:wrap}
  .panel-head h3{font-size:14px}.panel-head .help{font-size:9px}
  .panel-body{padding:14px!important;max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .stat-card{padding:13px!important}.stat-card strong{font-size:22px!important}
  .settings-grid{grid-template-columns:1fr!important}

  /* Tables: data remains intact, scrolling stays inside the card instead of the page */
  .table-wrap,.table-responsive,.table-scroll,.admin-table-wrap,.list-table-wrap,.finance-table-wrap{width:100%;max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .panel-body>table,.table-wrap>table,.table-responsive>table,.table-scroll>table{min-width:620px}
  table{font-size:11px}
  th,td{padding-top:8px!important;padding-bottom:8px!important}

  /* Forms */
  .form-grid{grid-template-columns:1fr!important;gap:13px!important}
  .field.full{grid-column:auto!important}
  .form-container{width:100%!important;max-width:100%!important;margin:0!important;padding:16px 13px!important;border-radius:14px!important}
  .form-actions,.modal-form-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important}
  .form-actions .btn,.modal-form-actions .btn{width:100%}

  /* Regular modals: predictable bottom sheet with safe-area spacing */
  body.modal-open,body.global-register-open,body.lifeline-detail-open{overflow:hidden!important}
  .modal-backdrop{padding:0!important;align-items:flex-end!important;overscroll-behavior:contain}
  .modal:not(.lifeline-detail-modal){
    width:100vw!important;max-width:none!important;max-height:96dvh!important;
    border-radius:18px 18px 0 0!important;margin:0!important;padding-bottom:env(safe-area-inset-bottom,0px)
  }
  .modal-head{flex:0 0 auto;padding:13px 14px!important;gap:9px!important}
  .modal-head h2{font-size:18px!important;line-height:1.3}
  .modal-head .page-desc{display:block;margin-top:3px}
  .modal-body{flex:1 1 auto;min-height:0;padding:14px!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
  .modal-foot{flex:0 0 auto;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;gap:7px!important}
  .modal-foot .btn{flex:1;min-width:0}
  .detail-meta,.event-modal-meta{grid-template-columns:1fr!important}
  .event-modal-image{width:100%!important;max-width:100%!important;margin:12px auto!important}
  .document-detail{width:100%!important;max-width:100%!important;padding:15px 13px!important;border-radius:12px!important;overflow-wrap:anywhere}
  .attachment-card{align-items:stretch!important;flex-direction:column!important}.attachment-card .btn{width:100%!important}

  /* Global registration/edit iframe */
  .global-register-backdrop{padding:0!important;align-items:stretch!important}
  .global-register-modal{width:100vw!important;height:100dvh!important;max-height:none!important;border-radius:0!important;padding-bottom:0!important}
  .global-register-head{padding:11px 12px!important}
  .global-register-body{min-height:0!important}
  .global-register-frame{width:100%!important;height:100%!important;min-height:0!important}
  html.itda-modal-child .page-shell{padding:12px 10px calc(22px + env(safe-area-inset-bottom,0px))!important}

  /* Login reliability + keyboard-safe layout */
  body.login-modal-open{overflow:hidden!important;touch-action:auto}
  .global-login-backdrop{overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0!important;align-items:flex-end!important}
  .global-login-modal{
    width:100%!important;max-width:none!important;max-height:calc(100dvh - env(safe-area-inset-top,0px))!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:18px 18px 0 0!important;
    padding-bottom:env(safe-area-inset-bottom,0px)!important
  }
  .global-login-modal-head{flex:0 0 auto!important}
  .global-login-modal-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .global-login-container{min-height:max-content!important;padding:20px 18px calc(22px + env(safe-area-inset-bottom,0px))!important}
  .global-login-container .original-input-wrapper input{font-size:16px!important;min-height:48px!important}
  .global-login-container .login-submit{min-height:48px!important}

  /* Bible dashboard */
  .bible-hero{padding:19px 16px!important;gap:16px!important;border-radius:16px!important;min-height:0!important}
  .bible-hero h1{font-size:23px!important}
  .bible-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;width:100%;margin-top:18px!important}
  .bible-actions .btn{min-width:0!important;width:100%;font-size:11px;padding-left:8px;padding-right:8px}
  .bible-streak{width:100%!important;min-width:0!important;padding:15px!important}
  .bible-streak strong{font-size:31px!important}
  .bible-dashboard-grid{grid-template-columns:1fr!important;gap:12px!important}
  .bible-calendar-card .panel-head{align-items:flex-start!important;flex-direction:column!important}
  .bible-calendar-nav{width:100%!important;display:flex!important;grid-template-columns:none!important;justify-content:space-between!important;align-items:center}
  .bible-calendar-nav .btn{width:44px!important;flex:0 0 44px}
  .bible-month{min-width:0!important}
  .bible-month .bible-day{min-height:62px!important;padding:5px!important}
  .bible-text-modal-box{max-height:58dvh!important}
  .verse-save-options{grid-template-columns:1fr!important}

  /* Life Line */
  .lifeline-page{width:100%!important;max-width:none!important;padding-bottom:18px!important}
  .lifeline-page-head{align-items:flex-start!important;flex-direction:column!important;gap:10px!important;margin-bottom:13px!important}
  .lifeline-page-head h1{font-size:25px!important}.lifeline-page-head .page-desc{font-size:11px!important}
  .lifeline-create-btn{width:100%!important;min-height:44px!important}
  .lifeline-grid{grid-template-columns:1fr!important;gap:12px!important}
  .lifeline-card{border-radius:15px!important}
  .lifeline-card-media{aspect-ratio:16/9!important}
  .lifeline-card-body{min-height:116px!important;padding:13px 14px!important}
  .lifeline-detail-backdrop{padding:0!important;align-items:stretch!important}
  .lifeline-detail-modal{width:100vw!important;height:100dvh!important;max-height:none!important;border-radius:0!important}
  .lifeline-modal-head{padding:12px 13px 10px!important}.lifeline-modal-heading h2{font-size:18px!important}
  .lifeline-modal-body{max-height:none!important;min-height:0!important}
  .lifeline-slider{padding:8px 0!important}
  .lifeline-slider-stage{height:52dvh!important;min-height:250px!important;border-radius:0!important}
  .lifeline-slide-nav{width:44px!important;height:52px!important}
  .lifeline-detail-copy{padding:16px 14px 20px!important;font-size:12px!important}
  .lifeline-modal-foot{padding:9px 11px calc(9px + env(safe-area-inset-bottom,0px))!important}
  .lifeline-modal-foot .btn{flex:1}
  .lifeline-form{width:100%!important;max-width:none!important;border-radius:0!important}
  .lifeline-form-intro{padding:14px 12px!important}.lifeline-form-body{padding:14px 12px!important}
  .lifeline-new-preview,.lifeline-existing-images{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* Collaboration / prep / schedules */
  .prep-layout,.calendar-layout,.reader-columns{grid-template-columns:1fr!important}
  .prep-task-head,.prep-progress-meta{align-items:stretch!important;flex-direction:column!important}
  .prep-progress-meta label{margin-left:0!important;width:100%!important}
  .ad-grid,.vehicle-summary{grid-template-columns:1fr!important}
  .schedule-detail-grid{grid-template-columns:1fr!important}
  .schedule-detail-grid>div.full{grid-column:auto!important}
  .comment-compose{flex-direction:column!important;align-items:stretch!important}.comment-compose .btn{width:100%!important}

  /* Permission/settings */
  .permission-layout{grid-template-columns:1fr!important;gap:12px!important}
  .permission-group-list{display:flex!important;overflow-x:auto!important;gap:7px!important;padding-bottom:4px!important;-webkit-overflow-scrolling:touch}
  .permission-group-btn{min-width:145px!important;flex:0 0 auto!important}
  .permission-editor{padding-left:0!important;border-left:0!important;border-top:1px solid #e2e8f0!important;padding-top:12px!important}
  .permission-editor-head,.permission-module-body{grid-template-columns:1fr!important}
  .permission-action-grid{grid-template-columns:1fr!important}
  .account-group-filterbar{grid-template-columns:1fr!important}

  /* Post-login summary */
  .login-summary-item{min-height:48px!important;padding:10px 11px!important}
  .post-login-detail-modal{width:100vw!important;max-width:none!important}

  /* Toasts stay inside the viewport */
  .toast-wrap{left:10px!important;right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}
  .toast{width:100%!important;min-width:0!important;max-width:none!important}
}

@media(max-width:430px){
  .page-actions,.form-actions,.modal-form-actions{grid-template-columns:1fr!important}
  .hero-buttons{grid-template-columns:1fr!important}
  .hero-side{grid-template-columns:1fr 1fr!important}
  .stats-grid{grid-template-columns:1fr 1fr!important}
  .bible-actions{grid-template-columns:1fr 1fr!important}
  .mobile-nav-subgrid{grid-template-columns:1fr 1fr!important}
}

@media(max-width:360px){
  .hero-side,.stats-grid,.bible-actions,.mobile-nav-subgrid{grid-template-columns:1fr!important}
  .server-mobile-nav{left:4px!important;right:4px!important;bottom:4px!important}
}

@media(prefers-reduced-motion:reduce){
  .server-mobile-nav,.server-mobile-nav *{scroll-behavior:auto!important;transition:none!important}
}

/* ===== v30.76 readability overrides ===== */
.mobile-bottom-nav{display:none}

@media(max-width:1050px){
  .mobile-nav-main-link,.mobile-nav-section-title{font-size:15px!important}
  .mobile-nav-subgrid a{font-size:14px!important;line-height:1.35!important;min-height:46px!important}
  .mobile-nav-user b{font-size:14px!important}
  .mobile-nav-user small{font-size:11px!important}
  .mobile-nav-logout{font-size:13px!important}
  .sub-nav .sub-item{font-size:14px!important;font-weight:780!important}
}

@media(max-width:760px){
  :root{--mobile-readable-text:15px;--mobile-readable-sub:13px}
  body{font-size:var(--mobile-readable-text)!important;line-height:1.58!important}
  p,li,dd,dt,label{line-height:1.58}
  .help,.page-desc,.field small,.muted{font-size:var(--mobile-readable-sub)!important;line-height:1.55!important}
  .eyebrow,.itda-eyebrow{font-size:11px!important;letter-spacing:.07em!important}
  .page-head h1,.itda-page-head h1{font-size:26px!important;line-height:1.22!important;letter-spacing:-.5px!important}
  .section-head h2,.section-head h3{font-size:18px!important;line-height:1.3!important}
  .title-link{font-size:15px!important;line-height:1.45!important;font-weight:800!important}
  .badge,.read-state{font-size:12px!important;line-height:1.3!important}

  .btn{font-size:14px!important;font-weight:800!important;min-height:46px!important}
  .btn-sm{font-size:13px!important;min-height:42px!important;height:auto!important}
  .input,.control,.textarea,input,select,textarea{line-height:1.4!important}
  .field>span,.field>label{font-size:14px!important;font-weight:800!important}

  /* leave room for thumb-friendly bottom navigation */
  body:not(.modal-open):not(.global-register-open):not(.login-modal-open) .page-shell{
    padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))!important
  }
  .itda-modal-child .mobile-bottom-nav{display:none!important}
  .itda-modal-child body .page-shell{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))!important}

  /* Bottom quick navigation */
  .mobile-bottom-nav{
    position:fixed;left:8px;right:8px;bottom:calc(7px + env(safe-area-inset-bottom,0px));z-index:75;
    min-height:64px;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;align-items:stretch;
    padding:5px;background:rgba(255,255,255,.97);border:1px solid #dbe3ee;border-radius:18px;
    box-shadow:0 12px 34px rgba(15,23,42,.18);backdrop-filter:blur(14px)
  }
  .mobile-bottom-nav a,.mobile-bottom-nav button{
    min-width:0;border:0;background:transparent;border-radius:13px;color:#64748b;text-decoration:none;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:5px 3px;
    font:inherit;cursor:pointer
  }
  .mobile-bottom-nav .mobile-bottom-icon{font-size:19px;line-height:1}
  .mobile-bottom-nav b{font-size:11px;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-bottom-nav a.active{background:#eff6ff;color:#1d4ed8}
  body.mobile-nav-open .mobile-bottom-nav,
  body.modal-open .mobile-bottom-nav,
  body.global-register-open .mobile-bottom-nav,
  body.login-modal-open .mobile-bottom-nav,
  body.lifeline-detail-open .mobile-bottom-nav{display:none!important}

  /* Home: readable, not miniature */
  .hero-main{padding:22px 18px!important}
  .hero-main h2{font-size:26px!important;line-height:1.28!important}
  .hero-main p{font-size:14px!important;line-height:1.65!important}
  .hero-side{gap:10px!important}
  .quick-card{min-height:112px!important;padding:15px!important;gap:6px!important}
  .quick-card strong{font-size:15px!important;line-height:1.3!important}
  .quick-card span:last-child{font-size:12.5px!important;line-height:1.35!important}
  .quick-icon{width:36px!important;height:36px!important;font-size:17px!important}
  .event-body h3,.event-card h3{font-size:17px!important;line-height:1.35!important}
  .event-body p,.event-card p{font-size:13px!important;line-height:1.55!important}

  /* Panels and generic cards */
  .panel-head{padding:15px!important;min-height:60px!important}
  .panel-head h3{font-size:17px!important;line-height:1.35!important}
  .panel-head .help{font-size:12px!important}
  .panel-body{padding:15px!important;overflow-x:visible!important}
  .card{font-size:14px!important;line-height:1.55!important}
  .card h3,.card h4{font-size:16px!important;line-height:1.35!important}
  .stat-card small{font-size:12px!important}
  .stat-card strong{font-size:25px!important}

  /* Toolbars stack into readable controls */
  .toolbar-left,.toolbar-right{gap:9px!important}
  .toolbar-left>.control,.toolbar-left>.input,.toolbar-left>.search,.toolbar-right>.control,.toolbar-right>.input{
    flex:1 1 100%!important;width:100%!important
  }
  .toolbar-left>span{align-self:center;font-size:13px;color:#64748b}

  /* Generic read-only data tables become vertical cards. JS adds .mobile-card-table and labels. */
  .data-wrap:has(>table.mobile-card-table),
  .table-wrap:has(>table.mobile-card-table),
  .table-responsive:has(>table.mobile-card-table),
  .table-scroll:has(>table.mobile-card-table){overflow:visible!important}
  table.mobile-card-table{
    display:block!important;width:100%!important;min-width:0!important;border:0!important;background:transparent!important;
    font-size:14px!important
  }
  table.mobile-card-table thead{display:none!important}
  table.mobile-card-table tbody{display:grid!important;gap:12px!important;width:100%!important}
  table.mobile-card-table tr{
    display:block!important;width:100%!important;overflow:hidden;background:#fff;border:1px solid #e2e8f0!important;
    border-radius:14px!important;box-shadow:0 3px 12px rgba(15,23,42,.04)
  }
  table.mobile-card-table tr.unread-doc{border-color:#93c5fd!important;background:#f8fbff!important}
  table.mobile-card-table td{
    display:grid!important;grid-template-columns:minmax(84px,31%) minmax(0,1fr)!important;align-items:start;gap:12px!important;
    width:100%!important;min-width:0!important;padding:10px 13px!important;border:0!important;border-bottom:1px solid #eef2f7!important;
    white-space:normal!important;text-align:left!important;font-size:14px!important;line-height:1.48!important;overflow-wrap:anywhere
  }
  table.mobile-card-table td:last-child{border-bottom:0!important}
  table.mobile-card-table td::before{
    content:attr(data-mobile-label);display:block;color:#64748b;font-size:12px;font-weight:850;line-height:1.45
  }
  table.mobile-card-table td:first-child{padding-top:13px!important}
  table.mobile-card-table td:first-child>a,
  table.mobile-card-table td:first-child .title-link{font-size:16px!important;line-height:1.4!important;font-weight:850!important}
  table.mobile-card-table td.align-right{text-align:left!important}
  table.mobile-card-table td .btn{width:auto!important;justify-self:start}
  table.mobile-card-table tr.mobile-card-empty td{display:block!important;text-align:center!important;padding:18px 12px!important}
  table.mobile-card-table tr.mobile-card-empty td::before{display:none!important}

  /* Tables intentionally kept editable/scrollable remain larger than v30.75 */
  table:not(.mobile-card-table){font-size:13px!important}
  table:not(.mobile-card-table) th,table:not(.mobile-card-table) td{padding:10px 9px!important;line-height:1.45!important}

  /* Modals */
  .modal-head h2{font-size:21px!important}
  .modal-head .page-desc{font-size:12.5px!important}
  .modal-body{font-size:15px!important;line-height:1.6!important;padding:16px!important}
  .modal-foot .btn{font-size:14px!important}
  .document-detail,.event-description{font-size:15px!important;line-height:1.7!important}
  .detail-meta>*,.event-modal-meta>*{font-size:14px!important}
  .detail-meta small,.event-modal-meta small{font-size:12px!important}

  /* Bible */
  .bible-hero{padding:22px 18px!important}
  .bible-hero h1{font-size:27px!important;line-height:1.28!important}
  .bible-hero p{font-size:14px!important;line-height:1.65!important}
  .bible-actions .btn{font-size:13.5px!important;line-height:1.3!important;padding-left:10px!important;padding-right:10px!important}
  .verse-line{font-size:15px!important;line-height:1.75!important;padding-top:9px!important;padding-bottom:9px!important}
  .verse-num{font-size:12px!important}
  .book-row{font-size:14px!important}
  .bible-text-section{font-size:15px!important;line-height:1.75!important}

  /* Life Line */
  .lifeline-page-head h1{font-size:28px!important}
  .lifeline-page-head .page-desc{font-size:13px!important}
  .lifeline-card-body{padding:15px!important;min-height:126px!important}
  .lifeline-card-title,.lifeline-card h3{font-size:17px!important;line-height:1.4!important}
  .lifeline-card-desc,.lifeline-card p{font-size:13.5px!important;line-height:1.55!important}
  .lifeline-modal-heading h2{font-size:21px!important;line-height:1.35!important}
  .lifeline-detail-copy{padding:18px 16px 24px!important;font-size:15px!important;line-height:1.7!important}
  .lifeline-detail-copy p{font-size:15px!important;line-height:1.7!important}

  /* Settings / permissions */
  .permission-group-btn b{font-size:14px!important}
  .permission-group-btn small{font-size:11px!important}
  .permission-module-title,.permission-editor h3{font-size:16px!important}
  .permission-action-grid label,.permission-module-body label{font-size:14px!important;line-height:1.45!important}

  /* Pagination large enough to tap */
  .pagination{gap:6px!important;flex-wrap:wrap!important}
  .pagination a,.pagination button{min-width:40px!important;min-height:40px!important;font-size:13px!important}

  /* login */
  .global-login-container .login-sub{font-size:13px!important;line-height:1.55!important}
  .global-login-container .login-options{font-size:13px!important}
}

@media(max-width:430px){
  .hero-side{grid-template-columns:1fr 1fr!important}
  .quick-card{min-height:106px!important}
  .mobile-bottom-nav{left:6px;right:6px}
  .mobile-bottom-nav b{font-size:10.5px}
}

@media(max-width:360px){
  .hero-side{grid-template-columns:1fr!important}
  .mobile-bottom-nav b{font-size:10px}
}


/* v30.77 Bible dashboard mobile: top quick-action buttons duplicate mobile navigation, so hide them. */
@media(max-width:760px){
  #view-bible .bible-hero .bible-actions{
    display:none!important;
  }
  #view-bible .bible-hero > div:first-child{
    width:100%!important;
  }
}
