.quick-nav{position:fixed;bottom:0;left:232px;right:0;z-index:20;display:flex;justify-content:center;gap:8px;padding:10px max(12px,env(safe-area-inset-right));padding-bottom:max(10px,env(safe-area-inset-bottom));background:#17212d;box-shadow:0 -2px 12px #0002}.quick-nav button{border:0;border-radius:9px;background:#ffffff16;color:#fff;padding:12px 20px;font:600 14px inherit;cursor:pointer;min-height:44px}.workspace{padding-bottom:80px}.editor-footer{bottom:70px}.media-view{width:100%;max-height:70vh;object-fit:contain}.bon-frame{width:100%;height:68vh;border:0;background:white}dialog:has(.bon-frame){width:min(1000px,96vw)}.schedule-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;margin-bottom:18px;border:1px solid #d7dfeb;border-left:4px solid #dba719;border-radius:12px;background:#fff}.schedule-banner small{display:block;color:#607080;margin-top:4px}
.planning-queue{margin-top:24px}.schedule-choice{display:block;width:100%;margin:8px 0;text-align:left}.compare-machines{display:grid;grid-template-columns:1fr 1fr;gap:20px}.compare-machines section{background:#f6f8fb;border-radius:10px;padding:14px}.compare-machines .summary-row{align-items:start;gap:12px}.compare-machines strong{overflow-wrap:anywhere}#schedule-error,#duplicate-error{color:#a51d24;margin-top:12px}#schedule-form fieldset{margin:16px 0;border:1px solid #d8dfe8;border-radius:8px}#duplicate-merge-form .field{margin:14px 0}
@media(max-width:900px){.quick-nav{left:0}}
@media(max-width:700px){.quick-nav{gap:5px}.quick-nav button{flex:1;padding:11px 5px}.schedule-banner{align-items:start;flex-direction:column}.schedule-banner .btn{width:100%}.compare-machines{grid-template-columns:1fr}.content{padding-bottom:90px}.editor-footer{bottom:68px}}

@media(min-width:761px) and (max-width:1100px){.quick-nav{left:200px}}
@media(max-width:760px){.sidebar{display:none}.quick-nav{left:0;z-index:40}.quick-nav button{font-size:12px;padding:11px 4px}.content{padding-bottom:90px}}
@media print{.quick-nav,.schedule-banner{display:none!important}}

.schedule-control{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;margin-top:14px}
.schedule-banner .btn,.schedule-control .btn{flex-shrink:0}
.passage-planning-text{display:block;font-size:.8rem;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.passage-planning-text[hidden]{display:none}
.passage-planning-text.unscheduled{color:#9a4708}
.passage-planning-text.provisional{color:#6940a9}
.passage-planning-text.confirmed{color:#14568e}
.passage-planning-text.cancelled{color:#535c67}
.passage-planning-text.late{color:#ad2132}
.job-end{width:245px;gap:6px}
.job-end .passage-planning-text{width:100%;text-align:left}
#schedule-form fieldset{min-width:0}
#schedule-form .schedule-details{padding:12px}
#schedule-form .schedule-assignment{padding:6px 12px 10px}
#schedule-form .schedule-assignment .check-line{min-height:38px;padding:7px 0;align-items:center}
#schedule-form .schedule-assignment input{margin-top:0}
#schedule-form .schedule-overlap .field-note{margin:3px 0 10px 28px}
@media(max-width:760px){.job-end{width:100%;gap:5px}.job-end .passage-planning-text{font-size:.76rem}.schedule-control{align-items:start;flex-direction:column}.schedule-control .btn{width:100%}}
@media print{.schedule-control .btn{display:none}}

.queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e6e9ef;
}
.queue-copy { min-width: 0; overflow-wrap: anywhere; }
.queue-row p { margin: 4px 0; color: #526072; }
.queue-equipment {
  margin: 3px 0 0;
  padding: 0;
  list-style: none;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
  color: #4d5a67;
}
.queue-row .btn {
  inline-size: 148px;
  min-block-size: 44px;
  padding-inline: 8px;
  font-size: .78rem;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .queue-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .queue-row .btn { inline-size: 100%; }
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.calendar-toolbar input,.calendar-toolbar select {
  padding: 9px 10px;
  border: 1px solid #ccd5df;
  border-radius: 8px;
  background: white;
  min-height: 44px;
  max-width: 100%;
  color: #24303f;
  font: inherit;
  font-size: 14px;
}
.calendar-toolbar select { margin-left: auto; }
#calendar-page .page-heading { margin-bottom: 18px; }
.calendar-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #dce2e9;
  border-radius: 12px;
  background: white;
}
.calendar-scroll:focus-visible { outline: 2px solid #185abd; outline-offset: 2px; }
.calendar-grid {
  --rail-width: 54px;
  --minute: 1px;
  --half-hour: calc(30 * var(--minute));
  --plot-height: calc(var(--plot-minutes) * var(--minute));
  --hour-line: #dce3ec;
  --half-hour-line: #ebeff4;
  --day-border: #dce3ec;
  display: grid;
  position: relative;
  grid-template-columns: var(--rail-width) repeat(7, minmax(var(--day-min), 1fr));
  min-width: calc(var(--rail-width) + 7 * var(--day-min));
}
.calendar-grid.day {
  grid-template-columns: var(--rail-width) minmax(var(--day-min), 1fr);
  min-width: calc(var(--rail-width) + var(--day-min));
}
.calendar-corner,.calendar-day-heading {
  background: #f5f7fa;
  border-bottom: 1px solid var(--day-border);
}
.calendar-corner,.calendar-time-rail {
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--day-border);
}
.calendar-day-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  text-align: center;
  border-right: 1px solid var(--day-border);
}
.calendar-day-heading.today { background: #eaf2fc; color: #16477d; }
.calendar-day-heading strong { font-size: 14px; }
.calendar-day-heading .btn { min-height: 32px; font-size: 12px; }
.calendar-grid.day .calendar-day-heading {
  flex-direction: row;
  justify-content: space-between;
  text-align: left;
  padding-inline: 12px;
}
.calendar-time-rail {
  background: #f8fafc;
  color: #42536a;
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.calendar-time-rail > div { position: relative; height: var(--plot-height); }
.calendar-time-rail span {
  position: absolute;
  top: calc(var(--offset) * var(--minute));
  right: 6px;
  line-height: 1;
  transform: translateY(-50%);
  background: #f8fafc;
}
.calendar-time-rail span:first-child { transform: translateY(4px); }
.calendar-time-rail span:last-child { transform: translateY(calc(-100% - 4px)); }
.calendar-time-rail .full-hour { font-weight: 700; }
.calendar-time-rail .half-hour { font-size: 10px; }
.calendar-day { min-width: 0; border-right: 1px solid var(--day-border); }
.calendar-day:last-child { border-right: 0; }
.calendar-hours {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: var(--plot-height);
  background:
    repeating-linear-gradient(to bottom,
      var(--hour-line) 0, var(--hour-line) 1px,
      transparent 1px, transparent var(--half-hour),
      var(--half-hour-line) var(--half-hour), var(--half-hour-line) calc(var(--half-hour) + 1px),
      transparent calc(var(--half-hour) + 1px), transparent calc(2 * var(--half-hour)));
}
.calendar-day.today { background: #f9fbff; }
.calendar-event,.calendar-marker {
  --event-bg: #f1effb;
  --event-border: #7765a7;
  --status-ink: #52427b;
  position: relative;
  isolation: isolate;
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #18283b;
  font: inherit;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
:is(.calendar-event,.calendar-marker).running {
  --event-bg: #e2eeff;
  --event-border: #3570bb;
  --status-ink: #174b8b;
}
:is(.calendar-event,.calendar-marker).paused {
  --event-bg: #fff0cb;
  --event-border: #a36408;
  --status-ink: #7c4a05;
}
:is(.calendar-event,.calendar-marker):is(.stopped,.review,.reviewed) {
  --event-bg: #e2f4e9;
  --event-border: #34845a;
  --status-ink: #1a6542;
}
:is(.calendar-event,.calendar-marker)::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  z-index: -1;
  border: 1px solid var(--event-border);
  border-left: 4px solid var(--tech);
  border-radius: inherit;
  background: var(--event-bg);
  pointer-events: none;
}
:is(.calendar-event,.calendar-marker).planned::before { border-style: dashed; border-left-style: solid; }
:is(.calendar-event,.calendar-marker).positioned {
  --duration-height: calc(var(--length) * var(--minute));
  --lane-width: calc(100% / var(--columns));
  position: absolute;
  top: calc(var(--offset) * var(--minute));
  left: calc(var(--column) * var(--lane-width) + 3px);
  width: calc(var(--lane-width) - 6px);
  height: max(2px, min(max(var(--duration-height), 32px), calc(var(--target) * var(--minute))));
  overflow: hidden;
  container: calendar-slot / size;
}
:is(.calendar-event,.calendar-marker).positioned::before { height: max(2px, var(--duration-height)); }
.calendar-marker { pointer-events: none; }
.calendar-event:hover::before { filter: brightness(.96); }
.calendar-event:focus-visible { outline: 2px solid #185abd; outline-offset: -1px; }
.event-copy {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 2px;
  padding: 4px 7px 5px 9px;
}
.calendar-event.positioned .event-copy { height: 100%; overflow: hidden; }
.positioned .event-copy > :not(.event-time) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.event-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.calendar-event.positioned .event-time > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-state,.event-compact-label { color: var(--status-ink); font-weight: 700; }
.event-people > span + span { margin-left: 6px; }
.event-people i,.calendar-detail i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--tech);
  border-radius: 50%;
  margin-right: 4px;
}
.event-compact-label { display: none; }
.calendar-event.compact .event-copy { display: none; }
.calendar-event.compact .event-compact-label {
  display: block;
  position: absolute;
  inset: 3px 6px auto 9px;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.calendar-extra {
  display: grid;
  gap: 6px;
  padding: 10px 6px;
  border-top: 1px solid var(--day-border);
}
.calendar-extra h3 { margin: 0 0 2px; font-size: 12px; }
.calendar-extra .event-copy { overflow-wrap: anywhere; }
.calendar-all-day-rail {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 6px 3px;
  border-right: 1px solid var(--day-border);
  border-bottom: 1px solid var(--day-border);
  background: #f8fafc;
  text-align: center;
  font-size: 10px;
}
.calendar-all-day { align-content: start; border-right: 1px solid var(--day-border); border-bottom: 1px solid var(--day-border); border-top: 0; padding: 6px; }
.calendar-all-day .event-time { display: none; }
.calendar-availability { cursor: default; }
.calendar-availability:hover::before { filter: none; }
:is(.calendar-event,.calendar-marker).unavailable {
  --event-bg: #edf0f3;
  --event-border: #8b97a5;
  --status-ink: #344356;
}
:is(.calendar-event,.calendar-marker).internal-activity {
  --event-bg: #e8f1f8;
  --event-border: #6d8eaa;
  --status-ink: #324e67;
}
.calendar-brief .calendar-event { min-height: 44px; }
.calendar-brief :is(.event-title,.event-equipment,.event-people) { display: none; }
.calendar-detail { overflow-wrap: anywhere; }
.calendar-detail section + section { margin-top: 14px; }
.calendar-detail h3 { margin: 0 0 4px; font-size: 15px; }
.calendar-detail p { margin: 0 0 10px; }
.calendar-detail ul { margin: 6px 0 0; padding: 0; list-style: none; }
.calendar-detail li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5eaf0;
  background: #f7f9fc;
}
.calendar-detail li small { color: #42536a; }
.calendar-plan-edit { justify-self: start; margin-top: 4px; }
@container calendar-slot (max-width: 99px) {
  .event-copy { padding: 3px 4px 2px 6px; }
  .calendar-event.positioned .event-copy > strong {
    display: -webkit-box;
    grid-row: 1;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .event-time { font-size: 10px; }
}
@container calendar-slot (max-width: 99px) and (max-height: 78px) {
  .event-title,.event-equipment,.event-people { display: none; }
}
@container calendar-slot (max-height: 85px) {
  .event-equipment { display: none; }
}
@container calendar-slot (max-height: 70px) {
  .event-people { display: none; }
}
@container calendar-slot (max-height: 67px) and (max-width: 158px) {
  .event-title { display: none; }
}
@container calendar-slot (max-height: 45px) {
  .event-title { display: none; }
}
@media (max-width: 760px) {
  .calendar-toolbar { gap: 7px; }
  .calendar-toolbar > .btn { padding-inline: 9px; min-height: 44px; }
  .calendar-toolbar input { flex: 1 1 100px; min-width: 0; padding-inline: 6px; }
  .calendar-toolbar select { width: 100%; margin-left: 0; }
  .calendar-toolbar input,.calendar-toolbar select { font-size: 16px; }
  .calendar-grid { --rail-width: 42px; }
  .calendar-time-rail span { right: 5px; }
  .calendar-day-heading .btn { min-height: 38px; }
}
@media (max-width: 360px) {
  .calendar-toolbar { gap: 5px; }
  .calendar-toolbar > .btn { padding-inline: 6px; }
  .calendar-toolbar > [data-action="calendar-step"] { width: 31px; }
  .calendar-toolbar input { font-size: 14px; }
}

.page-heading.with-calendar-preview { flex-wrap: wrap; }
.page-heading.with-calendar-preview > .calendar-preview-trigger { margin-left: auto; }
.modal-head > .calendar-preview-trigger { margin-left: auto; }
dialog.calendar-preview {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(520px, 100vw);
  height: 100dvh;
  max-height: none;
  border-radius: 14px 0 0 14px;
  overflow: hidden;
  box-sizing: border-box;
}
dialog.calendar-preview[open] { display: flex; flex-direction: column; }
.calendar-preview .modal-head { flex: none; }
.calendar-preview-tools { display: grid; gap: 8px; padding: 10px 16px; border-bottom: 1px solid #dce2e9; }
.calendar-preview-week { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.calendar-preview-week strong { text-align: center; font-size: 14px; }
.calendar-preview-options { display: flex; flex-wrap: wrap; gap: 6px; }
.calendar-preview-options select {
  flex: 1 1 155px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #ccd5df;
  border-radius: 8px;
  background: white;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.calendar-preview-days { overflow: auto; overscroll-behavior: contain; padding: 10px 16px 16px; }
.calendar-preview-day { display: grid; gap: 5px; padding-block: 8px; border-bottom: 1px solid #e8edf3; }
.calendar-preview-day h3 { font-size: 14px; margin: 0; }
.calendar-preview-day h3[aria-current] { color: #16477d; }
.calendar-preview-day > .field-note { margin: 0; }
.calendar-preview-day .calendar-event { cursor: default; overflow-wrap: anywhere; }
.calendar-preview-day .calendar-event:hover::before { filter: none; }
@media (max-width: 760px) {
  dialog.calendar-preview { width: 100vw; max-width: none; border-radius: 0; }
  .calendar-preview .modal-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .calendar-preview-days { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .calendar-preview .btn { min-height: 44px; }
  .page-heading.with-calendar-preview > .calendar-preview-trigger { margin-left: 0; }
  .modal-head:has(> .calendar-preview-trigger) { flex-wrap: wrap; }
}
