/* Phase 4-2 workspace. Scope every override to the timetable pages opting in. */
.of-timeline-workspace {
  --workspace-left: 0px;
  --workspace-top: 126px;
  --workspace-bottom: 0px;
  --workspace-panel-width: clamp(310px, 32vw, 410px);
  --workspace-blue: #2563eb;
  --workspace-border: #dfe6ee;
  --workspace-text: #203046;
}
.of-timeline-workspace [hidden] { display: none !important; }
.of-timeline-workspace .event-header {
  left: var(--workspace-left);
  right: 0;
  width: auto;
  min-height: 50px;
  padding: 7px 12px;
  box-sizing: border-box;
  z-index: 1002;
  color: var(--workspace-text);
  border-color: var(--workspace-border);
}
.of-timeline-workspace .timeline-header-title { flex: 1 1 auto; min-width: 0; }
.of-timeline-workspace .timeline-header-title h6 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.of-timeline-header-actions { display: flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.of-timeline-header-button,
.of-timeline-more > summary {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  font-size: 17px;
  cursor: pointer;
}
.of-timeline-header-button.active { color: var(--workspace-blue); background: #eff6ff; }
.of-timeline-toolbar {
  position: fixed;
  top: var(--event-header-height, 50px);
  left: var(--workspace-left);
  right: 0;
  z-index: 1001;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 8px 12px;
  color: var(--workspace-text);
  background: #fff;
  border-bottom: 1px solid var(--workspace-border);
  box-shadow: 0 2px 5px rgba(15,23,42,.04);
}
.of-timeline-tabs {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  padding: 3px;
  gap: 4px;
  border: 1px solid #dce4ee;
  border-radius: 10px;
  background: #f1f5f9;
}
.of-timeline-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  min-width: 0;
  min-height: 44px;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.of-timeline-tabs button:hover:not([aria-pressed="true"]) { background: #e2e8f0; color: #1e293b; }
.of-timeline-tabs button[aria-pressed="true"] {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.16);
}
.of-view-icon { font-size: 16px; flex-shrink: 0; }
.of-view-label { line-height: 1.3; }
.of-timeline-count {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.of-timeline-tabs button[aria-pressed="true"] .of-timeline-count { background: #fff; color: #1d4ed8; }
.of-timeline-actions { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.of-timeline-action, .of-timeline-actions .of-timeline-dropdown > summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #42556c;
  padding: 8px 9px;
  border: 1px solid #e4e9f0;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  min-height: 34px;
}
.of-timeline-action:disabled { opacity: .45; cursor: not-allowed; }
.of-timeline-action:not(:disabled):hover, .of-timeline-dropdown > summary:hover { background: #f3f6fa; color: #2563eb; }
.of-timeline-edit-link { color: #1d4ed8; }
.of-timeline-dropdown { position: relative; }
.of-timeline-dropdown > summary { list-style: none; }
.of-timeline-dropdown > summary::-webkit-details-marker { display: none; }
.of-timeline-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  min-width: 225px;
  max-width: calc(100vw - 24px);
  max-height: min(56vh, 400px);
  overflow: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--workspace-border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15,23,42,.16);
  z-index: 100;
  color: var(--workspace-text);
  text-align: left;
}
.of-timeline-filter-panel { width: 260px; }
.of-timeline-dropdown-panel > strong { display: block; font-size: 13px; margin-bottom: 10px; }
.of-timeline-dropdown-panel fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.of-timeline-dropdown-panel legend { font-size: 11px; color: #64748b; font-weight: 700; margin: 0 0 5px; }
.of-timeline-dropdown-panel label { display: flex; align-items: center; gap: 6px; min-height: 32px; margin: 0; padding: 4px; font-size: 13px; cursor: pointer; }
.of-timeline-dropdown-panel input { accent-color: #2563eb; }
.of-timeline-dropdown-panel small { display: block; color: #64748b; font-size: 11px; padding: 4px; }
.of-timeline-dropdown-panel > button, .of-timeline-dropdown-panel > a {
  display: flex; align-items: center; gap: 7px; width: 100%;
  border: 0; background: #fff; color: #334155; padding: 9px 8px; text-align: left;
  font-size: 13px; border-radius: 6px; text-decoration: none;
}
.of-timeline-dropdown-panel > button:hover, .of-timeline-dropdown-panel > a:hover { background: #eff6ff; color: #1d4ed8; }
.of-timeline-dropdown-panel > .of-timeline-clear { justify-content: center; border: 1px solid var(--workspace-border); color: #2563eb; }
.of-timeline-filter-dot { width: 7px; height: 7px; border-radius: 50%; background: #2563eb; }
.of-timeline-zoom-panel { display: flex; align-items: center; width: max-content; min-width: 0; gap: 4px; padding: 6px; }
.of-timeline-zoom-panel > button { width: auto; justify-content: center; white-space: nowrap; }
.of-timeline-workspace .timeline-viewport {
  left: var(--workspace-left);
  top: var(--workspace-top);
  bottom: var(--workspace-bottom);
  right: 0;
  width: auto;
  background: #fff;
}
.of-timeline-workspace[data-workspace-view="schedule"] .timeline-viewport {
  visibility: hidden;
  pointer-events: none;
}
.of-timeline-workspace[data-workspace-view="schedule"] .timeline-zoom-slider,
.of-timeline-workspace[data-workspace-view="schedule"] #of-timeline-filters,
.of-timeline-workspace[data-workspace-view="schedule"] #of-timeline-zoom-menu { display: none !important; }
.of-timeline-workspace[data-workspace-view="split"] .timeline-viewport { right: var(--workspace-panel-width); }
.of-my-schedule {
  position: fixed;
  top: var(--workspace-top);
  bottom: var(--workspace-bottom);
  left: var(--workspace-left);
  right: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #f7f9fc;
  color: var(--workspace-text);
  padding: 14px 14px 28px;
  box-sizing: border-box;
  z-index: 900;
  touch-action: pan-y;
}
.of-timeline-workspace[data-workspace-view="split"] .of-my-schedule {
  left: auto;
  width: var(--workspace-panel-width);
  border-left: 1px solid var(--workspace-border);
}
.of-my-schedule-content { max-width: 720px; margin: 0 auto; }
.of-my-schedule-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.of-my-schedule-heading h2 { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 0 0 3px; }
.of-my-schedule-heading p { margin: 0; font-size: 12px; color: #64748b; }
.of-my-schedule-next { border: 1px solid #d6e4fc; background: #eef5ff; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; overflow-wrap: anywhere; }
.of-my-schedule-summary-label { display: block; color: #4b678e; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.of-my-schedule-now-name { display: block; font-size: 13px; color: #1d4ed8; margin-bottom: 6px; }
.of-my-schedule-summary-line { display: flex; align-items: center; gap: 12px; }
.of-my-schedule-minutes { color: #1d4ed8; font-size: 29px; font-weight: 750; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.of-my-schedule-summary-slot { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.of-my-schedule-summary-slot > strong { font-size: 14px; line-height: 1.4; }
.of-my-schedule-summary-slot > span { font-size: 11px; color: #516681; }
.of-my-schedule-summary-note { margin: 0; color: #52667d; font-size: 12px; }
.of-my-schedule-filters { display: grid; gap: 8px; margin: 0 0 10px; }
.of-my-schedule-scope { display: flex; gap: 3px; padding: 3px; border-radius: 8px; background: #e9edf4; }
.of-my-schedule-scope > button { flex: 1 1 0; border: 0; background: transparent; border-radius: 6px; font-size: 12px; font-weight: 600; padding: 7px 4px; color: #53657c; }
.of-my-schedule-scope > button[aria-pressed="true"] { background: white; color: #1d4ed8; }
.of-my-schedule-filter-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.of-my-schedule-filter-row > button { border: 1px solid #dae2ed; background: #fff; color: #53657c; border-radius: 16px; padding: 5px 10px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.of-my-schedule-filter-row > button[aria-pressed="true"] { color: #1d4ed8; background: #eaf1ff; border-color: #b8cef8; }
.of-my-schedule-result-count { color: #64748b; font-size: 11px; margin-left: auto; white-space: nowrap; }
.of-my-schedule-note { margin: 8px 0 10px; color: #64748b; font-size: 11px; line-height: 1.5; }
.of-my-schedule-note > i, .of-conflict-color { color: #b45309; }
.of-my-schedule-list { display: grid; gap: 8px; outline-offset: 4px; }
.of-my-schedule-row { display: flex; gap: 8px; align-items: flex-start; min-width: 0; scroll-margin-top: 8px; }
.of-my-schedule-time { display: flex; flex-direction: column; flex: 0 0 45px; padding-top: 10px; gap: 3px; font-variant-numeric: tabular-nums; }
.of-my-schedule-time > strong { font-size: 14px; line-height: 1.3; }
.of-my-schedule-time > span { font-size: 11px; color: #64748b; }
.of-my-schedule-card {
  flex: 1 1 auto;
  min-width: 0;
  background-color: #e8edf4;
  background-clip: padding-box;
  border: 1px solid rgba(15,23,42,.12);
  border-left: 4px solid rgba(15,23,42,.20);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  overflow: hidden;
}
.of-my-schedule-detail {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
  padding: 9px 8px 10px;
  background: none;
  color: inherit;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  overflow-wrap: anywhere;
}
.of-my-schedule-stage { font-size: 11px; font-weight: 600; line-height: 1.3; }
.of-my-schedule-block-name { font-size: 14px; line-height: 1.4; }
.of-my-schedule-performers { display: grid; gap: 3px; width: 100%; }
.of-schedule-performer { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; font-weight: 650; line-height: 1.45; min-width: 0; }
.of-schedule-performer > i { flex: 0 0 auto; margin-top: 3px; font-size: 11px; text-shadow: 0 0 1px white; }
.of-schedule-performer > span { min-width: 0; overflow-wrap: anywhere; }
.of-my-schedule-card-actions { flex: 0 0 auto; display: flex; align-items: center; padding: 6px 6px 0 0; gap: 2px; }
.of-my-schedule-heart, .of-my-schedule-warning { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 34px; padding: 3px; border: 0; border-radius: 7px; color: #be123c; background: rgba(255,255,255,.84); font-weight: 750; font-size: 14px; white-space: nowrap; }
.of-my-schedule-warning { color: #b45309; font-size: 16px; }
.of-my-schedule-status { border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 700; color: #1e40af; background: #eaf1ff; }
.of-my-schedule-row[data-slot-status="ongoing"] .of-my-schedule-card { outline: 2px solid #2563eb; outline-offset: -1px; }
.of-my-schedule-row[data-slot-status="ended"] .of-my-schedule-card { opacity: .62; }
.of-my-schedule-row[data-slot-status="ended"] .of-my-schedule-status { background: #eef2f6; color: #475569; }
.of-my-schedule-empty { border: 1px dashed #d5deeb; border-radius: 10px; padding: 24px 12px; text-align: center; color: #64748b; background: #fff; font-size: 13px; }
.of-my-schedule-empty > i { font-size: 22px; color: #94a3b8; margin-bottom: 8px; }
.of-my-schedule-empty p { margin: 0 0 12px; }
.of-my-schedule-empty-button { color: #2563eb; border: 1px solid #d5deeb; background: white; border-radius: 7px; padding: 7px 12px; }
.of-heart-color { color: #be123c; }
.of-timeline-workspace .schedule-block .of-timeline-conflict-mark {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 17px; height: 17px; min-width: 17px;
  border: 1px solid #f6c66e; border-radius: 4px; padding: 0; margin: 0 2px;
  color: #a95005; background: #fff8e8; font-size: 11px; line-height: 1;
  z-index: 14; cursor: pointer;
}
.of-timeline-workspace .schedule-block .of-timeline-conflict-mark:focus-visible,
.of-timeline-workspace button:focus-visible,
.of-timeline-workspace summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.of-conflict-slot { border-radius: 8px; padding: 12px; border: 1px solid rgba(15,23,42,.12); margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.of-conflict-slot > small { font-size: 12px; }
.of-conflict-duration { align-self: flex-start; font-size: 12px; font-weight: 700; color: #92400e; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 5px; padding: 2px 6px; }
.of-conflict-explanation { margin: 14px 0 8px; color: #64748b; font-size: 13px; }
@media (min-width: 769px) {
  .of-timeline-workspace { --workspace-left: 200px; }
}
@media (min-width: 1100px) {
  .of-timeline-toolbar { padding: 8px 14px; }
}
@media (max-width: 768px) {
  .of-timeline-workspace .event-header { padding: 6px 9px; }
  .of-timeline-workspace .event-header h6 { font-size: 13px; }
  .of-timeline-toolbar { padding: 6px 9px; gap: 6px; }
  .of-timeline-tabs { width: 100%; }
  .of-timeline-tabs button { flex: 1 1 0; padding: 8px 4px; font-size: 12px; }
  .of-timeline-actions { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 4px; }
  .of-timeline-actions > .of-timeline-action, .of-timeline-actions > .of-timeline-dropdown { flex: 1 1 auto; }
  .of-timeline-actions > .of-timeline-dropdown > summary { width: 100%; }
  .of-timeline-action, .of-timeline-actions .of-timeline-dropdown > summary { padding: 8px 5px; font-size: 11px; gap: 4px; min-height: 34px; }
  #of-timeline-filters > .of-timeline-dropdown-panel { left: 0; right: auto; }
  #of-timeline-zoom-menu > .of-timeline-dropdown-panel { right: 0; }
  .of-my-schedule { padding: 13px 10px 24px; }
  .of-my-schedule-heading h2 { font-size: 17px; }
  .of-my-schedule-card-actions { padding: 6px 5px 0 0; }
}
@media (max-width: 360px) {
  .of-timeline-actions .of-timeline-action, .of-timeline-actions .of-timeline-dropdown > summary { font-size: 10px; padding: 7px 3px; }
  .of-my-schedule-card-actions { flex-direction: column; }
}

.of-timeline-back { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 34px; border-radius: 7px; color: #475569; text-decoration: none; }
.of-timeline-back:hover { background: #eff6ff; color: #2563eb; text-decoration: none; }

.of-timeline-workspace .timeline-block-related-line.is-readonly { cursor: default; }

/* Phase 4-2 refinement: the actual timeline uses the same visual language as My Schedule.
   Keep geometry from the existing lane/scale algorithm, and all registered stage colors. */
.of-timeline-title { min-width: 0; line-height: 1.3; }
.of-timeline-title-name { font-size: 16px; font-weight: 750; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-timeline-title-date { margin-top: 3px; font-size: 11px; color: #64748b; font-weight: 500; }
.of-timeline-workspace .timeline-viewport { background: #f7f9fc; }
.of-timeline-workspace .timeline-canvas { background: #fff; }
.of-timeline-workspace .timeline-event-group-row {
  min-height: 33px; padding: 4px 0 3px; border-bottom: 1px solid #e5eaf0;
  background: #fff;
}
.of-timeline-workspace .timeline-event-group-label {
  font-size: 12px; font-weight: 700; letter-spacing: .01em; color: #475569;
  padding: 3px 10px; background: #fff;
}
.of-timeline-workspace .timeline-event-group-label.is-primary { color: #1e293b; }
.of-timeline-workspace .venue-column-header {
  min-height: 37px;
  padding: 4px 5px;
  border-right: 1px solid #e5eaf0;
  background: #fff;
}
.of-timeline-workspace .venue-column-header h5 {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid rgba(15,23,42,.07);
  border-radius: 7px;
  background: var(--of-stage-color, #eef2f7);
  color: var(--of-stage-text, #334155);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.of-timeline-workspace .venue-column { border-left-width: 0; border-right: 1px solid #e2e8f0; }
.of-timeline-workspace .venue-column.event-group-divider { border-left-width: 10px; }
.of-timeline-workspace .timeline-time-axis,
.of-timeline-workspace .timeline-corner-cell { background: #fff; border-right: 1px solid #e2e8f0; }
.of-timeline-workspace .time-label {
  border: 0; border-bottom: 1px solid #dce4ed; box-sizing: border-box;
  background: #fff;
}
.of-timeline-workspace .time-label-text {
  top: 3px; left: 2px; right: 2px; font-size: 10px; font-weight: 650;
  font-variant-numeric: tabular-nums; text-align: center; color: #64748b;
}
.of-timeline-workspace .gray-line {
  height: 0; border-top: 1px solid rgba(100,116,139,.24);
  background: transparent; pointer-events: none;
}
.of-timeline-workspace .gray-line.of-half-hour-line {
  border-top: 1px dashed rgba(100,116,139,.19);
}
/* Restore the original busy-time band. The selection scripts merge all
   checked time ranges and update the band's width when columns change.
   Keep the band above unselected cards (z-index 100) but below the
   selected cards (101), so even opaque stage colors show the occupied time. */
.of-timeline-workspace .gray-highlight {
  background-color: rgba(15,23,42,.35);
  z-index: 100;
  pointer-events: none;
}
.of-timeline-workspace .schedule-block {
  margin-left: 4px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15,23,42,.09);
  padding: 0 5px 4px;
  line-height: 1.2;
}
.of-timeline-workspace .schedule-block.selected::after {
  border: 2px solid rgba(37,99,235,.82); border-radius: inherit;
}
.of-timeline-workspace .schedule-block.priority-2::after { border-color: #e11d48; box-shadow: inset 0 0 0 1px rgba(255,255,255,.65); }
/* The busy-time band itself supplies the dimming, restricted to selected
   time ranges. Do not dim unrelated blocks outside those ranges. */
.of-timeline-workspace.has-selection .schedule-block.not-selected::before {
  content: none;
}
.of-timeline-workspace .schedule-block-meta {
  gap: 3px; margin: 0 -5px 3px;
  padding: 4px 6px 3px;
}
.of-timeline-workspace .schedule-time-range {
  min-width: 0; white-space: nowrap; padding-left: 0;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.of-timeline-workspace .schedule-block-name {
  padding: 1px 2px; font-size: 13px; font-weight: 750; line-height: 1.2; overflow-wrap: anywhere;
}
.of-timeline-workspace .schedule-performer-list { gap: 3px 4px; padding: 0 2px; line-height: 1.25; }
.of-timeline-workspace .schedule-performer-name-inline { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.of-timeline-workspace .schedule-performer-pill { max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: 5px; font-size: 11px; padding: 2px 5px; line-height: 1.2; }
.of-timeline-workspace .schedule-block .favorite-count {
  flex-shrink: 0; gap: 2px; padding-right: 0; font-size: 10px; white-space: nowrap;
}
.of-timeline-workspace .schedule-block .favorite-count:not(.selected),
.of-timeline-workspace .schedule-block .favorite-count:not(.selected) i {
  color: #64748b !important; text-shadow: none; -webkit-text-stroke: 0;
}
.of-timeline-workspace .schedule-block .favorite-count.priority-1 .favorite-selection-heart--second,
.of-timeline-workspace .schedule-block .favorite-count.priority-2 .favorite-selection-heart--first,
.of-timeline-workspace .schedule-block .favorite-count.priority-2 .favorite-selection-heart--second {
  color: #e11d48 !important; text-shadow: none; -webkit-text-stroke: 0;
}
.of-timeline-workspace .schedule-block .favorite-count i { font-size: 12px; }
.of-timeline-workspace .schedule-block .of-timeline-conflict-mark { width: 18px; min-width: 18px; height: 18px; margin: 0; }
.of-timeline-workspace #current-time-line { background: #dc2626; height: 2px; pointer-events: none; }
.of-timeline-workspace #current-time-text {
  color: #fff; background: #dc2626; font-size: 12px; font-weight: 700;
  top: -9px; padding: 2px 5px; border-radius: 4px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Keep the controls on the top toolbar, never obscure the schedule grid. */
.of-timeline-workspace .timeline-zoom-slider { display: none !important; }
.of-timeline-zoom-panel {
  display: block;
  width: 248px;
  min-width: 0;
  max-width: calc(100vw - 20px);
  padding: 12px;
}
.of-zoom-stepper { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px; margin: 8px 0 13px; }
.of-zoom-stepper > button {
  height: 42px; border: 1px solid #dfe6ee; background: #f5f7fb; border-radius: 8px; color: #334155; font-size: 16px;
}
.of-zoom-stepper > button:disabled { opacity: .45; cursor: not-allowed; }
.of-zoom-scale { display: grid; justify-items: center; gap: 1px; }
.of-zoom-scale > output { font-size: 20px; line-height: 1.25; font-weight: 750; color: #1e293b; font-variant-numeric: tabular-nums; }
.of-zoom-scale > small { padding: 0; font-size: 11px; }
.of-zoom-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding-top: 11px; border-top: 1px solid #e5eaf0; }
.of-zoom-presets > button {
  border: 1px solid #dfe6ee; background: #fff; border-radius: 8px; padding: 9px 6px;
  display: grid; justify-items: center; gap: 7px; font-size: 12px; color: #334155;
}
.of-zoom-presets > button:hover, .of-zoom-stepper > button:not(:disabled):hover { background: #eff6ff; color: #1d4ed8; }
.of-zoom-columns {
  display: flex; gap: 3px; width: 66px; height: 43px; padding: 4px; border: 1px solid #dfe6ee; background: #f8fafc; border-radius: 5px;
}
.of-zoom-columns > i { flex: 1; min-width: 0; border-radius: 3px; background: #dbeafe; border-top: 8px solid #60a5fa; }
.of-zoom-columns > i:nth-child(2) { background: #fce7f3; border-top-color: #f472b6; }
.of-zoom-columns > i:nth-child(3) { background: #dcfce7; border-top-color: #4ade80; }
.of-timeline-zoom-panel > .of-zoom-reset { width: 100%; justify-content: center; border: 1px solid #dfe6ee; margin-top: 9px; }
.of-timeline-zoom-panel > small { text-align: center; padding: 8px 0 0; }
.of-my-schedule-row[data-released="true"] .of-my-schedule-card {
  border: 1px dashed #aab8c8; outline: none; opacity: 1;
}
.of-my-schedule-row[data-released="true"] .of-my-schedule-detail { opacity: .72; }
.of-my-schedule-row[data-released="true"] .of-my-schedule-card-actions {
  flex-direction: column; align-items: flex-end; gap: 4px;
}
.of-my-schedule-released-label { font-size: 11px; color: inherit; opacity: .85; font-weight: 600; }
.of-my-schedule-heart[data-priority="0"], .of-detail-heart[data-priority="0"] { color: #64748b; }
.of-my-schedule-undo {
  font-size: 11px; font-weight: 650; color: #1d4ed8; background: #fff; border: 1px solid #d5deeb;
  border-radius: 5px; padding: 4px 6px; white-space: nowrap;
}
.of-my-schedule-hide-released {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  padding: 10px; margin-top: 12px; border: 1px solid #d5deeb;
  background: #fff; color: #52647b; border-radius: 8px; font-size: 12px; font-weight: 600;
}
/* Common schedule detail used by cards, overlap markers and long press. */
.of-timeline-workspace #timelineBlockDetailModal .timeline-block-detail-header {
  background: #fff; border-bottom: 1px solid #e5eaf0;
}
.of-timeline-workspace #timelineBlockDetailModal .timeline-block-detail-card { border-radius: 12px; border-color: rgba(15,23,42,.12); }
.of-timeline-workspace #timelineBlockDetailModal .timeline-block-detail-section { padding: 0 14px 14px; }
.of-timeline-workspace #timelineBlockDetailModal .timeline-block-detail-name { color: inherit; margin-bottom: 10px; font-size: 16px; }
.of-timeline-workspace #timelineBlockDetailModal .timeline-block-detail-section-title { color: inherit; opacity: .8; margin-bottom: 6px; }
.of-timeline-workspace #timelineBlockDetailModal .timeline-block-detail-performer.performer-name-inline { color: inherit; }
.of-timeline-detail-overview { padding: 12px 14px 8px; }
.of-timeline-detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.of-timeline-detail-stage { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; min-width: 0; }
.of-timeline-detail-time { display: block; font-size: 23px; line-height: 1.3; font-weight: 750; font-variant-numeric: tabular-nums; margin: 5px 0 2px; }
.of-detail-heart {
  display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0;
  min-width: 38px; min-height: 34px; padding: 3px 7px; border: 1px solid rgba(15,23,42,.09);
  border-radius: 7px; background: rgba(255,255,255,.9); color: #be123c; font-size: 15px; font-weight: 700;
}
.of-timeline-detail-conflicts { margin: 18px 0; }
.of-timeline-detail-conflicts h6 {
  display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 14px; font-weight: 750; color: #334155;
}
#of-timeline-detail-conflict-count { margin-left: auto; color: #64748b; font-size: 12px; font-weight: 600; }
.of-conflict-slot-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.of-conflict-overlap-info { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.of-conflict-overlap-info > small { font-size: 11px; color: inherit; }
.of-timeline-detail-conflicts .of-conflict-explanation {
  background: #f7f9fc; border: 1px solid #e4e9f0; border-radius: 8px; padding: 10px; margin: 0; line-height: 1.5;
}
@media (max-width: 768px) {
  .of-timeline-title-name { font-size: 14px; }
  .of-timeline-actions .of-timeline-action, .of-timeline-actions .of-timeline-dropdown > summary {
    min-height: 43px; display: flex; flex-direction: column; gap: 4px; padding: 5px 4px;
  }
  .of-timeline-actions .of-timeline-action > i, .of-timeline-actions .of-timeline-dropdown > summary > i { font-size: 15px; }
  .of-timeline-filter-dot { position: absolute; right: 5px; top: 5px; }
}

.of-timeline-detail-conflicts[data-has-conflicts="false"] .of-conflict-color { display: none; }

/* Gesture recovery: the timeline owns its pan/pinch; the schedule list and
   common detail modal use native vertical scrolling, with no competing drag. */
.of-timeline-workspace .timeline-viewport.is-pan-zoom-enabled .timeline-canvas {
  touch-action: none;
}
.of-timeline-workspace .timeline-viewport.is-pan-zoom-enabled .schedule-block {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.of-timeline-workspace .of-my-schedule {
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
}
.of-timeline-workspace #timelineBlockDetailModal .modal-dialog.modal-dialog-scrollable {
  width: calc(100% - 24px);
  max-width: 560px;
  margin: 12px auto;
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  min-height: 0;
  max-height: none;
}
.of-timeline-workspace #timelineBlockDetailModal .modal-content {
  width: 100%;
  min-height: 0;
  max-height: 100%;
}
.of-timeline-workspace #timelineBlockDetailModal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Search and My Schedule deliberately share the same card renderer. */
.of-timeline-workspace[data-workspace-view="search"] .timeline-viewport {
  visibility: hidden;
  pointer-events: none;
}
.of-timeline-workspace[data-workspace-view="search"] #of-timeline-filters,
.of-timeline-workspace[data-workspace-view="search"] #of-timeline-zoom-menu {
  display: none !important;
}
.of-timeline-workspace[data-workspace-view="split-search"] .timeline-viewport { right: var(--workspace-panel-width); }
.of-timeline-workspace[data-workspace-view="split-search"] .of-my-schedule {
  left: auto;
  width: var(--workspace-panel-width);
  border-left: 1px solid var(--workspace-border);
}
.of-timeline-search-controls {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}
.of-timeline-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #c7d4e4;
  border-radius: 10px;
  color: #64748b;
}
.of-timeline-search-field:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}
.of-timeline-search-field > input {
  min-height: 46px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  color: #1e293b;
  font-size: 16px;
}
.of-timeline-search-field > input::-webkit-search-cancel-button { display: none; }
.of-timeline-search-field > button {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
}
.of-timeline-search-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}
.of-timeline-search-results small { font-size: 11px; color: #64748b; white-space: nowrap; }
.of-search-match { background: #fde68a; color: #1e293b; padding: 0; border-radius: 2px; }
.of-search-detail-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 550;
  color: inherit;
  opacity: .8;
}
.of-my-schedule-detail { min-height: 54px; }
.of-my-schedule-heart {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  font-size: 18px;
  line-height: 1.1;
}
.of-heart-label { font-size: 10px; color: #64748b; font-weight: 600; }
.of-my-schedule-warning { min-width: 44px; min-height: 44px; font-size: 16px; }
.of-my-schedule-undo { min-height: 44px; }
.of-my-schedule-filter-row > button { min-height: 34px; }
.of-timeline-workspace .schedule-block.of-revealed-slot {
  outline: 3px solid #2563eb;
  outline-offset: -3px;
  box-shadow: 0 0 0 3px rgba(37,99,235,.32);
  z-index: 102;
}

/* One detail screen for schedule priority and performer-level memberships. */
.of-timeline-workspace [data-workspace-detail="true"] .timeline-block-detail-section-title,
.of-timeline-workspace [data-workspace-detail="true"] #timelineBlockDetailPerformers { display: none; }
.of-timeline-detail-registration,
.of-timeline-detail-favorites {
  margin: 18px 0;
}
.of-timeline-detail-registration h6,
.of-timeline-detail-favorites h6 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 750;
  color: #334155;
}
.of-detail-priority-group {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 3px;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
}
.of-detail-priority-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 46px;
  padding: 8px 4px;
  background: transparent;
  font-weight: 700;
  font-size: 17px;
  color: #be123c;
}
.of-detail-priority-button[data-priority="0"] { color: #64748b; font-size: 13px; }
.of-detail-priority-button[aria-pressed="true"] {
  background: #fff;
  border-color: #d9e2ed;
  box-shadow: 0 1px 3px rgba(15,23,42,.09);
}
.of-detail-priority-button[data-priority="1"][aria-pressed="true"],
.of-detail-priority-button[data-priority="2"][aria-pressed="true"] {
  background: #fff1f2;
  border-color: #fda4af;
}
.of-registration-status {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  margin: 7px 0 0;
}
.of-favorite-performer-card {
  padding: 12px;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
}
.of-favorite-performer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.of-favorite-performer-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.of-favorite-performer-info > strong { display: block; font-size: 14px; color: #1e293b; line-height: 1.5; }
.of-favorite-membership-tags { display: flex; flex-wrap: wrap; gap: 5px 7px; margin-top: 5px; }
.of-favorite-membership-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #53657c;
  overflow-wrap: anywhere;
}
.of-favorite-membership-tag > i, .of-favorite-list-option > i { text-shadow: 0 0 1px #475569; }
.of-favorite-edit-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  border: 1px solid #d5deeb;
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.of-favorite-edit-button .fa-star { color: #a16207; }
.of-favorite-edit-button[aria-expanded="true"] { background: #eff6ff; color: #1d4ed8; }
.of-favorite-edit-button:disabled, .of-favorite-editor-actions button:disabled { opacity: .5; cursor: not-allowed; }
.of-favorite-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5eaf0; }
.of-favorite-editor-caption { color: #64748b; font-size: 12px; margin: 0 0 7px; }
.of-favorite-list-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 2px;
  margin: 0;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
  font-size: 13px;
}
.of-favorite-list-option input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: #2563eb; }
.of-favorite-list-name { flex: 1; min-width: 0; color: #334155; overflow-wrap: anywhere; }
.of-favorite-list-count { flex: 0 0 auto; font-size: 11px; color: #64748b; white-space: nowrap; }
.of-favorite-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.of-favorite-editor-actions > button {
  min-height: 44px;
  padding: 8px;
  border: 1px solid #d5deeb;
  border-radius: 8px;
  background: white;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
}
.of-favorite-editor-actions > .of-favorite-save { background: #2563eb; color: #fff; border-color: #2563eb; }
.of-favorite-error, .of-favorite-notice {
  font-size: 12px;
  border-radius: 7px;
  padding: 9px;
  margin: 0 0 8px;
  color: #9a3412;
  background: #fff7ed;
}
.of-favorite-notice { color: #1d4ed8; background: #eff6ff; }
.of-favorite-login {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  margin-bottom: 9px;
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 8px;
}
.of-favorite-link { display: inline-flex; align-items: center; min-height: 38px; color: #1d4ed8; font-weight: 650; }
.of-timeline-location-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  background: #fff;
  border: 1px solid #d5deeb;
  color: #2563eb;
  font-size: 13px;
  font-weight: 650;
  border-radius: 8px;
}
@media (max-width: 768px) {
  .of-timeline-tabs button {
    min-height: 44px;
    padding: 6px 3px;
    line-height: 1.3;
    white-space: normal;
  }
  .of-my-schedule-card-actions { flex-direction: column; align-items: center; gap: 4px; }
  .of-my-schedule-row[data-released="true"] .of-my-schedule-card-actions { align-items: flex-end; }
  .of-my-schedule-filter-row > button { min-height: 40px; }
  .of-my-schedule-card-actions .of-my-schedule-warning { order: 2; }
  .of-my-schedule-card-actions .of-my-schedule-undo { order: 3; }
}
@media (max-width: 360px) {
  .of-timeline-tabs button { font-size: 11px; }
  .of-timeline-count { margin-left: 0; padding: 2px 4px; }
  .of-my-schedule-filter-row > button { padding: 5px 7px; font-size: 11px; }
}

@media (max-width: 768px) {
  .of-timeline-tabs {
    display: grid;
    grid-template-columns: 1fr 1.15fr .9fr;
    gap: 3px;
  }
  .of-timeline-tabs button {
    position: relative;
    flex-direction: column;
    gap: 4px;
    min-height: 56px;
    padding: 7px 2px;
    font-size: 11px;
    white-space: nowrap;
  }
  .of-timeline-tabs .of-view-icon { font-size: 17px; }
  .of-timeline-tabs .of-timeline-count {
    position: absolute;
    top: 4px;
    right: 5px;
    margin: 0;
    padding: 2px 5px;
  }
}
@media (max-width: 360px) {
  .of-timeline-tabs button { font-size: 10px; }
}

/* Explicit share actions work with or without the Web Share API. */
#share-modal.of-share-modal { z-index: 6000; }
#share-modal .modal-dialog { width: calc(100% - 24px); max-width: 480px; margin: 12px auto; }
#share-modal .modal-content { width: 100%; border: 0; border-radius: 14px; overflow: hidden; }
#share-modal .modal-body { min-height: 0; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
#share-modal .modal-title { font-size: 17px; font-weight: 700; color: #1e293b; }
#share-modal .of-share-note { font-size: 13px; line-height: 1.6; color: #64748b; margin: 0 0 12px; }
#share-modal .of-share-label { display: block; font-size: 13px; font-weight: 650; color: #334155; margin: 14px 0 5px; }
#share-modal .form-control { font-size: 16px; background: #f8fafc; border-color: #d5deeb; color: #334155; border-radius: 8px; }
#share-modal textarea { resize: vertical; white-space: pre-wrap; min-height: 110px; }
#share-modal .of-share-copy, #share-modal .of-share-twitter {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  min-height: 44px; border-radius: 8px; margin-top: 8px; padding: 8px;
  font-size: 13px; font-weight: 650;
}
#share-modal .of-share-copy { background: white; border: 1px solid #cbd5e1; color: #334155; }
#share-modal .of-share-twitter { background: #14171a; border: 1px solid #14171a; color: white; }
#share-modal .of-share-twitter[aria-disabled="true"] { pointer-events: none; opacity: .5; }
#share-modal .of-share-status { margin: 12px 0 0; padding: 9px; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: 13px; }
#share-modal .of-share-status.is-error, #share-modal .of-share-privacy { background: #fff7ed; color: #9a3412; }
#share-modal .of-share-privacy { margin: 12px 0 0; padding: 9px; border-radius: 8px; }
#share-modal .of-share-delete { color: #be123c; font-size: 13px; margin-right: auto; }
#share-modal .modal-footer .btn { min-height: 44px; }
#share-modal [hidden] { display: none !important; }
