/* r221 — compact, continuous layouts shared by desktop and mobile. */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
html[data-m3e-theme] summary { list-style:none; }
html[data-m3e-theme] summary::-webkit-details-marker { display:none; }
html[data-m3e-theme] summary::marker { content:""; }
html[data-m3e-theme] summary::after { content:none!important; }
html[data-m3e-theme] .site-date-trigger::after { content:none!important; display:none!important; }
html[data-m3e-theme] .registration-toggle-icon,
html[data-m3e-theme] .list-toggle-state svg,
html[data-m3e-theme] .ph-caret-down,
html[data-m3e-theme] .ph-caret-up { display:none!important; }
html[data-m3e-theme] .site-date-trigger,
html[data-m3e-theme] select { background-image:none!important; }
html[data-m3e-theme] select { appearance:none; -webkit-appearance:none; }
html[data-m3e-theme] #moduleViewWorkbench .workbench-extra-filters { display:none!important; }
html[data-m3e-theme] #moduleViewWorkbench[data-workbench-view="routes"] .expressive-page-heading { display:none!important; }
html[data-m3e-theme] #moduleViewWorkbench[data-workbench-view="routes"] #dashboard-overview { display:block!important; padding:0!important; margin:0 0 8px!important; min-height:0!important; }
html[data-m3e-theme] #moduleViewWorkbench[data-workbench-view="routes"] #analysisDateSlot,
html[data-m3e-theme] #moduleViewWorkbench[data-workbench-view="routes"] #filterChips { display:none!important; }
html[data-m3e-theme] #moduleViewWorkbench[data-workbench-view="routes"] .workbench-view-switch { margin:0!important; min-height:0; }
html[data-m3e-theme] #moduleViewWorkbench #dashboard-overview .workbench-view-switch>button { padding:8px 16px; min-height:44px; font-size:14px; }
html[data-m3e-theme] #moduleViewWorkbench .mobile-shift-group { margin:12px 0 20px; min-width:0; }
.mobile-shift-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:4px 2px 10px; color:var(--md-on-surface); font-size:13px; }
.mobile-shift-heading span { white-space:nowrap; color:var(--md-muted); }
.mobile-person-stack { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
html[data-m3e-theme] #moduleViewWorkbench .mobile-person-card { width:100%; max-width:none; margin:0; }
html[data-m3e-theme] #moduleViewWorkbench .mobile-hour-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px; }
html[data-m3e-theme] #moduleViewWorkbench .mobile-person-disclosure>span[aria-hidden] { display:none; }

/* Roster: identity, date, and search occupy two short rows, never a centered masthead. */
html[data-m3e-theme] body.scheduling-page .scheduling-main { padding-top:12px!important; }
html[data-m3e-theme] body.scheduling-page .schedule-heading { display:flex; flex-direction:row; align-items:center; justify-content:space-between; text-align:left; min-height:0; gap:12px; margin:0 0 12px!important; padding:0!important; }
html[data-m3e-theme] body.scheduling-page .schedule-heading-copy { min-width:0; flex:1; }
html[data-m3e-theme] body.scheduling-page .schedule-heading h1 { font-size:24px; margin:0 0 2px; }
html[data-m3e-theme] body.scheduling-page .schedule-heading-actions { display:flex; flex-direction:row; flex-wrap:nowrap; flex:0 0 auto; justify-content:flex-end; gap:4px; width:auto; max-width:none; margin:0; }
html[data-m3e-theme] body.scheduling-page .schedule-heading-actions a,
html[data-m3e-theme] body.scheduling-page .schedule-heading-actions button { width:auto; min-height:44px; padding:8px 10px; font-size:12px; }
html[data-m3e-theme] body.scheduling-page .schedule-toolbar { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:space-between; padding:8px; margin-bottom:10px; gap:8px; }
html[data-m3e-theme] body.scheduling-page .schedule-segment { flex:1 1 240px; }
html[data-m3e-theme] body.scheduling-page #scheduleDateLabel { display:flex; align-items:center; gap:10px; min-width:0; flex:1 1 220px; margin:0; }
html[data-m3e-theme] body.scheduling-page #scheduleDateLabel input { width:150px; min-width:0; flex:1; }
html[data-m3e-theme] body.scheduling-page .schedule-filter { display:flex; flex-wrap:wrap; align-items:center; margin:0 0 12px; gap:8px; }
html[data-m3e-theme] body.scheduling-page .schedule-filter label { display:flex; align-items:center; gap:8px; flex:1 1 240px; min-width:0; }
html[data-m3e-theme] body.scheduling-page .schedule-filter input { min-width:0; width:100%; }
html[data-m3e-theme] body.scheduling-page .schedule-help { margin:0; flex:0 1 auto; }
html[data-m3e-theme] body.scheduling-page .schedule-help summary { min-height:44px; padding:0 8px; }
html[data-m3e-theme] body.scheduling-page .schedule-person-label strong { font-weight:750; }
@media(min-width:801px){
 html[data-m3e-theme] body.scheduling-page .schedule-table .schedule-person-label { display:flex; flex-direction:row; align-items:center; gap:8px; }
 html[data-m3e-theme] body.scheduling-page .schedule-table .schedule-person-label::before { content:""; width:8px; height:24px; flex:0 0 8px; border-radius:8px; background:var(--md-primary); }
 html[data-m3e-theme] body.scheduling-page .schedule-table td button { border-radius:14px; }
}

/* Personnel/route controls have real min-width:0 boundaries at every nesting level. */
html[data-m3e-theme] body #routeApp { padding:8px 12px 24px!important; }
html[data-m3e-theme] #routeApp .route-area-switch { margin:0 0 10px!important; padding:4px; }
html[data-m3e-theme] #routeApp .registration-section { margin:0; padding:16px; border-radius:26px; }
html[data-m3e-theme] #routeApp .registration-section h2 { font-size:20px; line-height:1.4; margin:0 0 12px; }
html[data-m3e-theme] #routeApp .registration-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:end; gap:10px; }
html[data-m3e-theme] #routeApp .registration-form label,
html[data-m3e-theme] #routeApp .registration-view-tools label { display:flex; flex-direction:column; gap:6px; min-width:0; width:auto; font-size:12px; color:var(--md-muted); }
html[data-m3e-theme] #routeApp .registration-form input,
html[data-m3e-theme] #routeApp .registration-form select,
html[data-m3e-theme] #routeApp .registration-view-tools input,
html[data-m3e-theme] #routeApp .registration-view-tools select { display:block; box-sizing:border-box; width:100%; min-width:0; max-width:100%; min-height:44px; height:auto; padding:10px 12px; font-size:14px; border:1px solid var(--md-outline); border-radius:16px; background:var(--md-surface); color:var(--md-on-surface); }
html[data-m3e-theme] #routeApp .registration-view-tools { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:10px; width:100%; margin:12px 0 0; }
html[data-m3e-theme] #routeApp .registration-form button { min-height:44px; margin:0; padding:10px 16px; }
html[data-m3e-theme] #registrationRouteStatus { margin:10px 0; font-size:12px; }
html[data-m3e-theme] #registrationSummary .registration-summary-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; }
html[data-m3e-theme] #registrationSummary .registration-summary-facts>div { position:relative; min-width:0; overflow:hidden; margin:0; padding:16px; border:0; border-radius:22px; background:var(--md-primary-container); color:var(--md-on-primary-container); }
html[data-m3e-theme] #registrationSummary .registration-summary-facts>div:nth-child(4n+1),
html[data-m3e-theme] #registrationSummary .registration-summary-facts>div:nth-child(4n+4) { background:var(--md-accent); color:var(--md-on-accent); }
#registrationSummary .registration-summary-facts dt { display:flex; align-items:center; justify-content:space-between; gap:6px; color:inherit; font-size:13px; }
#registrationSummary .registration-summary-facts .card-illustration { width:44px; height:38px; flex:0 0 44px; }
html[data-m3e-theme] #registrationSummary .registration-summary-facts dd { color:inherit; margin:4px 0 0; font-size:28px; line-height:1.2; font-weight:750; }
#registrationSummary .registration-summary-facts .registration-unit { font-size:12px; font-weight:500; }
#registrationSummary .registration-summary-facts small { display:block; font-size:11px; line-height:1.5; color:inherit; margin-top:6px; font-weight:400; }
html[data-m3e-theme] #registrationSummary .registration-trip-totals { padding:10px 0 0; margin:0; font-size:12px; line-height:1.5; }
html[data-m3e-theme] #routeApp .registration-help { margin:0 0 8px; padding:0; }
html[data-m3e-theme] #routeApp .registration-help summary { min-height:44px; display:flex; align-items:center; padding:0; }
html[data-m3e-theme] #registrationRoutes .person-card-detail { padding:12px; }
html[data-m3e-theme] #registrationRoutes .registration-device-section,
html[data-m3e-theme] #registrationRoutes .registration-trip-group { min-width:0; margin:12px 0 0; padding:0; }
html[data-m3e-theme] #registrationRoutes h4 { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; margin:0 0 8px; font-size:14px; }
html[data-m3e-theme] #registrationRoutes h4>span { font-size:11px; font-weight:400; color:var(--md-muted); }
html[data-m3e-theme] #registrationRoutes .registration-device-list,
html[data-m3e-theme] #registrationRoutes .registration-trip-list { list-style:none; margin:0; padding:0; min-width:0; --carousel-item-size:92%; }
html[data-m3e-theme] #registrationRoutes .registration-device-list>li,
html[data-m3e-theme] #registrationRoutes .registration-trip-list>li { box-sizing:border-box; display:block; width:100%; min-width:0; padding:12px; border:0; border-radius:18px; background:var(--md-surface); color:var(--md-on-surface); }
html[data-m3e-theme] #registrationRoutes .registration-trip-group[data-trip-tier="0"] li { background:var(--md-primary-container); color:var(--md-on-primary-container); }
html[data-m3e-theme] #registrationRoutes .registration-trip-group[data-trip-tier="1"] li { background:var(--md-accent); color:var(--md-on-accent); }
html[data-m3e-theme] #registrationRoutes li header { display:flex; align-items:center; gap:8px; margin:0 0 6px; }
html[data-m3e-theme] #registrationRoutes li header .card-illustration { width:36px; height:32px; flex:0 0 36px; }
html[data-m3e-theme] #registrationRoutes li header>div { min-width:0; }
html[data-m3e-theme] #registrationRoutes li header strong { font-size:15px; overflow-wrap:anywhere; }
html[data-m3e-theme] #registrationRoutes .registration-trip-time { display:block; margin-top:2px; font-size:11px; color:inherit; }
html[data-m3e-theme] #registrationRoutes .registration-trip-list dl { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:6px 0; }
html[data-m3e-theme] #registrationRoutes li dl>div { display:block; padding:0; border:0; }
html[data-m3e-theme] #registrationRoutes li dt { font-size:11px; color:inherit; }
html[data-m3e-theme] #registrationRoutes li dd { margin:3px 0 0; font-size:13px; color:inherit; }
html[data-m3e-theme] #registrationRoutes li dd strong { font-size:20px; color:inherit; }
html[data-m3e-theme] #registrationRoutes li .trip-share { margin:0; font-size:11px; }
html[data-m3e-theme] #registrationRoutes .registration-trip-quality { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:10px; padding:5px 0 0; }
html[data-m3e-theme] #registrationRoutes .registration-device-list dl { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:6px 0; }
html[data-m3e-theme] #registrationRoutes .registration-device-list dl>div:first-child { grid-column:1/-1; display:flex; align-items:center; gap:10px; }
html[data-m3e-theme] #registrationRoutes .registration-device-list p { font-size:11px; margin:6px 0 0; }
html[data-m3e-theme] #routeApp .top-route .top-name { word-break:normal; overflow-wrap:break-word; }
@media(max-width:759px){
 html[data-m3e-theme] #routeApp .registration-form { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 html[data-m3e-theme] #routeApp .registration-form button { grid-column:1/-1; width:100%!important; margin:0!important; }
 html[data-m3e-theme] #registrationSummary .registration-summary-facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 html[data-m3e-theme] #registrationSummary .registration-summary-facts>div { padding:12px; }
 html[data-m3e-theme] #registrationSummary .registration-summary-facts dd { font-size:25px; }
 html[data-m3e-theme] #routeApp .registration-section { padding:14px 12px; }
}
@media(max-width:380px){
 html[data-m3e-theme] #routeApp .registration-view-tools { grid-template-columns:minmax(0,1fr); }
 html[data-m3e-theme] body.scheduling-page .schedule-heading-actions a { display:none; }
}

/* Profile: compact account passport + editable facts, with the real rank retained. */
html[data-m3e-theme] body.profile-v3-page .m3e-profile-page-heading { margin:0 0 14px; }
html[data-m3e-theme] body.profile-v3-page .m3e-profile-page-heading h1 { font-size:28px; margin:0 0 4px; }
html[data-m3e-theme] body.profile-v3-page .m3e-profile-page-heading p { font-size:13px; margin:0; }
html[data-m3e-theme] body.profile-v3-page .profile-identity { display:block; overflow:hidden; padding:0; border-radius:28px; background:var(--md-surface); color:var(--md-on-surface); }
html[data-m3e-theme] body.profile-v3-page .profile-identity-top { position:relative; isolation:isolate; grid-template-columns:54px minmax(0,1fr) 90px; gap:12px; padding:20px; background:var(--md-primary); color:var(--md-on-primary); border-radius:28px 28px 32px 12px; }
html[data-m3e-theme] body.profile-v3-page .profile-identity-top::before { content:""; position:absolute; z-index:-1; width:180px; height:180px; border:24px solid rgba(255,255,255,.09); border-radius:38% 62% 55% 45%; right:-36px; top:-70px; transform:rotate(22deg); pointer-events:none; }
html[data-m3e-theme] body.profile-v3-page .profile-identity-top .profile-avatar-current { width:54px; height:54px; border-radius:20px; }
html[data-m3e-theme] body.profile-v3-page .m3e-profile-identity-heading h2 { font-size:22px; margin:0 0 3px; color:inherit; }
html[data-m3e-theme] body.profile-v3-page .profile-quality-badge .quality-badge { height:60px; max-width:80px; }
html[data-m3e-theme] body.profile-v3-page .profile-quality-badge strong { font-size:12px; }
html[data-m3e-theme] body.profile-v3-page .profile-quality-badge small { font-size:10px; }
html[data-m3e-theme] body.profile-v3-page .profile-readonly-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:16px 20px 8px; gap:12px; border:0; }
html[data-m3e-theme] body.profile-v3-page .profile-readonly-grid .profile-readonly { padding:10px 12px; gap:3px; border-radius:16px; background:var(--md-surface-container); }
html[data-m3e-theme] body.profile-v3-page .profile-readonly span { color:var(--md-muted); font-size:12px; }
html[data-m3e-theme] body.profile-v3-page .profile-readonly output { color:var(--md-on-surface); font-size:15px; }
html[data-m3e-theme] body.profile-v3-page .profile-readonly:last-child { grid-column:1/-1; }
html[data-m3e-theme] body.profile-v3-page .profile-logout { display:flex; width:auto; min-height:44px; margin:0 12px 8px auto; padding:8px 14px; color:var(--md-primary); background:transparent; }
html[data-m3e-theme] body.profile-v3-page .profile-settings-section { padding:20px; }
html[data-m3e-theme] body.profile-v3-page .profile-section-heading { margin:0 0 16px; gap:12px; }
html[data-m3e-theme] body.profile-v3-page .profile-section-heading h2 { font-size:22px; }
html[data-m3e-theme] body.profile-v3-page .profile-section-heading p { font-size:13px; line-height:1.5; }
html[data-m3e-theme] body.profile-v3-page .profile-section-icon { width:48px; height:48px; border-radius:18px 18px 8px 18px; background:var(--md-primary-container); }
html[data-m3e-theme] body.profile-v3-page .profile-section-icon .card-illustration { width:44px; height:42px; }
html[data-m3e-theme] body.profile-v3-page .profile-form { gap:16px; }
html[data-m3e-theme] body.profile-v3-page .profile-form-actions { margin-top:16px; padding-top:0; min-height:0; }
html[data-m3e-theme] body.profile-v3-page .profile-status:empty { display:none; }
html[data-m3e-theme] body.profile-v3-page .profile-field small { font-size:12px; line-height:1.5; }
html[data-m3e-theme] body.profile-v3-page .quality-rank-ladder button { padding:20px; border-radius:24px; }
html[data-m3e-theme] body.profile-v3-page .quality-rank-ladder .quality-badge { height:140px; width:100%; object-fit:contain; }
html[data-m3e-theme] body.profile-v3-page .quality-rank-ladder b { font-size:20px; }
@media(min-width:1050px){
 html[data-m3e-theme] body.profile-v3-page .profile-settings-layout[data-profile-section="profileSection"] { grid-template-columns:minmax(320px,.9fr) minmax(0,1.4fr); align-items:start; gap:20px; }
}
@media(prefers-reduced-motion:no-preference){
 .profile-identity-top .profile-avatar-current { transition:transform 240ms cubic-bezier(.2,.8,.2,1); }
 .profile-identity-top:hover .profile-avatar-current { transform:rotate(-3deg); }
 .profile-section-icon .card-illustration { transition:transform 220ms ease; }
 .profile-settings-section:focus-within .profile-section-icon .card-illustration { transform:translateY(-3px) rotate(4deg); }
 #registrationSummary .registration-summary-facts>div { animation:r221-card-in 260ms cubic-bezier(.2,.8,.2,1) both; }
 #registrationSummary .registration-summary-facts>div:nth-child(2) { animation-delay:40ms; }
 #registrationSummary .registration-summary-facts>div:nth-child(3) { animation-delay:80ms; }
 #registrationSummary .registration-summary-facts>div:nth-child(4) { animation-delay:120ms; }
 @keyframes r221-card-in { from { transform:translateY(7px); } to { transform:translateY(0); } }
}

