  :root {
    --bg: #080808;
    --surface: #0f0f0f;
    --surface2: #161616;
    --border: #1e1e1e;
    --border2: #2a2a2a;
    --accent: #00e5ff;
    --accent2: #ff6b00;
    --text: #c8c8c8;
    --text-dim: #555;
    --text-bright: #eee;
    --playhead: #ff2d55;
    --track-h: 24px;
    --label-w: 180px;
    --header-h: 48px;
    --controls-h: 52px;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  /* iOS Safari: give html a fixed height so -webkit-fill-available works on body */
  html {
    height: -webkit-fill-available;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Barlow Condensed', sans-serif;
    height: 100vh;
    /* fallback */
    height: -webkit-fill-available;
    /* iOS Safari ≤ 15.3 */
    height: 100dvh;
    /* modern – dynamic viewport, excludes browser chrome */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
  }

  /* ── TOP AREA (placeholder for video feeds) ── */
  .top-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 0;
    overflow: hidden;
  }

  .feed-grid-inner {
    position: relative;
  }

  .feed {
    background: #050505;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .feed.blur-editing {
    touch-action: none;
    user-select: none;
  }

  .feed.blur-editing .feed-video,
  .feed.blur-editing .feed-thumb {
    touch-action: none;
  }

  .feed::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(0, 229, 255, .015) 30px, rgba(0, 229, 255, .015) 31px),
      repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(0, 229, 255, .015) 30px, rgba(0, 229, 255, .015) 31px);
  }

  .feed-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: .08em;
    text-transform: uppercase;
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
  }

  .track-eye {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.15s;
    filter: drop-shadow(0 0 3px currentColor);
  }

  .track-eye:hover {
    opacity: 1;
  }

  .track-eye svg {
    width: 14px;
    height: 14px;
  }

  .track-eye .eye-closed {
    display: none;
  }

  .track-row.cam-hidden .track-eye .eye-open {
    display: none;
  }

  .track-row.cam-hidden .track-eye .eye-closed {
    display: block;
  }

  .track-row.cam-hidden .track-name {
    opacity: 0.35;
  }

  /* Toggle-all eye button in the "Channel" header spacer */
  .toggle-all-eye {
    color: #fff;
  }

  .toggle-all-eye .eye-closed {
    display: none;
  }

  .toggle-all-eye.all-hidden .eye-open {
    display: none;
  }

  .toggle-all-eye.all-hidden .eye-closed {
    display: block;
  }

  .feed-icon {
    opacity: .07;
    font-size: 48px;
  }

  .feed-thumb {
    position: absolute;
    inset: 0;
    z-index: 7;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    /* so the bars are black */
    display: none;
  }

  .feed-thumb.loaded {
    display: block;
  }

  .feed-video {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    /* so the bars are black */
    display: none;
    background: #000;
  }

  .feed-video.playing {
    display: block;
  }

  .feed-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: rgba(0, 229, 255, .3);
    border-style: solid;
  }

  .feed-corner.tl {
    top: 4px;
    left: 4px;
    border-width: 1px 0 0 1px;
  }

  .feed-corner.tr {
    top: 4px;
    right: 4px;
    border-width: 1px 1px 0 0;
  }

  .feed-corner.bl {
    bottom: 4px;
    left: 4px;
    border-width: 0 0 1px 1px;
  }

  .feed-corner.br {
    bottom: 4px;
    right: 4px;
    border-width: 0 1px 1px 0;
  }

  .feed-loader {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
  }

  .feed.loading .feed-loader {
    display: flex;
  }

  .feed-loader::after {
    content: '';
    width: 72px;
    height: 72px;
    border: 4px solid rgba(0, 229, 255, .2);
    border-top-color: rgba(0, 229, 255, .9);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .feed.cam-gap::after {
    content: 'NO SIGNAL';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    font-size: 10px;
    letter-spacing: 1px;
    color: #ff9800;
    background: rgba(0, 0, 0, .6);
    padding: 2px 7px;
    border-radius: 3px;
    pointer-events: none;
  }

  .feed.cam-error::after {
    content: 'STREAM ERROR';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    font-size: 10px;
    letter-spacing: 1px;
    color: #f44336;
    background: rgba(0, 0, 0, .6);
    padding: 2px 7px;
    border-radius: 3px;
    pointer-events: none;
  }

  /* ── TIMELINE SECTION ── */
  .timeline-section {
    background: var(--surface);
    border-top: 1px solid var(--border2);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    max-height: 50vh;
    overflow: hidden;
  }

  /* Controls bar */
  .controls {
    min-height: var(--controls-h);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px 12px;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
  }

  .ctrl-group {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .ctrl-sep {
    width: 1px;
    height: 24px;
    background: var(--border2);
    margin: 0 6px;
  }

  .btn {
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    padding: 5px 14px;
    cursor: pointer;
    transition: all .15s;
    text-transform: uppercase;
  }

  #btnPlayPause {
    width: 44px;
    text-align: center;
  }

  .btn:hover {
    background: #1a1a1a;
    border-color: var(--accent);
    color: var(--accent);
  }

  .btn.active {
    background: rgba(0, 229, 255, .12);
    border-color: var(--accent);
    color: var(--accent);
  }

  /* The link into the new dashboard wears that dashboard's own palette rather than
     this page's cyan-on-black: filled sky (--dashboard-accent, #38bdf8) on the deep
     navy it uses for text over the accent, with its 4px corner radius. The button is
     a doorway to a different app, so it is the one control here that deliberately
     does not match the rest of the strip. */
  #btnArchivist3 {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0b1220;
    border-radius: 4px;
    letter-spacing: .06em;
  }

  #btnArchivist3:hover {
    background: #7dd3fc;
    border-color: #7dd3fc;
    color: #0b1220;
  }

  /* LIVE toggle: orange when idle, green when live is active.
     margin-left:auto pushes it (and the cursor-time after it) to the right edge,
     so it sits just left of the cursor-time readout. */
  .btn-live {
    margin-left: auto;
    border-color: var(--accent2);
    color: var(--accent2);
  }

  .btn-live:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    background: rgba(255, 107, 0, .12);
  }

  .btn-live.live-active,
  .btn-live.live-active:hover {
    background: rgba(34, 197, 94, .18);
    border-color: #22c55e;
    color: #22c55e;
  }

  /* ── JOG SHUTTLE ── */
  .jog-shuttle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
  }

  .jog-track {
    width: 130px;
    height: 14px;
    background: linear-gradient(to right, rgba(255, 107, 0, .55) 0%, #444 45%, #444 55%, rgba(0, 229, 255, .55) 100%);
    border: 1px solid #777;
    border-radius: 7px;
    position: relative;
    cursor: grab;
    flex-shrink: 0;
  }

  .jog-track:active {
    cursor: grabbing;
  }

  .jog-center-mark {
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 2px;
    background: #aaa;
    transform: translateX(-50%);
    pointer-events: none;
    border-radius: 1px;
  }

  .jog-handle {
    width: 20px;
    height: 20px;
    background: #e8e8e8;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .8);
  }

  .jog-shuttle.fwd .jog-handle {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 10px var(--accent);
  }

  .jog-shuttle.rev .jog-handle {
    background: var(--accent2);
    border-color: var(--accent2);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 10px var(--accent2);
  }

  .jog-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: bold;
    color: #bbb;
    letter-spacing: 0.08em;
    pointer-events: none;
    min-width: 44px;
    text-align: center;
  }

  .jog-shuttle.fwd .jog-label {
    color: var(--accent);
  }

  .jog-shuttle.rev .jog-label {
    color: var(--accent2);
  }

  .btn-nav {
    background: #d8d8d8;
    border: none;
    color: #000000;
    width: 38px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    transition: all .15s;
    flex-shrink: 0;
  }

  .btn-nav:hover {
    background: #e0e0e0;
    color: #000;
  }

  .nav-cartouche {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border2);
    border-radius: 20px;
    overflow: hidden;
    height: 30px;
    flex-shrink: 0;
  }

  .nav-cartouche .btn-nav:first-child {
    border-right: 1px solid var(--border2);
  }

  .nav-cartouche .btn-nav:last-child {
    border-left: 1px solid var(--border2);
  }

  .nav-cartouche .ctrl-group {
    gap: 0;
  }

  .nav-cartouche .btn {
    border: none;
    border-right: 1px solid var(--border2);
  }

  .nav-cartouche .btn:last-of-type {
    border-right: none;
  }

  .event-select {
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 10px;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
  }

  .event-select:hover,
  .event-select:focus {
    border-color: var(--accent);
    color: var(--accent);
  }

  .event-select option {
    background: #1a1a1a;
    color: var(--text-bright);
    text-transform: none;
  }

  .track-event {
    position: absolute;
    top: 4px;
    height: calc(var(--track-h) - 8px);
    background: #ff2d55;
    box-shadow: 0 0 4px rgba(255, 45, 85, .5);
    border-radius: 2px;
    min-width: 2px;
    z-index: 2;
    cursor: pointer;
    opacity: .85;
    touch-action: none;
  }

  @media (hover: hover) {
    .track-event:hover {
      opacity: 1;
      box-shadow: 0 0 8px #ff2d55;
    }
  }

  .user-badge {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .05);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .logout-icon {
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
    line-height: 1;
    transition: color .15s;
  }

  .logout-icon:hover {
    color: #ff2d55;
  }

  .time-display {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    letter-spacing: .12em;
    padding: 4px 12px;
    border: 1px solid rgba(0, 229, 255, .2);
    background: rgba(0, 229, 255, .04);
    min-width: 200px;
    text-align: center;
    cursor: pointer;
    user-select: none;
  }

  .time-display:hover {
    border-color: var(--accent);
    background: rgba(0, 229, 255, .1);
  }

  /* ── CALENDAR POPUP ── */
  .cal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
  }

  .cal-overlay.open {
    display: block;
  }

  .cal-popup {
    position: absolute;
    background: #111;
    border: 1px solid var(--border2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .8);
    width: 280px;
    padding: 16px;
    font-family: 'Barlow Condensed', sans-serif;
  }

  .cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .cal-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-bright);
    cursor: pointer;
  }

  .cal-title:hover {
    color: var(--accent);
  }

  .cal-nav {
    background: none;
    border: 1px solid var(--border2);
    color: var(--text);
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cal-nav:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 12px;
  }

  .cal-dow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--text-dim);
    text-align: center;
    padding: 2px 0;
    text-transform: uppercase;
  }

  .cal-day {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 5px 2px;
    cursor: pointer;
    border-radius: 2px;
    color: var(--text);
    border: 1px solid transparent;
  }

  .cal-day:hover {
    background: rgba(0, 229, 255, .1);
    border-color: var(--accent);
    color: var(--accent);
  }

  .cal-day.empty {
    cursor: default;
  }

  .cal-day.today {
    color: var(--accent);
  }

  .cal-day.selected {
    background: rgba(0, 229, 255, .2);
    border-color: var(--accent);
    color: #fff;
  }

  .cal-day.other-month {
    color: #333;
  }

  .cal-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-bottom: 12px;
  }

  .cal-time-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    flex-shrink: 0;
  }

  .cal-time-input {
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    width: 46px;
    text-align: center;
    padding: 4px 6px;
    outline: none;
  }

  .cal-time-input:focus {
    border-color: var(--accent);
  }

  .cal-time-sep {
    color: var(--text-dim);
    font-size: 16px;
    font-weight: 700;
  }

  .cal-go {
    width: 100%;
    background: rgba(0, 229, 255, .12);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px;
    cursor: pointer;
    transition: background .15s;
  }

  .cal-go:hover {
    background: rgba(0, 229, 255, .25);
  }

  /* ── BLUR CALENDAR OVERLAYS ── */
  /* These appear above the confirm-overlay (z-index 400) */
  .blur-cal-overlay {
    z-index: 500;
  }

  /* ── BLUR DIALOG TABS ── */
  .blur-enhanced-row {
    margin: 0 0 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border2);
    text-align: left;
  }

  .blur-enhanced-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    cursor: pointer;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .blur-enhanced-label input {
    accent-color: var(--accent);
  }

  .blur-enhanced-label:has(input:checked) {
    color: var(--accent);
  }

  .blur-enhanced-label:has(input:disabled) {
    cursor: default;
    opacity: .45;
  }

  .blur-enhanced-tip {
    margin: -6px 0 12px;
    color: #ff7a90;
    font-size: 12px;
    text-align: left;
  }

  .blur-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border2);
  }

  .blur-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 6px 16px;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
  }

  .blur-tab:hover {
    color: var(--text-bright);
  }

  .blur-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .blur-tab-panel {}

  /* ── BLUR DATETIME ROW ── */
  .blur-datetime-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
  }

  .blur-date-btn {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, color .15s;
  }

  .blur-date-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  /* ── CONFIRM DIALOG ── */
  .confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 400;
    align-items: center;
    justify-content: center;
  }

  .confirm-overlay.open {
    display: flex;
  }

  /* Blur request dialog must appear above the SVG draw overlay (z-index 9998) */
  #blurRequestOverlay {
    z-index: 9999;
  }

  /* Blur delete confirm must also appear above the SVG draw overlay (z-index 9998) */
  #blurDeleteConfirmOverlay {
    z-index: 9999;
  }

  .confirm-box {
    background: #111;
    border: 1px solid var(--border2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .9);
    padding: 28px 32px;
    min-width: 280px;
    text-align: center;
  }

  .confirm-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-bright);
    margin-bottom: 20px;
  }

  /* Explanatory line under a confirm title, e.g. which account was refused */
  .confirm-text {
    font-size: 13px;
    color: var(--text);
    margin: -10px 0 20px;
    max-width: 380px;
    line-height: 1.5;
  }

  .confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
  }

  .confirm-btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px 24px;
    cursor: pointer;
    border: 1px solid;
    transition: background .15s;
  }

  .confirm-btn-yes {
    background: rgba(255, 45, 85, .15);
    border-color: #ff2d55;
    color: #ff2d55;
  }

  .confirm-btn-yes:hover {
    background: rgba(255, 45, 85, .35);
  }

  #blurRequestConfirmBtn:disabled,
  #blurRequestConfirmBtn:disabled:hover {
    opacity: .35;
    cursor: default;
    background: rgba(255, 45, 85, .15);
  }

  .confirm-btn-no {
    background: var(--surface);
    border-color: var(--border2);
    color: var(--text);
  }

  .confirm-btn-no:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .cursor-time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    color: #ffffff;
    letter-spacing: .1em;
    /* margin-left:auto pushes the time readout to the right edge on its own, so
       it stays there even when the LIVE button (the old spacer) is hidden. */
    margin-left: auto;
    padding-right: 12px;
    /* Clicking the readout jumps to the present (see gotoPresent in annotations.js). */
    cursor: pointer;
    user-select: none;
  }

  .cursor-time:hover {
    color: var(--accent);
  }


  /* prepend — annotation row */
  .timeline-annotation-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    /* Tall enough for a readable label and for the nav arrows. layoutTimeline()
       measures this row's offsetHeight, so the timeline below adjusts by itself. */
    height: 18px;
    flex-shrink: 0;
  }

  .timeline-annotation-row .tl-label-spacer {
    /* The inherited 0.65em rendered at ~7px. Colour overrides the --text-dim (#555)
       of the base .tl-label-spacer, unreadable on black at this size — and the arrows
       beside it are controls, not decoration. */
    font-size: 12px;
    color: var(--text-bright);
    letter-spacing: 0.06em;
    gap: 2px;
  }

  /* Jump to the previous/next annotation: sized to the row rather than to .btn-nav
     (38x30 would not fit), with the label giving up the space it needs. */
  .timeline-annotation-row .ann-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ann-nav {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    width: 16px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
  }

  .ann-nav:hover {
    color: var(--text-bright);
  }

  /* The + reads heavier than the chevrons at the same size, so it is set smaller to
     match them optically. */
  .ann-add {
    font-size: 15px;
  }

  .ann-nav:disabled {
    opacity: .35;
    cursor: default;
  }

  .timeline-annotation-row .timeline-annotation {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: visible;
  }

  /* Timeline header (ruler) */
  .timeline-header {
    height: var(--header-h);
    display: flex;
    border-bottom: 1px solid var(--border2);
    position: relative;
  }

  .tl-label-spacer {
    width: var(--label-w);
    flex-shrink: 0;
    border-right: 1px solid var(--border2);
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .1em;
  }

  .timeline-header .tl-label-spacer {
    gap: 6px;
  }

  .ruler-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: none;
  }

  .ruler {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
  }

  .ruler-tick {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .ruler-tick-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
  }

  .ruler-tick-line {
    background: var(--border2);
    width: 1px;
  }

  .ruler-tick.major .ruler-tick-label {
    color: #ffffff;
  }

  .ruler-tick.major .ruler-tick-line {
    background: #333;
    height: 16px;
  }

  .ruler-tick.minor .ruler-tick-line {
    height: 8px;
  }

  /* Tracks */
  .tracks-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .tracks-container::-webkit-scrollbar {
    display: none;
  }

  .track-row {
    height: var(--track-h);
    display: flex;
    border-bottom: 1px solid var(--border);
    position: relative;
  }

  .track-row:hover {
    background: rgba(255, 255, 255, .015);
  }

  .track-label {
    width: var(--label-w);
    flex-shrink: 0;
    border-right: 1px solid var(--border2);
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
  }

  .track-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .track-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .track-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: none;
  }

  .track-segment {
    position: absolute;
    top: 4px;
    height: calc(var(--track-h) - 8px);
    border-radius: 2px;
    opacity: .75;
    transition: opacity .15s;
    touch-action: none;
  }

  @media (hover: hover) {
    .track-segment:hover {
      opacity: 1;
    }
  }

  .blur-region-bar {
    position: absolute;
    top: 4px;
    height: 80%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.12);
    background-image: repeating-linear-gradient(135deg,
        rgba(255, 255, 255, 0.8) 0,
        rgba(255, 255, 255, 0.8) 2px,
        transparent 2px,
        transparent 6px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 4px rgba(255, 255, 255, 0.12);
    pointer-events: none;
    z-index: 5;
  }

  /* Playhead */
  .playhead-container {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    pointer-events: none;
    z-index: 10;
  }

  .playhead-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--playhead);
    box-shadow: 0 0 8px var(--playhead);
    left: 50%;
  }

  .playhead-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--playhead);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    cursor: ew-resize;
    pointer-events: all;
  }

  .playhead-head:hover {
    box-shadow: 0 0 10px var(--playhead);
  }

  /* ── REPORT DIALOG ── */
  .report-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 400;
    align-items: center;
    justify-content: center;
  }

  .report-overlay.open {
    display: flex;
  }

  .report-box {
    background: #111;
    border: 1px solid var(--border2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .9);
    padding: 28px 32px;
    min-width: 320px;
  }

  .report-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-bright);
    margin-bottom: 20px;
    text-align: center;
  }

  .report-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
  }

  .report-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .report-input {
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    padding: 6px 10px;
    outline: none;
    width: 100%;
    color-scheme: dark;
  }

  .report-input:focus {
    border-color: var(--accent);
  }

  .report-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
  }

  .report-btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px 24px;
    cursor: pointer;
    border: 1px solid;
    transition: background .15s;
  }

  .report-btn-submit {
    background: rgba(0, 229, 255, .12);
    border-color: var(--accent);
    color: var(--accent);
  }

  .report-btn-submit:hover:not(:disabled) {
    background: rgba(0, 229, 255, .28);
  }

  .report-btn-submit:disabled {
    opacity: .45;
    cursor: default;
  }

  .report-btn-cancel {
    background: var(--surface);
    border-color: var(--border2);
    color: var(--text);
  }

  .report-btn-cancel:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .report-error {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    color: #ff2d55;
    text-align: center;
    margin-top: 10px;
    min-height: 16px;
  }

  .report-generating {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0 4px;
  }

  .report-generating.active {
    display: flex;
  }

  .report-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 229, 255, .2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
  }

  .report-gen-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
  }

  /* ── BUG REPORT DIALOG ── */
  .bug-report-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 400;
    align-items: center;
    justify-content: center;
  }

  .bug-report-overlay.open {
    display: flex;
  }

  .bug-report-textarea {
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    padding: 6px 10px;
    outline: none;
    width: 100%;
    resize: vertical;
    min-height: 100px;
    color-scheme: dark;
  }

  .bug-report-textarea:focus {
    border-color: var(--accent);
  }

  .bug-report-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--border);
    padding: 6px 10px;
    width: 100%;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
  }

  /* Overlay for dragging across entire timeline */
  .ruler-drag-overlay {
    position: absolute;
    inset: 0;
    cursor: ew-resize;
    z-index: 5;
  }

  /* Track areas are always pannable */
  .track-area {
    cursor: grab;
  }

  .panning .track-area {
    cursor: grabbing;
  }

  /* ── FEED EXPAND BUTTON ── */
  .feed-expand-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 8;
    background: rgba(0, 0, 0, .6);
    border: 1px solid rgba(255, 255, 255, .3);
    color: rgba(255, 255, 255, .85);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .4;
    transition: opacity .15s, border-color .15s, color .15s;
    border-radius: 3px;
    padding: 0;
    flex-shrink: 0;
  }

  .feed:hover .feed-expand-btn {
    opacity: 1;
  }

  .feed-expand-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 0, 0, .8);
  }

  .feed-expand-btn svg {
    width: 15px;
    height: 15px;
  }

  .feed-expand-btn .icon-compress {
    display: none;
  }

  .feed-expand-btn.is-expanded .icon-expand {
    display: none;
  }

  .feed-expand-btn.is-expanded .icon-compress {
    display: block;
  }

  .feed-expand-btn.is-expanded {
    opacity: 1;
    border-color: var(--accent);
    color: var(--accent);
  }

  /* ── FEED EDITOR (PEN) BUTTON ── */
  .feed-editor-btn {
    background: rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 3px;
    color: rgba(255, 255, 255, .85);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .4;
    transition: opacity .15s, border-color .15s, color .15s, background .15s;
    padding: 0;
    flex-shrink: 0;
  }

  .feed:hover .feed-editor-btn {
    opacity: 1;
  }

  .feed-editor-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 0, 0, .8);
  }

  .feed-editor-btn svg {
    width: 15px;
    height: 15px;
  }

  /* ── FEED MUTE / SOUND BUTTON ── */
  .feed-mute-btn {
    background: rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 3px;
    color: rgba(255, 255, 255, .85);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .4;
    transition: opacity .15s, border-color .15s, color .15s, background .15s;
    padding: 0;
    flex-shrink: 0;
  }

  .feed:hover .feed-mute-btn {
    opacity: 1;
  }

  .feed-mute-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 0, 0, .8);
  }

  /* A muted feed keeps the speaker visible (dimmed accent) so it's obvious sound is off. */
  .feed-mute-btn.is-muted {
    color: rgba(255, 255, 255, .55);
  }

  .feed-mute-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Show the sound-on icon when audible, the crossed-out icon when muted. */
  .feed-mute-btn .icon-sound-off { display: none; }
  .feed-mute-btn.is-muted .icon-sound-on { display: none; }
  .feed-mute-btn.is-muted .icon-sound-off { display: block; }

  /* ── FEED EVENT NAV BUTTONS ── */
  .feed-nav-btn {
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 3px;
    padding: 3px;
    cursor: pointer;
    color: rgba(255, 255, 255, .9);
    display: flex;
    align-items: center;
    opacity: .4;
    transition: opacity .15s, color .15s, border-color .15s;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8));
    flex-shrink: 0;
  }

  .feed:hover .feed-nav-btn {
    opacity: 1;
  }

  .feed-nav-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 0, 0, .7);
  }

  .feed-nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .feed-nav-btn:disabled {
    opacity: .2 !important;
    cursor: default;
  }

  /* ── DOWNLOAD SIDE PANEL ── */
  .download-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    border-left: 1px solid var(--border2);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .7);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
  }

  .download-panel.open {
    right: 0;
  }

  .blur-list-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    border-left: 1px solid var(--border2);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .7);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
  }

  .blur-list-panel.open {
    right: 0;
  }

  .blur-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
  }

  .blur-list-container::-webkit-scrollbar {
    width: 4px;
  }

  .blur-list-container::-webkit-scrollbar-thumb {
    background: #333;
  }

  .blur-list-card {
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 8px;
    padding: 9px 10px;
    background: var(--surface2);
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
    user-select: none;
  }

  .blur-list-card:hover {
    border-color: rgba(0, 229, 255, .35);
    background: #1a1a1a;
    transform: translateX(-2px);
  }

  .blur-list-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }

  .blur-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 5px currentColor;
  }

  .blur-list-camera {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .blur-list-duration {
    margin-left: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--accent);
    background: rgba(0, 229, 255, .08);
    border: 1px solid rgba(0, 229, 255, .2);
    padding: 1px 6px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .blur-list-time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #bbb;
    line-height: 1.45;
  }

  .blur-list-empty {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 18px 10px;
    text-align: center;
  }

  .download-panel-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border2);
    flex-shrink: 0;
  }

  .download-panel-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .download-panel-title svg {
    color: var(--accent);
    flex-shrink: 0;
  }

  .download-panel-subtitle {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 4px;
  }

  .download-file-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
  }

  .download-file-list::-webkit-scrollbar {
    width: 4px;
  }

  .download-file-list::-webkit-scrollbar-thumb {
    background: #333;
  }

  .download-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 4px;
    background: var(--surface2);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    user-select: none;
  }

  .download-file-item:hover {
    border-color: var(--border2);
    background: #1a1a1a;
  }

  .download-file-item.checked {
    border-color: rgba(0, 229, 255, .25);
  }

  .download-file-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border2);
    background: var(--surface);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s, background .15s;
  }

  .download-file-checkbox:checked {
    background: rgba(0, 229, 255, .15);
    border-color: var(--accent);
  }

  .download-file-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 0px;
    width: 5px;
    height: 8px;
    border: 2px solid var(--accent);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
  }

  .download-file-info {
    flex: 1;
    min-width: 0;
  }

  .download-file-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .download-file-meta {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    color: #bbb;
    letter-spacing: .06em;
    margin-top: 1px;
  }

  .download-file-size {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
  }

  .download-select-all-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .download-select-all-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .download-count-badge {
    margin-left: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    background: rgba(0, 229, 255, .08);
    border: 1px solid rgba(0, 229, 255, .2);
    padding: 1px 7px;
    border-radius: 10px;
  }

  .download-panel-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border2);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }

  .download-confirm-btn {
    flex: 1;
    background: rgba(0, 229, 255, .12);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 8px 0;
    cursor: pointer;
    transition: background .15s;
  }

  .download-confirm-btn:hover:not(:disabled) {
    background: rgba(0, 229, 255, .25);
  }

  .download-confirm-btn:disabled {
    opacity: .35;
    cursor: default;
  }

  .download-cancel-btn {
    flex: 1;
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 8px 0;
    cursor: pointer;
    transition: border-color .15s, color .15s;
  }

  .download-cancel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .download-progress-row {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }

  .download-progress-row.active {
    display: flex;
  }

  .download-progress-bar-wrap {
    flex: 1;
    height: 4px;
    background: var(--border2);
    border-radius: 2px;
    overflow: hidden;
  }

  .download-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width .3s;
    box-shadow: 0 0 6px var(--accent);
  }

  .download-progress-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
  }

  .download-progress-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
  }

  /* ── TOAST NOTIFICATION ── */
  .toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 600;
    background: var(--surface2);
    border: 1px solid var(--border2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .8);
    min-width: 220px;
    max-width: 320px;
    font-family: 'Barlow Condensed', sans-serif;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .2s, transform .2s;
  }

  .toast.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .toast-body {
    padding: 12px 16px 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-bright);
  }

  .toast-bar {
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    width: 100%;
    transform-origin: left;
  }

  .toast-bar.animating {
    transition: width 3s linear;
    width: 0%;
  }

  #task-notifs {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 590;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }

  .task-notif {
    background: var(--surface2);
    border: 1px solid var(--border2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .8);
    min-width: 240px;
    max-width: 300px;
    font-family: 'Barlow Condensed', sans-serif;
    overflow: hidden;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity .25s, transform .25s;
    border-left: 2px solid var(--accent);
  }

  .task-notif.visible {
    opacity: 1;
    transform: translateX(0);
  }

  .task-notif-header {
    padding: 8px 12px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .task-notif-camera {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .task-notif-date {
    font-size: 13px;
    letter-spacing: .04em;
    color: #bbb;
    margin-top: 3px;
  }

  .task-notif-progress-row {
    padding: 6px 12px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .task-notif-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, .12);
    border-radius: 3px;
    overflow: hidden;
  }

  .task-notif-bar {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent), 0 0 4px var(--accent);
    width: 0%;
    transition: width .4s ease;
    border-radius: 3px;
  }

  .task-notif-pct {
    font-size: 10px;
    color: #aaa;
    min-width: 30px;
    text-align: right;
    letter-spacing: .04em;
    font-family: 'Share Tech Mono', monospace;
  }

  .range-selection {
    position: absolute;
    pointer-events: none;
    z-index: 25;
    background: rgba(0, 229, 255, 0.07);
    border-left: 1px solid rgba(0, 229, 255, 0.55);
    border-right: 1px solid rgba(0, 229, 255, 0.55);
    display: none;
  }

  .range-selection.active {
    display: block;
  }

  .range-selection-label {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.75);
    padding: 2px 7px;
    border-radius: 2px;
    letter-spacing: .06em;
  }

  /* ── TIMELINE ANNOTATION BAR ── */
  .timeline-annotation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: var(--bg);
    z-index: 6;
    cursor: crosshair;
  }

  .annotation-emoji {
    position: absolute;
    font-size: 12px;
    top: -1px;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 7;
    line-height: 1;
    pointer-events: all;
  }

  /* ── ANNOTATION POPUP ── */
  .annotation-popup {
    position: fixed;
    z-index: 600;
    background: #111;
    border: 1px solid var(--border2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .85);
    padding: 14px 16px;
    width: 250px;
    display: none;
  }

  .annotation-popup-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-bright);
    margin-bottom: 10px;
  }

  .annotation-type-select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    padding: 5px 8px;
    margin-bottom: 8px;
    outline: none;
    cursor: pointer;
  }

  .annotation-type-select:focus {
    border-color: var(--accent);
  }

  .annotation-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    padding: 6px 8px;
    outline: none;
    resize: vertical;
    min-height: 64px;
    margin-bottom: 8px;
    color-scheme: dark;
  }

  .annotation-textarea:focus {
    border-color: var(--accent);
  }

  .annotation-popup-error {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    color: #ff2d55;
    min-height: 14px;
    margin-bottom: 4px;
  }

  .annotation-popup-btns {
    display: flex;
    gap: 8px;
  }

  .annotation-btn {
    flex: 1;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 0;
    cursor: pointer;
    border: 1px solid;
    transition: background .15s;
  }

  .annotation-btn-confirm {
    background: rgba(0, 229, 255, .12);
    border-color: var(--accent);
    color: var(--accent);
  }

  .annotation-btn-confirm:hover {
    background: rgba(0, 229, 255, .25);
  }

  .annotation-btn-cancel {
    background: var(--surface);
    border-color: var(--border2);
    color: var(--text);
  }

  .annotation-btn-cancel:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  /* ── ANNOTATION CONTEXT MENU ── */
  #annotationContextMenu {
    display: none;
    position: fixed;
    z-index: 100000;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 0;
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  }

  #annotationCtxDelete {
    padding: 8px 16px;
    cursor: pointer;
    color: #ff4444;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #annotationCtxDelete:hover {
    background: rgba(255, 68, 68, 0.15);
  }

  /* ── ANNOTATION DELETE CONFIRM ── */
  .annotation-delete-title {
    color: #ff4444;
  }

  .annotation-delete-preview {
    font-family: 'Barlow Condensed', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 12px;
  }

  .annotation-delete-btn-yes {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
  }

  .annotation-delete-btn-yes:hover {
    background: #cc2222;
  }

  #downloadPanel {
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow: hidden;
  }

  #downloadFileList {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 48px;
  }

  #recentDownloadsSection {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    max-height: 30vh;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 6px;
    padding-top: 2px;
    overflow: hidden;
  }

  #recentDownloadsList {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 48px;
  }
