/* JustScribes mobile app presentation. No desktop selectors or DOM mutations.
 * Existing plugins retain data, permissions, navigation and form behavior.
 * Loaded after the legacy page layers; every rule is mobile scoped. */
@media screen and (max-width:900px) {
 html body {
  --jsv-app-ink:#102f4b; --jsv-app-paper:#fffdf8; --jsv-app-line:#e3e6e8;
  --jsv-app-canvas:#f0f5f8; --jsv-app-radius:16px;
  --jsf-mobile-safe-bottom:calc(74px + env(safe-area-inset-bottom));
  background:var(--jsv-app-canvas)!important;
  padding-bottom:var(--jsf-mobile-safe-bottom)!important;
  -webkit-text-size-adjust:100%;
 }
 /* Shared navigation uses the existing live header geometry and menus. */
 html body > header.top.jsf-hybrid-top {
  background:var(--jsv-app-paper)!important;border-bottom:1px solid #e5dfd1!important;
  box-shadow:0 2px 10px #102f4b08!important;padding-left:max(10px,env(safe-area-inset-left))!important;
  padding-right:max(10px,env(safe-area-inset-right))!important;gap:8px!important;
 }
 html body > header.top.jsf-hybrid-top .jsf-site-logo {flex:1 1 auto!important;max-width:210px!important;}
 html body > header.top.jsf-hybrid-top .jsf-site-logo img {max-width:100%!important;object-fit:contain!important;}
 html body > nav.mobilebar.jsf-hybrid-mobilebar {
  background:#0b2f4f!important;border-top:1px solid #214663!important;
  height:var(--jsf-mobile-safe-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important;
  box-shadow:0 -3px 16px #102f4b12!important;
 }
 html body > nav.mobilebar.jsf-hybrid-mobilebar > :is(a,button) {height:74px!important;gap:5px!important;}
 html body > nav.mobilebar.jsf-hybrid-mobilebar > .on {color:#f4ce65!important;}
 html body > nav.mobilebar.jsf-hybrid-mobilebar small {font-size:11px!important;font-weight:700!important;}
 html body > nav.mobilebar.jsf-hybrid-mobilebar .jsf-mobile-create > span {
  background:linear-gradient(145deg,#f6d779,#e3a91b)!important;color:#fff!important;
  width:48px!important;height:48px!important;border:3px solid #fffdf8!important;border-radius:50%!important;
 }
 html body :is(.jsf-mobile-action-sheet,.jsf-user-dropdown) {border-radius:18px!important;}
 html body .jsf-mobile-context-toggle {font-size:12px!important;padding:10px 14px!important;min-height:44px!important;bottom:calc(86px + env(safe-area-inset-bottom))!important;box-shadow:0 3px 12px #102f4b20!important;}
 /* Shared page surfaces. Fullscreen chat, maps and game scroll owners are not reset. */
 html body :is(.jsf-context-main,.jsf-network-center,.jsf-groups-main,.jsf-business-owner-main,.jsw-main,.jsm-mp-main,.business-view-main) {min-width:0!important;max-width:100%!important;}
 html body :is(.jsw-card,.jsw-centre-card,.jsw-crm-card,.jsw-pro-card,.jsf-bp-card,.jsf-bs-card,.jsf-bw-card,.jsf-bg-card,.jsf-mycc-card,.jsf-qm-card,.jsst-card,.jsst-chart-card,.js-kb-card,.js-bdm-card,.js-bqm-card,.js-brm-card,.jsf-editor-card,.jths-card,.jsf-event-card,.js-events-card,.jsf-dir-market-card,.jsm-mp-product-card,.jsgl-card) {
  border-radius:var(--jsv-app-radius)!important;border:1px solid var(--jsv-app-line)!important;
  box-shadow:0 3px 12px #102f4b06!important;min-width:0!important;max-width:100%!important;
 }
 html body :is(.business-view-main,.jsf-account-shell,.jsf-saved-page,.jsf-friends-page,.jsf-service-requests,.jsf-newsroom) > .card {
  border-radius:16px!important;padding:16px!important;border:1px solid var(--jsv-app-line)!important;box-shadow:none!important;
 }
 html body :is(.jsw-main,.jsf-account-shell,.jsf-cc,.jsst-suite,.jsf-service-requests,.business-view-main) :is(h1,h2,h3) {overflow-wrap:break-word;}
 html body :is(.jsw-main,.jsf-account-shell,.jsf-cc,.jsst-suite,.jsf-service-requests) h1 {font-size:26px!important;line-height:1.2!important;}
 html body :is(.jsw-main,.jsf-account-shell,.jsf-cc,.jsst-suite,.jsf-service-requests) h2 {font-size:20px!important;line-height:1.3!important;}
 html body :is(.jsf-tabs,.jsw-tabs,.jsf-bp-tabs,.jsf-bg-tabs,.jths-tabs,.jsm-order-tabs,.jsd-filter-tabs,.jsd-section-tabs,.business-page-nav,.jsf-gm-tabs,.jsf-group-inner-tabs,.jsgl-tabs) {
  max-width:100%!important;overflow-x:auto!important;flex-wrap:nowrap!important;
  gap:6px!important;padding:8px 0!important;scrollbar-width:thin;overscroll-behavior-x:contain;
 }
 html body :is(.jsf-tabs,.jsw-tabs,.jsf-bp-tabs,.jsf-bg-tabs,.jths-tabs,.jsm-order-tabs,.jsd-filter-tabs,.business-page-nav,.jsf-gm-tabs,.jsf-group-inner-tabs,.jsgl-tabs) > :is(a,button) {
  flex:0 0 auto!important;white-space:nowrap!important;min-height:44px!important;
  padding:11px 14px!important;border-radius:10px!important;font-size:14px!important;
 }
 html body :is(.jsw-shell,.jsf-account-shell,.jsf-cc,.jsst-suite,.jsm-checkout-grid,.business-owner-layout,.jsf-editor-grid) {grid-template-columns:minmax(0,1fr)!important;}
 html body :is(.jsw-grid,.jsf-cc-grid,.jsst-overview-grid,.jsw-pro-form-grid,.jsv-ui-control-grid,.jsd-detail-grid) {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
 html body :is(.jsw-card,.jsf-account-shell,.jsf-cc,.jsst-suite,.auth-card,.jsf-niagara-auth) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),select,textarea) {
  box-sizing:border-box!important;min-width:0!important;max-width:100%!important;font-size:16px!important;border-radius:10px!important;
 }
 html body :is(.jsw-card,.jsf-account-shell,.jsf-cc,.jsst-suite,.auth-card) :is(button,.btn) {min-height:44px;}
 /* Group identities and updates stay in natural document flow. */
 html body.jsv-groups-theme-layout .jsf-gm-page.jsv133-group-shell {gap:12px!important;padding-bottom:16px!important;}
 html body.jsv-groups-theme-layout .jsf-gm-page .jsf-gm-hero {
  min-height:0!important;height:auto!important;padding:20px 16px!important;
  border-radius:18px!important;gap:12px!important;flex-wrap:wrap!important;
 }
 html body.jsv-groups-theme-layout .jsf-gm-hero-copy {min-width:0!important;max-width:100%!important;}
 html body.jsv-groups-theme-layout .jsf-gm-hero-copy h1 {font-size:26px!important;line-height:1.2!important;margin-bottom:8px!important;}
 html body.jsv-groups-theme-layout .jsf-gm-hero-copy p {display:flex!important;flex-wrap:wrap!important;gap:6px 12px!important;font-size:13px!important;}
 html body.jsv-groups-theme-layout .jsf-gm-hero-actions {flex-wrap:wrap!important;gap:8px!important;margin:0!important;}
 html body.jsv-groups-theme-layout .jsf-gm-hero-actions :is(a,button) {min-height:44px!important;border-radius:10px!important;}
 html body.jsv-groups-theme-layout :is(.jsg-overview-stats,.jsf-gm-event-grid,.jsg-course-grid) {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
 html body.jsv-groups-theme-layout .jsf-gm-page :is(.jsg-happening,.jsg-update-page-grid) {padding:12px!important;border-radius:16px!important;}
 html body.jsv-groups-theme-layout .jsf-gm-page .jsg-update-card {background:var(--jsv-app-paper)!important;border:1px solid #e4dfd3!important;border-radius:14px!important;box-shadow:none!important;}
 html body .jsgl-page .jsgl-hero {min-height:0!important;padding:22px 16px!important;border-radius:18px!important;}
 html body .jsgl-page :is(.jsgl-my-grid,.jsgl-feature-grid,.jsgl-local-grid,.jsgl-new-grid,.jsgl-event-grid) {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
 /* Marketplace: real product and store controls, two comfortable phone columns. */
 html body .jsm-marketplace-hub .jsm-mp-split {grid-template-columns:minmax(0,1fr)!important;gap:16px!important;}
 html body .jsm-marketplace-hub .jsm-mp-product-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
 html body .jsm-marketplace-hub .jsm-mp-product-grid > .jsm-mp-product-card {max-width:none!important;width:100%!important;border-radius:14px!important;overflow:hidden;}
 html body .jsm-marketplace-hub .jsm-mp-product-media {aspect-ratio:1!important;min-height:0!important;height:auto!important;}
 html body .jsm-marketplace-hub .jsm-mp-product-body {padding:10px!important;}
 html body .jsm-marketplace-hub .jsm-mp-product-body h3 {font-size:15px!important;line-height:1.35!important;}
 html body .jsm-marketplace-hub .jsm-mp-store-name {font-size:12px!important;margin-bottom:6px!important;}
 html body .jsm-marketplace-hub .jsm-mp-product-meta strong {font-size:18px!important;white-space:normal!important;}
 html body .jsm-marketplace-hub .jsm-mp-product-actions .jsm-mp-btn {padding:10px 6px!important;font-size:12px!important;}
 html body .jsm-marketplace-hub .jsm-mp-section-head {flex-wrap:wrap!important;gap:8px!important;}
 /* Business profile: compact identity, reachable actions, readable sections. */
 html body .business-view-cover {min-height:0!important;height:auto!important;display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;gap:12px!important;padding:24px 16px 16px!important;border-radius:18px 18px 0 0!important;}
 html body .business-hero-logo {width:64px!important;height:64px!important;border-width:3px!important;font-size:22px!important;}
 html body .business-hero-copy h1 {font-size:25px!important;line-height:1.2!important;overflow-wrap:break-word;}
 html body .business-hero-copy p {font-size:14px!important;line-height:1.45!important;}
 html body .business-view-cover .business-actions {grid-column:1/-1!important;display:flex!important;flex-wrap:wrap!important;width:100%!important;gap:8px!important;margin:4px 0 0!important;}
 html body .business-view-cover .business-actions > :is(a,button) {flex:1 1 120px!important;min-height:44px!important;text-align:center!important;border-radius:10px!important;}
 html body .business-view-layout {grid-template-columns:minmax(0,1fr)!important;gap:14px!important;}
 html body .business-view-main {order:1!important;}
 html body .business-info-rail {order:2!important;}
 html body .business-tools-rail {order:3!important;grid-column:auto!important;}
 html body .welcome-business {grid-template-columns:minmax(0,1fr)!important;min-height:0!important;}
 html body .welcome-copy {padding:16px!important;}
 html body .welcome-copy h2 {font-size:24px!important;}
 html body .featured-services {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
 html body .business-page-nav {justify-content:flex-start!important;}
 html body .jsf-directory-home-hero {min-height:0!important;padding:24px 16px!important;}
 html body .jsf-directory-home-hero h1 {font-size:34px!important;line-height:1.1!important;}
 html body .jsf-directory-home-hero-copy > p {font-size:15px!important;margin:12px 0!important;}
 html body .jsf-directory-home-categories {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;}
 html body .jsf-directory-home-categories a {min-height:84px!important;}
 html body .jsf-directory-home-business-grid {grid-template-columns:minmax(0,1fr)!important;}
 html body .jsf-directory-home-section > header h2 {font-size:23px!important;}
 /* Events and editorial results use one readable stream. */
 html body .js-events-home-shell .js-events-group-grid {grid-template-columns:minmax(0,1fr)!important;}
 html body :is(.jsf-newsroom,.jsd-search-hero) h1 {font-size:28px!important;line-height:1.2!important;}
 html body .jsd-service-grid {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
 html body :is(.jsf-cc-hero,.jscc-studio-hero,.jsf-qm-hero,.jsmo-hero,.jsv-ui-control-hero) {min-height:0!important;padding:20px 16px!important;border-radius:16px!important;}
 /* Activity, profile, public information and sign-in share the same surfaces. */
 html body #jsf-activity-page#jsf-activity-page#jsf-activity-page#jsf-activity-page#jsf-activity-page :is(.activity-post,.jsf-activity-quick-compose) {border-radius:16px!important;border:1px solid #e3e6e8!important;box-shadow:0 3px 12px #102f4b06!important;}
 html body .jsf-exact-profile-hub .jsf-xp-cover {height:180px!important;min-height:0!important;border-radius:16px 16px 0 0!important;}
 html body .jsf-exact-profile-hub .jsf-xp-composer {border-radius:16px!important;box-shadow:none!important;}
 html body .jsf-exact-profile-hub .jsf-xp-feed-filters {overflow-x:auto!important;flex-wrap:nowrap!important;gap:8px!important;}
 html body .jsf-niagara-auth .jsf-niagara-card {border-radius:18px!important;padding:20px 16px!important;max-width:100%!important;}
 html body .jsf-niagara-auth .jsf-auth-grid {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
 html body .jsf-niagara-auth :is(.jsf-auth-primary,.jsf-auth-signin) {min-height:48px!important;border-radius:12px!important;}
 html body .jslp-policy .jslp-hero {min-height:0!important;padding:24px 16px!important;border-radius:16px!important;}
 html body .jslp-policy .jslp-section {padding:16px!important;border-radius:14px!important;}
 html body .jslp-policy .jslp-section-body {font-size:16px!important;line-height:1.65!important;}
 /* Never expose permission-gated or inactive panels through presentation rules. */
 html body [hidden]:not([hidden=until-found]) {display:none!important;}
}
@media screen and (max-width:359px) {
 html body .jsm-marketplace-hub .jsm-mp-product-grid,
 html body .featured-services {grid-template-columns:minmax(0,1fr)!important;}
 html body > nav.mobilebar.jsf-hybrid-mobilebar small {font-size:10px!important;}
}
