.project-queue { min-width: 0; display: grid; gap: 14px; padding-top: 18px; }
.project-queue.empty { min-height: 420px; place-content: center; justify-items: center; padding: 36px; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(12, 15, 13, .72); text-align: center; }
.project-queue.empty h3 { margin: 0; font: 650 19px var(--font-display); }
.project-queue.empty p { max-width: 520px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.project-queue.empty.error { border-color: rgba(255, 133, 133, .3); }
.queue-empty-mark { width: 84px; height: 84px; display: grid; place-items: center; border: 1px solid rgba(231, 188, 104, .34); border-radius: 50%; color: var(--accent-strong); font: 800 11px var(--font-mono); box-shadow: inset 0 0 0 7px rgba(231, 188, 104, .035); }
.queue-pulse { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(231, 188, 104, .3); animation: queue-pulse 1.4s infinite; }
.queue-head, .queue-waves > header, .queue-exceptions > header, .queue-attempts > header, .queue-proposals > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-head { padding: 2px 2px 12px; border-bottom: 1px solid var(--line); }
.queue-head h3 { margin: 5px 0 3px; font: 650 18px var(--font-display); }
.queue-head p:last-child { margin: 0; color: var(--faint); font: 8px var(--font-mono); }
.queue-head > div:last-child { display: flex; gap: 6px; }
.queue-waves, .queue-exceptions, .queue-attempts, .queue-proposals { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(17, 20, 17, .72); }
.queue-waves > header h4 { margin: 4px 0 0; font: 620 13px var(--font-display); }
.queue-waves > header > span, .queue-exceptions > header, .queue-attempts > header, .queue-proposals > header { color: var(--faint); font: 8px var(--font-mono); }
.queue-waves > div { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 8px; margin-top: 11px; overflow-x: auto; padding-bottom: 3px; }
.queue-wave { min-width: 0; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.queue-wave.ready { border-color: rgba(92, 197, 139, .3); }
.queue-wave.queued, .queue-wave.running { border-color: rgba(89, 141, 255, .36); }
.queue-wave.stale, .queue-wave.blocked { border-color: rgba(233, 170, 81, .36); }
.queue-wave > header, .queue-task > header { display: flex; justify-content: space-between; gap: 8px; }
.queue-wave > header div { display: flex; gap: 7px; align-items: baseline; }
.queue-wave code, .queue-task code, .queue-attempts code { color: var(--accent); font-size: 8px; }
.queue-wave > header span, .queue-wave > header b { color: var(--faint); font: 7px var(--font-mono); }
.queue-wave h4, .queue-task h4 { margin: 0; font: 620 11px/1.3 var(--font-display); }
.queue-wave p, .queue-task p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.queue-wave dl { display: grid; gap: 4px; margin: 0; }
.queue-wave dl div { min-width: 0; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 6px; }
.queue-wave dt, .queue-wave dd { margin: 0; color: var(--faint); font: 7px/1.4 var(--font-mono); overflow-wrap: anywhere; }
.queue-wave dt { color: var(--muted); }
.queue-wave-route { display: grid; grid-template-columns: auto minmax(20px, 1fr) auto minmax(20px, 1fr) auto; align-items: center; gap: 6px; padding: 8px; border-radius: 6px; background: #0b0e0c; }
.queue-wave-route span { color: var(--faint); font: 7px var(--font-mono); white-space: nowrap; }
.queue-wave-route i { height: 1px; background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 6px); opacity: .45; }
.queue-wave footer, .queue-task footer, .queue-proposals article footer { display: flex; gap: 5px; justify-content: flex-end; }
.queue-wave button, .queue-task button { min-height: 27px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 7px; cursor: pointer; }
.queue-wave button.queue-launch { border-color: rgba(231, 188, 104, .4); color: var(--accent-strong); }
.queue-board { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 7px; overflow-x: auto; padding-bottom: 5px; }
.queue-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.queue-filters button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--faint); font-size: 8px; cursor: pointer; }
.queue-filters button.active { border-color: rgba(231, 188, 104, .42); background: var(--accent-wash); color: var(--accent-strong); }
.queue-filters b { margin-left: 5px; color: var(--text); font: 7px var(--font-mono); }
.queue-column { min-width: 190px; min-height: 330px; padding: 8px; border-top: 2px solid var(--line-strong); border-radius: 4px 4px 10px 10px; background: rgba(12, 15, 13, .78); }
.queue-column.ready, .queue-column.completed { border-top-color: var(--green); }
.queue-column.queued, .queue-column.running, .queue-column.review { border-top-color: var(--blue); }
.queue-column > header { display: flex; justify-content: space-between; padding: 2px 2px 9px; color: var(--faint); font: 8px var(--font-mono); text-transform: uppercase; }
.queue-column > header b, .queue-exceptions > header b, .queue-attempts > header b, .queue-proposals > header b { color: var(--text); }
.queue-column > div { display: grid; gap: 7px; }
.queue-column-empty { margin: 10px 3px; color: var(--faint); font-size: 8px; }
.queue-task { min-width: 0; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.queue-task.needs_decision, .queue-task.blocked, .queue-task.stale { border-color: rgba(233, 170, 81, .38); }
.queue-task.error, .queue-task.cancelled { border-color: rgba(255, 133, 133, .35); }
.queue-task > header span { color: var(--faint); font: 7px var(--font-mono); }
.queue-task dl { display: grid; gap: 4px; margin: 0; }
.queue-task dl div { min-width: 0; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 5px; }
.queue-task dt, .queue-task dd { margin: 0; color: var(--faint); font: 7px/1.4 var(--font-mono); overflow-wrap: anywhere; }
.queue-task dt { color: var(--muted); }
.queue-exceptions > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 7px; margin-top: 10px; }
.queue-proposals { border-color: rgba(89, 141, 255, .28); }
.queue-proposals article { display: grid; gap: 9px; margin-top: 10px; }
.queue-proposals article > div { display: flex; justify-content: space-between; color: var(--faint); font: 8px var(--font-mono); }
.queue-proposals pre { max-height: 260px; margin: 0; overflow: auto; padding: 12px; border-radius: 7px; background: #090b0a; color: #c7cdc7; font: 8px/1.5 var(--font-mono); white-space: pre; }
.queue-attempts { display: grid; gap: 9px; }
.queue-attempts > header { grid-column: 1 / -1; }
.queue-attempt { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 7, 5, .55); color: var(--muted); }
.queue-attempt.running { border-color: rgba(182, 255, 62, .38); box-shadow: inset 3px 0 var(--accent); }
.queue-attempt.partial, .queue-attempt.blocked, .queue-attempt.interrupted { border-color: rgba(242, 187, 75, .42); }
.queue-attempt.error { border-color: rgba(235, 99, 85, .45); }
.queue-attempt > header, .queue-attempt > header > div, .queue-attempt > footer, .queue-attempt-route { display: flex; align-items: center; gap: 8px; }
.queue-attempt > header { justify-content: space-between; font: 8px var(--font-mono); }
.queue-attempt > header span { color: var(--accent); letter-spacing: .08em; }
.queue-attempt > p { margin: 0; color: var(--text); font-size: 11px; line-height: 1.5; }
.queue-attempt-route { min-width: 0; overflow-x: auto; color: var(--faint); font: 8px var(--font-mono); white-space: nowrap; }
.queue-attempt-route i { width: 18px; height: 1px; flex: 0 0 18px; background: var(--line-strong); }
.queue-attempt dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
.queue-attempt dl div { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 5px; }
.queue-attempt dt, .queue-attempt h5 { margin: 0 0 4px; color: var(--faint); font: 7px var(--font-mono); text-transform: uppercase; }
.queue-attempt dd { margin: 0; overflow-wrap: anywhere; color: var(--muted); font: 8px/1.45 var(--font-mono); }
.queue-attempt-tasks, .queue-attempt-events { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.queue-attempt-tasks li { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; padding: 6px; border-radius: 5px; background: rgba(255,255,255,.025); font-size: 9px; }
.queue-attempt-tasks li.completed b { color: var(--accent); }
.queue-attempt-tasks li.error b, .queue-attempt-tasks li.unstarted b { color: var(--danger); }
.queue-attempt details summary { cursor: pointer; color: var(--faint); font: 8px var(--font-mono); }
.queue-attempt-events { margin-top: 7px; }
.queue-attempt-events li { display: grid; grid-template-columns: 125px 90px 1fr; gap: 7px; font: 8px/1.4 var(--font-mono); }
.queue-attempt-events time { color: var(--faint); }
.queue-attempt > footer { flex-wrap: wrap; }
.queue-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.project-dialog:has(.queue-edit-grid) { width: min(820px, calc(100vw - 32px)); }
.project-dialog-fields:has(.queue-edit-grid) { max-height: 68vh; overflow: auto; }
.queue-edit-grid .wide { grid-column: 1 / -1; }
.queue-wave-members { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.queue-wave-members span { width: 100%; color: var(--faint); font-size: 8px; }
.queue-wave-members code { padding: 4px 6px; border-radius: 4px; background: var(--accent-wash); color: var(--accent); font-size: 8px; }
.queue-contract, .queue-preflight { display: grid; gap: 11px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: #0c0f0d; }
.queue-contract code, .queue-contract b { overflow-wrap: anywhere; color: var(--accent); font: 8px var(--font-mono); }
.queue-contract p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.queue-preflight.ready { border-color: rgba(92, 197, 139, .35); }
.queue-preflight.blocked { border-color: rgba(233, 170, 81, .4); }
.queue-preflight > header, .queue-preflight > footer { display: flex; justify-content: space-between; gap: 10px; }
.queue-preflight h3 { margin: 4px 0 0; font: 620 14px var(--font-display); }
.queue-preflight > header span, .queue-preflight > header code, .queue-preflight > footer { color: var(--faint); font: 8px var(--font-mono); }
.queue-preflight > footer code { max-width: 65%; overflow: hidden; text-overflow: ellipsis; }
.queue-preflight ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.queue-preflight li { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 7px; background: rgba(233, 170, 81, .055); color: var(--muted); font-size: 8px; }
.queue-preflight li b { color: var(--amber); font: 7px var(--font-mono); }
.queue-preflight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.queue-preflight-grid > div { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.queue-preflight-grid span { color: var(--faint); font: 7px var(--font-mono); text-transform: uppercase; }
.queue-preflight-grid b { color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
@keyframes queue-pulse { 70% { box-shadow: 0 0 0 12px rgba(231, 188, 104, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 188, 104, 0); } }

@media (max-width: 760px) {
  .queue-head { align-items: flex-start; flex-direction: column; }
  .queue-head > div:last-child { width: 100%; }
  .queue-head .project-button { flex: 1; }
  .queue-waves > div { grid-auto-columns: minmax(270px, 84vw); }
  .queue-board { grid-template-columns: repeat(6, minmax(76vw, 1fr)); scroll-snap-type: x proximity; }
  .queue-column { scroll-snap-align: start; }
  .queue-edit-grid, .queue-preflight-grid { grid-template-columns: 1fr; }
  .queue-edit-grid .wide { grid-column: auto; }
  .queue-preflight li { grid-template-columns: 1fr; }
  .queue-attempt dl { grid-template-columns: 1fr; }
  .queue-attempt-tasks li, .queue-attempt-events li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { .queue-pulse { animation: none; } }
