/* Scoped cast UI. No admin/staff/login selectors are restyled. */
.ch-shell{--ch-teal:var(--tolno-deep);--ch-ink:var(--tolno-text);min-height:100dvh;color:var(--ch-ink);background:var(--tolno-page);position:relative;isolation:isolate;padding-bottom:calc(110px + env(safe-area-inset-bottom));font-size:14px;overflow:clip}
.ch-shell::before{content:"";position:fixed;z-index:-2;inset:0;background:var(--tolno-brand-gradient);border-radius:0}
.ch-shell::after{content:none}
.ch-header{padding:32px 20px 22px;max-width:600px;margin:auto}.ch-brand{display:flex;align-items:center;justify-content:space-between;gap:15px;color:white}.ch-brand>span{font-size:30px;letter-spacing:.16em;font-weight:600;line-height:1.3}.ch-brand>small{font-size:12px;text-align:right;max-width:40%;overflow-wrap:anywhere}.ch-name{font-weight:600;color:white;font-size:27px;margin-top:23px;overflow-wrap:anywhere}.ch-name>small{font-size:13px;margin-left:6px;font-weight:500}
.ch-main{max-width:600px;margin:auto;padding:0 16px;position:relative}.ch-card,.ch-main>.card{background:white;border:1px solid #e2f4f4;border-radius:19px;padding:19px 16px;margin:0 0 14px;box-shadow:0 3px 15px #40898c05;min-width:0}
.ch-card h2,.ch-main h2{display:flex;align-items:center;gap:12px;background:none;border:0;padding:0;margin:0 0 20px;border-radius:0;color:var(--ch-ink);font-size:17px;font-weight:650;line-height:1.5;letter-spacing:0}.ch-card h2 svg{width:28px;height:28px;color:var(--ch-teal);flex-shrink:0}.ch-shell svg{display:block}.ch-shell button{font:inherit;cursor:pointer;touch-action:manipulation}.ch-shell button:focus-visible{outline:3px solid #135e68;outline-offset:3px}.ch-shell button:disabled{cursor:default}.ch-today h2{margin-bottom:16px}.ch-today-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ch-today-row time{font-size:12px;color:#536c7a}.ch-today-row strong{font-size:22px;letter-spacing:-.025em;white-space:nowrap}.ch-today-row strong>span{font-size:17px;margin:0 3px}.ch-today-row .ch-today-message{font-size:16px;white-space:normal;letter-spacing:0}.ch-pill{display:inline-block;background:#d4f6f3;border-radius:20px;padding:5px 12px;color:#188b94;font-size:11px;white-space:nowrap;font-style:normal;font-weight:600}.ch-pill.neutral{background:#eff1f4;color:#647382}.ch-period{display:flex;align-items:center;gap:12px;margin:18px 0}.ch-period strong{font-size:26px;letter-spacing:-.025em;font-weight:650}.ch-deadline{font-size:12px;color:#667385;margin:12px 0 20px;line-height:1.6}.ch-deadline time{margin-left:6px}.ch-sent{font-size:12px;color:#168c94;margin:12px 0 18px}.ch-shell .ch-primary{display:block;width:100%;background:var(--tolno-action-gradient);color:white;border:none;border-radius:12px;padding:15px 12px;font-size:15px;font-weight:600;min-height:48px;line-height:1.4;text-align:center}.ch-primary:disabled{opacity:.6}.ch-week-control{display:flex;align-items:center;justify-content:space-between;gap:1px;margin:16px 0}.ch-week-control button{background:transparent;border:0;color:var(--ch-ink);padding:9px 5px;border-radius:8px;min-width:36px;min-height:44px}.ch-week-control svg{width:19px;height:19px}.ch-week-control .ch-week-label{font-size:13px;font-weight:600;white-space:normal;padding:9px 0;flex:1;letter-spacing:-.02em}.ch-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}.ch-week-day{min-width:0;text-align:center;border-radius:10px;padding:5px 0 8px}.ch-week-day.today{background:#d9f6f5}.ch-week-day>small{display:block;font-size:11px;font-weight:400;color:#65758a;margin-bottom:13px}.ch-week-day>b{font-size:20px;font-weight:500;display:block;margin-bottom:12px;color:#455c71}.ch-times{min-height:36px;color:#12a5ae;line-height:1.6;font-size:10px;letter-spacing:-.04em;white-space:nowrap}.ch-times span{display:block}.ch-times .ch-dash{color:#8d9aa8;font-size:17px}.ch-times .ch-adjusted{font-size:9px;letter-spacing:-.08em;white-space:normal;min-height:36px;padding-top:7px}.ch-week-day em{display:block;font-style:normal;font-size:10px;color:#168e98;font-weight:600;margin-top:5px;white-space:nowrap}.ch-week-day em.pending{color:#8b95a3}.ch-nav{position:fixed;z-index:25;bottom:0;left:0;right:0;background:white;border-top:1px solid #7cd6d5;display:grid;grid-template-columns:repeat(3,1fr);align-items:end;padding:8px max(15px,calc((100vw - 600px)/2)) calc(10px + env(safe-area-inset-bottom));box-shadow:none}.ch-nav button{background:none;border:0;border-radius:0;color:var(--tolno-inactive);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;font-size:12px;font-weight:600;padding:0;min-height:65px}.ch-nav button>svg{height:28px;width:28px;margin-bottom:7px}.ch-nav button.selected{color:var(--tolno-deep)}.ch-nav .ch-home i{width:48px;height:48px;border-radius:50%;background:var(--tolno-deep);color:white;display:grid;place-items:center;font-style:normal;box-shadow:none;border:0}.ch-nav .ch-home:not(.selected) i{background:#e9f7f7;color:#829fa4}.ch-nav .ch-home i svg{height:26px;width:26px}.ch-nav span{line-height:16px}.ch-page-title{font-size:21px;margin:0 0 20px;color:white;font-weight:650}.ch-link{display:block;background:white;color:#39777e;border:1px solid #e3efef;border-radius:12px;width:100%;padding:14px;margin:12px 0}.ch-main input{width:100%;min-width:0;margin:8px 0 16px;padding:12px;font-size:16px;border:1px solid #cce8e9;border-radius:9px}.ch-main label{font-size:13px}.ch-main .arrival-list{grid-template-columns:1fr}.ch-main .arrival-record{min-width:0;overflow-wrap:anywhere}.ch-main .row{flex-wrap:wrap}.ch-main .hint,.ch-main .muted,.ch-help{font-size:11px;line-height:1.7;color:#68808b}.ch-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:20px 0}.ch-month-grid>small{font-size:11px;text-align:center;color:#71828b;padding:4px 0}.ch-month-grid>button{background:white;color:var(--tolno-text);border:1px solid #e4eeee;border-radius:9px;min-height:42px;padding:7px 1px;min-width:0}.ch-month-grid>button.on{background:#def7f4;border-color:#86d7d3;color:#138c98}.ch-submit-grid button{min-height:76px}.ch-submit-grid button small{display:block;white-space:nowrap;font-size:9px;line-height:1.6}.ch-submit-grid button b{display:block;font-size:15px;margin-bottom:4px}.ch-submit-grid button:disabled{opacity:1}.ch-submit-summary{display:grid;gap:16px;font-size:13px}.ch-submit-summary small{color:#778d93;font-size:11px}.ch-dialog-head,.ch-month-control{display:flex;justify-content:space-between;align-items:center;gap:10px}.ch-dialog-head h2{margin:0;background:none;border:0;padding:0;font-size:17px}.ch-active dialog{max-width:420px;width:calc(100% - 28px);max-height:88dvh;overflow:auto;padding:22px;border:1px solid #e3eeee;border-radius:18px;color:var(--tolno-text)}.ch-active dialog::backdrop{background:#163b4666}.ch-active:has(dialog[open]){overflow:hidden}.ch-active .toast{z-index:100}.ch-active .save-cloud-status{z-index:100}.ch-main .notice-item{overflow-wrap:anywhere}.ch-main h3{font-size:15px}.ch-main .actions{flex-wrap:wrap}
@media(min-width:650px){.ch-header{padding-top:44px}.ch-main{padding:0 20px}.ch-card{padding:24px}.ch-week-label{font-size:15px!important}.ch-times{font-size:12px}.ch-week-day em{font-size:11px}.ch-brand>span{font-size:36px}}
@media(max-width:360px){.ch-header{padding-left:16px;padding-right:16px}.ch-brand>span{font-size:26px}.ch-brand>small{font-size:10px}.ch-main{padding:0 12px}.ch-card{padding:16px 12px}.ch-card h2{font-size:16px;gap:9px}.ch-period strong{font-size:23px}.ch-today-row strong{font-size:20px}.ch-week-control .ch-week-label{font-size:11px}.ch-week-control button{min-width:28px}.ch-times{font-size:9px}.ch-week-day em{font-size:9px}}
/* Keep the home overview compact on phones without shrinking tap targets. */
.ch-review h2{margin-bottom:12px}.ch-review .ch-week-control{margin:8px 0}.ch-week-day>small{margin-bottom:9px}.ch-week-day>b{margin-bottom:9px}.ch-card .ch-period{margin:14px 0}.ch-card .ch-deadline{margin-bottom:16px}

/* Submission overlays the home; other screens retain their layout. */
.ch-active dialog.ch-submission-dialog{max-width:540px;width:calc(100% - 24px);max-height:88dvh;padding:18px 14px;overscroll-behavior:contain;overflow-x:hidden;scrollbar-gutter:stable}.ch-submission-dialog .ch-dialog-head{position:sticky;top:-18px;z-index:1;background:#fff;padding:0 0 12px;margin-bottom:12px}.ch-submission-dialog .ch-dialog-head>button{min-width:44px;min-height:44px;font-size:23px;padding:4px 10px}.ch-submission-dialog .ch-card{border:0;box-shadow:none;padding:0;margin:0}.ch-submission-dialog h2{display:flex;gap:8px;align-items:center;background:none;border:0;padding:0;font-size:16px;color:var(--tolno-text)}.ch-submission-dialog h2 svg{height:24px;width:24px;color:#16b9bc;flex-shrink:0}.ch-submission-dialog .ch-primary{display:block;width:100%;background:var(--tolno-action-gradient);color:#fff;border:0;border-radius:12px;min-height:48px;padding:14px;font-weight:600}.ch-submission-dialog .ch-submit-summary{margin-top:16px}.ch-submission-dialog .ch-month-grid{margin-top:16px}.ch-submission-dialog .ch-help{font-size:11px}.ch-submission-dialog::backdrop{background:#163b4666}

.ch-person-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:23px}.ch-person-row .ch-name{margin-top:0;min-width:0}.ch-shell .ch-profile-icon{display:grid;place-items:center;flex-shrink:0;min-width:44px;min-height:44px;border:1px solid #ffffff88;border-radius:50%;background:#ffffff24;color:#fff;padding:10px}.ch-profile-icon svg{width:23px;height:23px}.ch-profile-logout{display:block;background:none;color:#63828a;margin:20px auto 0;min-height:44px}.ch-notification-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;border-bottom:1px solid #e3eff0;border-radius:0;background:white;color:var(--tolno-text);padding:16px 0;overflow-wrap:anywhere}.ch-notification-item:last-child{border-bottom:0}.ch-notification-item>span{flex:1;min-width:0}.ch-notification-item b{font-size:13px}.ch-notification-item small{display:block;color:#7a8996;font-size:10px;line-height:1.7;margin-top:6px}.ch-notification-item svg{width:16px;height:16px;flex-shrink:0}.ch-unread-count{display:inline-block;background:#16a9af;color:white;border-radius:12px;min-width:16px;padding:1px 4px;font-size:9px;margin-left:4px}

/* Lift only the profile button; retain the existing header layout. */
.ch-person-row .ch-profile-icon{transform:translateY(-18px)}

.ch-person-row{min-height:44px}.ch-my-period{font-size:14px;font-weight:600;margin-bottom:18px;color:#40858d}.ch-my-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}.ch-my-stats>div{min-width:0}.ch-my-stats small{font-size:11px;color:#6c8191;display:block}.ch-my-stats strong{font-size:31px;font-weight:650;display:block;margin-top:6px;color:#103b49}.ch-my-stats strong span{font-size:12px;margin-left:5px;font-weight:400}.ch-my-account{margin:0 0 14px;font-size:12px}.ch-my-account>div{display:grid;grid-template-columns:85px minmax(0,1fr);gap:12px;padding:7px 0}.ch-my-account dt{color:#7d8c99}.ch-my-account dd{margin:0;overflow-wrap:anywhere}.ch-my-menu{display:flex;align-items:center;justify-content:space-between;gap:12px;background:transparent;color:var(--tolno-text);border:0;border-top:1px solid #e3eff0;border-radius:0;min-height:52px;width:100%;padding:14px 0;text-align:left;font-size:13px}.ch-my-menu>span{min-width:0;overflow-wrap:anywhere}.ch-my-menu small{display:block;font-size:11px;color:#7b8e98;margin-top:6px}.ch-my-menu svg{width:17px;height:17px;flex-shrink:0}.ch-my-menu .ch-unread-count{font-size:10px;margin-left:8px}

/* Submitted wishes stay yellow until publication; published times are pink. */
.ch-shift-legend{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin:0 0 12px;font-size:11px;line-height:1.5}
.ch-shift-legend>span{display:inline-flex;align-items:center;gap:5px;color:#536c7a}
.ch-shift-legend>span:before{content:"";width:9px;height:9px;border-radius:50%;background:#c49416}
.ch-shift-legend>.final:before{background:#dc7789}
.ch-week-day .ch-times.ch-time-wish{color:#a77c0a;font-weight:600;background:#fff8df;border-radius:6px}
.ch-week-day .ch-times.ch-time-final{color:#cc657e;font-weight:600;background:#fff0f4;border-radius:6px}

.sr-calendar-grid button.sr-calendar-outside{background:#f5f7f8;color:#89979d;border-color:#e4eaed}

/* Keep all six calendar weeks visible without changing the normal submission form. */
.ch-submission-dialog[data-mode="request"] .sr-calendar-grid{gap:3px;margin:10px 0 12px}
.ch-submission-dialog[data-mode="request"] .sr-calendar-grid>button{min-height:48px;padding:3px 1px;border-radius:7px;line-height:1.2}
.ch-submission-dialog[data-mode="request"] .sr-calendar-grid>button b{font-size:14px;margin-bottom:2px}
.ch-submission-dialog[data-mode="request"] .sr-calendar-grid>button small{font-size:9px;line-height:1.3}
.ch-submission-dialog[data-mode="request"] .sr-calendar-grid>small{padding:2px 0}
.ch-submission-dialog[data-mode="request"] .ch-month-control h2{margin:6px 0}
.ch-submission-dialog[data-mode="request"] .sr-calendar-grid+.ch-primary{margin-top:10px}
@media(max-height:700px){.ch-submission-dialog[data-mode="request"] .sr-calendar-grid>button{min-height:44px}}

/* Match the home view: wishes stay yellow until publication. */
.ch-submission-dialog .sr-calendar-grid>button.sr-calendar-wish{background:#fff8df;color:#a77c0a;border-color:#efdda0}
.ch-submission-dialog .sr-calendar-grid>button.sr-calendar-final{background:#fff0f4;color:#cc657e;border-color:#efbdcb}
.ch-submission-dialog .sr-calendar-grid>button.sr-calendar-selected{background:#fff8df;color:#a77c0a;border:2px solid #a77c0a;box-shadow:none}
.ch-submission-dialog .sr-calendar-grid>button.sr-calendar-selected.sr-calendar-final{background:#fff0f4;color:#cc657e;border-color:#cc657e}
.ch-submission-dialog .sr-calendar-grid>button:disabled{background:#f0f2f4;color:#76808b;border-color:#e4eaed}

.ch-period strong .ch-period-label{display:block;font-size:12px;font-weight:400;line-height:1.5;color:var(--tolno-secondary);margin-bottom:3px}

@media(max-width:700px){
 .ch-header{position:sticky;top:0;z-index:30;max-width:none;padding:10px 20px 12px;isolation:isolate}
 .ch-header>.ch-brand,.ch-header>.ch-person-row{max-width:560px;margin-left:auto;margin-right:auto}
 .ch-header .ch-person-row{margin-top:8px;min-height:28px}
 .ch-header .ch-name{font-size:22px}.ch-header .ch-brand>span{font-size:24px}
}

/* Cast-only pastel home: compact header, notification bell, unified submission. */
.ch-shell{--tolno-brand-gradient:linear-gradient(135deg,#e0f7f6 0%,#d9f3f2 58%,#eeeafa 100%);--tolno-header-gradient:var(--ch-accent-gradient);--ch-ink:#214b57}
.ch-shell::before{background:var(--tolno-brand-gradient)}
.ch-shell .ch-header{padding:8px 16px 10px;position:sticky;top:0;z-index:30;min-height:68px}
.ch-shell .ch-brand{color:#24525d;gap:10px}
.ch-shell .ch-brand>span{font-size:24px;line-height:28px;letter-spacing:.12em}
.ch-shell .ch-person-row{margin-top:0;min-height:20px}
.ch-shell .ch-name{color:#24525d;font-size:16px;line-height:20px;margin-top:0}
.ch-shell .ch-name>small{font-size:11px}
.ch-header-tools{display:flex;align-items:center;gap:8px;min-width:0}
.ch-header-tools>small{font-size:11px;max-width:140px;overflow-wrap:anywhere}
html body .ch-shell .ch-bell{position:relative;display:grid;place-items:center;min-width:36px;min-height:36px;padding:7px;border-radius:50%;background:#ffffff99!important;color:#587c9c!important;border:0;flex:none}
.ch-bell svg{width:22px;height:22px}
.ch-bell>b{position:absolute;right:-3px;top:-3px;background:#e75059;color:#fff;min-width:16px;height:16px;padding:0 4px;border-radius:10px;font-size:10px;line-height:16px;text-align:center}
.ch-shell .ch-card{box-shadow:0 3px 12px #46818e0d;border-color:#e4f0f3;border-radius:18px;padding:16px;margin-bottom:12px}
.ch-shell .ch-today h2{margin-bottom:10px;font-size:16px}
.ch-shell .ch-today-row{gap:5px 10px}
.ch-shell .ch-today-row .ch-today-message{font-size:14px}
.ch-shell .ch-card h2>svg{background:linear-gradient(140deg,#bdeeed,#d5cef2);color:white;border-radius:50%;padding:6px;box-sizing:content-box;width:22px;height:22px;filter:drop-shadow(0 1px 1px #50718b20)}
.ch-unified-heading{display:flex;align-items:center;gap:8px;justify-content:space-between}
.ch-unified-heading h2{font-size:16px;margin:0;min-width:0}
.ch-unified-dates{margin:12px 0 8px;display:grid;gap:5px;font-size:12px}
.ch-unified-dates>div{display:grid;grid-template-columns:60px minmax(0,1fr);gap:8px;align-items:baseline}
.ch-unified-dates dt{color:#6e8191}
.ch-unified-dates dd{margin:0;font-weight:600;overflow-wrap:anywhere}
.ch-unified-shift>.ch-primary{margin-top:14px}
.ch-draft-count{font-size:11px;color:#668494;margin:12px 0 0}
html body .ch-shell .ch-week-grid>button.ch-week-day{display:block;appearance:none;min-width:0;min-height:0;padding:5px 0 8px;margin:0;border:0;border-radius:10px;background:transparent!important;color:inherit!important;font:inherit;text-align:center;box-shadow:none;line-height:normal}
html body .ch-shell .ch-week-grid>button.ch-week-day.today{background:#d9f6f5!important}
html body .ch-shell .ch-week-grid>button.ch-week-day[aria-disabled=true]{background:#f2f4f6!important;color:#89949d!important}
html body .ch-shell .ch-nav{background:#ffffffed;border-top-color:#e8e5f3;box-shadow:0 -3px 16px #6978b00a}
html body .ch-shell .ch-nav button.selected{color:#8187bd!important}
.ch-shell .ch-nav .ch-home.selected i{background:var(--ch-accent-gradient);color:white;box-shadow:0 3px 8px #8887b126}
.ch-shell .ch-nav .ch-home:not(.selected) i{background:#f0eef8;color:#9a9ab3}
@media(max-width:360px){.ch-shell .ch-header{padding-left:12px;padding-right:12px}.ch-header-tools>small{max-width:110px;font-size:10px}.ch-shell .ch-card{padding:14px 12px}.ch-unified-heading h2{font-size:15px}.ch-unified-dates{font-size:11px}}
/* Match special collection metadata to the ordinary submission card. */
.ch-shell .sp-cast-card{margin-top:0}
.ch-shell .sp-cast-card>h2{margin-bottom:12px;font-size:16px}
.ch-shell .sp-cast-card .sp-cast-collection{border:0;padding:0;margin:0}
.ch-shell .sp-cast-card .sp-cast-collection+.sp-cast-collection{border-top:1px solid #e5edf3;padding-top:16px;margin-top:16px}
.ch-shell .sp-cast-collection .ch-unified-heading{align-items:flex-start}
.ch-shell .sp-cast-collection h3{background:none;border:0;padding:0;margin:0;color:var(--ch-ink);font-size:15px;line-height:1.5;overflow-wrap:anywhere;min-width:0}
.ch-shell .sp-cast-collection .ch-pill{max-width:50%;white-space:normal;font-size:10px;line-height:1.5;flex:none}
.ch-shell .sp-cast-collection .ch-unified-dates{margin:12px 0}
.ch-shell .sp-cast-collection>.ch-primary{margin:14px 0 0;width:100%}
.ch-shell .sp-deadline-state{display:block;color:#8a6e87;font-size:10px;font-weight:400;margin-top:3px}
.ch-active .sp-store-comment{margin:12px 0 0;padding:10px 12px;background:#f5f4fb;border-radius:10px;color:#496471;min-width:0}
.ch-active .sp-store-comment h4{font-size:11px;line-height:1.5;font-weight:600;margin:0 0 5px;color:#7a7b9c}
.ch-active .sp-store-comment p{font-size:12px;line-height:1.7;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}

/* One cast action palette, inherited by both the home shell and body-level dialogs. */
body.ch-active{--ch-accent-gradient:linear-gradient(135deg,#88cbdb,#a59bd1);--tolno-action-gradient:var(--ch-accent-gradient);--tolno-header-gradient:var(--ch-accent-gradient);--tolno-aux:#f1f6fa;--tolno-aux-ink:#526e89;--tolno-white-label-shadow:none}

/* Week navigation mirrors the cast month navigator; the period is plain text. */
.ch-shell .ch-week-control{gap:10px;align-items:center}
.ch-shell .ch-week-control>button{display:grid;place-items:center;flex:0 0 44px;width:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:8px}
.ch-shell .ch-week-control>.ch-week-label{display:block;flex:1;min-width:0;margin:0;padding:0;text-align:center;font-size:13px;line-height:1.5;font-weight:600;color:var(--ch-ink);background:none;border:0}
.ch-shell .ch-week-control>button svg{width:17px;height:17px}
@media(max-width:360px){.ch-shell .ch-week-control{gap:6px}.ch-shell .ch-week-control>.ch-week-label{font-size:11px}}

/* Cast forms: reserve breathing room around fields and action groups, including
   body-level dialogs that do not inherit .ch-shell layout rules. */
html body.ch-active dialog .tolno-modal-body .actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px;margin:20px 0 0}
html body.ch-active dialog .tolno-modal-body .actions>button{margin:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px;line-height:1.5}
html body.ch-active dialog .tolno-modal-body label>select,
html body.ch-active dialog .tolno-modal-body label>input:not([type=checkbox]):not([type=radio]){display:block;margin:8px 0 0}
html body.ch-active dialog .tolno-modal-body label:has(>select),
html body.ch-active dialog .tolno-modal-body label:has(>input:not([type=checkbox]):not([type=radio])){margin:16px 0}
html body.ch-active dialog .tolno-modal-body label:has(>select):first-child{margin-top:0}
html body.ch-active dialog .tolno-modal-body :is(input,select,textarea)+.actions{margin-top:20px}
html body.ch-active dialog .tolno-modal-body :is(input,select,textarea)+label{margin-top:16px}
html body.ch-active dialog .tolno-modal-body form>.ch-primary,
html body.ch-active dialog .tolno-modal-body form>.tolno-save-action{margin-top:20px}
html body.ch-active dialog .tolno-modal-body .sr-error:empty{display:none}
html body.ch-active dialog :is(.tolno-modal-footer,footer:not(.tolno-ui-head)){display:flex;flex-wrap:wrap;gap:12px}

/* All cast modal section headings use the same quiet pastel treatment. */
html body.ch-active dialog .tolno-modal-body h3{box-sizing:border-box;display:block;margin:20px 0 12px;padding:9px 12px;border:0;border-radius:9px;background:#f2effa;color:#70648f;font-size:13px;font-weight:650;line-height:1.6;letter-spacing:.01em;overflow-wrap:anywhere}
html body.ch-active dialog .tolno-modal-body>h3:first-child{margin-top:0}
html body.ch-active dialog .tolno-modal-body #sr-cal-times>h3{margin-top:20px}

/* Submitted-day overview: a fixed layout with actions next to their information. */
.ch-active .ch-day-section{margin:0;padding:4px 0 0;min-width:0}
.ch-active .ch-day-section+.ch-day-section{margin-top:24px;padding-top:20px;border-top:1px solid #eeedf5}
.ch-active .ch-day-heading{display:flex;align-items:center;gap:10px;min-width:0}
html body.ch-active dialog .tolno-modal-body .ch-day-heading h3{margin:0;padding:0;background:transparent;border-radius:0;color:#234e5a;font-size:16px;line-height:1.5}
.ch-active .ch-day-icon{display:flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#a5dfeb,#c7bce9);color:white}
.ch-active .ch-day-icon svg{display:block;width:20px;height:20px}
.ch-active .ch-day-heading .ch-pill,.ch-active .ch-day-count{margin-left:auto;flex:none;font-size:11px}
.ch-active .ch-day-time{margin:16px 0 0;font-size:26px;font-weight:700;line-height:1.45;color:#234e5a;overflow-wrap:anywhere}
.ch-active .ch-day-original{margin-top:6px}
.ch-active .ch-day-visit{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 0;border-bottom:1px solid #eeedf5;min-width:0}
.ch-active .ch-day-visit>div{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.6}
.ch-active .ch-day-visit p{margin:5px 0 0}.ch-active .ch-day-note{white-space:pre-wrap;color:#6c7b89}
.ch-active .ch-day-visit>button{flex:none;min-height:44px;padding:10px 14px;font-size:12px}
.ch-active .ch-day-empty{margin:16px 0}
.ch-active .ch-day-menu{display:grid;gap:12px;margin-top:16px}
.ch-active .ch-day-menu>button{width:100%;min-height:48px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:360px){.ch-active .ch-day-time{font-size:23px}}

/* Native date fields must shrink inside the modal, including WebKit intrinsic widths. */
html body.ch-active dialog .tolno-modal-body :is(form,.formgrid,.formgrid>div){min-width:0;max-width:100%;box-sizing:border-box}
html body.ch-active dialog .tolno-modal-body .formgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
html body.ch-active dialog .tolno-modal-body :is(input,select,textarea){min-width:0;max-width:100%;box-sizing:border-box}
.ch-active .ch-day-time.ch-day-no-time{font-size:18px;font-weight:600}
.ch-active .ch-request-current{display:grid;gap:6px;padding:14px 16px;margin:0 0 20px;border-radius:12px;background:#f5f3fb;font-size:12px;color:#71808f}
.ch-active .ch-request-current strong{font-size:20px;color:#234e5a;overflow-wrap:anywhere}
.ch-active .ch-request-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:20px}
.ch-active .ch-request-times>div{min-width:0}
html body.ch-active dialog .tolno-modal-body :is(.ch-home-request,.ch-request-times) select{display:block;width:100%;min-height:46px;margin-top:8px}
html body.ch-active dialog .tolno-modal-body .ch-request-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.ch-active .ch-request-actions button{width:100%;min-height:48px}
.ch-active .ch-request-compare{display:grid;gap:16px;margin:20px 0}
.ch-active .ch-request-compare>div{display:grid;gap:6px;min-width:0}
.ch-active .ch-request-compare dt{font-size:12px;color:#71808f}
.ch-active .ch-request-compare dd{margin:0;font-size:20px;font-weight:600;overflow-wrap:anywhere}
@media(max-width:650px){html body.ch-active dialog .tolno-modal-body .formgrid{grid-template-columns:minmax(0,1fr)}}

/* Cast navigation lives in the header; home is the only primary screen. */
.ch-shell{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
.ch-shell .ch-header-tools{gap:8px}
.ch-shell .ch-header-tools>small{min-width:0;max-width:120px;text-align:right;overflow-wrap:anywhere}
html body .ch-shell .ch-header-account,html body .ch-shell .ch-bell{box-sizing:border-box;display:grid;place-items:center;position:relative;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:10px;border:0;border-radius:50%;background:#ffffff99!important;color:#587c9c!important}
.ch-shell .ch-header-account svg{display:block;width:22px;height:22px}
html body .ch-shell .ch-header-account[aria-current=page]{background:var(--ch-accent-gradient)!important;color:white!important}
.ch-shell .ch-subpage-toolbar{margin:0 0 12px}
.ch-shell .ch-subpage-toolbar>button{display:inline-flex;align-items:center;gap:6px;min-height:44px;margin:0;padding:10px 12px;font-size:12px;border-radius:10px}
.ch-shell .ch-subpage-toolbar svg{width:16px;height:16px}
@media(max-width:360px){.ch-shell .ch-header-tools{gap:6px}.ch-shell .ch-header-tools>small{max-width:80px}.ch-shell .ch-brand{gap:8px}}

/* Compact cast account: read-only identity and one history entry. */
.ch-shell .ch-account-card h2,.ch-shell .ch-account-history h2{font-size:16px;margin-bottom:12px}
.ch-shell .ch-account-card .ch-my-account{margin:0;display:grid;gap:12px}
.ch-shell .ch-account-card .ch-my-account>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;align-items:baseline;margin:0;padding:0;font-size:12px;line-height:1.6}
.ch-shell .ch-account-card .ch-my-account dt{font-size:12px;color:#718493;overflow-wrap:anywhere}
.ch-shell .ch-account-card .ch-my-account dd{margin:0;font-size:12px;color:#214b57;overflow-wrap:anywhere}
.ch-shell .ch-account-history .ch-my-menu{margin:0;padding:12px 0;min-height:44px;font-size:13px}
.ch-shell .ch-account-retry{min-height:44px;margin-top:12px}
.ch-shell .ch-page-title{color:#214b57}
@media(max-width:360px){.ch-shell .ch-account-card .ch-my-account>div{grid-template-columns:92px minmax(0,1fr);gap:8px}}

/* Header icons must keep explicit bounds after a card title moves into a dialog. */
html body.ch-active dialog .tolno-ui-head h2>svg{display:block;flex:0 0 24px;width:24px;height:24px;min-width:24px;max-width:24px;max-height:24px}
html body.ch-active dialog .tolno-ui-head h2:has(>svg){display:flex;align-items:center;gap:8px}

/* Keep an equal marker slot between weekday and date, including days without visits. */
.ch-shell{--ch-arrival-color:#9b6bd3}
.ch-shell .ch-shift-legend>.arrival:before{background:var(--ch-arrival-color)}
.ch-shell .ch-week-day>small{margin-bottom:0}
.ch-shell .ch-week-day>.ch-arrival-slot{display:flex;align-items:center;justify-content:center;height:12px;margin:0}
.ch-shell .ch-arrival-dot{display:block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:var(--ch-arrival-color)}

.ch-active .ch-day-visit-actions{display:flex;flex:none;align-items:center;gap:12px;margin:0}
.ch-active .ch-day-visit-actions>button{flex:none;min-width:44px;min-height:44px;margin:0;padding:10px 12px;font-size:12px}

.ch-times .ch-time-approval {
  font-size: 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}
