/* Keep calendar geometry independent of cached base theme versions. */
/* Desktop date scrolling uses the workspace blue palette, above and below the roster. */
.schedule-shell{--schedule-scrollbar-thumb:#6474ef;--schedule-scrollbar-track:#e8edff}
.schedule-top-scroll{position:relative;z-index:0;box-sizing:border-box;max-width:100%;height:16px;margin-bottom:8px;overflow-x:scroll;overflow-y:hidden;border-radius:8px;background:var(--schedule-scrollbar-track)}
.schedule-top-scroll[hidden]{display:none}
.schedule-top-scroll>div{height:1px}
.schedule-top-scroll:focus-visible{outline:2px solid #5264df;outline-offset:3px}
.schedule-grid,.schedule-top-scroll{scrollbar-color:var(--schedule-scrollbar-thumb) var(--schedule-scrollbar-track)}
@supports selector(::-webkit-scrollbar){.schedule-grid,.schedule-top-scroll{scrollbar-color:auto}}
.schedule-grid::-webkit-scrollbar,.schedule-top-scroll::-webkit-scrollbar{width:14px;height:14px}
.schedule-grid::-webkit-scrollbar-track,.schedule-top-scroll::-webkit-scrollbar-track{background:var(--schedule-scrollbar-track);border-radius:8px}
.schedule-grid::-webkit-scrollbar-thumb,.schedule-top-scroll::-webkit-scrollbar-thumb{background:var(--schedule-scrollbar-thumb);border:3px solid var(--schedule-scrollbar-track);border-radius:8px}
.schedule-grid::-webkit-scrollbar-thumb:hover,.schedule-top-scroll::-webkit-scrollbar-thumb:hover{background:#4e5ed6}
.schedule-grid::-webkit-scrollbar-button,.schedule-top-scroll::-webkit-scrollbar-button{background:var(--schedule-scrollbar-track)}
@media(max-width:760px){
 .schedule-top-scroll{display:none}
 html:has(body[data-workspace-page=schedule]),body[data-workspace-page=schedule],body[data-workspace-page=schedule] *{scrollbar-width:none!important}
 html:has(body[data-workspace-page=schedule])::-webkit-scrollbar,body[data-workspace-page=schedule]::-webkit-scrollbar,body[data-workspace-page=schedule] *::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
}
.schedule-grid{overflow:auto;max-width:100%;box-sizing:border-box}
@media(min-width:761px){.schedule-grid:not(.coverage-grid){max-height:none;overflow-x:auto;overflow-y:hidden;scrollbar-gutter:auto}}
.schedule-grid #schedule-table,.schedule-grid #coverage-table{table-layout:fixed;border-spacing:0}
.schedule-grid col:not(.employee-column){width:54px}
.schedule-grid .date-heading th:not(.employee-cell),.schedule-grid tbody tr:not(.team-heading)>td{padding:0;overflow:hidden;box-sizing:border-box}
.schedule-grid .duty,.schedule-grid .date-review-button{width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin:0;padding:0;overflow:hidden}
.schedule-grid .duty{border:0;border-radius:9px!important;font-size:12px}
.schedule-grid .date-review-button{padding:6px 0;font-size:11px}
.schedule-grid thead .month-heading th{top:0;height:27px}
.schedule-grid thead .date-heading th{top:27px}
.schedule-grid .daily-budget input{width:100%;max-width:100%;min-width:0;box-sizing:border-box;padding:2px 0;font-size:10px;text-align:center}
.schedule-grid .weekly-summary td{overflow:hidden;padding:2px 0;font-size:11px}

/* Spaced square duties and a single-line identity, including employee codes. */
:root{--schedule-name-width:200px;--schedule-day-width:54px}
.schedule-grid tbody tr:not(.team-heading)>td{height:54px;padding:5px!important}
.schedule-grid .duty{width:42px;max-width:42px;height:42px;min-height:42px;margin:auto;border:1px solid #00000012;border-radius:9px!important}
.schedule-grid .employee-cell{box-sizing:border-box;padding:6px 10px}
.employee-identity{gap:8px;white-space:nowrap}
.employee-identity .employee-name{min-width:0}
.employee-identity b{overflow:hidden;text-overflow:ellipsis}
.employee-identity b{white-space:nowrap;font-size:12px;line-height:1.3}
.employee-identity img,.employee-identity .avatar-placeholder{width:34px;height:34px;border-radius:10px}
.employee-identity .schedule-code{display:inline-block;flex:none;width:56px;min-height:0;padding:4px 0;margin:0;font-size:10px;white-space:nowrap}
.schedule-grid thead th.current-day:after{width:fit-content;margin:2px auto;padding:2px 4px;border-radius:4px;background:#8d73e6;color:#fff}
.schedule-grid .current-day .duty{box-shadow:0 0 0 2px #8d73e633}
@media(max-width:600px){.schedule-grid .employee-cell{position:static}.schedule-grid .month-label{left:5px}}

/* Readable calendar labels and coverage totals. */
.schedule-grid .duty{font-size:14px!important}
.schedule-grid .date-review-button{font-size:15px}
.schedule-grid th small{font-size:11px}
.schedule-grid thead .month-heading th{font-size:13px}
.schedule-grid .coverage-count{font-size:18px;font-weight:700}
.schedule-grid .weekly-summary td,.schedule-grid .daily-estimate td{font-size:16px}
.schedule-grid .daily-budget input{font-size:14px}
#coverage-panel .schedule-budgets{margin:16px 0}

.schedule-grid .month-tint{background-color:var(--month-color)}
.schedule-grid thead .month-heading th.month-tint,.schedule-grid thead .date-heading th.month-tint{background-color:var(--month-color)}
#preview-employee{max-width:300px}

/* Friday begins each budget period. */
.schedule-grid .week-start{border-left:3px solid #df6865}

/* Hanging tags float beside the date without increasing calendar row height. */
.schedule-grid thead th.current-day:after{content:none;display:none}
.schedule-grid .date-heading th:not(.employee-cell){vertical-align:middle;height:60px;overflow:visible;z-index:4}
.schedule-grid .date-heading th:has(.date-status){z-index:5}
.schedule-grid .date-review-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 0;overflow:visible;min-height:0;height:60px}
.schedule-grid .date-badges{position:absolute;left:-5px;top:-9px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:max-content;max-width:none;min-height:0;margin:0;z-index:8;pointer-events:none;transform:rotate(-12deg);transform-origin:0 10px;filter:drop-shadow(0 2px 2px #15223830)}
.schedule-grid .date-status{position:relative;display:block;box-sizing:border-box;width:max-content;max-width:none;padding:3px 9px 3px 20px;margin:0;border-radius:2px 5px 5px 2px;background:#374151;color:#fff;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0;white-space:nowrap;text-align:center;text-shadow:none;clip-path:polygon(10px 0,100% 0,100% 100%,10px 100%,0 50%)}
.schedule-grid .date-status:before{content:"";position:absolute;left:8px;top:8px;width:5px;height:5px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #0002}
.schedule-grid .date-status-today{background:#d52235;color:#fff}
.schedule-grid .date-status-holiday{background:#237244;color:#fff}
.schedule-grid .date-status-pay{background:#6740a1;color:#fff}
.schedule-grid .date-number{font-size:16px;font-weight:700;line-height:20px}
.schedule-grid .date-review-button small{margin:0;font-size:11px;line-height:15px}
.schedule-grid thead .month-heading th{font-size:15px}

#mobile-schedule{display:none}
@media(max-width:600px){
 .personal-calendar #mobile-schedule:not([hidden]){display:block}
 .personal-calendar>.schedule-heading,.personal-calendar #personal-identity,.personal-calendar #schedule-table,.personal-calendar #schedule-table:empty,.personal-calendar #schedule-help{display:none}
 .personal-calendar #schedule-table{visibility:hidden}
 .personal-calendar .schedule-grid:has(#schedule-table){display:none}
 .personal-calendar .schedule-dates{display:none}
 .personal-calendar .schedule-toolbar{margin:0 0 12px}
 .personal-calendar .mobile-schedule-hero{padding:12px 6px 24px;color:#173959;background:none}
 .mobile-schedule-hero span{font-size:16px;font-weight:600}.mobile-schedule-hero h2{font-size:25px;margin:4px 0}
 .mobile-calendar-card{position:relative;margin-top:-14px;border-radius:18px;background:#fff;padding:12px 8px;box-shadow:0 8px 30px #234b7812}
 .mobile-calendar-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;color:#123c75}.mobile-calendar-nav strong{font-size:15px}.schedule-shell .mobile-calendar-nav button{border:0;background:transparent;font-size:26px;padding:0 12px;color:#1671ef}
 .mobile-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
 .mobile-weekday{text-align:center;font-size:10px;color:#213b69;font-weight:600;padding:6px 0}
 .mobile-calendar-day{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:82px;padding:5px 1px;gap:4px;border-radius:10px;background:#f6f9fe;border:1px solid transparent;box-sizing:border-box}
 .mobile-calendar-day small{font-size:11px;color:#254171}.mobile-calendar-day.sunday small{color:#ed354b}.mobile-calendar-day.outside-month{opacity:.35}.mobile-calendar-day.is-today{border-color:#6578ff;box-shadow:0 0 0 2px #a5b1ff30}
 .mobile-calendar-day .duty{display:grid;place-items:center;width:28px;height:28px;border-radius:6px;font-size:12px;font-weight:700;box-shadow:0 3px 6px #183a6815}
 .mobile-day-label{font-size:9px;line-height:12px;background:#6740a1;color:white;border-radius:3px;padding:1px 2px;max-width:100%;overflow-wrap:anywhere}
 .personal-calendar .schedule-legend{margin-top:14px;padding:14px;border-radius:16px}.personal-calendar .schedule-legend>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.personal-calendar .legend-entry{font-size:10px}.personal-calendar .legend-chip{min-width:22px;height:22px}
}

.mobile-schedule-bottom{display:none}@media(max-width:600px){.personal-calendar{padding-bottom:80px}.personal-calendar .mobile-schedule-bottom{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:20;justify-content:space-around;background:#fff;border-top:1px solid #e4eaf5;padding:10px 6px max(10px,env(safe-area-inset-bottom))}.mobile-schedule-bottom a{display:flex;flex-direction:column;align-items:center;gap:3px;text-decoration:none;color:#7990b0;font-size:23px}.mobile-schedule-bottom a[aria-current]{color:#1671ef}.mobile-schedule-bottom span{font-size:10px}}

@media(max-width:600px){body:has(.personal-calendar) .profile-sidebar{display:none}.personal-calendar #refresh{display:none}.personal-calendar .schedule-toolbar:has(>button#employee-view[hidden]){display:none}.personal-calendar .profile-shell{margin-top:0}}

@media(max-width:600px){.schedule-shell.personal-calendar{margin-top:64px;padding-top:16px}.mobile-day-tags{position:absolute;top:-8px;left:-4px;z-index:2;display:flex;flex-direction:column;align-items:flex-start;gap:2px;transform:rotate(-12deg);transform-origin:left top;pointer-events:none}.mobile-day-tags .mobile-day-label{font-size:11px;line-height:15px;padding:2px 6px 2px 12px;max-width:none;white-space:nowrap;clip-path:polygon(7px 0,100% 0,100% 100%,7px 100%,0 50%)}.mobile-day-label:before{content:"";position:absolute;left:5px;top:7px;width:4px;height:4px;border-radius:50%;background:#fff}.mobile-day-label{position:relative}.mobile-day-tags .mobile-day-today{background:#d52235}}

@media(max-width:600px){
 .mobile-calendar-card{padding:12px 8px}
 .mobile-calendar-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:18px 0 8px;-webkit-overflow-scrolling:touch}
 .mobile-calendar-days{display:grid;grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:calc((100% - 24px)/7);gap:4px}
 .mobile-calendar-day{min-height:106px;background:var(--month-color);padding:8px 0;gap:5px}
 .mobile-calendar-day .mobile-date{font-size:11px;font-weight:700;white-space:nowrap}
 .mobile-calendar-day .mobile-weekday{font-size:10px;padding:0;line-height:14px}
 .mobile-calendar-day.period-start{border-left:3px solid #df6865;scroll-snap-align:start}
}

@media(max-width:600px){
 .mobile-calendar-card{touch-action:pan-y;padding:14px 8px}
 .mobile-month-title{display:block;text-align:center;color:#123c75;font-size:15px;margin-bottom:18px}
 .mobile-calendar-days{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px 4px}
 .mobile-calendar-days>.mobile-weekday{padding:3px 0 8px}
 .mobile-calendar-day{min-height:70px;padding:6px 0;gap:5px}
 .mobile-calendar-day.period-start{border-left:1px solid transparent}
 .mobile-calendar-day .mobile-date{font-size:12px}
 .mobile-calendar-day.outside-month{opacity:.35}
 .mobile-calendar-day.sunday .mobile-date{color:#ed354b}
}

/* Folded paper ribbons, matching the supplied Today reference. */
.schedule-grid .date-status,.mobile-day-tags .mobile-day-label{clip-path:polygon(0 0,100% 0,92% 50%,100% 100%,0 100%);border-radius:0;padding:5px 16px 5px 10px;background:linear-gradient(110deg,#fff1b9,#fff8e5);color:#713b16;border:1px solid #ffd269;font-weight:800;text-shadow:none;box-shadow:0 2px 5px #8b641b25}
.schedule-grid .date-status:before,.mobile-day-tags .mobile-day-label:before{content:none}
.schedule-grid .date-badges,.mobile-day-tags{filter:drop-shadow(0 3px 3px #75511430);transform:rotate(-12deg)}
.schedule-grid .date-badges:not(:empty):before,.mobile-day-tags:not(:empty):before{content:'';position:absolute;left:0;bottom:-5px;width:6px;height:6px;background:#d8a23b;clip-path:polygon(0 0,100% 0,100% 100%)}
.schedule-grid .date-badges:not(:empty):after,.mobile-day-tags:not(:empty):after{content:'';position:absolute;right:-10px;top:4px;width:3px;height:9px;border-radius:2px;background:#ffc64d;transform:rotate(35deg);box-shadow:7px 7px 0 #ffc64d,8px 17px 0 #ffc64d}
.schedule-grid .date-heading .current-day .date-number{color:#7352ca}
@media(max-width:600px){.mobile-day-tags .mobile-day-label{font-size:11px;line-height:15px;padding:3px 10px 3px 7px}.mobile-calendar-day.is-today{border-color:#9475ff;box-shadow:inset 2px 0 #9475ff,inset -2px 0 #9475ff,0 0 0 2px #a5b1ff30}.mobile-calendar-day.is-today .mobile-date{color:#7352ca}}

.schedule-grid .date-status,.mobile-day-tags .mobile-day-label{background:var(--ribbon-color,#2563a6);color:#fff;border-color:var(--ribbon-color,#2563a6)}
.schedule-grid .date-badges:not(:empty):after,.mobile-day-tags:not(:empty):after{content:none;display:none}
.clock-in-list .clock-in-code{display:inline-grid;place-items:center;min-width:26px;width:26px;height:26px;flex:0 0 26px;box-sizing:border-box;border-radius:7px;font-size:11px;line-height:1;font-weight:700;border:1px solid #00000012}
.clock-in-list>div{align-items:center}

.schedule-grid #schedule-table .current-day{background-color:#e7d9ff;box-shadow:inset 3px 0 #7c3aed,inset -3px 0 #7c3aed}.schedule-grid #schedule-table thead .current-day,.schedule-grid #coverage-table thead .current-day{background-color:#d8beff}.schedule-grid #schedule-table .current-day .duty{outline:2px solid #8b5cf6;outline-offset:1px;box-shadow:0 0 0 4px #7c3aed22}.schedule-grid #coverage-table .current-day{box-shadow:inset 3px 0 #7c3aed,inset -3px 0 #7c3aed}

.schedule-grid #schedule-table .selection-gap-fill{position:absolute;display:block;top:0;bottom:0;background:#8b5cf62b;border-left:2px solid #8b5cf6;border-right:2px solid #8b5cf6;pointer-events:none;z-index:0}.schedule-grid .date-heading th.grid-column-selected{box-shadow:inset 0 0 0 2px #8b5cf6;background-color:#e7ddff}.schedule-grid .team-heading th{cursor:crosshair}.schedule-grid .month-heading th:not(.employee-cell),.schedule-grid .date-heading th:not(.employee-cell){cursor:crosshair}

/* Dates scroll behind the fixed employee/coverage label column. */
.schedule-grid thead .employee-cell{left:0;z-index:12!important;background:#f9f9fc!important}
.schedule-grid tbody .employee-cell{z-index:8}

/* Isolate wide desktop grid paints from the surrounding page while scrolling. */
@media(min-width:601px){.schedule-grid{contain:layout paint;isolation:isolate}}
/* Month headings live above the scrolling grids, matching the mobile calendar. */
.schedule-grid thead .date-heading th{top:0}.schedule-desktop-month{font-size:18px;font-weight:700;color:#173f70;margin:14px 0 10px;line-height:1.4}@media(max-width:600px){.schedule-desktop-month{display:none}}

/* Keep the desktop month in the existing toolbar's right-hand slot. */
.schedule-shell .schedule-toolbar{flex-wrap:nowrap}.schedule-shell .schedule-toolbar #schedule-desktop-month{margin:0 0 0 auto;flex:none;white-space:nowrap;font-size:18px}.schedule-shell .schedule-toolbar #employee-search{flex:1 1 180px;min-width:80px;max-width:240px;width:auto}.schedule-shell .schedule-toolbar #team{flex:0 1 180px;min-width:80px;max-width:180px}.schedule-toolbar>button,.schedule-toolbar .schedule-add-edit{white-space:nowrap;flex-shrink:0}
@media(min-width:601px) and (max-width:1100px){.schedule-shell .schedule-toolbar{gap:5px}.schedule-shell .schedule-toolbar>button,.schedule-shell .schedule-toolbar #schedule-add-edit-tab{font-size:11px;padding:8px}.schedule-shell .schedule-toolbar #schedule-desktop-month{font-size:15px}.schedule-shell .schedule-toolbar #team{max-width:120px;width:100px}.schedule-shell .schedule-toolbar #employee-search{min-width:65px}}
/* Paint ribbon copies outside the clipped scrolling grids. */
@media(min-width:601px){.schedule-grid .date-badges{visibility:hidden}}
.schedule-ribbon-overlay{position:fixed;inset:0;z-index:100;pointer-events:none;overflow:visible}.schedule-ribbon-overlay .date-badges{position:absolute;display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:max-content;margin:0;transform:rotate(-12deg);transform-origin:0 10px;filter:drop-shadow(0 3px 3px #75511430)}.schedule-ribbon-overlay .date-status{position:relative;display:block;box-sizing:border-box;width:max-content;margin:0;padding:5px 16px 5px 10px;border:1px solid var(--ribbon-color,#2563a6);border-radius:0;clip-path:polygon(0 0,100% 0,92% 50%,100% 100%,0 100%);background:var(--ribbon-color,#2563a6);color:white;font:800 12px/16px 'Segoe UI',sans-serif;letter-spacing:0;white-space:nowrap;text-align:center;box-shadow:0 2px 5px #8b641b25}.schedule-ribbon-overlay .date-badges:before{content:'';position:absolute;left:0;bottom:-5px;width:6px;height:6px;background:#d8a23b;clip-path:polygon(0 0,100% 0,100% 100%)}@media(max-width:600px){.schedule-ribbon-overlay{display:none}}
@media(min-width:601px){.schedule-shell .schedule-toolbar{margin-bottom:28px}}

.coverage-heading-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0 10px}.coverage-heading-row #coverage-title,.coverage-heading-row .schedule-desktop-month{margin:0}

/* Keep ribbons in a stable sibling layer; page scroll moves the layer natively. */
.schedule-ribbon-frame{position:relative;isolation:isolate;overflow:visible;margin-top:var(--ribbon-extra-headroom,0px)}.schedule-ribbon-frame>.schedule-ribbon-overlay{position:absolute;inset:0;z-index:50;display:block;pointer-events:none;overflow:visible}.schedule-ribbon-frame>.schedule-ribbon-overlay .date-badges{align-items:center;transform-origin:center center}
@media(max-width:600px){.schedule-ribbon-frame[data-primary=true]{display:none}.schedule-mobile-ribbon-frame{margin-top:calc(24px + var(--ribbon-extra-headroom,0px))}.schedule-mobile-ribbon-frame .team-week-scroll{padding-top:0}.schedule-mobile-ribbon-frame .team-week-table thead th,.schedule-mobile-ribbon-frame .team-week-table thead th.multiple-week-ribbons{padding:8px 2px;height:52px;box-sizing:border-box;top:0}.team-week-table .team-week-badges{visibility:hidden}.schedule-mobile-ribbon-frame .schedule-ribbon-overlay .date-status{font-size:10px;line-height:13px;padding:3px 8px}.schedule-ribbon-frame .schedule-grid .date-badges{visibility:hidden}}
.schedule-ribbon-frame>.schedule-ribbon-overlay .date-badges{transform:none}.schedule-ribbon-frame>.schedule-ribbon-overlay .date-status{transform:rotate(-12deg);transform-origin:center center}

@media(max-width:600px){.schedule-ribbon-frame .schedule-ribbon-overlay .date-status{font-size:10px;line-height:13px;padding:3px 8px}}

/* Upper-left date decorations sit outside the scrolling border. */
.schedule-ribbon-frame>.schedule-ribbon-overlay .date-badges{align-items:flex-start}
.schedule-ribbon-frame>.schedule-ribbon-overlay .date-status{transform-origin:left bottom}
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-icon{padding:0;border:0;background:transparent;clip-path:none;box-shadow:none;transform:none;width:32px;height:32px}
.date-status-icon img{display:block;width:32px;height:32px;object-fit:contain;filter:drop-shadow(0 2px 3px #1765a838)}
.schedule-ribbon-overlay .date-badges:has(.date-status-icon):before{content:none}
.date-label-presets{flex-wrap:wrap}
.date-label-presets button{display:inline-flex;align-items:center;gap:5px;min-height:42px}
.date-label-presets .date-preset-today{background:#7944bc;color:#fff}
.date-label-presets .date-preset-short{background:#dc263f;color:#fff}
.date-label-presets .date-preset-pay{background:#075985;color:#fff}
.date-label-presets .date-preset-holiday{background:#237244;color:#fff}
.date-label-presets button[aria-pressed=true]{outline:3px solid #3189ed;outline-offset:2px}

/* Rounded dimensional ribbons with a rolled left edge, matching the supplied references. */
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status:not(.date-status-icon){padding:0;border:0;background:transparent;clip-path:none;box-shadow:none;isolation:isolate;filter:drop-shadow(1px 4px 3px #10243b45);text-shadow:0 1px 2px #0006}
.schedule-ribbon-overlay .date-status-face{position:relative;display:block;padding:5px 13px;clip-path:none;border-radius:12px 12px 10px 3px;background:linear-gradient(175deg,#ffffff95 0%,#ffffff38 15%,#ffffff0d 38%,#00000008 55%,#00000045 100%),var(--ribbon-color);box-shadow:inset 0 1px 1px #ffffffb3,inset 1px 0 2px #ffffff70,inset 0 -2px 2px #00000045;z-index:1}
.schedule-ribbon-overlay .date-status:has(.date-status-face):before{content:'';position:absolute;inset:3px 0 -4px;border-radius:12px 12px 9px 4px;background:linear-gradient(180deg,#0003,#0009),var(--ribbon-color);box-shadow:0 2px 2px #0003;z-index:-1}
.schedule-ribbon-overlay .date-status:has(.date-status-face):after{content:'';position:absolute;left:-1px;bottom:-15px;width:22px;height:24px;background:linear-gradient(115deg,#0008 5%,#0003 35%,#ffffff60 57%,#0006 82%),var(--ribbon-color);clip-path:path('M22 0 C4 -1 -5 11 9 24 C3 13 12 8 22 9 Z');z-index:-2}
.schedule-ribbon-overlay .date-badges:before{content:none}
@media(max-width:600px){.schedule-ribbon-overlay .date-status-face{padding:3px 8px}}
@keyframes schedule-typhoon-turn{to{transform:rotate(360deg)}}
[data-date-icon=typhoon] img,[data-date-label=Typhoon] img{animation:schedule-typhoon-turn 20s linear infinite;transform-origin:center}
@media(prefers-reduced-motion:reduce){[data-date-icon=typhoon] img,[data-date-label=Typhoon] img{animation:none}}

/* Reference-drawn 3D ribbon artwork; text stays sharp and accessible at every scale. */
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered{width:78px;height:30px;filter:drop-shadow(0 3px 2px #18203c30)}
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered .date-status-face{width:78px;height:24px;box-sizing:border-box;padding:4px 0;background:transparent;box-shadow:none;text-align:center;font-size:12px;line-height:16px;color:white;text-shadow:0 1px 2px #0006;transform:translateY(-2px) rotate(-3deg);transform-origin:center}
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered:before{inset:auto;left:-12px;top:-8px;width:100px;height:50px;transform:none;border-radius:0;box-shadow:none;background: url('/has/assets/schedule-ribbon-purple-3d-v1.webp') center/contain no-repeat;z-index:0}
.schedule-ribbon-frame .schedule-ribbon-overlay [data-ribbon-art=short]:before,.schedule-ribbon-frame .schedule-ribbon-overlay [data-ribbon-art=holiday]:before{background-image:url('/has/assets/schedule-ribbon-red-3d-v1.webp')}
.schedule-ribbon-frame .schedule-ribbon-overlay [data-ribbon-art=holiday]:before{filter:hue-rotate(125deg) saturate(.8)}
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered:after{content:none}
@media(max-width:600px){.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered{width:64px;height:25px}.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered:before{left:-10px;top:-7px;width:84px;height:42px}.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-rendered .date-status-face{width:64px;height:21px;padding:3px 0;font-size:10px;line-height:15px}}

/* Today plus one status shares one continuous two-color ribbon. */
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-combined{width:134px}
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-combined .date-status-face{width:134px;display:grid;grid-template-columns:1fr 1fr;gap:0}
.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-combined:before{width:158px;height:53px;left:-12px;top:-8px;background-image:url('/has/assets/schedule-ribbon-today-short-3d-v1.webp')}
.schedule-ribbon-frame .schedule-ribbon-overlay [data-ribbon-art=today-holiday]:before{background-image:url('/has/assets/schedule-ribbon-today-holiday-3d-v1.webp')}
@media(max-width:600px){.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-combined{width:112px}.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-combined .date-status-face{width:112px}.schedule-ribbon-frame .schedule-ribbon-overlay .date-status-combined:before{width:132px;height:44px;left:-10px;top:-7px}}

/* Undo sits immediately after Add/Edit, using the same blue 3D icon language. */
.schedule-shell .schedule-toolbar .schedule-undo{display:inline-grid;place-items:center;flex:0 0 46px;width:46px;height:46px;padding:2px;border:0;border-radius:12px;background:transparent;box-shadow:none;cursor:pointer}
.schedule-shell .schedule-toolbar .schedule-undo[hidden]{display:none}
.schedule-undo img{display:block;width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 3px 3px #1576c930);pointer-events:none}
.schedule-shell .schedule-toolbar .schedule-undo:hover:not(:disabled){background:#ffffff80}
.schedule-shell .schedule-toolbar .schedule-undo:focus-visible{outline:2px solid #3287e7;outline-offset:2px}
.schedule-shell .schedule-toolbar .schedule-undo:disabled{cursor:default;opacity:.4}
.schedule-undo:disabled img{filter:grayscale(.8)}
@media(max-width:600px){.schedule-shell .schedule-toolbar .schedule-undo{flex-basis:38px;width:38px;height:38px}.schedule-undo img{width:36px;height:36px}}

/* Manager mobile labels stay inside their sticky date cells. iOS scrolls
   these natively; no measured overlay can lag behind a compositor scroll. */
@media(max-width:600px){
 .schedule-mobile-ribbon-frame.schedule-native-ribbons{--ribbon-extra-headroom:0px;margin-top:12px}
 .schedule-native-ribbons>.schedule-ribbon-overlay{display:none}
 /* Freeze the header as one layer so a ribbon spanning two dates paints
    above both backgrounds instead of behind the next sticky cell. */
 .schedule-native-ribbons .team-week-table thead{position:sticky;top:0;z-index:45}
 .schedule-native-ribbons .team-week-table thead th,
 .schedule-native-ribbons .team-week-table thead th.multiple-week-ribbons{position:relative;z-index:auto;height:calc(52px + var(--native-ribbon-space,54px));padding:calc(8px + var(--native-ribbon-space,54px)) 2px 8px;top:0}
 .schedule-native-ribbons .team-week-table thead th:first-child{position:sticky;left:0;z-index:60}
 .schedule-native-ribbons .schedule-native-ribbon-host{display:block;position:absolute;inset:0;z-index:1;pointer-events:none;overflow:visible}
 .schedule-native-ribbons .schedule-native-ribbon-host .team-week-badges{visibility:visible;position:absolute;left:3px;top:24px;bottom:auto;transform:none;align-items:flex-start}
 .schedule-native-ribbon-host .date-status{transform:rotate(-12deg);transform-origin:left bottom}
}

/* A raised purple strip continues behind Today's duty buttons and group gaps. */
.schedule-shell{--today-column-fill:linear-gradient(90deg,#7c4ac4 0%,#bc8bf8 9%,#ac6ff0 30%,#a266e8 70%,#7441b2 100%);--today-column-depth:inset 2px 0 2px #f0e1ff99,inset -3px 0 4px #4b22715c}
.schedule-shell .schedule-grid #schedule-table .current-day,
.workspace-glass .schedule-shell .team-week-table thead th.team-week-today,
.workspace-glass .schedule-shell .team-week-table tbody td.team-week-current-day,
.schedule-shell .team-week-table thead th.team-week-today,
.schedule-shell .team-week-table tbody td.team-week-current-day{background:var(--today-column-fill);box-shadow:var(--today-column-depth);border-bottom-color:#9953e4;border-right-color:#642aa8}
.schedule-shell .schedule-grid #schedule-table th.current-day .date-number,
.schedule-shell .schedule-grid #schedule-table th.current-day small,
.schedule-shell .team-week-table thead th.team-week-today,
.schedule-shell .team-week-table thead th.team-week-today small{color:#fff!important;text-shadow:0 1px 2px #38126966}
.schedule-shell .schedule-grid #schedule-table .current-day .duty,
.schedule-shell .team-week-table td.team-week-current-day>.duty{outline:none;box-shadow:0 2px 4px #30104b77,inset 0 1px 0 #ffffff77}
.schedule-shell #schedule-table.has-today-column .team-heading th:after,
.schedule-shell .team-week-table.has-today-column .team-week-group td:after{content:'';position:absolute;left:var(--today-column-left);width:var(--today-column-width);top:-1px;bottom:-1px;background:var(--today-column-fill);box-shadow:var(--today-column-depth);pointer-events:none;z-index:0}
.schedule-shell .team-week-table .team-week-group td{position:relative}
.schedule-shell #schedule-table .team-heading span,
.schedule-shell .team-week-table .team-week-group span{z-index:1}

/* Group names stay opaque over the band when dates scroll under them. */
.schedule-shell #schedule-table.has-today-column.today-column-has-label .team-heading th{padding-left:0}
.schedule-shell #schedule-table.has-today-column.today-column-has-label .team-heading span{display:inline-block;position:sticky;left:0;width:var(--today-column-name-width);box-sizing:border-box;padding-left:14px;background:inherit}
.schedule-shell .team-week-table.has-today-column.today-column-has-label .team-week-group td{padding-left:0}
.schedule-shell .team-week-table.has-today-column.today-column-has-label .team-week-group span{display:inline-block;position:sticky;left:0;width:var(--today-column-name-width);box-sizing:border-box;padding-left:5px;background:inherit}
