/* Loaded last: one consistent small-screen layout across all practice modules. */
.mobile-menu-toggle,.mobile-bottom-nav,.mobile-location-days{display:none}
.mobile-menu-dialog .mobile-account{display:grid;gap:5px;padding:2px 0 18px;border-bottom:1px solid var(--border)}
.mobile-account strong{color:var(--navy);font-size:18px}.mobile-account span{color:var(--muted);font-size:13px}
.mobile-menu-links{display:grid;gap:20px;padding:20px 0}
.mobile-menu-links .nav-section{display:grid;gap:4px}
.mobile-menu-links .nav-section-label{display:block;font-size:11px;padding:0 10px 6px}
.mobile-menu-links .nav-item{width:100%;min-height:48px;font-size:15px;padding:12px;white-space:normal;text-align:left}
.mobile-menu-links .nav-item.active{background:var(--sky);color:var(--navy)}
.mobile-account-actions{border-top:1px solid var(--border);padding-top:18px;display:flex;gap:12px;flex-wrap:wrap}
.mobile-menu-dialog{max-width:460px}

@media(max-width:900px){
  html{scroll-padding-top:76px;scroll-padding-bottom:100px}
  body{font-size:15px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  .shell{display:block;min-width:0}
  .main{margin-left:0;min-width:0;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  .sidebar{position:relative;inset:auto;width:100%;height:auto;min-height:72px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));border:0;border-top:4px solid var(--navy);border-bottom:1px solid var(--border)}
  .sidebar .brand{max-width:calc(100% - 60px);margin:0;gap:8px}
  .sidebar .brand-logo{width:48px;height:40px;flex-basis:48px;padding:2px}
  .sidebar .brand-copy strong{font-size:15px;line-height:1.15}
  .sidebar .brand .brand-copy small{font-size:9px;line-height:1.25;margin-top:3px}
  .sidebar>.practice-nav,.sidebar>.sidebar-bottom{display:none!important}
  .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;background:var(--tint);border:1px solid var(--border);color:var(--navy)}
  .mobile-menu-toggle .icon{width:23px;height:23px}
  .topbar,.schedule-shell .topbar{height:auto;min-height:58px;border-top:0;padding:6px 16px;gap:8px;flex-wrap:nowrap;align-items:center}
  .topbar>span{font-size:14px;min-width:0;overflow-wrap:anywhere}
  .topbar>div{gap:4px;flex-shrink:0}
  .topbar .breadcrumb-prefix,.topbar .today,.topbar .role-label{display:none}
  .topbar .icon-button{width:44px;height:44px}
  .topbar .push-nav-button{font-size:13px;padding:8px 12px;min-height:44px}
  .mobile-bottom-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left));border-top:1px solid var(--border);background:#fff;box-shadow:0 -4px 24px #0d304708}
  .mobile-bottom-nav button{border:0;background:transparent;min-width:0;min-height:52px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:var(--muted);font-size:11px;font-weight:650;padding:6px 2px}
  .mobile-bottom-nav .icon{width:22px;height:22px}
  .mobile-bottom-nav button.active{background:var(--sky);color:var(--navy)}
  .shell:has(input:focus,textarea:focus,select:focus) .mobile-bottom-nav{display:none}
  .content,.schedule-content{padding:22px 16px;min-height:0;min-width:0}
  .content>*,.card,.page-heading>*,.heading-actions{min-width:0;max-width:100%}
  .page-heading,.schedule-content .page-heading{margin-bottom:20px;gap:12px;align-items:flex-start;flex-wrap:wrap}
  .page-heading h1,.schedule-content .page-heading h1{font-size:28px;line-height:1.15;margin-bottom:10px;overflow-wrap:anywhere}
  .page-heading .eyebrow{font-size:10px;line-height:1.6;letter-spacing:.09em;margin-bottom:8px}
  .page-heading p{font-size:14px;line-height:1.65;max-width:none}
  .heading-actions{padding:0}.heading-actions:empty{display:none}
  .heading-actions .button{font-size:14px;min-height:44px}
  .button,.button.text,.button.secondary,.button.primary,.button.quiet{font-size:14px;min-height:44px}
  .icon-button{min-width:44px;min-height:44px}
  .card{padding:20px;border-radius:18px}
  .card-title{gap:12px;flex-wrap:wrap}.card-title h2{font-size:21px;line-height:1.3}.card-title p{font-size:14px}
  .hint,.notice,.notice.amber{font-size:13px;line-height:1.6}
  .hint{font-size:13px!important}
  .notice{gap:10px;overflow-wrap:anywhere}
  .badge{font-size:12px;line-height:1.4}.filter-tabs{flex-wrap:wrap;gap:8px}
  .filter-tabs .button{min-height:44px;font-size:14px}
  .section-heading{gap:12px;flex-wrap:wrap;align-items:center}
  .section-heading h2{font-size:23px}.section-heading>p{display:none}
  .section-heading.compact .button{font-size:14px}
  label{font-size:14px;line-height:1.4}
  input,select,textarea,.chat-compose textarea{font-size:16px!important;min-width:0;max-width:100%}
  input:not([type=checkbox]):not([type=radio]),select{min-height:46px}
  .check-label{min-height:44px;line-height:1.5;align-items:center;gap:10px}
  .check-label input[type=checkbox]{width:20px;height:20px;flex:0 0 20px}
  .form-grid{grid-template-columns:minmax(0,1fr)}
  .form-actions{gap:10px;flex-wrap:wrap}.form-actions .button{font-size:14px;flex:1 1 125px}
  dialog,dialog.wide-modal{width:calc(100% - 24px);max-width:600px;max-height:calc(100dvh - 24px);padding:0;border-radius:18px;overscroll-behavior:contain}
  .modal-header{padding:14px 18px;position:sticky;top:0;background:#fff;z-index:2;border-bottom:1px solid var(--border);gap:12px}
  .modal-header h2{font-size:20px;line-height:1.3}.modal-header .icon-button{flex-shrink:0}
  .modal-body{padding:18px}.mobile-menu-dialog .modal-body{padding:16px 18px 22px}
  dialog.mobile-menu-dialog{max-width:440px;margin:12px 12px 12px auto;max-height:calc(100dvh - 24px)}
  .mobile-menu-links .nav-item .icon{width:22px;height:22px;flex-shrink:0}
  #toast{bottom:calc(88px + env(safe-area-inset-bottom,0px));left:16px;right:16px;width:auto;max-width:none;transform:none;font-size:14px}
  #toast.visible{transform:none}
  .page-footer{padding:8px 16px 14px;font-size:12px;flex-wrap:wrap;gap:6px}.page-footer>span:last-child{display:none}

  /* The personal assignment is the first useful card; omit the desktop welcome hero. */
  .practice-hero{display:none}
  .practice-pulse{grid-template-columns:1fr;gap:10px;margin-bottom:26px}
  .practice-pulse>button{padding:15px;min-height:76px;align-items:center}
  .practice-pulse>button>span{display:flex;align-items:baseline;gap:12px}
  .practice-pulse strong{font-size:25px;margin:0}.practice-pulse small{font-size:14px;max-width:none}
  .practice-pulse>button>.icon:last-child{display:block;flex-shrink:0}
  .practice-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .practice-module{padding:18px;border-radius:18px;transform:none!important}
  .practice-module h3{font-size:17px;line-height:1.3}.practice-module>p{font-size:14px;line-height:1.6;margin-bottom:16px}
  .module-symbol{margin-bottom:14px}.module-action{font-size:13px;line-height:1.4}
  .practice-bottom,.practice-news-list{grid-template-columns:1fr;gap:18px}
  .practice-news-list .practice-news-card,.practice-news-card,.practice-next{padding:20px}
  .practice-news-card h2{font-size:21px;line-height:1.35}
  .practice-news-card>p,.practice-empty p,.next-chat p,.library-preview,.library-content{font-size:15px;line-height:1.7}
  .practice-news-meta time,.practice-news-footer>span:not(.badge),.news-admin-actions>span{font-size:12px}
  .practice-news-footer .button,.news-admin-actions>.button,.practice-next>.button{font-size:14px}
  .upcoming{flex-wrap:wrap}.upcoming strong{font-size:15px}.practice-next .upcoming small,.time-label{font-size:13px}
  .personal-day{padding:18px;margin-bottom:20px}
  .personal-day-heading{align-items:flex-start;flex-direction:column;gap:6px}
  .personal-day-heading h2{font-size:22px}.personal-day-status{font-size:15px;line-height:1.65}
  .personal-periods{display:grid;grid-template-columns:minmax(0,1fr)}
  .personal-period{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px;min-width:0}
  .personal-time{font-size:19px}.personal-place strong{font-size:18px}.personal-place span{font-size:15px}
  .personal-day-footer{gap:10px}.personal-day-footer>span{font-size:12px}.personal-day-footer .button{min-height:44px;font-size:14px}

  /* A phone gets day cards from the same plan snapshot as the desktop table. */
  .schedule-content .page-heading{margin-bottom:16px}
  .schedule-content .personal-day-heading .eyebrow,.schedule-content .personal-day-footer>span{display:none!important}
  .schedule-content .personal-day-heading h2{font-size:20px}
  .schedule-content .personal-day{padding:16px}
  .schedule-content .personal-period{gap:6px;padding:12px}
  .schedule-content .schedule-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:16px}
  .week-picker{justify-self:start;min-height:48px;align-items:center}
  .week-picker input{width:150px!important;font-size:16px!important;min-height:40px!important}
  .week-picker .icon-button{width:44px;height:44px;min-height:44px}
  .schedule-toolbar .toolbar-right{width:100%;display:flex;align-items:stretch;flex-wrap:wrap;gap:10px}
  .location-tabs{flex:1 1 100%;display:flex;flex-wrap:wrap;border-radius:16px;gap:4px}
  .location-tabs .button{flex:1 1 110px;min-height:44px;font-size:15px;padding:8px 14px}
  .segmented{display:flex;flex-wrap:wrap}.segmented .button{min-height:44px;font-size:14px}
  .location-plan{padding:0;border-radius:18px;overflow:hidden}
  .schedule-content .location-plan>.card-title{padding:18px;align-items:flex-start;gap:12px}
  .schedule-content .location-plan .card-title h2{font-size:22px}
  .schedule-content .location-plan .card-title p{font-size:13px;line-height:1.65}
  .location-plan>.table-scroll{display:none}
  .mobile-location-days{display:grid;gap:0}
  .mobile-plan-day{padding:18px;border-top:1px solid var(--border);min-width:0}
  .mobile-plan-day>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
  .mobile-plan-day h3{font-size:19px;line-height:1.3;margin:0}
  .mobile-plan-day time{font-size:14px;color:var(--muted)}
  .mobile-plan-day.today{display:block!important;background:#f0f8f7;border-left:3px solid var(--teal)}
  .mobile-plan-area+.mobile-plan-area{margin-top:18px}
  .mobile-plan-area h4{font-size:14px;color:var(--navy);line-height:1.5;display:flex;gap:8px;align-items:center;margin:0 0 9px}
  .mobile-plan-area .legend-dot{flex:0 0 7px}
  .mobile-plan-shifts{display:grid;gap:8px}
  .mobile-location-days .shift{display:grid;grid-template-columns:minmax(0,1fr);min-height:68px;width:100%;max-width:none;margin:0;padding:12px 14px;gap:4px;white-space:normal;text-align:left;overflow-wrap:anywhere;border-radius:10px}
  .mobile-location-days .shift strong{font-size:14px;line-height:1.4}
  .mobile-location-days .shift span{font-size:16px;line-height:1.4;font-weight:650}
  .mobile-location-days .shift small{font-size:12px;line-height:1.5}
  .mobile-location-days .shift.own-shift{border:2px solid var(--teal)}
  .mobile-location-days .own-shift-label{font-size:12px;font-style:normal;color:var(--teal-dark);font-weight:700}
  .mobile-location-days .shift-pause{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
  .mobile-no-shifts{font-size:14px;color:var(--muted);margin:0}
  .schedule-content .week-totals{padding:18px}.week-totals summary{font-size:15px;line-height:1.5}
  .draft-banner,.schedule-content .draft-banner{padding:16px;gap:12px;flex-wrap:wrap}
  .draft-banner>div{min-width:0}.draft-banner strong{font-size:15px}.draft-banner small,.schedule-content .draft-banner small{font-size:13px;line-height:1.65}
  .draft-banner .button{width:100%;font-size:14px;min-height:44px}
  .schedule-content .plan-information,.schedule-content .plan-information .plan-version{font-size:13px;line-height:1.6}

  .team-grid,.reports-grid,.area-location-grid,.settings-grid{grid-template-columns:minmax(0,1fr);gap:18px}
  .employee-top h2,.report-card h2{font-size:20px}.employee-top p,.employee-bottom>span,.report-meta{font-size:13px}
  .employee-bottom .button{font-size:14px}.availability-summary{font-size:13px;line-height:1.6}
  .priority-list>div{font-size:14px}.priority-list small,.priority-list b{font-size:12px}
  .report-description{font-size:15px;line-height:1.7}.report-comment{overflow-wrap:anywhere}
  .data-table{min-width:510px}.data-table th,.data-table td{font-size:13px;line-height:1.5}.data-table td small{font-size:12px}
  .table-scroll,.clock-table-wrap{max-width:100%;overscroll-behavior-x:contain}
  .clock-intro{align-items:flex-start;flex-direction:column;gap:10px}.clock-filter label{min-width:0}
  .clock-summary-grid{grid-template-columns:minmax(0,1fr)}
  .clock-table{min-width:490px}.clock-pages{gap:10px;flex-wrap:wrap}
  .area-row p,.area-location-heading p,.subarea-list .hint,.subarea-row small{font-size:13px;line-height:1.6}
  .subarea-row>div:first-child{font-size:15px}.area-row-actions{gap:6px 12px}
  .area-location-heading{align-items:flex-start}.area-location-heading .button{margin-left:0}
  .preference-fields>div{flex-wrap:wrap;gap:8px}.preference-fields select{width:100%;max-width:100%}
  .days{flex-wrap:wrap;gap:6px}.days span{width:38px;height:44px;font-size:13px}
  .library-filters{padding:18px;gap:14px;flex-wrap:wrap}.library-filters label,.library-filters label:first-child{flex:1 1 100%}
  .library-grid{grid-template-columns:minmax(0,1fr)}.library-card{padding:20px}.library-card h2{font-size:21px}.library-card small{font-size:13px}
  .library-actions{gap:8px}.library-content{word-break:normal;overflow-wrap:anywhere}
  .push-layout{grid-template-columns:minmax(0,1fr);gap:18px}.push-layout p,.push-notice p,.push-admin p{font-size:15px}
  .push-layout .hint,.push-admin .hint{font-size:13px}.push-actions{align-items:stretch;gap:8px}
  .push-actions .button{flex:1 1 100%;text-align:center}.push-device-row{align-items:flex-start;flex-wrap:wrap}
  .push-device-row small{font-size:13px}.push-meta{font-size:12px}.push-stats{gap:16px}
  .push-receipts>div{grid-template-columns:minmax(0,1fr);gap:8px}.push-optional summary{line-height:1.6}

  .chat-card{padding:0;overflow:hidden}
  .chat-header{padding:16px;gap:10px;flex-wrap:wrap}.chat-header h2{font-size:20px}.chat-header p{font-size:12px;line-height:1.5}
  .chat-feed{height:clamp(200px,42dvh,420px);padding:18px 12px}
  .chat-message{max-width:100%;gap:8px;min-width:0}.chat-message>div{min-width:0}
  .chat-message .avatar{width:28px;height:28px;flex:0 0 28px;font-size:10px}
  .chat-message p{font-size:15px;line-height:1.65;padding:12px;overflow-wrap:anywhere}
  .chat-meta{font-size:12px;flex-wrap:wrap;gap:4px 8px}.chat-meta time{font-size:11px}
  .chat-compose{padding:14px;gap:10px;grid-template-columns:minmax(0,1fr) auto;align-items:end}
  .chat-compose textarea{min-height:76px}.chat-compose .button{font-size:14px;min-height:46px;padding:10px 13px}
  .chat-compose small{font-size:12px;line-height:1.5}
  .login-page{grid-template-columns:minmax(0,1fr)}
  .login-story{padding:20px;min-height:0;border-right:0;border-bottom:1px solid var(--border)}
  .login-story>div:nth-child(2),.login-features,.login-footer{display:none}
  .login-story .brand-logo{width:60px;height:44px;flex-basis:60px}.login-story .brand-copy strong{font-size:18px}
  .login-panel{padding:28px 20px max(32px,env(safe-area-inset-bottom));align-items:flex-start}
  .login-form{max-width:460px}.login-form h2{font-size:28px}.login-form>p{font-size:15px}.login-form label{font-size:15px}
  .login-form>.hint{font-size:13px!important}.login-form .primary{font-size:15px;min-height:50px}
  .first-password{padding:20px}.first-password .card{padding:22px}
}
@media(max-width:480px){
  .practice-module-grid{grid-template-columns:minmax(0,1fr)}
  .mobile-menu-dialog .mobile-account-actions .button{flex:1 1 100%}
  .availability-day{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .availability-day .check-label{grid-column:1/-1;margin:0}
  .work-period{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .work-period .period-number{grid-column:1/-1;padding:0}
  .work-period>.button{font-size:13px}
}
@media(max-width:360px){
  .content,.schedule-content{padding-inline:12px}.card{padding:16px}.location-plan,.chat-card{padding:0}
  .topbar,.sidebar{padding-inline:12px}.page-heading h1{font-size:26px}
  .topbar .push-nav-button{padding-inline:9px;font-size:12px}.topbar>span{font-size:13px}
  .mobile-plan-day,.schedule-content .location-plan>.card-title{padding:16px}
  .personal-time{font-size:17px}.personal-day{padding:16px}
  .chat-compose{grid-template-columns:minmax(0,1fr)}.chat-compose .button{justify-self:end}
}

.mobile-tab-icon{position:relative;display:inline-flex}
.mobile-task-count{position:absolute;top:-7px;right:-13px;min-width:17px;height:17px;padding:0 3px;border-radius:10px;background:var(--navy);color:#fff;font-size:10px;line-height:17px;font-weight:700;text-align:center}