/* Explicit single-column fallback: no range media queries or implicit named columns. */
html[data-m3e-module] body.tn-task-page .ticket-appeal-layout,
html[data-m3e-module] body.tn-task-page .ticket-resolution-layout { display:grid; grid-template-columns:minmax(0,1fr); grid-template-areas:none; gap:16px; width:100%; min-width:0; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-primary,
html[data-m3e-module] body.tn-task-page .ticket-resolution-primary,
html[data-m3e-module] body.tn-task-page .ticket-appeal-summary,
html[data-m3e-module] body.tn-task-page .ticket-resolution-summary { grid-area:auto; grid-column:auto; grid-row:auto; min-width:0; width:auto; max-width:100%; position:static; box-sizing:border-box; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-layout[hidden],
html[data-m3e-module] body.tn-task-page .ticket-resolution-layout[hidden] { display:none!important; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-type-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; min-width:0; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-type-card { min-width:0; width:auto; min-height:112px; height:auto; padding:14px 12px; border-radius:20px; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-type-card strong { font-size:17px; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-type-card span { font-size:12px; line-height:1.5; white-space:normal; overflow-wrap:break-word; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-form,
html[data-m3e-module] body.tn-task-page .ticket-resolution-form { min-width:0; width:auto; padding:12px 18px 20px; box-sizing:border-box; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-summary dl,
html[data-m3e-module] body.tn-task-page .ticket-resolution-summary dl { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; margin:8px 0 0; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-summary dl>div,
html[data-m3e-module] body.tn-task-page .ticket-resolution-summary dl>div { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 12px; padding:9px 0; min-width:0; }
html[data-m3e-module] body.tn-task-page .ticket-appeal-summary dd,
html[data-m3e-module] body.tn-task-page .ticket-resolution-summary dd { margin:0; font-size:15px; overflow-wrap:anywhere; }
html[data-m3e-module] body.ticket-page .ticket-priority-card { min-width:0; scroll-margin-top:100px; }
html[data-m3e-module] body.ticket-page .ticket-queue-count { white-space:normal; min-width:0; line-height:1.4; }
html[data-m3e-module] body.ticket-page .ticket-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); gap:8px; }
html[data-m3e-module] body.ticket-page .ticket-status-help { margin:8px 0; }
html[data-m3e-module] body.ticket-page .ticket-status-help summary { min-height:36px; }
@media(min-width:1100px){
 html[data-m3e-module] body.tn-task-page .ticket-appeal-layout,
 html[data-m3e-module] body.tn-task-page .ticket-resolution-layout { grid-template-columns:minmax(0,1fr) 300px; align-items:start; gap:24px; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-primary,
 html[data-m3e-module] body.tn-task-page .ticket-resolution-primary { grid-column:1; grid-row:1; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-summary,
 html[data-m3e-module] body.tn-task-page .ticket-resolution-summary { grid-column:2; grid-row:1; position:sticky; top:16px; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-type-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:759px){
 html[data-m3e-module] body.ticket-page .ticket-main-canvas { min-width:0; padding:12px 12px 100px!important; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-summary,
 html[data-m3e-module] body.tn-task-page .ticket-resolution-summary { padding:16px; border-radius:22px; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-section { min-width:0; padding:16px 0; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-form fieldset { min-width:0; margin:0; padding:0; border:0; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-mobile-actions { display:flex; position:fixed; bottom:0; left:0; right:0; padding:10px 12px; padding-bottom:calc(10px + env(safe-area-inset-bottom,0px)); gap:8px; height:auto; min-height:0; z-index:45; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-mobile-actions>button,
 html[data-m3e-module] body.tn-task-page #appealMobilePrimary { flex:1; min-width:0; width:auto; }
 html[data-m3e-module] body.tn-task-page .ticket-appeal-mobile-actions .ticket-detail-action { width:100%; min-height:48px; padding:10px 12px; font-size:14px; line-height:1.4; }
}

