@font-face{font-family:"JetBrains Mono";src:url("./fonts/jetbrains-mono.woff2") format("woff2");font-weight:100 800;font-style:normal;font-display:swap}
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: dark;
  background: #000;
  font-family: "JetBrains Mono", monospace;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: var(--events-surface-width, 100%);
  height: var(--events-surface-height, 100%);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
}

body {
  position: fixed;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  min-width: 280px;
  min-height: 360px;
  touch-action: pan-y;
}

#events-canvas {
  position: fixed;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  display: block;
  width: var(--events-surface-width, 100%);
  height: var(--events-surface-height, 100%);
  background: #000;
  z-index: 1;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.timeline-scroll {
  position: fixed;
  z-index: 0;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  width: var(--events-surface-width, 100%);
  height: var(--events-surface-height, 100%);
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: none;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.timeline-scroll.timeline-dragging {
  overflow-y: hidden;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

.timeline-scroll.timeline-zooming {
  overflow-y: hidden;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

.timeline-scroll::-webkit-scrollbar {
  display: none;
}

.timeline-scroll-spacer {
  width: 1px;
  height: 2000000px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.canvas-input-bridge {
  position: fixed;
  z-index: -1;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 2px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0.01;
  color: transparent;
  background: transparent;
  caret-color: transparent;
  font-size: 16px;
  resize: none;
  pointer-events: none;
}

.canvas-file-bridge {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Let the native text control own caret, selection, and editing gestures.
   The timeline keeps its own pan-y rule when the editor is open. */
body.native-text-editing {
  touch-action: auto;
}

.canvas-schedule-field {
  position: fixed;
  z-index: 3;
  display: block;
  height: 64px;
  border: 1px solid #2a2a2e;
  border-radius: 12px;
  background: #121214;
  touch-action: auto;
  -webkit-user-select: none;
  user-select: none;
}

.canvas-schedule-field[hidden] {
  display: none;
}

.canvas-schedule-field:focus-within {
  border-color: #0a84ff;
}

.canvas-schedule-field > span {
  position: absolute;
  top: 9px;
  left: 13px;
  color: #a1a1aa;
  font: 400 12px/14px JetBrains Mono, monospace;
}

#canvas-schedule-input {
  position: absolute;
  top: 24px;
  left: 13px;
  width: calc(100% - 26px);
  height: 34px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #f2f2f7;
  caret-color: #0a84ff;
  font: 400 16px/22px JetBrains Mono, monospace;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
}

#canvas-schedule-input::placeholder {
  color: #66666f;
  opacity: 1;
}

#canvas-schedule-input:disabled {
  opacity: 0.6;
}

.canvas-date-bridge {
  position: fixed;
  z-index: 3;
  display: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0.001;
  color: transparent;
  background: transparent;
  color-scheme: dark;
  font-size: 16px;
  pointer-events: none;
}

.canvas-a11y {
  position: fixed;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  width: var(--events-surface-width, 100%);
  height: var(--events-surface-height, 100%);
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.canvas-a11y button,
.canvas-a11y a {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0.001;
  color: transparent;
  background: transparent;
  pointer-events: none;
}

.canvas-a11y button:focus-visible,
.canvas-a11y a:focus-visible {
  outline: 2px solid #64d2ff;
  outline-offset: -2px;
  opacity: 0.02;
}

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  #events-canvas {
    scroll-behavior: auto;
  }
}

@media print {
  body::after {
    content: "Open Events on screen to use the interactive timeline.";
    display: block;
    padding: 2rem;
    color: #111;
    background: #fff;
  }

  #events-canvas {
    display: none;
  }
}

.canvas-input-bridge.native-active {z-index:4;opacity:1;color:#f2f2f7;background:#121214;caret-color:#0a84ff;pointer-events:auto;padding:0;border:0;outline:0;line-height:22px;font-family:"JetBrains Mono",monospace;user-select:text;-webkit-user-select:text;touch-action:auto;}
