/* Hosted mobile correction pass — presentation only. */
body.tribal-portal-mode{--tribal-mobile-nav-height:66px;--tribal-mobile-gutter:16px;--tribal-mobile-bottom-space:calc(var(--tribal-mobile-nav-height) + env(safe-area-inset-bottom) + 72px)}
@media(max-width:1023px){
 html,body.tribal-portal-mode{max-width:100%;overflow-x:hidden!important}
 body.tribal-portal-mode{padding-bottom:0!important}
 .tf-app,.tf-app-main{min-height:100dvh!important}
 .tf-app-content{box-sizing:border-box!important;width:100%!important;max-width:100%!important;padding:18px var(--tribal-mobile-gutter) var(--tribal-mobile-bottom-space)!important;overflow-x:clip!important}
 .tf-app-content{scroll-padding-bottom:var(--tribal-mobile-bottom-space)!important}
 .tf-app-content>*{max-width:100%}
 .tf-bottom-nav{box-sizing:content-box!important;height:var(--tribal-mobile-nav-height)!important;padding:0 4px env(safe-area-inset-bottom)!important}
 .tf-bottom-nav a,.tf-bottom-nav button{min-height:var(--tribal-mobile-nav-height)!important}
 .tf-more-sheet{bottom:calc(var(--tribal-mobile-nav-height) + env(safe-area-inset-bottom))!important}
 .tf-more-backdrop{bottom:calc(var(--tribal-mobile-nav-height) + env(safe-area-inset-bottom))!important}
}
@media(max-width:767px){
 .tf-app-content h1{margin:0 0 6px!important;font-size:28px!important;line-height:1.08!important}
 .tf-client-page-head,.tribal-member-top,.tfbfd-page-head{margin:0 0 18px!important}
 .tf-client-page-head>p,.tribal-member-top p,.tfbfd-page-head p{margin:5px 0 0!important;line-height:1.45}
 .tf-app-content :is(.tribal-card,.tf-client-card,.tf90-section,.tfbfd-card){margin-bottom:12px!important;border-radius:12px!important}

 /* Book a Class: protect the calendar from generic mobile grid flattening. */
 body.tribal-portal-mode .tribal-calendar-wrap{margin:0!important;padding:0!important}
 body.tribal-portal-mode .tribal-calendar-card{display:grid!important;grid-template-columns:minmax(0,1fr)!important;min-height:0!important}
 body.tribal-portal-mode .tribal-month-panel{padding:16px 10px 17px!important}
 body.tribal-portal-mode .tribal-month-head{margin-bottom:12px!important}
 body.tribal-portal-mode .tribal-month-head h1{font-size:24px!important}
 body.tribal-portal-mode .tribal-month-nav a{width:40px!important;min-width:40px!important;height:40px!important;font-size:19px!important}
 body.tribal-portal-mode .tribal-weekdays,body.tribal-portal-mode .tribal-month-grid{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;width:100%!important;gap:3px!important}
 body.tribal-portal-mode .tribal-weekdays{margin-top:10px!important}
 body.tribal-portal-mode .tribal-weekdays span{padding:4px 0 6px!important;font-size:9px!important}
 body.tribal-portal-mode .tribal-month-grid{margin-top:4px!important;grid-auto-rows:38px!important}
 body.tribal-portal-mode .tribal-day{box-sizing:border-box!important;display:grid!important;place-items:center!important;align-self:center!important;justify-self:center!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;aspect-ratio:1!important;padding:0!important;font-size:12px!important;line-height:1!important}
 body.tribal-portal-mode .tribal-day.booked:after{bottom:3px!important;width:3px!important;height:3px!important}
 body.tribal-portal-mode .tribal-slots-panel{padding:16px 12px!important}
 body.tribal-portal-mode .tribal-selected-help{margin-bottom:12px!important}
 body.tribal-portal-mode .tribal-slot{min-height:0!important;margin-bottom:8px!important;padding:11px 12px!important}
 body.tribal-portal-mode .tribal-slot>.tribal-pill,body.tribal-portal-mode .tribal-slot>button,body.tribal-portal-mode .tribal-slot>a{min-height:40px!important}

 /* Dashboard density. */
 .tf-client-dashboard .tribal-member-actions{gap:8px!important;margin-top:14px!important}
 .tf-client-dashboard-grid{gap:10px!important}
 .tf-client-dashboard-grid>.tf-client-card{padding:15px!important}
 .tf-client-dashboard-grid>.tf-client-card:nth-child(1),.tf-client-dashboard-grid>.tf-next-booking-card{min-height:0!important}
 .tf-client-dashboard .tf-week-bookings{padding-top:10px!important}

 /* My Bookings: compact actions while retaining 44px targets. */
 body.tribal-portal-mode .tf-my-bookings .tf-rescheduling-guide{margin:10px 0 12px!important;padding:12px!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-list{gap:9px!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-card{padding:13px!important;border-radius:11px!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-details summary{min-height:40px!important;padding:7px 10px!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:9px!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-actions>.tribal-muted{grid-column:1/-1!important;font-size:12px!important;line-height:1.35!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-actions :is(.tribal-btn,button){min-height:44px!important;padding:7px 8px!important;font-size:11px!important}
 body.tribal-portal-mode .tf-my-bookings .tf-booking-actions :is(.tribal-btn,button):last-child:nth-child(odd){grid-column:1/-1}

 /* Forms: empty workflow sections become compact status rows. */
 .tfbfd-app>.tfbfd-card{padding:15px!important}
 .tfbfd-app>.tfbfd-card:has(>.tfbfd-empty.compact){min-height:0!important;padding:13px 15px!important}
 .tfbfd-app>.tfbfd-card:has(>.tfbfd-empty.compact)>h2{margin:0 0 5px!important;font-size:18px!important}
 .tfbfd-app>.tfbfd-card>.tfbfd-empty.compact{min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;text-align:left!important;font-size:13px!important}
 .tfbfd-client-form-card{gap:10px!important;padding:12px 0!important}
 .tfbfd-client-form-card h3{margin-bottom:5px!important}

 /* Notifications: inbox density. */
 .tf-notification-list{gap:8px!important}
 .tf-notification-item{grid-template-columns:7px minmax(0,1fr)!important;gap:9px!important;padding:12px!important}
 .tf-notification-meta{margin-bottom:3px!important;font-size:10px!important}
 .tf-notification-body h3{margin:0 0 3px!important;font-size:17px!important;line-height:1.25!important}
 .tf-notification-body p{margin:0 0 8px!important;font-size:12px!important;line-height:1.4!important}
 .tf-notification-actions{display:flex!important;gap:6px!important;width:auto!important}
 .tf-notification-actions form{width:auto!important}
 .tf-notification-actions .tribal-btn{width:auto!important;min-height:36px!important;padding:7px 10px!important;font-size:10px!important}

 /* Account forms and save action. */
 .tf-client-account .tf-account-grid{gap:12px!important}
 .tf-client-account .tf-account-grid>.tribal-card,.tf-client-account .tf-password-form{padding:15px!important}
 .tf-client-account .tf-account-grid label,.tf-client-account .tf-password-form label{margin:10px 0!important;gap:4px!important;font-size:13px!important}
 .tf-client-account :is(input:not([type=checkbox]),select){min-height:44px!important;padding:8px 10px!important}
 .tf-client-account .tf-account-save{margin:-4px 0 4px!important;padding:0!important}
 .tf-client-account .tf-account-save .tribal-btn{min-height:44px!important}
 .tf-client-account .tf-password-form{margin-top:12px!important}

 /* Membership store density without changing cards or actions. */
 .tf-product-grid,.tf-membership-grid{gap:10px!important}
 .tf-product-grid>*,.tf-membership-grid>*{padding:14px!important}
}
@media(max-width:374px){
 body.tribal-portal-mode{--tribal-mobile-gutter:12px}
 body.tribal-portal-mode .tribal-month-panel{padding-inline:6px!important}
 body.tribal-portal-mode .tribal-weekdays,body.tribal-portal-mode .tribal-month-grid{gap:1px!important}
 body.tribal-portal-mode .tribal-day{width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;font-size:11px!important}
}

/* System > Features desktop composition. */
@media(min-width:768px){
 body.tribal-portal-mode .tf-system-tab-features{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
 body.tribal-portal-mode .tf-system-tab-features>h2,body.tribal-portal-mode .tf-system-tab-features>h3,body.tribal-portal-mode .tf-system-tab-features>p,body.tribal-portal-mode .tf-system-tab-features>.tf-feature-grid,body.tribal-portal-mode .tf-system-tab-features>button{grid-column:1!important;width:100%!important}
 body.tribal-portal-mode .tf-system-tab-features>h3{margin:24px 0 10px!important;padding-top:18px;border-top:1px solid var(--tf-border);font-size:13px!important;letter-spacing:.06em;text-transform:uppercase}
 body.tribal-portal-mode .tf-system-tab-features>.tf-feature-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;gap:12px!important}
 body.tribal-portal-mode .tf-system-tab-features .tf-feature-grid>.tf90-check{box-sizing:border-box;display:flex!important;align-items:flex-start!important;min-width:0!important;min-height:82px!important;margin:0!important;padding:16px!important}
 body.tribal-portal-mode .tf-system-tab-features .tf-feature-grid>.tf90-check span{min-width:0}
 body.tribal-portal-mode .tf-system-tab-features .tf-feature-grid>.tf90-check strong{display:block;margin-bottom:4px;font-size:15px}
 body.tribal-portal-mode .tf-system-tab-features .tf-feature-grid>.tf90-check small{line-height:1.45}
 body.tribal-portal-mode .tf-system-tab-features>p.tribal-muted:last-of-type{margin:24px 0 0!important;padding:14px 16px;border-radius:10px;background:#f7f7f5}
 body.tribal-portal-mode .tf-system-tab-features>button[type=submit]{justify-self:start;width:auto!important;min-width:150px;margin-top:18px}
}
@media(min-width:1024px){.tf-bottom-nav{display:none!important}}

/* Universal fixed-navigation clearance for every client and staff route. */
.tf-bottom-nav-spacer{display:none}
@media(max-width:1023px){
 body.tribal-portal-mode{--tribal-mobile-bottom-space:calc(var(--tf-bottom-nav-rendered-height,var(--tribal-mobile-nav-height)) + env(safe-area-inset-bottom) + 48px)!important}
 body.tribal-portal-mode .tf-app-content{padding-bottom:var(--tribal-mobile-bottom-space)!important}
 body.tribal-portal-mode .tf-app-content:after{content:'';display:block;width:100%;height:24px;clear:both;pointer-events:none}
 body.tribal-portal-mode .tf-bottom-nav-spacer{display:block!important;width:100%!important;height:var(--tribal-mobile-bottom-space)!important;min-height:var(--tribal-mobile-bottom-space)!important;flex:0 0 var(--tribal-mobile-bottom-space)!important;visibility:hidden!important;pointer-events:none!important}
 body.tribal-portal-mode :is(.tfbfd-sticky,.tf-account-save,.tf-loyalty-save,.tf-card-action,.tbr-submit){scroll-margin-bottom:var(--tribal-mobile-bottom-space)!important}
}
@media(min-width:1024px){.tf-bottom-nav-spacer{display:none!important}}

/* Shared client/staff More menu: compact, readable bottom sheet. */
@media(max-width:1023px){
 body.tribal-portal-mode .tf-more-backdrop{inset:58px 0 calc(var(--tribal-mobile-nav-height) + env(safe-area-inset-bottom))!important;background:rgba(7,21,38,.58)!important;backdrop-filter:blur(2px)}
 body.tribal-portal-mode .tf-more-sheet{box-sizing:border-box!important;inset:auto 10px calc(var(--tribal-mobile-nav-height) + env(safe-area-inset-bottom) + 10px)!important;width:auto!important;max-width:520px!important;max-height:min(72dvh,680px)!important;margin:0 auto!important;padding:16px!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:18px!important;box-shadow:0 22px 60px rgba(7,21,38,.34)!important;overflow:auto!important;overscroll-behavior:contain}
 body.tribal-portal-mode .tf-more-sheet header{position:sticky;top:-16px;z-index:2;min-height:48px;margin:-16px -16px 12px!important;padding:14px 16px 10px!important;background:inherit;border-bottom:1px solid rgba(255,255,255,.12)}
 body.tribal-portal-mode .tf-more-sheet header strong{font-size:19px!important}
 body.tribal-portal-mode .tf-more-sheet header button{width:auto!important;min-width:72px!important;min-height:38px!important;padding:7px 12px!important}
 body.tribal-portal-mode .tf-more-sheet nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 body.tribal-portal-mode .tf-more-sheet nav .tf-more-group{grid-column:1/-1;margin:10px 2px 0;color:#91a2b5;font-size:10px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}
 body.tribal-portal-mode .tf-more-sheet nav .tf-more-group:first-child{margin-top:0}
 body.tribal-portal-mode .tf-more-sheet nav a{box-sizing:border-box;display:flex!important;align-items:center!important;min-width:0!important;min-height:46px!important;padding:10px 12px!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:10px!important;background:rgba(255,255,255,.07)!important;color:#f3f7fb!important;font-size:13px!important;font-weight:750!important;line-height:1.25!important;text-shadow:0 1px 1px rgba(0,0,0,.16);overflow-wrap:anywhere}
 body.tribal-portal-mode .tf-more-sheet nav a[aria-current=page]{border-color:#ff6a13!important;background:#fff1e8!important;color:#8f3500!important}
 body.tribal-portal-mode .tf-more-sheet nav a:hover,body.tribal-portal-mode .tf-more-sheet nav a:focus-visible{border-color:rgba(255,106,19,.8)!important;background:rgba(255,255,255,.13)!important;color:#fff!important;outline:2px solid #ff6a13;outline-offset:1px}
 body.tribal-portal-mode .tf-more-sheet nav a[aria-current=page]:hover,body.tribal-portal-mode .tf-more-sheet nav a[aria-current=page]:focus-visible{background:#fff1e8!important;color:#7a2d00!important}
 body.tribal-portal-mode .tf-more-account{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 0;padding:13px 2px 0;border-top:1px solid rgba(255,255,255,.12)}
 body.tribal-portal-mode .tf-more-account strong{flex:1 1 100%;overflow-wrap:anywhere}
 body.tribal-portal-mode .tf-more-sheet header strong,body.tribal-portal-mode .tf-more-account strong{color:#fff!important}
 body.tribal-portal-mode .tf-more-account a{color:#fff!important;font-size:13px;font-weight:750}
}
@media(max-width:374px){
 body.tribal-portal-mode .tf-more-sheet{inset-inline:7px!important;padding:13px!important}
 body.tribal-portal-mode .tf-more-sheet header{top:-13px;margin:-13px -13px 10px!important;padding:12px 13px 9px!important}
 body.tribal-portal-mode .tf-more-sheet nav{gap:6px!important}
 body.tribal-portal-mode .tf-more-sheet nav a{padding:9px!important;font-size:12px!important}
}
