@layer er-earth {
/* EarthRoster V1438 • tightly scoped layout corrections over original V1435.
   Preserve original earth-green, warm neutral background, and shift accent colours. */
@media(max-width:1023px){
  /* Seven reliably centred/equal-height tiles regardless of shift count. */
  html body.ww-roster-active #app #page .rst-days,
  html body.ww-roster-active #app .ww521-roster-controls .rst-days{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:5px!important;padding:4px 0!important;align-items:stretch!important;width:100%!important;min-width:0!important;}
  html body.ww-roster-active #app #page .rst-days .rst-day,
  html body.ww-roster-active #app .ww521-roster-controls .rst-days .rst-day{
   width:100%!important;min-width:0!important;height:73px!important;min-height:73px!important;max-height:73px!important;
   margin:0!important;padding:6px 1px!important;display:grid!important;grid-template-rows:15px 29px 17px!important;
   align-items:center!important;justify-items:center!important;align-content:center!important;row-gap:1px!important;
   border-radius:11px!important;overflow:hidden!important;box-sizing:border-box!important;
  }
  html body.ww-roster-active #app #page .rst-day .rd-dow,html body.ww-roster-active #app #page .rst-day .rd-num{
   width:100%!important;min-width:0!important;text-align:center!important;margin:0!important;padding:0!important;
   white-space:nowrap!important;line-height:1!important;position:static!important;transform:none!important;
  }
  html body.ww-roster-active #app #page .rst-day .rd-dow{font-size:clamp(8px,2.4vw,10px)!important;font-weight:750!important;color:inherit;}
  html body.ww-roster-active #app #page .rst-day .rd-num{font-size:19px!important;font-weight:750!important;line-height:27px!important;}
  html body.ww-roster-active #app #page .rst-day :is(.rd-cnt,.rd-stats,.rd-empty,.er1441-day-count){
   position:static!important;display:flex!important;align-items:center!important;justify-content:center!important;
   width:auto!important;min-width:19px!important;min-height:16px!important;max-height:17px!important;height:16px!important;
   margin:0!important;padding:0 3px!important;font-size:10px!important;line-height:15px!important;box-sizing:border-box!important;
   transform:none!important;
  }
  html body.ww-roster-active #app #page .rst-day :is(.rd-stats.empty,.rd-empty,.er1441-day-count.is-zero){visibility:hidden!important;opacity:0!important;}
  /* Consistent green selection, keep numbers white on selected green tile. */
  html body.ww-roster-active #app #page .rst-day.sel{background:#305a41!important;border-color:#305a41!important;color:#fff!important;box-shadow:none!important;}
  html body.ww-roster-active #app #page .rst-day.sel :is(.rd-num,.rd-dow){color:#fff!important;}
  html body.ww-roster-active #app #page .rst-day.sel :is(.rd-cnt,.rd-stats,.er1441-day-count){background:#e7eeda!important;color:#285037!important;}
  /* Five secondary actions: 3 across, then 2 centered at equal widths. */
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child){
   display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important;width:100%!important;
  }
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button{
   width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;
   min-height:36px!important;height:auto!important;padding:6px 3px!important;margin:0!important;
   border-radius:8px!important;display:flex!important;align-items:center!important;justify-content:center!important;
   gap:3px!important;font-size:clamp(9px,2.55vw,11px)!important;line-height:1.2!important;white-space:normal!important;
  }
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button:nth-child(-n+2){grid-column:1/-1!important;min-height:38px!important;}
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button:nth-child(3){grid-column:1/span 2!important;}
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button:nth-child(4){grid-column:3/span 2!important;}
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button:nth-child(5){grid-column:5/span 2!important;}
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button:nth-child(6){grid-column:1/span 3!important;}
  html body #app #page .v213-card .v213-actions:has(>button:nth-child(7):last-child)>button:nth-child(7){grid-column:4/span 3!important;}
  /* Underline-only state tabs, no chunky filled block. */
  html body.ww-roster-active #app #page .er1024-filter-scroll>.er1024-filter{
   background:transparent!important;background-image:none!important;border:0!important;border-bottom:2px solid transparent!important;
   box-shadow:none!important;border-radius:0!important;min-width:0!important;min-height:44px!important;height:44px!important;
   padding:3px 0!important;color:var(--er-muted)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;
  }
  html body.ww-roster-active #app #page .er1024-filter-scroll>.er1024-filter.active{border-bottom-color:var(--er-focus)!important;color:var(--er-brand-text)!important;background:transparent!important;}
  html body.ww-roster-active #app #page .er1024-filter-scroll>.er1024-filter b{background:none!important;color:inherit!important;border:0!important;box-shadow:none!important;font-size:11px!important;line-height:13px!important;padding:0!important;}
  /* Keep all five bottom navigation labels completely visible. */
  html body #app nav.wwnav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;column-gap:0!important;padding-inline:4px!important;}
  html body #app nav.wwnav button.wwnav-item,
  html body #app nav.wwnav button.wwnav-item.is-active{
   width:100%!important;min-width:0!important;padding:5px 1px!important;margin:0!important;
   height:auto!important;min-height:56px!important;border-radius:0!important;border:0!important;
   background:transparent!important;background-image:none!important;box-shadow:none!important;
   display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;
  }
  html body #app nav.wwnav button.wwnav-item:before, html body #app nav.wwnav button.wwnav-item:after{display:none!important;content:none!important;}
  html body #app nav.wwnav button.wwnav-item .wwnav-ic{height:25px!important;width:27px!important;min-height:25px!important;background:transparent!important;box-shadow:none!important;margin:0!important;}
  html body #app nav.wwnav button.wwnav-item .wwnav-lbl{display:block!important;width:100%!important;text-align:center!important;white-space:nowrap!important;overflow:visible!important;line-height:15px!important;font-size:clamp(9px,2.65vw,11px)!important;font-weight:700!important;color:#dce7d9!important;}
  html body #app nav.wwnav button.wwnav-item.is-active .wwnav-lbl{color:#ebcb82!important;font-weight:800!important;}
  /* Simplify login input focus: one border, never two stacked brown outlines. */
  html body .lg2-root .lg2-field,html body .lg2-form .lg2-field,html body .lg2-root .lg2-pw{outline:none!important;box-shadow:none!important;border:0!important;background:transparent!important;}
  html body .lg2-root .lg2-input,html body .lg2-root .lg2-input:focus-visible,html body .lg2-root .lg2-input:focus{outline:none!important;box-shadow:none!important;border:1px solid #ced8cf!important;background:#fffefa!important;}
  html body .lg2-root .lg2-input:focus{border:2px solid #4f8061!important;}
  /* Compact shift cards in BOTH employee roster and dashboard, preserving the original coloured time rail. */
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee{
   height:auto!important;min-height:0!important;max-height:none!important;margin-bottom:8px!important;overflow:hidden!important;
   border-radius:13px!important;
  }
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-l{
   width:57px!important;min-width:57px!important;max-width:57px!important;padding:3px 2px!important;
  }
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-t{font-size:17px!important;line-height:1.2!important;}
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-ap{font-size:9px!important;line-height:1.1!important;}
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-b{
   padding:8px 9px!important;gap:2px!important;min-height:0!important;justify-content:center!important;
  }
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-1 h3{font-size:13px!important;line-height:1.15!important;margin:0!important;}
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-2,
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-3{font-size:10.5px!important;line-height:1.15!important;margin:0!important;}
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .v1227-teamline{margin:1px 0!important;min-height:16px!important;}
  html body #app #page :is(.roster-mobile,.home-roster-list,.er1438-next) article.rc-card.is-employee .rc-acts{margin:2px 0 0!important;padding:2px 0 0!important;gap:4px!important;min-height:0!important;}
  html body #app #page article.rc-card.is-employee .rc-acts .er1434-shift-action.past,
  html body #app #page article.rc-card.is-employee .rc-acts .er1434-shift-action.completed{
    width:auto!important;min-width:0!important;height:27px!important;min-height:27px!important;max-height:27px!important;
    padding:4px 9px!important;margin:0!important;border-radius:7px!important;font-size:10.5px!important;line-height:1!important;white-space:nowrap!important;}
  html body #app #page .er1438-next{margin:12px 0 8px!important;}
  html body #app #page .er1438-next-kicker{font-size:12px!important;font-weight:750!important;color:#45674d!important;margin:0 0 7px!important;}
  /* Taller real message textarea; application inline resize logic is upgraded in JS. */
  html body.ww-chat-active.chat-thread-open #app .chat-shell .chat-thread .chat-composer{min-height:86px!important;max-height:194px!important;height:auto!important;padding:9px 9px!important;align-items:center!important;box-sizing:border-box!important;}
  html body.ww-chat-active.chat-thread-open #app .chat-shell .chat-thread .chat-composer #chatInput.chat-editbox{min-height:68px!important;max-height:150px!important;font-size:16px!important;line-height:23px!important;padding:12px!important;resize:none!important;box-sizing:border-box!important;}
  html body.ww-chat-active.chat-thread-open #app .chat-shell .chat-thread .chat-composer :is(.cattach,.csend){height:43px!important;min-height:43px!important;width:43px!important;min-width:43px!important;}
  /* Profile retains original structure. Shorten the unnecessarily huge header/card spacings. */
  html body.ww-app-visible #app #page .pf2{gap:11px!important;}
  html body.ww-app-visible #app #page .pf2-hero{padding:14px 12px 13px!important;min-height:0!important;border-radius:17px!important;}
  html body.ww-app-visible #app #page .pf2-hero-bg{height:48px!important;}
  html body.ww-app-visible #app #page .pf2-avatar{width:54px!important;height:54px!important;border-radius:16px!important;font-size:21px!important;margin-top:4px!important;border-width:3px!important;}
  html body.ww-app-visible #app #page .pf2-name{font-size:18px!important;line-height:1.2!important;margin:6px 0 1px!important;}
  html body.ww-app-visible #app #page .pf2-title{font-size:12px!important;}
  html body.ww-app-visible #app #page .pf2-role{margin-top:3px!important;padding:2px 8px!important;font-size:10px!important;}
  html body.ww-app-visible #app #page .pf2-edit{margin-top:8px!important;padding:7px 12px!important;font-size:11px!important;}
  html body.ww-app-visible #app #page .pf2-section-label{margin:4px 2px -1px!important;}
  html body.ww-app-visible #app #page .pf2-links{gap:7px!important;}
  html body.ww-app-visible #app #page .pf2-link{min-height:55px!important;padding:8px 12px!important;gap:10px!important;border-radius:13px!important;}
  html body.ww-app-visible #app #page .pf2-link-ic{height:36px!important;width:36px!important;border-radius:11px!important;}
  html body.ww-app-visible #app #page .pf2-link-txt strong{font-size:13px!important;}
  html body.ww-app-visible #app #page .pf2-link-txt span{font-size:11px!important;}
  html body.ww-app-visible #app #page .pf2-row{padding:10px 12px!important;}
}
@media(min-width:1024px){
  /* Let all seven weekdays share available desktop width before horizontal overflow. */
  html body.ww-roster-active #app #page .rwg-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;}
  html body.ww-roster-active #app #page .rwg-grid{min-width:0!important;width:100%!important;max-width:100%!important;}
}
@media(max-width:760px){
 html body.ww-app-visible #app #page .hm-hero-copy p{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:12px!important;line-height:1.4!important;max-width:100%!important;}
}

}
