#schedule-mobile-day,#schedule-mobile-actions{display:none}
.schedule-icon{min-width:44px;min-height:44px}
.schedule-popup{box-sizing:border-box;width:min(94vw,750px);max-height:90dvh;overflow:auto;border:1px solid currentColor;border-radius:18px;background:var(--panel,#f4f0e6);color:var(--text,#24241f);padding:18px}
.schedule-popup::backdrop{background:#0007;backdrop-filter:blur(5px)}
.schedule-popup p{white-space:pre-line;overflow-wrap:anywhere}
.schedule-action-sheet{position:fixed;inset:auto 0 0;margin:0 auto;display:flex;flex-wrap:wrap;gap:12px;border-radius:22px 22px 0 0}
.schedule-week-popup{width:96vw;max-width:1400px}.schedule-week-zoom{overflow:auto;max-height:65dvh;touch-action:pan-x pan-y pinch-zoom}.schedule-week-zoom table{min-width:650px;width:100%;table-layout:fixed}.schedule-week-zoom td{vertical-align:top;overflow-wrap:anywhere}.schedule-week-popup.rotated{width:90dvh;max-width:none;height:94vw;max-height:none;position:fixed;left:50%;top:50%;margin:0;transform:translate(-50%,-50%) rotate(90deg)}
.schedule-swap-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:15px 0}.schedule-swap-row>*{min-width:0;width:100%;box-sizing:border-box}
@media(max-width:700px){
 body:has(#schedule-mobile-day) .schedule-week-navigation,body:has(#schedule-mobile-day) .schedule-page-actions,body:has(#schedule-mobile-day) .schedule-planner-people,body:has(#schedule-mobile-day) .schedule-load-legend,#inline-roster>.calendar-scroll,#inline-roster>.toolbar,body:has(#schedule-mobile-day) .pagehead p{display:none!important}
 body:has(#schedule-mobile-day) .schedule-planner-layout{display:block!important;grid-template-columns:minmax(0,1fr)!important}
 #schedule-content,#inline-roster,#schedule-mobile-day{min-width:0!important;width:100%;max-width:100%;box-sizing:border-box}
 #schedule-mobile-day{display:block;touch-action:pan-y}#schedule-mobile-day header{display:flex;align-items:center;gap:4px}#schedule-mobile-day h2{font-size:1.15rem;flex:1;min-width:0;text-align:center}
 .mobile-shifts{display:grid;gap:12px}.mobile-shift{margin:0!important;padding:14px!important;display:grid;gap:10px;min-width:0}.mobile-shift select,.mobile-shift input{width:100%;min-width:0;max-width:100%;box-sizing:border-box}.mobile-day-requests{margin:10px 0;overflow-wrap:anywhere}
 #schedule-mobile-actions{display:block;position:fixed;bottom:12px;left:50%;transform:translateX(-50%);margin:0;z-index:40}#inline-roster{padding-bottom:65px}#schedule-week-summary,#schedule-person-days,#kitchen-schedule-defaults{max-width:100%;overflow-wrap:anywhere}#schedule-week-summary table,#schedule-person-days table{min-width:0!important}#schedule-person-days .tablewrap{max-width:100%}
}

@media(max-width:700px){#schedule-proposal-dialog .toolbar{display:flex!important;flex-wrap:wrap!important;max-width:100%}#schedule-proposal-dialog .toolbar button{white-space:normal!important;max-width:100%;min-width:0}#schedule-proposal-dialog>section{max-width:94vw;box-sizing:border-box}}

/* Explicit captions only in the roster action sheet. */
.schedule-popup.schedule-action-sheet{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px;padding:16px;max-height:85dvh;overflow-y:auto}
.schedule-action-item{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;text-align:center}
.schedule-action-caption{font:500 13px/1.25 system-ui,sans-serif;overflow-wrap:anywhere;cursor:pointer;max-width:100%}

/* Planner actions use explicit text on every screen. Keep save beside draft. */
.schedule-save-bar{display:flex!important;gap:10px;align-items:center;flex-wrap:nowrap;margin:12px 0;max-width:100%;box-sizing:border-box}
.schedule-save-bar .btn{min-width:0;white-space:normal;overflow-wrap:anywhere;max-width:100%}
.schedule-icon{width:auto!important;height:auto!important;aspect-ratio:auto!important;white-space:normal;overflow-wrap:anywhere;padding:10px 14px!important}
.schedule-popup.schedule-action-sheet{grid-template-columns:repeat(2,minmax(0,1fr))}
.schedule-action-sheet>.btn{min-width:0;max-width:100%}
@media(max-width:700px){
 .schedule-save-bar>.btn{flex:1 1 0;padding:12px 8px!important}
 #schedule-mobile-day header{flex-wrap:wrap}
 #schedule-mobile-day header h2{order:-1;flex-basis:100%}
 #schedule-mobile-day header .btn{flex:1 1 28%;font-size:14px}
}

/* Distinct publishing and draft actions, retaining the shared button shape. */
body #app .schedule-save-bar #calendar-save{background:linear-gradient(180deg,#353535,#080808)!important;color:#fff!important;border:1px solid #111!important;box-shadow:inset 0 1px 0 #ffffff30,0 3px 6px #0003!important}
body #app .schedule-save-bar #calendar-draft-save{background:linear-gradient(180deg,#ffffffed,#e5e5e5ed)!important;color:#111!important;border:2px solid #111!important;box-shadow:inset 0 1px 0 #fff,0 3px 6px #0002!important}
body #app .schedule-save-bar :is(#calendar-save,#calendar-draft-save){font-weight:650;min-height:48px;text-shadow:none!important}
body #app .schedule-save-bar :is(#calendar-save,#calendar-draft-save):focus-visible{outline:3px solid #2574cf!important;outline-offset:3px}
body #app .schedule-save-bar :is(#calendar-save,#calendar-draft-save):disabled{opacity:.5;cursor:wait}

/* Explicit workspace tracks: warning panels cannot push the calendar into the name column. */
@media screen and (min-width:701px){
 body.signed-in #app .schedule-planner-layout>.schedule-planner-people{grid-column:1;grid-row:1 / span 3}
 body.signed-in #app .schedule-planner-layout>#schedule-content{grid-column:2;grid-row:2;width:100%;min-width:0}
 body.signed-in #app .schedule-planner-layout>section[role=status]{grid-column:2;grid-row:1;min-width:0}
 body.signed-in #app .schedule-planner-layout:not(:has(>section[role=status]))>#schedule-content{grid-row:1}
}

/* Owner day-off has its own row, never overlaps the date. */
.inline-calendar thead th.has-owner-dayoff{position:relative;padding-top:6px!important}
.inline-calendar thead th>[data-owner-dayoff]{position:absolute;right:10px;top:6px;font-size:16px!important;line-height:20px;font-weight:700;white-space:nowrap}
#schedule-mobile-day header>[data-owner-dayoff]{display:block;flex-basis:100%;text-align:right;margin:0 10px 14px;font-size:16px;font-weight:700}
.schedule-popup th>[data-owner-dayoff]{display:block;text-align:right;margin-bottom:14px;font-size:16px}

/* E off is an overlay: date keeps its centered, unchanged position. */
.inline-calendar thead th>[data-owner-dayoff]{right:5px;top:6px;font-size:13px!important;pointer-events:none;z-index:1}
#schedule-mobile-day header{position:relative}
#schedule-mobile-day header>[data-owner-dayoff]{position:absolute;right:5px;top:0;margin:0;font-size:13px;pointer-events:none}

.inline-calendar thead th>[data-owner-dayoff]{top:50%;transform:translateY(-50%)}

/* Per-person rule editor: independent of appearance checkbox presets. */
.schedule-current-rules{width:min(800px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:85dvh;overflow-y:auto;box-sizing:border-box}
.schedule-current-rules [data-person]{margin:12px 0;padding:12px;border:1px solid currentColor;border-radius:12px;min-width:0}
.schedule-current-rules summary{cursor:pointer;font-weight:700;overflow-wrap:anywhere}
.schedule-rule-row{padding:12px 0;border-bottom:1px solid #8886;min-width:0}
.schedule-rule-row input:not([type=checkbox]){width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.schedule-rule-days{display:flex;flex-wrap:wrap;gap:12px}
.schedule-rule-toggle{position:relative;display:flex!important;align-items:center;gap:12px;min-width:0;overflow-wrap:anywhere}
.schedule-rule-toggle>input[role=switch]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;clip-path:inset(50%)}
.schedule-rule-toggle .schedule-rule-track{display:block!important;flex:0 0 48px;width:48px;height:28px;background:#777;border-radius:20px;position:relative}
.schedule-rule-track::after{content:'';position:absolute;left:3px;top:3px;width:22px;height:22px;border-radius:50%;background:white;transition:transform .15s}
.schedule-rule-toggle input:checked+.schedule-rule-track{background:#008a50}
.schedule-rule-toggle input:checked+.schedule-rule-track::after{transform:translateX(20px)}
.schedule-rule-toggle input:focus-visible+.schedule-rule-track{outline:3px solid #2476e8;outline-offset:3px}

/* Unified schedule workspace: tabs without close controls. */
.schedule-view-tabs{display:flex;gap:4px;max-width:100%;border-bottom:1px solid currentColor;margin-bottom:16px;touch-action:pan-y}
.schedule-view-tabs [role=tab]{flex:0 1 auto;min-width:0;white-space:normal;padding:12px 20px;border:1px solid transparent;border-radius:16px 16px 0 0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.schedule-view-tabs [aria-selected=true]{background:rgba(255,255,255,.25);border-color:currentColor;border-bottom-color:transparent;font-weight:700}
.schedule-view-tabs [role=tab]:focus-visible{outline:2px solid currentColor;outline-offset:-4px}
.schedule-view-tabs ~ .schedule-page-actions #calendar-edit{display:none}
@media(max-width:760px){.schedule-view-tabs [role=tab]{flex:1;padding:12px 8px;font-size:16px}}

/* Browser-like connected tabs: exempt from generic glassy button presets. */
body #app .schedule-view-tabs{gap:0!important;align-items:end;padding:8px 8px 0!important;border:0!important;border-bottom:1px solid #65726b!important;border-radius:12px 12px 0 0;background:#15291b26!important}
body #app .schedule-view-tabs button[role=tab]{position:relative;flex:0 1 240px!important;margin:0!important;padding:12px 24px!important;min-height:46px!important;height:auto!important;border:0!important;border-radius:14px 14px 0 0!important;box-shadow:none!important;background:transparent!important;color:inherit!important;font:500 16px/1.4 system-ui!important;transform:none!important;text-shadow:none!important;white-space:normal!important}
body #app .schedule-view-tabs button[aria-selected=true]{background:#eef1e6!important;color:#18231c!important;font-weight:700!important;box-shadow:0 1px 0 #eef1e6!important;z-index:1}
body #app .schedule-view-tabs button[aria-selected=false]:hover{background:#ffffff26!important}
@media(max-width:760px){body #app .schedule-view-tabs button[role=tab]{flex:1 1 0!important;padding:12px 8px!important;font-size:15px!important}}
