/* Scoped to the schedule; all data-driven colors are an explicit enum. */
.schedule-ui {
  --schedule-border: var(--line, #d6e0e7);
  --schedule-ink: var(--ink, #10202b);
  --schedule-muted: #486170;
  color: var(--schedule-ink);
  min-width: 0;
  max-width: 100%;
  padding: clamp(12px, 2vw, 24px);
  margin-bottom: 22px;
  border: 1px solid var(--schedule-border);
  border-radius: 22px;
  background: radial-gradient(ellipse at top right, #eaf5f8, transparent 55%), #fff;
  overflow-wrap: anywhere;
}
.schedule-ui *, .schedule-ui *::before, .schedule-ui *::after { box-sizing: border-box; }
.schedule-ui h2, .schedule-ui h3, .schedule-ui h4, .schedule-ui p { margin: 0 0 10px; }
.schedule-ui p { line-height: 1.55; }
.schedule-heading, .schedule-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.schedule-tools { align-items: flex-end; }
.schedule-heading h2 { font-size: clamp(24px, 3vw, 36px); letter-spacing: -.025em; }
.schedule-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--schedule-muted); }
.schedule-month-title { text-transform: capitalize; font-size: 19px; }
.schedule-ui label { display: grid; gap: 6px; min-width: 0; font-weight: 600; }
.schedule-ui input, .schedule-ui select, .schedule-ui button { min-width: 0; max-width: 100%; font: inherit; }
.schedule-ui input, .schedule-ui select { width: 100%; padding: 10px; border: 1px solid var(--schedule-border); border-radius: 10px; background: #fff; color: var(--schedule-ink); }
.schedule-ui button { white-space: normal; }
.schedule-ui :is(button, input, select, summary):focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.schedule-notice { padding: 12px 16px; border-left: 4px solid #1d4ed8; border-radius: 8px; background: #eef4ff; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; list-style: none; padding: 0; margin: 18px 0; font-size: 12px; }
.schedule-legend li { display: flex; align-items: center; gap: 7px; min-width: 0; }
.schedule-color-green { --schedule-fill: #e3f3e8; --schedule-tone: #23603d; --schedule-edge: #63a17b; }
.schedule-color-blue, .schedule-myjnia-night { --schedule-fill: #e6efff; --schedule-tone: #234c89; --schedule-edge: #799ed6; }
.schedule-color-amber { --schedule-fill: #fff1d5; --schedule-tone: #754808; --schedule-edge: #c29a48; }
.schedule-color-rose, .schedule-myjnia-day { --schedule-fill: #fce5ed; --schedule-tone: #843250; --schedule-edge: #ce88a1; }
.schedule-color-teal { --schedule-fill: #dff4f1; --schedule-tone: #145e59; --schedule-edge: #61a49c; }
.schedule-chip { display: inline-block; width: 13px; height: 13px; flex: 0 0 13px; border-radius: 4px; background: var(--schedule-fill); border: 2px solid var(--schedule-edge); }
.schedule-status-key { padding: 3px 7px; border: 1px solid #617788; border-radius: 5px; }
.schedule-proposed { border-style: dashed !important; }
.schedule-warnings { padding: 14px 16px; margin-bottom: 20px; background: #fff7e7; border: 1px solid #dfbe79; border-radius: 14px; color: #68420e; }
.schedule-warnings h3 { font-size: 16px; }
.schedule-warnings ul { margin: 8px 0; padding-left: 18px; font-size: 13px; }
.schedule-weeks { display: grid; gap: 14px; }
.schedule-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.schedule-day { min-width: 0; padding: 8px; background: #fff; border: 1px solid var(--schedule-border); border-radius: 14px; }
.schedule-day.schedule-weekend { background: #f2f6fa; }
.schedule-day h3 { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--schedule-border); }
.schedule-day h3 span { font-size: 11px; font-weight: 600; color: var(--schedule-muted); }
.schedule-day h3 time { font-size: 22px; font-weight: 750; }
.schedule-shift { margin-top: 8px; }
.schedule-shift h4 { font-size: 11px; line-height: 1.4; margin-bottom: 5px; }
.schedule-shift ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.schedule-cell { display: grid; gap: 2px; min-width: 0; padding: 4px 5px; border: 1px solid var(--schedule-edge); border-left-width: 4px; border-radius: 7px; background: var(--schedule-fill); color: var(--schedule-tone); font-size: 11px; line-height: 1.35; }
.schedule-cell strong { font-size: 12px; }
.schedule-cell .schedule-slot-label { width:100%; min-height:24px; padding:0; border:0; border-radius:2px; box-shadow:none; background:none; color:inherit; text-align:left; font-size:12px; font-weight:750; overflow-wrap:anywhere; text-decoration:underline; text-underline-offset:.16em; }
.schedule-cell small { font-size: 10px; font-weight: 700; }
.schedule-status-description { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.schedule-time { font-variant-numeric: tabular-nums; }
.schedule-empty { font-size: 11px; color: var(--schedule-muted); }
.schedule-day-gaps { padding-left: 14px; font-size: 11px; color: #84320e; }
.schedule-ui details { padding: 14px; margin-block: 12px; min-width: 0; background: #fff; border: 1px solid var(--schedule-border); border-radius: 14px; box-shadow: none; }
.schedule-ui summary { cursor: pointer; font-weight: 600; }
.schedule-ui .schedule-day-warning { margin: 10px 0 0; padding: 7px; border-color: #dfbe79; border-radius: 8px; background: #fff7e7; color: #68420e; }
.schedule-day-warning > summary { font-size: 11px; line-height: 1.4; }
.schedule-day-warning .schedule-day-gaps { margin: 8px 0 0; }
.schedule-ui .schedule-warning-details { margin: 10px 0 0; padding: 10px; border-color: #dfbe79; background: transparent; }
.schedule-pair summary > span { vertical-align: middle; }
.schedule-pair summary > span:not(.schedule-chip) { display: inline-block; max-width: 100%; margin: 3px 8px; }
.schedule-pair small { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; color: var(--schedule-muted); }
.schedule-pair-order { font-size: 12px; color: var(--schedule-muted); }
.schedule-archived { border-style: dashed !important; }
.schedule-ui .schedule-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); align-items: end; gap: 16px; margin: 18px 0 0; }
.schedule-ui .schedule-form > input[type=hidden] { display: none; }
.schedule-ui .schedule-archive-form { display: block; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--schedule-border); }
.schedule-archive-form p { font-size: 13px; }
.schedule-extra-form .schedule-extra-wide { grid-column: 1 / -1; }
.schedule-extra-form textarea { min-width: 0; max-width: 100%; width: 100%; font: inherit; resize: vertical; }
.schedule-extra-form textarea:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
.schedule-extra-caution { padding: 10px; border: 1px solid #bd8c32; border-radius: 8px; background: #fff4dc; color: #68420e; }
.schedule-extra-caution ul, [data-schedule-extra] ul { list-style: disc; padding-left: 16px; }
.schedule-extra-badge { padding-block: 4px; border-block: 1px solid currentColor; }
.schedule-extra-history { font-weight: 600; }
.schedule-day h3 [data-schedule-edit-day] { font: inherit; color: inherit; background: transparent; padding: .2em .35em; text-decoration: underline; text-underline-offset: .18em; }
.schedule-day h3 [data-schedule-edit-day]:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.schedule-ui [data-schedule-extra] { margin: 4px 0 0; padding: 6px; background: #fff; color: var(--schedule-ink); border-radius: 6px; }
.schedule-ui [data-schedule-extra] p { margin-top: 8px; white-space: pre-wrap; }
@media (max-width: 1100px) {
  .schedule-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schedule-outside { display: none; }
}
@media (max-width: 700px) {
  .schedule-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-tools { width: 100%; align-items: end; }
  .schedule-tools label { flex: 1 1 160px; }
}
@media (max-width: 380px) {
  .schedule-week { grid-template-columns: minmax(0, 1fr); }
}
@page { size: A4 landscape; margin: 8mm; }
@media print {
  .schedule-ui { background: #fff; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 9pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .schedule-tools, .schedule-settings { display: none !important; }
  .schedule-extra-form { display: none !important; }
  .schedule-heading h2 { font-size: 18pt; }
  .schedule-notice, .schedule-warnings, .schedule-legend { break-inside: avoid; }
  .schedule-ui :is(.schedule-day-warning, .schedule-warning-details) { max-height: none; overflow: visible; break-inside: auto; }
  .schedule-ui :is(.schedule-day-warning, .schedule-warning-details)::details-content { display: block !important; content-visibility: visible !important; height: auto !important; }
  .schedule-ui :is(.schedule-day-warning, .schedule-warning-details):not([open]) > :not(summary) { display: block !important; }
  .schedule-ui [data-schedule-extra]::details-content { display: block !important; content-visibility: visible !important; height: auto !important; }
  .schedule-ui [data-schedule-extra]:not([open]) > :not(summary) { display: block !important; }
  .schedule-weeks { display: block; }
  .schedule-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2mm; margin-bottom: 3mm; break-inside: avoid; page-break-inside: avoid; }
  .schedule-outside { display: block; }
  .schedule-day { border-radius: 2mm; padding: 2mm; break-inside: avoid; }
  .schedule-day h3 time { font-size: 14pt; }
  .schedule-day h3 [data-schedule-edit-day] { display: contents !important; text-decoration: none; }
  .schedule-cell { padding: 1.5mm; font-size: 8pt; }
  .schedule-cell strong { font-size: 8pt; }
  .schedule-cell .schedule-slot-label { min-height:0; text-decoration:none; font-size:8pt; }
  .schedule-cell small, .schedule-shift h4, .schedule-empty, .schedule-day-gaps { font-size: 7pt; }
}
