/* Layout adapters only: colors, typography, cards, branding and navigation
   are loaded directly from the PC program's own CSS, not a second theme. */
.mobile-program main{min-width:0}.mobile-program .header-main-brand{display:flex;align-items:center}.mobile-program .header-utility-bar{display:flex}.mobile-program .web-storage-actions{display:flex;align-items:center}
.mobile-program .header-home-button{padding:0;border:0;background:transparent;cursor:pointer}.mobile-program .service-badge{display:flex;align-items:center}.mobile-program .badge-divider{width:1px}.mobile-program .badge-text{display:flex;flex-direction:column}
.mobile-program .nav-inner{display:flex}.mobile-program .nav-inner button{flex:1;white-space:nowrap}.mobile-program .nav-home-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.mobile-care-note{font-size:11px;line-height:1.8;color:#6b7769;margin:0 0 8px}.mobile-care-status{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 14px}.care-status,.care-form-state{font-size:11px;color:#6b7769}.care-alert:empty{display:none}.care-alert{padding:12px;border:1px solid #e8d3b1;border-radius:8px;background:#fff8eb;font-size:12px;line-height:1.8}
.program-care label{display:block;font-size:13px;margin-bottom:8px}.program-care label input,.program-care label select,.program-care label textarea{display:block;width:100%;margin-top:7px}.mobile-subject-fields{max-width:420px}.program-care .detail-form-grid>div{min-width:0}.program-care .care-actions{display:flex;flex-wrap:wrap;gap:8px}.program-care .care-actions button{white-space:nowrap}.program-care .journal-subject-finder{margin-bottom:18px}.program-care .journal-subject-finder select{max-width:100%}.program-care .mobile-visit-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.program-care .mobile-visit-fields>div{min-width:0}
.mobile-table-scroll{max-width:100%;overflow:auto;overscroll-behavior-x:contain;margin-top:16px}.mobile-table-scroll table{min-width:740px;width:100%;table-layout:auto}.mobile-table-scroll td{max-width:260px;overflow-wrap:anywhere;white-space:pre-wrap}.mobile-table-scroll th{white-space:nowrap}.mobile-table-scroll .care-actions{min-width:145px}.care-empty td{text-align:center;padding:36px 16px;color:#7c8979}.program-care .app-search-field input{min-width:0;width:100%}
.mobile-program #tab-dashboard .dashboard-hero-slide{position:absolute;inset:0;display:flex;align-items:center;gap:26px;padding:20px 30px}.mobile-program #tab-dashboard .dashboard-hero-copy{max-width:calc(100% - 150px)}.mobile-program #tab-dashboard .dashboard-primary-row>.card{height:auto;min-height:210px}.mobile-program #tab-dashboard .mobile-pc-only{font-size:19px}.mobile-home-record{padding:13px 0;border-bottom:1px solid #e6ebe4}.mobile-home-record>span{float:right;font-size:11px;color:#71816b}.mobile-home-record strong{font-size:13px}.mobile-home-record p{font-size:12px;margin:6px 0 0;overflow-wrap:anywhere}.mobile-empty{padding:24px 0;text-align:center;font-size:12px}.mobile-program .dashboard-overview-clock{flex-shrink:0}.mobile-program .dashboard-live-date{font-size:11px}.mobile-program #mobile-live-time{font-size:16px}
@media(max-width:760px){body.mobile-program .brand-header{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'brand storage';gap:10px;padding:12px}.mobile-program .brand-header .header-main-brand{flex-direction:row!important;justify-content:flex-start!important;gap:10px!important}.mobile-program .brand-header .header-home-button{width:116px!important}.mobile-program .brand-header .header-main-logo{height:42px!important}.mobile-program .brand-header .header-utility-bar{width:auto!important;flex-direction:row!important}.mobile-program .brand-header .orangefarm-header-link{display:none}.mobile-program .brand-header .web-storage-actions{display:flex!important;width:auto!important}.mobile-program .brand-header .settings-launch-button{font-size:0!important;padding:8px!important}.mobile-program .brand-header .settings-launch-button .bi{font-size:20px}.mobile-program .nav-inner button{flex:0 0 auto}.mobile-program #tab-dashboard .kpi{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mobile-program #tab-dashboard .kpi>div{padding:16px 14px;min-height:104px}.mobile-program #tab-dashboard .two-col{grid-template-columns:1fr}.mobile-program #tab-dashboard .dashboard-hero-slide{padding:18px;gap:12px}.mobile-program #tab-dashboard .dashboard-overview-clock{display:none}.mobile-program #tab-dashboard .dashboard-hero-copy{max-width:78%}.mobile-program #tab-dashboard .dashboard-hero h1{font-size:23px}.mobile-program #tab-dashboard .dashboard-hero p{font-size:11px;line-height:1.7}.mobile-program #tab-dashboard .dashboard-hero-watermark{width:96px;opacity:.45}.program-care .mobile-visit-fields,.program-care .detail-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.program-care input,.program-care select,.program-care textarea{font-size:16px;min-height:44px;min-width:0}.program-care .flex-between{align-items:stretch;flex-direction:column;gap:12px}.program-care .card{padding:18px 14px}.mobile-care-note{font-size:10px}.mobile-home-record>span{float:none;display:block;margin-top:4px}.mobile-program .warning{font-size:10px}.mobile-program footer{padding-bottom:calc(18px + env(safe-area-inset-bottom))}}
@media(max-width:360px){.program-care .mobile-visit-fields,.program-care .detail-form-grid{grid-template-columns:1fr}.mobile-program .brand-header .service-badge{padding:4px!important;gap:4px!important}.mobile-program .brand-header .header-home-button{width:102px!important}}
@media(prefers-reduced-motion:reduce){.mobile-program *{scroll-behavior:auto!important}}

/* Minimal mobile workflow: only synced work, bounded lists and optional editors. */
.mobile-program #tab-dashboard .kpi{grid-template-columns:repeat(2,minmax(0,1fr))}
.mobile-program #tab-dashboard .dashboard-primary-row{grid-template-columns:minmax(0,1fr)}
.mobile-program #tab-dashboard .dashboard-primary-row>.card{min-height:0}
.mobile-program #tab-dashboard .kpi>.kpi-link{min-height:100px;padding:18px 20px}
.mobile-program #tab-dashboard .kpi .kpi-illustration{display:none}
.mobile-program #tab-dashboard .kpi .num{font-size:28px!important}.mobile-program #tab-dashboard .kpi .lbl{margin-top:7px;padding-right:25px}
.mobile-program #tab-dashboard .dashboard-hero{min-height:128px;height:128px}
.mobile-program #tab-dashboard .mobile-home-record p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mobile-program .sync-status{margin:6px 0 12px}.mobile-program .sync-status .btn{min-height:32px;font-size:11px;padding:5px 10px}
.mobile-program .care-status:not(.is-error){display:none}.mobile-program .care-status.is-error{padding:10px;border:1px solid #e8d3b1;background:#fff8eb;border-radius:8px;color:#805e37}
.mobile-program .mobile-care-status{margin:0;display:block}.mobile-program .care-form-state:empty{display:none}
.mobile-editor-shell{margin:0 0 16px;border:1px solid #dfe6df;border-radius:12px;background:#fff;overflow:clip}
.mobile-editor-shell>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;color:#365932;font-size:14px;font-weight:700;list-style:none;cursor:pointer}
.mobile-editor-shell>summary::-webkit-details-marker{display:none}.mobile-editor-shell[open]>summary{border-bottom:1px solid #e3e9e0}.mobile-editor-shell[open]>summary>.bi{transform:rotate(45deg)}
.program-care .mobile-editor-shell>form.card{margin:0;border:0!important;box-shadow:none;border-radius:0;padding:16px 18px}
.mobile-editor-shell>form>.workspace-eyebrow,.mobile-editor-shell>form>h2{display:none}
.mobile-program .mobile-list-tools{margin:12px 0}.mobile-list-tools>.app-search-field{width:100%;max-width:none!important}
.mobile-list-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;font-size:12px;color:#6c7868}
.program-care .mobile-list-meta label{display:flex;align-items:center;gap:6px;margin:0;font-size:11px;font-weight:400}
.program-care .mobile-list-meta select{width:76px;min-height:34px;font-size:12px;padding:5px 8px;margin:0}
.mobile-pagination{display:flex;align-items:center;justify-content:center;gap:18px;border-top:1px solid #e5eae1;margin-top:12px;padding-top:14px}
.mobile-pagination>span{font-size:12px;color:#6c7868}.mobile-pagination button{min-width:66px;min-height:38px}.mobile-pagination button:disabled{opacity:.4;cursor:default}
.mobile-program .mobile-table-scroll td{max-width:240px}.mobile-program .mobile-table-scroll .care-actions{gap:5px}.mobile-program .mobile-table-scroll .care-actions .btn{padding:5px 9px}
.mobile-program footer{font-size:10px;color:#78826f;padding:14px;background:transparent;border-top:0}
body.mobile-program>nav .nav-inner{justify-content:flex-start}body.mobile-program>nav .nav-inner button{flex:0 0 auto;min-width:140px}
@media(max-width:760px){body.mobile-program>nav .nav-container{padding:6px 10px;overflow:visible}body.mobile-program>nav .nav-inner{width:100%;min-width:0;padding:0;gap:5px}body.mobile-program>nav .nav-inner button{flex:1;min-width:0;padding:9px 5px;font-size:14px}.mobile-program #tab-dashboard{gap:12px}.mobile-program #tab-dashboard .kpi>.kpi-link{padding:16px 14px;min-height:96px}.mobile-program #tab-dashboard .card{padding:16px 14px}.mobile-program #tab-dashboard .card h2{font-size:15px}.mobile-program .mobile-editor-shell{margin-bottom:12px}.mobile-program .mobile-editor-shell>summary{padding:14px}.mobile-program .mobile-table-scroll td{font-size:12px}.mobile-program .warning{padding:7px 10px}.mobile-list-tools .app-search-field input{min-height:40px}.mobile-program .mobile-home-record p{font-size:11px}.mobile-program .mobile-home-record{padding:11px 0}.mobile-program .mobile-empty{padding:12px 0}.mobile-program #tab-dashboard .flex-between{display:flex;flex-direction:row;align-items:center;gap:8px}.mobile-program #tab-dashboard .flex-between h2{flex:1}.mobile-program #tab-dashboard .flex-between .btn{font-size:10px;white-space:nowrap}.mobile-pagination{gap:14px}}
.mobile-cell-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;max-width:240px}

/* Home cards share the PC's cream heading strip without shrinking touch targets. */
body.mobile-program #tab-dashboard .mobile-dashboard-card{--mobile-heading-background:#fcfaf6;padding:0!important;overflow:hidden;border:1px solid #e8e3d9}
body.mobile-program #tab-dashboard .mobile-dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:53px;padding:8px 14px;box-sizing:border-box;background:var(--mobile-heading-background);border-bottom:1px solid #e8e3d9}
body.mobile-program #tab-dashboard .mobile-dashboard-heading h2{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0;flex:1;margin:0;padding:0;border:0;font-size:15px;line-height:1.6}
body.mobile-program #tab-dashboard .mobile-dashboard-heading h2>.bi{flex:none;font-size:18px}
body.mobile-program #tab-dashboard .mobile-dashboard-heading h2>span:not(.dashboard-section-count){word-break:keep-all}
body.mobile-program #tab-dashboard .mobile-dashboard-heading>button{flex:none;white-space:nowrap}
body.mobile-program #tab-dashboard .mobile-dashboard-body{padding:16px 14px}
.mobile-dashboard-guide{margin:0 0 12px;font-size:12px;line-height:1.7;color:#737d89}
body.mobile-program #mobile-schedule-list .dashboard-empty-state{display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:160px;padding:20px 14px;border:1px solid #dfe6df;border-radius:8px;background:#f7faf8;box-sizing:border-box;text-align:center}
body.mobile-program #mobile-schedule-list .dashboard-empty-state strong{font-size:13px;color:#4f5d54}
body.mobile-program #mobile-schedule-list .dashboard-empty-state span{font-size:12px;color:#77817c}

/* Native mobile inputs must fit their grid cells, including iOS date controls. */
body.mobile-program{min-height:100svh;padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.mobile-program .mobile-editor-shell{overflow:visible;min-width:0}
.mobile-program .program-care .mobile-subject-fields{grid-template-columns:minmax(0,1fr);width:100%;max-width:420px}
.mobile-program .program-care :is(.journal-care-card,.journal-subject-finder,.mobile-visit-fields,.detail-form-layout,.detail-form-grid,[data-mobile-field],label){min-width:0;max-width:100%;box-sizing:border-box}
.mobile-program .program-care :is(input,select,textarea){min-width:0;min-inline-size:0;max-width:100%;max-inline-size:100%;box-sizing:border-box}
.mobile-program .program-care input:is([type="date"],[type="time"],[type="datetime-local"]){display:block;width:100%;inline-size:100%;min-width:0;min-inline-size:0;max-width:100%;height:48px;min-height:48px;line-height:1.4;padding:10px 12px;-webkit-appearance:none;appearance:none;text-align:left}
.mobile-program input::-webkit-date-and-time-value{min-width:0;min-inline-size:0;text-align:left;min-height:1.4em;line-height:1.4;margin:0}
.mobile-program input::-webkit-datetime-edit{min-width:0;padding:0}
.mobile-program input::-webkit-datetime-edit-fields-wrapper{padding:0}
.mobile-program .workspace-head>div{min-width:0;overflow-wrap:anywhere}
.mobile-program .workspace-head>button{flex-shrink:0}
.mobile-program .mobile-table-hint{display:none}
@media(max-width:1024px){
  .mobile-program{ -webkit-text-size-adjust:100%;text-size-adjust:100% }
  .mobile-program :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea){font-size:16px;line-height:1.4;min-width:0;min-inline-size:0;max-width:100%;box-sizing:border-box}
  .mobile-program .program-care :is(input,select),.mobile-program :is(#auth-form,#pair-form) input{height:48px;min-height:48px;line-height:1.4;padding:10px 12px}
  .mobile-program .program-care textarea{min-height:128px;resize:vertical;padding:12px}
  .mobile-program .program-care label{width:100%;margin-bottom:10px;line-height:1.5;overflow-wrap:anywhere}
  .mobile-program .program-care :is(.mobile-visit-fields,.detail-form-grid){grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:14px 12px}
  .mobile-program .program-care .mobile-visit-fields>[data-mobile-field="date"],.mobile-program .program-care .mobile-visit-fields>[data-mobile-field="recheck"]{grid-column:1 / -1}
  .mobile-program .program-care .journal-subject-finder select{display:block;width:100%;max-width:100%;min-width:0;line-height:1.4;text-overflow:ellipsis}
  .mobile-program .program-care .mobile-list-meta label{width:auto;margin:0;white-space:nowrap}
  .mobile-program .program-care .mobile-list-meta select{width:86px;min-height:44px;height:44px;font-size:16px;padding:8px}
  body.mobile-program .brand-header .header-home-button{min-height:44px}
  body.mobile-program .brand-header .settings-launch-button{min-width:44px!important;min-height:44px!important}
  body.mobile-program>nav .nav-inner button{min-height:44px!important}
  .mobile-program :is(.btn,.btn.small,.btn.mini,button,summary){min-height:44px;min-width:44px}
  .mobile-program .mobile-editor-shell>summary{display:flex;align-items:center;min-height:52px}
  .mobile-program .mobile-table-hint{display:block;color:#73806b;font-size:11px;line-height:1.6;margin:8px 0}
  .mobile-program .mobile-table-scroll{scroll-padding-inline:12px;-webkit-overflow-scrolling:touch}
  .mobile-program footer{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  .mobile-program .mobile-editor-shell>form.card{padding:16px 14px;border-radius:0 0 12px 12px}
  .mobile-program .program-care :is(input,select,textarea){scroll-margin-block:80px}
}
@media(max-width:600px){
  .mobile-program .program-care :is(.mobile-visit-fields,.detail-form-grid){grid-template-columns:minmax(0,1fr)}
  .mobile-program .program-care .journal-care-card{padding:14px 12px}
  .mobile-program .program-care .mobile-visit-fields{gap:4px}
  .mobile-program .workspace-head{flex-wrap:wrap}
  .mobile-program .workspace-head>div{flex:1 1 200px}
  .mobile-program .program-care .care-actions{gap:8px}
  .mobile-program .program-care .care-actions>.btn{white-space:normal}
}

/* Shared desktop identity fields, adapted to narrow touch screens. */
.mobile-program .program-care .mobile-identity-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:5px;border:1px solid #dfe7d9;background:#f3f6ef;border-radius:12px;margin:16px 0}
.mobile-program .program-care .mobile-identity-mode button{width:100%;min-width:0;min-height:46px;padding:10px 8px;white-space:normal;font-size:14px;border:0;border-radius:8px;background:transparent;color:#63715b;box-shadow:none}
.mobile-program .program-care .mobile-identity-mode button[aria-pressed="true"]{background:#fff;color:#465b37;font-weight:700;box-shadow:0 2px 8px #40552b0d}
.mobile-program .program-care .mobile-identity-mode button:disabled{opacity:.6}
.mobile-program .program-care .mobile-identity-mode button:focus-visible{outline:2px solid #87a66e;outline-offset:2px}
.mobile-program .program-care .mobile-subject-fields,.mobile-program .program-care .mobile-identity-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:none;width:100%}
.mobile-program .program-care .mobile-identity-fields>[data-mobile-field]{grid-column:auto}
.mobile-program .program-care [data-visit-identity]{margin:16px 0;min-width:0}
.mobile-program .program-care .mobile-field-help{display:block;margin:7px 0 0;color:#77816f;font-size:12px;font-weight:400;line-height:1.6}
.mobile-program .program-care [data-custom]{margin-top:8px}
.mobile-program .program-care [hidden]{display:none!important}
.mobile-program .program-care .mobile-subject-details{margin:16px 0}
.mobile-program .program-care .mobile-subject-details summary{min-height:44px;display:flex;align-items:center}
.mobile-program .program-care .mobile-subject-details [data-mobile-field="note"],.mobile-program .program-care .mobile-subject-details [data-mobile-field="risks"],.mobile-program .program-care .mobile-subject-details [data-mobile-field="etc"]{grid-column:1 / -1}
.mobile-program .program-care .journal-subject-finder{padding:16px;min-width:0}
.mobile-program .program-care .journal-subject-finder>strong{display:block;margin-bottom:12px}
@media(max-width:600px){.mobile-program .program-care .mobile-subject-fields,.mobile-program .program-care .mobile-identity-fields{grid-template-columns:minmax(0,1fr);gap:4px}.mobile-program .program-care .journal-subject-finder{padding:14px 12px}}

/* Five mobile sections keep touch targets instead of squeezing their labels. */
body.mobile-program>nav .nav-container{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;scroll-padding:12px;-webkit-overflow-scrolling:touch;position:relative}
body.mobile-program>nav .nav-container::-webkit-scrollbar{display:none;width:0;height:0}
body.mobile-program>nav .nav-inner{display:flex;flex-wrap:nowrap;width:max-content;min-width:100%;gap:6px;padding:0}
body.mobile-program>nav .nav-inner button{flex:1 0 auto;width:auto;min-width:110px;white-space:nowrap;padding:12px 16px}
body.mobile-program #tab-dashboard .dashboard-hero-slide{display:none!important}
body.mobile-program #tab-dashboard .dashboard-hero-slide.is-active{display:flex!important;opacity:1!important;transform:none!important;animation:none!important;transition:none;pointer-events:auto}
body.mobile-program #tab-dashboard .dashboard-hero-slide.is-active .dashboard-hero-copy,
body.mobile-program #tab-dashboard .dashboard-hero-slide.is-active .dashboard-hero-copy>*{opacity:1!important;transform:none!important;animation:none!important;transition:none}
.mobile-banner-controls{display:flex;justify-content:center;align-items:center;gap:5px;margin:6px 0 14px;flex-wrap:wrap}
.mobile-banner-controls button{min-width:32px;min-height:36px;padding:4px 9px}
.mobile-banner-controls [aria-current="true"]{background:#568441;color:#fff;border-color:#568441}
.mobile-extra-record{border-bottom:1px solid #dfe7df;padding:18px 0;overflow-wrap:anywhere}
.mobile-extra-record p{white-space:pre-wrap;margin:8px 0}
.mobile-extra-record h3{font-size:18px;margin:0 0 8px}
.mobile-extra-record details{margin:10px 0}
.mobile-extra-record .care-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.mobile-emergency-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.mobile-emergency-fields label{display:flex;flex-direction:column;gap:7px;font-weight:600;min-width:0}
.mobile-emergency-fields input,.mobile-emergency-fields textarea{box-sizing:border-box;width:100%;font:inherit;font-size:16px;padding:11px;border:1px solid #cdd8cf;border-radius:8px}
.mobile-emergency-fields input[type="checkbox"]{width:22px;height:22px;accent-color:#568441}
#mobile-extra-workspace [hidden]{display:none!important}
#mobile-extra-status:empty{display:none}
@media(max-width:600px){.mobile-emergency-fields{grid-template-columns:1fr}body.mobile-program>nav .nav-inner button{min-width:106px;font-size:15px;padding:11px 13px}.mobile-program #tab-dashboard .dashboard-hero{min-height:156px}.mobile-program .dashboard-hero-copy h1{font-size:20px}.mobile-program .dashboard-hero-copy p{font-size:12px;line-height:1.55}}
@media(prefers-reduced-motion:reduce){body.mobile-program>nav .nav-container{scroll-behavior:auto}}

/* PC record workspaces: retain the section identity on touch screens. */
#mobile-tab-emergency{--record-accent:#c95852;--record-tint:#fff8f7;--record-border:#ead6d4}
#mobile-tab-trash{--record-accent:#292d32;--record-tint:#f3f4f5;--record-border:#d9dde1}
#mobile-extra-workspace{min-width:0}
#mobile-extra-workspace .card{min-width:0;border-top:1px solid #dfe6df}
#mobile-tab-emergency .emergency-list-card,#mobile-tab-trash>.card{border-top:3px solid var(--record-accent)}
#mobile-extra-workspace h2::before{background:var(--record-accent)!important}
#mobile-extra-workspace .workspace-eyebrow{color:var(--record-accent);font-size:11px;letter-spacing:.12em}
#mobile-extra-workspace .mobile-editor-shell{border:1px solid #dfe6df}
#mobile-extra-workspace .mobile-editor-shell>summary{color:var(--record-accent);background:#fff}
#mobile-extra-workspace .mobile-editor-shell>form{margin:0;padding:20px;border:0;box-shadow:none;border-radius:0 0 12px 12px}
#mobile-tab-emergency .emergency-form-card::before{display:none}
#mobile-tab-emergency .emergency-primary-fields{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);max-width:none;margin:0 0 16px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#mobile-tab-emergency .mobile-emergency-narrative{display:grid;gap:14px;margin-bottom:16px}
#mobile-tab-emergency .emergency-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:13px;font-weight:600}
#mobile-tab-emergency .emergency-field input,#mobile-tab-emergency .emergency-field textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box;border:1px solid #d7deda;border-radius:8px;padding:11px;font:inherit;font-size:16px}
#mobile-tab-emergency .emergency-field textarea{min-height:96px;resize:vertical}
#mobile-tab-emergency .workspace-detail-fields{border-color:#e5dddd;margin:16px 0}
#mobile-tab-emergency .workspace-detail-fields>summary{color:#9b403c;background:#fffafa}
#mobile-tab-emergency .emergency-status-options{grid-template-columns:repeat(4,minmax(0,1fr))}
#mobile-tab-emergency .emergency-status-options span{min-height:44px}
#mobile-tab-emergency .emergency-status-options input:checked+span{border-color:#cf6963;background:#fff1f0;color:#9e3935}
#mobile-tab-emergency button[type="submit"]{background:#bd514b;border-color:#a94440;color:#fff}
#mobile-extra-workspace .mobile-table-scroll{overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--record-border);border-radius:10px}
#mobile-extra-workspace table{width:100%;margin:0;border-collapse:collapse}
#mobile-extra-workspace th{background:var(--record-tint);white-space:nowrap;border-top-color:var(--record-accent)}
#mobile-extra-workspace th,#mobile-extra-workspace td{padding:13px 12px;text-align:left;vertical-align:middle}
#mobile-extra-workspace td{border-bottom:1px solid #e4e8e5;white-space:normal;overflow-wrap:anywhere}
#mobile-extra-workspace .emergency-table-wrap table{min-width:1000px}
#mobile-extra-workspace .trash-table{display:table;min-width:0;width:100%;table-layout:fixed}
#mobile-extra-workspace .trash-table th:nth-child(1){width:25%}
#mobile-extra-workspace .trash-table th:nth-child(2){width:19%}
#mobile-extra-workspace .trash-table th:nth-child(3){width:34%}
#mobile-extra-workspace .trash-table th:nth-child(4){width:22%}
#mobile-extra-workspace .trash-table th,#mobile-extra-workspace .trash-table td{min-width:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
#mobile-extra-workspace .record-actions{display:flex;gap:6px;flex-wrap:nowrap}
#mobile-extra-workspace .record-actions button{white-space:nowrap;min-height:40px}
#mobile-extra-workspace .empty{text-align:center;padding:32px;color:#6b7280}
.mobile-record-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin:18px 0}
.mobile-record-filters label{display:flex;flex-direction:column;gap:6px;flex:1 1 130px;min-width:0;margin:0;font-size:12px;font-weight:600}
.mobile-record-filters>button{align-self:end;height:44px;min-height:44px;margin:0;box-sizing:border-box}
.mobile-record-filters .mobile-filter-search{flex:2 1 220px}
.mobile-record-filters input,.mobile-record-filters select{width:100%;min-width:0;max-width:100%;height:44px;box-sizing:border-box;border:1px solid #d6ddd7;border-radius:8px;padding:9px;font:inherit;font-size:16px;background:#fff}
#mobile-extra-workspace .mobile-record-filters input,#mobile-extra-workspace .mobile-record-filters select,#mobile-extra-workspace .mobile-record-filters>button,#mobile-extra-workspace .mobile-filter-tail>button{height:48px!important;min-height:48px!important;margin:0!important;box-sizing:border-box}
.mobile-filter-tail{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;flex:1 1 240px;min-width:0}
#mobile-tab-trash .trash-note{padding:12px 14px;border:1px solid #d9dde1;border-radius:8px;background:#f3f4f5;color:#454b52;line-height:1.7;font-size:13px}
#mobile-tab-trash .trash-kind{display:inline-block;white-space:nowrap;font-size:12px;font-weight:700;color:#353b42;background:#f3f4f5;border:1px solid #d9dde1;border-radius:6px;padding:4px 7px}
#mobile-tab-trash .trash-description strong,#mobile-tab-trash .trash-description small{display:block;overflow-wrap:anywhere}
#mobile-tab-trash .trash-description small{margin-top:6px;color:#6b7280;font-size:12px}
#mobile-tab-trash .trash-row-actions button{white-space:nowrap}
#mobile-tab-trash .trash-row-actions{display:flex;flex-wrap:wrap;gap:6px}
/* Keep the navigation underline fixed while the menu scrolls horizontally. */
body.mobile-program>nav#mobile-bottom-nav{border-bottom:2px solid var(--of-green,#4c9c3d)}
body.mobile-program>nav#mobile-bottom-nav .nav-container::after{content:none}
body.mobile-program #mobile-bottom-nav .nav-inner button[data-program-tab]{transition:none}
body.mobile-program #tab-dashboard .kpi>div{animation:none!important;opacity:1!important;visibility:visible;transform:none!important}
.mobile-record-dialog{--record-accent:#568441;--record-tint:#f4f8f1;width:min(820px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);box-sizing:border-box;overflow:auto;padding:24px;border:1px solid #dce5df;border-top:4px solid var(--record-accent);border-radius:14px;background:#fff;color:#293c3a;overscroll-behavior:contain}
.mobile-record-dialog[data-theme="emergency"]{--record-accent:#c95852;--record-tint:#fff8f7}
.mobile-record-dialog[data-theme="trash"]{--record-accent:#292d32;--record-tint:#f3f4f5}
.mobile-record-dialog::backdrop{background:rgba(24,39,49,.45)}
.mobile-record-dialog>header,.mobile-record-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mobile-record-dialog>header{border-bottom:1px solid #e4e9e5;padding-bottom:14px;margin-bottom:16px}
.mobile-record-dialog>header h2{font-size:20px;margin:0;overflow-wrap:anywhere;color:var(--record-accent)}
.mobile-record-dialog>header button{flex-shrink:0}
.mobile-record-dialog>footer{justify-content:flex-end;border-top:1px solid #e4e9e5;margin-top:20px;padding-top:16px}
.mobile-record-dialog .mobile-detail-note{background:var(--record-tint);padding:12px;border-radius:8px;font-size:12px;line-height:1.7;color:#657066}
.mobile-record-dialog .detail-form-group{margin:16px 0;padding:16px;border:1px solid #e1e6e2;border-radius:10px}
.mobile-record-dialog .detail-form-group h3{margin:0 0 14px;color:var(--record-accent);font-size:14px}
.mobile-record-dialog .subject-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}
.mobile-record-dialog .subject-detail-item{min-width:0;padding:0;border:0;background:transparent}
.mobile-record-dialog dt{display:block;margin-bottom:5px;font-size:12px;color:#6b7870}
.mobile-record-dialog dd{display:block;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:14px;font-weight:500}
.mobile-program .care-actions .delete-action-btn,.mobile-record-dialog .delete-action-btn{color:#b34740;background:#fff8f7;border-color:#e3b8b3}
.mobile-program .mobile-table-scroll .care-actions{flex-wrap:wrap;min-width:166px}
.mobile-program .mobile-table-scroll .care-actions button{white-space:nowrap}
@media(max-width:600px){
  #mobile-extra-workspace .card{padding:18px 14px}
  #mobile-extra-workspace .mobile-editor-shell>form{padding:16px 14px}
  #mobile-tab-emergency .emergency-primary-fields{grid-template-columns:minmax(0,1fr);padding:0;gap:14px}
  #mobile-tab-emergency .mobile-emergency-fields{grid-template-columns:minmax(0,1fr)}
  #mobile-tab-emergency .emergency-status-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  #mobile-tab-emergency input[type="datetime-local"],.mobile-record-filters input[type="date"]{-webkit-appearance:none;appearance:none;inline-size:100%;min-inline-size:0;max-inline-size:100%;min-height:48px}
  .mobile-record-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .mobile-record-filters .mobile-filter-search{grid-column:1 / -1}
  .mobile-record-filters .mobile-filter-tail{grid-column:1 / -1;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  #mobile-extra-workspace .trash-table th,#mobile-extra-workspace .trash-table td{padding:12px 6px;font-size:12px}
  #mobile-tab-trash .trash-kind{white-space:normal;padding:4px;font-size:11px}
  #mobile-tab-trash .trash-row-actions{min-width:0;width:100%;max-width:100%}
  body.mobile-program #mobile-tab-trash .trash-row-actions button.btn{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px;padding:8px 4px!important;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere;font-size:12px;line-height:1.5}
  #mobile-extra-workspace .record-actions{flex-direction:column;min-width:64px}
  #mobile-extra-workspace .record-actions button{min-height:44px}
  .mobile-record-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:16px 12px}
  .mobile-record-dialog .subject-detail-grid{grid-template-columns:minmax(0,1fr);gap:14px}
  .mobile-record-dialog>header h2{font-size:18px}
  .mobile-record-dialog button{min-height:44px}
}
