/* Lesson and workflow dialogs keep the schedule canvas in place. */
.drawer.center-modal {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 32px));
  height: auto;
  max-height: min(88dvh, 900px);
  border: 1px solid #dfe4ed;
  border-radius: 14px;
  box-shadow: 0 24px 80px #17223550;
  overscroll-behavior: contain;
}
.drawer.center-modal h2 { margin: 12px 0 18px; }
.drawer.center-modal .participants { display: block; }
.drawer.center-modal .detail-row { align-items: center; }
.drawer-backdrop { background: #17223570; }
@media(max-width:820px) {
  .drawer.center-modal {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 16px;
  }
}

.lesson-people { display: grid; gap: 10px; }
.lesson-person { border: 1px solid #e1e6ed; border-radius: 9px; padding: 12px; }
.lesson-person-head, .lesson-person-state { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.lesson-person-head button { padding: 0; font-weight: 650; }
.lesson-person-state { color: #657286; font-size: 12px; margin: 8px 0; }
.lesson-ordinal { color: #415875; font-size: 12px; }
.lesson-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.lesson-badges span { background: #edf2f8; color: #405675; border-radius: 5px; padding: 3px 6px; font-size: 11px; }
.lesson-actions { border-top: 1px solid #e0e5ed; padding-top: 14px; margin-top: 18px; }

.city-environment-marker{position:fixed;right:12px;bottom:12px;z-index:25;padding:3px 8px;border:1px solid #d8e1e8;border-radius:9px;background:#f5f8fae8;color:#547084;font:600 10px/1.35 system-ui;letter-spacing:.04em;pointer-events:none}
@media(max-width:820px){.city-environment-marker{display:none;position:static;font-size:9px}.mobile-more-card .city-environment-marker{display:block;width:fit-content;max-width:100%;margin-top:16px;overflow-wrap:anywhere}}
.daily-header .city-environment-marker{display:block;position:static;width:fit-content;max-width:100%;margin-top:8px;overflow-wrap:anywhere}
/* The modal must sit above the fixed mobile brand bar and bottom navigation. */
.drawer-backdrop:not([hidden]){z-index:85}
.drawer.center-modal:not([hidden]){z-index:90}

/* Brand buttons; state/tariff colors remain separate. */
.primary{background:var(--city-coral,#e83b45)!important;color:#fff!important;border-color:var(--city-coral,#e83b45)!important}
.primary:hover{background:#ae3029!important}.primary:disabled{background:#a8a8ac!important;border-color:#a8a8ac!important}
.drawer,.daily-detail{overflow-x:hidden;scrollbar-gutter:stable}
.drawer *,.daily-detail *{min-width:0}
.drawer input,.drawer select,.drawer textarea,.daily-detail input,.daily-detail select,.daily-detail textarea{max-width:100%;min-width:0;box-sizing:border-box}
.drawer fieldset{min-inline-size:0;max-width:100%}
.drawer .check input{flex:0 0 auto}
.drawer .command-form button{height:auto;min-height:40px;white-space:normal;overflow-wrap:anywhere}
.drawer .command-form [hidden]{display:none!important}
.drawer .command-form details{min-width:0}
.drawer .command-result{overflow-wrap:anywhere;word-break:break-word}
.drawer #close-drawer{background:#fff;min-width:34px;min-height:34px;flex:none}
.drawer header{position:sticky;top:0;background:#fff;z-index:6}
@media(max-width:820px){
 input:not([type=checkbox]):not([type=radio]),select,textarea,
 .command-form input,.command-form select,.command-form textarea,
 .daily-detail input,.daily-detail select,.daily-detail textarea,
 .journal-payment-form input,.journal-payment-form select,.journal-payment-form textarea{font-size:16px!important}
 .drawer.center-modal{inset:auto!important;left:calc(var(--city-visible-left,0px) + 8px)!important;top:calc(var(--city-visible-top,0px) + 8px)!important;transform:none!important;width:calc(var(--city-visible-w,100vw) - 16px)!important;max-width:calc(var(--city-visible-w,100vw) - 16px)!important;max-height:calc(var(--city-visible-h,100dvh) - 16px)!important;height:auto!important;padding:12px!important;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:auto}
 .daily-detail{inset:auto!important;left:calc(var(--city-visible-left,0px) + 8px)!important;top:calc(var(--city-visible-top,0px) + 8px)!important;width:calc(var(--city-visible-w,100vw) - 16px)!important;height:calc(var(--city-visible-h,100dvh) - 16px)!important;border-radius:12px;z-index:90;box-shadow:0 0 0 100vmax #24334577}
 .drawer .detail-row{gap:8px}.drawer .detail-row b{overflow-wrap:anywhere}
 .drawer select{width:100%;white-space:normal}
 .drawer .action-row{gap:6px}.drawer .action-row button{max-width:100%;font-size:14px}
}
.participant-search{display:block!important;margin:8px 0 12px!important}
.participant-search input{width:100%;border:1px solid #c7cdd6;border-radius:7px;padding:9px;min-height:39px;background:white}
.participant-search-count{font-size:12px;color:#5c6c83}
.lesson-person[hidden],.check[hidden]{display:none!important}
.schedule-cell-selection{position:absolute;left:2px;right:2px;border:2px solid #c83c33;background:#fff3f0aa;pointer-events:none;z-index:5}

.participant-notice-banner{padding:8px 10px;margin:8px 0;border:1px dashed #b6a276;border-radius:7px;background:#fff9e9;font-size:13px}
.participant-notice-banner b,.participant-notice-banner small{display:block;line-height:1.45;overflow-wrap:anywhere}.participant-notice-banner small{font-size:11px;color:#675d4e;margin-top:3px}
.participant-notice-banner.notice-recording,.participant-notice-banner.notice-materials{background:#f5f1fb;border-color:#a99bbc}
.participant-notice-banner.notice-cancelled{background:#fff2ef;border-color:#c39386}
.participant-state.planned-notice,.cell-button.planned-notice{border:1px dashed #ab8e66!important;background:#fff4da!important;color:#695433!important;font-size:10px!important}
#notice-finance-note,.notice-explanation{font-size:12px;line-height:1.5}.notice-history{margin-top:14px}.notice-history article{display:grid;gap:4px;border-bottom:1px solid #dde1e8;padding:9px 0;font-size:12px}.notice-history article span,.notice-history article small{color:#637086}
#notice-back{padding:8px;border:1px solid #ccd3de;border-radius:6px;margin-top:10px}

/* Today has three children in a two-column shell: keep its task panel out of the grid. */
@media(min-width:821px){
 .daily-shell > .daily-detail{position:fixed;inset:16px 16px 16px auto;width:min(380px,calc(100vw - 32px));max-height:calc(100dvh - 32px);z-index:80;border:1px solid #d6dce6;border-radius:12px;box-shadow:0 20px 60px #17223530}
}
