@font-face {
  font-family: "CutKit Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url("fonts/inter/inter-variable-100-900.woff2") format("woff2");
}

@font-face {
  font-family: "CutKit Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url("fonts/inter/inter-variable-italic-100-900.woff2") format("woff2");
}

@font-face {
  font-family: "CutKit Screenplay Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/screenplay-mono/screenplay-mono-regular.ttf") format("truetype");
}

@font-face {
  font-family: "CutKit Screenplay Mono";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("fonts/screenplay-mono/screenplay-mono-bold.ttf") format("truetype");
}

@font-face {
  font-family: "CutKit Screenplay Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/screenplay-mono/screenplay-mono-italic.ttf") format("truetype");
}

@font-face {
  font-family: "CutKit Screenplay Mono";
  font-style: italic;
  font-weight: 700 900;
  font-display: swap;
  src: url("fonts/screenplay-mono/screenplay-mono-bold-italic.ttf") format("truetype");
}

:root {
  --font-ui: "CutKit Inter", sans-serif;
  --font-script: "CutKit Screenplay Mono", "Courier New", Courier, monospace;
  --bg: #e8edf3;
  --surface: #f5f7fa;
  --surface-2: #e7edf5;
  --control: #eef3f8;
  --control-muted: #dfe7f0;
  --page-backdrop: var(--bg);
  --ink: #2d3748;
  --ink-strong: #202a38;
  --text: var(--ink-strong);
  --muted: #68758a;
  --line: #cbd5e1;
  --line-strong: #aebccd;
  --accent: #3b6bcf;
  --accent-dark: #2f58b3;
  --danger: #a93d45;
  --danger-bg: #f5e8ea;
  --danger-line: #ddb4ba;
  --active-row: #dce8f6;
  --topbar: #111722;
  --topbar-line: rgba(255, 255, 255, 0.08);
  --icon-button-bg: rgba(255, 255, 255, 0.08);
  --dark-button: #1c2533;
  --dark-button-ink: #ffffff;
  --focus-ring: rgba(59, 107, 207, 0.14);
  --shadow: 0 18px 46px rgba(38, 50, 69, 0.14);
  --shadow-strong: 0 18px 44px rgba(38, 50, 69, 0.18);
  --modal-backdrop: rgba(16, 24, 38, 0.34);
  --warning: #93601d;
  --search-accent: #b98a25;
  --topbar-height: 58px;
  --edit-top-panel-base-height: 126px;
  --edit-top-panel-height: var(--edit-top-panel-base-height);
  --edit-script-panel-gap: 18px;
  --edit-script-panel-side: clamp(16px, 2vw, 40px);
  --edit-script-panel-top: calc(var(--topbar-height) + var(--edit-top-panel-height) + var(--edit-script-panel-gap));
  --edit-script-panel-width: clamp(420px, calc(100vw - 360px), 720px);
  --marker-green: #3f6f4d;
  --marker-red: #a63a42;
  --marker-purple: #74568f;
  --marker-orange: #ad5520;
  --marker-amber: #7b5c25;
  --marker-blue: #3f66a8;
  --marker-teal: #277268;
  --marker-pink: #934462;
  --marker-slate: #59687a;
  --token-bg: var(--marker-slate);
  --token-bg-hover: color-mix(in srgb, var(--token-bg) 84%, #ffffff);
  --token-ink: #f7f9fc;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0f17;
  --surface: #121823;
  --surface-2: #171f2d;
  --control: #121823;
  --control-muted: #172030;
  --page-backdrop: var(--topbar);
  --ink: #edf3ff;
  --ink-strong: #ffffff;
  --text: var(--ink-strong);
  --muted: #93a1b7;
  --line: #202a3a;
  --line-strong: #263246;
  --accent: #4f83ff;
  --accent-dark: #3768d8;
  --danger: #ff6b6b;
  --danger-bg: #2b171b;
  --danger-line: #7f3038;
  --active-row: #132744;
  --topbar: #070a10;
  --topbar-line: rgba(255, 255, 255, 0.1);
  --icon-button-bg: rgba(255, 255, 255, 0.1);
  --dark-button: #dce6f8;
  --dark-button-ink: #111827;
  --focus-ring: rgba(79, 131, 255, 0.22);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.38);
  --modal-backdrop: rgba(5, 10, 18, 0.52);
  --warning: #ffd88a;
  --search-accent: #cfa239;
  --marker-green: #2f5e3c;
  --marker-red: #7a1e24;
  --marker-purple: #5b3e7c;
  --marker-orange: #d6752d;
  --marker-amber: #6f4a18;
  --marker-blue: #2d4e8c;
  --marker-teal: #155e55;
  --marker-pink: #7a274f;
  --marker-slate: #334155;
  --token-bg: var(--marker-slate);
  --token-bg-hover: color-mix(in srgb, var(--token-bg) 84%, #ffffff);
  --token-ink: #e8edf2;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-backdrop);
}

body {
  margin: 0;
  background: var(--page-backdrop);
  color: var(--ink);
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  font-synthesis: none;
  font-size: 14px;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

.cutkit-anchor-icon,
.cutkit-script-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
}

.cutkit-anchor-icon {
  -webkit-mask: url("/static/tracker/icons/script-anchor.svg") center / contain no-repeat;
  mask: url("/static/tracker/icons/script-anchor.svg") center / contain no-repeat;
}

.cutkit-script-icon {
  -webkit-mask: url("/static/tracker/icons/edit-script.svg?v=3") center / contain no-repeat;
  mask: url("/static/tracker/icons/edit-script.svg?v=3") center / contain no-repeat;
}

body:has([data-logging-root]) {
  overflow-x: hidden;
}

html:has(.setup-members-card),
body:has(.setup-members-card) {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: auto;
  max-width: none;
  margin-inline: clamp(16px, 2vw, 40px);
}

main.shell {
  background: var(--page-backdrop);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: var(--topbar);
  color: #fff;
  border-bottom: 0;
}

body:has([data-edit-root]) .topbar {
  position: fixed;
  inset: 0 0 auto;
}

body:has([data-finishing-root]) .topbar {
  position: sticky;
}

.topbar-inner {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

.topbar-brand {
  min-width: 0;
  flex: 0 0 auto;
}

.topbar-center {
  min-width: max-content;
  justify-self: center;
}

.topbar-actions {
  min-width: 0;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-direct-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-more-menu {
  position: relative;
  display: none;
}

.topbar-more-trigger {
  list-style: none;
}

.topbar-more-trigger::-webkit-details-marker {
  display: none;
}

.topbar-more-trigger::marker {
  content: "";
}

.topbar-more-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(260px, calc(100vw - 24px));
  padding: 6px;
  display: grid;
  gap: 2px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, #020617 4%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  z-index: 1300;
}

.topbar-more-item {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.topbar-more-item:hover,
.topbar-more-item:focus-visible,
.topbar-more-item.is-active {
  outline: none;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: color-mix(in srgb, var(--accent) 34%, #ffffff 66%);
}

.topbar-more-item svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.25;
}

.global-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.topbar-overview-action {
  position: relative;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.topbar-overview-icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  background: transparent url("/static/tracker/icons/tasks-overview-lighthouse.svg?v=2") center / contain no-repeat;
  pointer-events: none;
  transform: translateY(-2px);
}

.topbar-overview-action:not(.is-active) .topbar-overview-icon {
  opacity: 0.72;
  filter: grayscale(1) brightness(1.05);
}

.topbar-overview-action.is-active .topbar-overview-icon,
.topbar-overview-action:hover .topbar-overview-icon,
.topbar-overview-action:focus-visible .topbar-overview-icon {
  opacity: 1;
  filter: none;
}

@media (prefers-reduced-motion: no-preference) {
  .topbar-overview-action.is-active .topbar-overview-icon {
    background-image: url("/static/tracker/icons/tasks-overview-lighthouse-beacon.svg?v=4");
  }
}

.global-notification-button {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  z-index: 2;
  touch-action: manipulation;
}

.global-notification-button svg,
.global-notification-button i,
.global-notification-badge {
  pointer-events: none;
}

.global-notification-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: #ef4444;
  box-shadow: 0 0 0 2px var(--topbar);
}

.global-notification-panel {
  position: fixed;
  top: calc(var(--topbar-height, 58px) + 12px);
  right: clamp(10px, 1.2vw, 18px);
  bottom: 12px;
  width: min(430px, calc(100vw - 20px));
  max-height: none;
  z-index: 2600;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 12px 10px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 24px;
  background: rgba(5, 10, 18, 0.94);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  pointer-events: auto;
}

.global-notification-panel[hidden] {
  display: none;
}

.global-notification-panel-head {
  min-height: 34px;
  padding: 0 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 0;
}

.global-notification-panel-head strong {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--muted) 84%, #ffffff 16%);
}

.global-notification-mark-all,
.global-notification-item-action {
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--accent) 62%, #ffffff 38%);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.global-notification-mark-all {
  color: color-mix(in srgb, var(--muted) 72%, #ffffff 28%);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.global-notification-mark-all:hover,
.global-notification-mark-all:focus-visible,
.global-notification-item-action:hover,
.global-notification-item-action:focus-visible {
  color: var(--text);
  outline: none;
}

.global-notification-item-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.global-notification-item-close:hover {
  color: var(--text);
  background: transparent;
}

.global-notification-item-close svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.global-notification-list {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 0 2px 4px;
  scrollbar-gutter: stable;
}

.global-notification-empty {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, #020617 4%);
}

.global-notification-empty strong,
.global-notification-item-title {
  display: block;
  color: var(--ink);
  font-weight: 780;
}

.global-notification-empty p,
.global-notification-item-body,
.global-notification-item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.global-notification-item-body--structured {
  display: grid;
  gap: 5px;
}

.global-notification-body-context {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted) 12%);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.3;
}

.global-notification-body-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  line-height: 1.35;
}

.global-notification-tag-chip {
  flex: 0 0 auto;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--control-muted));
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
}

.global-notification-tag-chip.is-sound,
.global-notification-tag-chip.is-noise,
.global-notification-tag-chip.is-audio-defect,
.global-notification-tag-chip.is-sync-audio,
.global-notification-tag-chip.is-dubbing,
.global-notification-tag-chip.is-voiceover,
.global-notification-tag-chip.is-foley,
.global-notification-tag-chip.is-music,
.global-notification-tag-chip.is-mix,
.global-notification-tag-chip.is-m-and-e {
  background: color-mix(in srgb, #0f766e 24%, var(--control-muted));
}

.global-notification-tag-chip.is-graphics,
.global-notification-tag-chip.is-vfx,
.global-notification-tag-chip.is-infographics,
.global-notification-tag-chip.is-compositing,
.global-notification-tag-chip.is-titles,
.global-notification-tag-chip.is-stabilization,
.global-notification-tag-chip.is-cleanup {
  background: color-mix(in srgb, #1d4ed8 24%, var(--control-muted));
}

.global-notification-tag-chip.is-color,
.global-notification-tag-chip.is-exposure,
.global-notification-tag-chip.is-white-balance,
.global-notification-tag-chip.is-match-color {
  background: color-mix(in srgb, #9333ea 22%, var(--control-muted));
}

.global-notification-tag-chip.is-qc,
.global-notification-tag-chip.is-problem,
.global-notification-tag-chip.is-defect,
.global-notification-tag-chip.is-visual-defect,
.global-notification-tag-chip.is-urgent,
.global-notification-tag-chip.is-backup,
.global-notification-tag-chip.is-reports,
.global-notification-tag-chip.is-aaf,
.global-notification-tag-chip.is-xml-edl,
.global-notification-tag-chip.is-integration {
  background: color-mix(in srgb, #b45309 26%, var(--control-muted));
}

.global-notification-tag-chip.is-rights,
.global-notification-tag-chip.is-legal,
.global-notification-tag-chip.is-brand,
.global-notification-tag-chip.is-music-rights,
.global-notification-tag-chip.is-stock,
.global-notification-tag-chip.is-archive,
.global-notification-tag-chip.is-release {
  background: color-mix(in srgb, #7e22ce 22%, var(--control-muted));
}

.global-notification-body-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.global-notification-item {
  --notification-accent: var(--accent);
  position: relative;
  display: grid;
  gap: 8px;
  padding: 15px 44px 15px 16px;
  border: 1px solid color-mix(in srgb, var(--line) 56%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 96%, var(--notification-accent) 4%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--notification-accent) 30%, transparent),
    0 18px 48px rgba(0, 0, 0, 0.28);
  opacity: 1;
}

.global-notification-item.is-unread {
  background: color-mix(in srgb, var(--surface) 88%, var(--notification-accent) 12%);
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--notification-accent) 44%, transparent),
    0 20px 48px rgba(0, 0, 0, 0.34);
}

/* Keep accent by type: blue/info/action, amber/warning, red/danger, green/success */
.global-notification-item--info,
.global-notification-item--action_required,
.global-notification-item--kind-source-ready,
.global-notification-item--kind-task,
.global-notification-toast--info,
.global-notification-toast--action_required {
  --notification-accent: #60a5fa;
}

.global-notification-item--success,
.global-notification-toast--success {
  --notification-accent: #22c55e;
}

.global-notification-item--warning {
  --notification-accent: #f59e0b;
}

.global-notification-item--critical {
  --notification-accent: #ef4444;
}

.global-notification-item--danger,
.global-notification-item--error,
.global-notification-toast--danger,
.global-notification-toast--error,
.global-notification-toast--critical {
  --notification-accent: #ef4444;
}

.global-notification-item--kind-edit-ready,
.global-notification-toast--kind-edit-ready {
  --notification-accent: #22c55e;
}

.global-notification-item--kind-success,
.global-notification-toast--kind-success {
  --notification-accent: #22c55e;
}

.global-notification-item--kind-source-ready,
.global-notification-toast--kind-source-ready {
  --notification-accent: #60a5fa;
}

.global-notification-item--kind-signal-source,
.global-notification-toast--kind-signal-source {
  --notification-accent: #f59e0b;
}

.global-notification-item--kind-signal-edit,
.global-notification-toast--kind-signal-edit {
  --notification-accent: #7c3aed;
}

.global-notification-item--kind-signal-tasks,
.global-notification-toast--kind-signal-tasks,
.global-notification-item--kind-signal,
.global-notification-toast--kind-signal {
  --notification-accent: #f59e0b;
}

.global-notification-item--kind-task,
.global-notification-toast--kind-task {
  --notification-accent: #60a5fa;
}

.global-notification-toast--warning {
  --notification-accent: #f59e0b;
}

.global-notification-toast--critical {
  --notification-accent: #ef4444;
}

.global-notification-toast--danger,
.global-notification-toast--error {
  --notification-accent: #ef4444;
}

.global-notification-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.global-notification-toasts {
  position: fixed;
  top: calc(var(--topbar-height, 58px) + 14px);
  right: clamp(10px, 1.2vw, 18px);
  z-index: 2700;
  width: min(430px, calc(100vw - 20px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.global-notification-toast {
  --notification-accent: var(--accent);
  position: relative;
  pointer-events: auto;
  padding: 16px 44px 16px 18px;
  border: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 96%, var(--notification-accent) 4%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--notification-accent) 32%, transparent),
    0 22px 60px rgba(0, 0, 0, 0.36);
  opacity: 1;
}

.global-notification-toast strong {
  display: block;
  margin-bottom: 4px;
}

.global-notification-toast span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.global-notification-toast-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.global-notification-toast-close:hover,
.global-notification-toast-close:focus-visible {
  color: var(--text);
  outline: none;
}

.global-notification-toast-close svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.topbar-left {
  --topbar-identity-height: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.app-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}

.app-nav a {
  position: relative;
  min-height: 30px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.app-nav a + a {
  margin-left: 12px;
}

.app-nav a + a::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: color-mix(in srgb, #ffffff 14%, transparent);
  pointer-events: none;
}

.nav-primary-icon {
  display: none;
  width: 16px;
  height: 16px;
  stroke-width: 2.35;
}

.app-nav a.is-icon-only {
  width: 30px;
  justify-content: center;
  padding: 6px;
}

.app-nav a.is-icon-only svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

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

.nav-access-icon {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  color: color-mix(in srgb, #ffffff 68%, var(--muted));
  opacity: 0.9;
}

.nav-access-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.3;
}

.nav-access-icon.is-editable {
  color: color-mix(in srgb, var(--accent) 68%, #ffffff 32%);
}

.nav-access-icon.is-saving {
  color: color-mix(in srgb, var(--accent) 78%, #ffffff 22%);
  filter: drop-shadow(0 0 6px rgba(90, 129, 255, 0.42));
  opacity: 1;
}

.nav-access-icon.is-saved {
  color: #42d77d;
  filter: drop-shadow(0 0 8px rgba(66, 215, 125, 0.45));
  opacity: 1;
}

.nav-access-icon.is-readonly {
  color: color-mix(in srgb, var(--muted) 76%, #ffffff 24%);
}

.nav-access-icon.is-assigned {
  color: color-mix(in srgb, var(--accent) 72%, #ffffff 28%);
}

.icon-button[data-save-indicator].is-saving svg {
  color: color-mix(in srgb, var(--accent) 78%, #ffffff 22%);
  filter: drop-shadow(0 0 6px rgba(90, 129, 255, 0.42));
}

.icon-button[data-save-indicator].is-saved svg {
  color: #42d77d;
  filter: drop-shadow(0 0 8px rgba(66, 215, 125, 0.45));
}

.finishing-page {
  padding-block: 10px 40px;
  --finishing-panel-top-offset: 132px;
}

:root:not([data-theme="dark"]) body:has([data-finishing-root]),
:root:not([data-theme="dark"]) body:has([data-finishing-root]) main.shell,
:root:not([data-theme="dark"]) .finishing-page {
  background: var(--bg);
}

.finishing-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.finishing-page-head.is-compact {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.finishing-page-head h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1.05;
}

.finishing-page-head p:not(.section-eyebrow) {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.finishing-scope-note {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control);
  color: var(--muted);
  font-size: 12px;
  font-weight: 840;
}

.finishing-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.finishing-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
}

.finishing-mode-switch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  gap: 4px;
  margin-right: 2px;
  padding: 0 10px 0 0;
  border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: transparent;
}

.finishing-mode-switch-button {
  width: 22px;
  min-width: 22px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  place-items: center;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.finishing-mode-switch-button svg,
.finishing-mode-switch-button i,
.finishing-mode-switch-custom-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 2.15;
}

.finishing-mode-switch-custom-icon {
  display: inline-block;
  background: currentColor;
}

.finishing-mode-switch-custom-icon--overview {
  width: 18px;
  height: 18px;
  background: transparent url("/static/tracker/icons/tasks-overview-lighthouse.svg?v=2") center / contain no-repeat;
  mask: none;
  -webkit-mask: none;
}

.finishing-mode-switch-button:not(.is-active) .finishing-mode-switch-custom-icon--overview {
  opacity: 0.72;
  filter: grayscale(1) brightness(1.05);
}

.finishing-mode-switch-button.is-active .finishing-mode-switch-custom-icon--overview,
.finishing-mode-switch-button:hover .finishing-mode-switch-custom-icon--overview,
.finishing-mode-switch-button:focus-visible .finishing-mode-switch-custom-icon--overview {
  opacity: 1;
  filter: none;
}

@media (prefers-reduced-motion: no-preference) {
  .finishing-mode-switch-button.is-active .finishing-mode-switch-custom-icon--overview {
    background-image: url("/static/tracker/icons/tasks-overview-lighthouse-beacon.svg?v=4");
  }
}

.finishing-mode-switch-button:hover,
.finishing-mode-switch-button:focus-visible {
  color: var(--ink);
  outline: none;
}

.finishing-mode-switch-button.is-active {
  color: var(--accent);
}

.finishing-overview-surface {
  min-width: 0;
  display: grid;
  gap: 12px;
  overflow: visible;
}

.finishing-overview-toolbar-placeholder {
  min-width: 1px;
  min-height: 36px;
}

.finishing-overview-dashboard-head {
  min-width: 960px;
  display: block;
}

.finishing-overview-title-block {
  display: grid;
  gap: 5px;
}

.finishing-overview-title-block h1 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1.05;
}

.finishing-overview-title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.finishing-overview-section-heading {
  min-width: 960px;
  margin: 1px 0 -6px;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  font-size: 13px;
  font-weight: 860;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-section-heading[data-overview-block="episodes"] {
  margin-top: 10px;
}

.finishing-overview-search {
  min-width: 960px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.finishing-overview-table-search {
  margin-top: -2px;
}

.finishing-page .finishing-overview-search .finishing-filter-search--source-like.finishing-overview-smart-search {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  display: block;
  align-content: unset;
}

.finishing-page .finishing-overview-search .finishing-overview-smart-search .finishing-filter-search-box {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 46%, transparent);
  color: var(--muted);
}

.finishing-page .finishing-overview-search .finishing-overview-smart-search .finishing-filter-search-box > svg,
.finishing-page .finishing-overview-search .finishing-overview-smart-search .finishing-filter-search-box > i {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.finishing-page .finishing-overview-search .finishing-overview-smart-search input {
  width: 100%;
  min-width: 52px;
  height: 34px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  line-height: 34px;
  outline: none;
}

.finishing-page .finishing-overview-search .finishing-overview-smart-search input::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

.finishing-page .finishing-overview-search .finishing-overview-smart-search .finishing-filter-token-list {
  max-width: 180px;
}

.finishing-page .finishing-overview-search .finishing-overview-smart-search .finishing-search-menu {
  left: 0;
  right: auto;
  z-index: 2600;
}

.finishing-overview-search-box {
  width: 250px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 46%, transparent);
  color: var(--muted);
}

.finishing-overview-search-box svg,
.finishing-overview-search-box i {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.finishing-overview-search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  outline: none;
}

.finishing-overview-search-box input::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

.finishing-overview-row.is-hidden-by-smart-filter {
  display: none;
}

.finishing-overview-filter-menu {
  position: relative;
}

.finishing-overview-filter-menu summary {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 52%, transparent);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  list-style: none;
}

.finishing-overview-filter-menu summary::-webkit-details-marker {
  display: none;
}

.finishing-overview-filter-menu summary svg,
.finishing-overview-filter-menu summary i {
  width: 15px;
  height: 15px;
}

.finishing-overview-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: 190px;
  padding: 6px;
  display: grid;
  gap: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 98%, black 4%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.finishing-overview-filter-panel a {
  min-height: 30px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
}

.finishing-overview-filter-panel a:hover,
.finishing-overview-filter-panel a:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}

.finishing-overview-project-metrics {
  min-width: 1120px;
  display: grid;
  grid-template-columns: minmax(270px, 0.95fr) minmax(270px, 0.95fr) minmax(420px, 1.4fr);
  gap: 8px;
}

.finishing-overview-project-metric {
  min-height: 92px;
  padding: 10px 11px 11px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  overflow: visible;
}

.finishing-overview-project-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 840;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-project-metric-label svg,
.finishing-overview-project-metric-label i {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.finishing-overview-project-metric-main {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.finishing-overview-project-metric-main strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 860;
  line-height: 0.95;
}

.finishing-overview-project-metric-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.finishing-overview-project-metric-values {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  justify-self: stretch;
}

.finishing-overview-project-metric-values > span {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 4px;
  justify-items: start;
}

.finishing-overview-project-metric-values > span:nth-child(2) {
  justify-items: center;
  text-align: center;
}

.finishing-overview-project-metric-values > span:nth-child(3) {
  justify-items: end;
  text-align: right;
}

.finishing-overview-project-metric-values strong {
  min-width: 0;
  font-size: 28px;
  font-weight: 880;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.finishing-overview-project-metric-values small {
  min-width: 0;
  font-size: 10px;
  font-weight: 820;
  line-height: 1.05;
  text-transform: lowercase;
  overflow-wrap: anywhere;
}

.finishing-overview-project-metric-values .is-total {
  color: #5f8cff;
}

.finishing-overview-project-metric-values .is-accepted {
  color: #f0a13a;
}

.finishing-overview-project-metric-values .is-ready {
  color: #31d0a1;
}

.finishing-overview-project-bars {
  display: grid;
  gap: 4px;
}

.finishing-overview-project-bars > span {
  height: 4px;
  display: block;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 54%, transparent);
  overflow: hidden;
}

.finishing-overview-project-bars > span > span {
  height: 100%;
  display: block;
  border-radius: inherit;
}

.finishing-overview-project-bars > .is-accepted > span {
  background: linear-gradient(90deg, #d98224, #f0a13a);
}

.finishing-overview-project-bars > .is-ready > span {
  background: linear-gradient(90deg, #2dbb88, #31d0a1);
}

.finishing-overview-project-metric-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
}

.finishing-overview-project-status-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.finishing-overview-project-status {
  position: relative;
  min-height: 26px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.finishing-overview-project-status:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 2px;
}

.finishing-overview-project-status-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 42;
  width: max-content;
  min-width: 190px;
  max-width: min(300px, calc(100vw - 32px));
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, #020617);
  color: var(--ink);
  box-shadow: 0 18px 34px color-mix(in srgb, #000 36%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.finishing-overview-project-status:hover .finishing-overview-project-status-popover,
.finishing-overview-project-status:focus-within .finishing-overview-project-status-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.finishing-overview-project-status-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-project-status-popover-head strong,
.finishing-overview-project-status-popover-head span {
  color: inherit;
  font-size: inherit;
}

.finishing-overview-project-status-episodes {
  display: grid;
  gap: 5px;
}

.finishing-overview-project-status-episodes > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.finishing-overview-project-status-episodes strong {
  color: inherit;
  font-size: inherit;
  font-weight: 860;
}

.finishing-overview-project-status-episodes small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finishing-overview-project-status svg,
.finishing-overview-project-status i {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.finishing-overview-project-status strong {
  color: inherit;
  font-size: 13px;
  font-weight: 860;
}

.finishing-overview-project-status.status-partial {
  background: color-mix(in srgb, #64748b 28%, var(--surface-2));
  color: #d7dee9;
}

.finishing-overview-project-status.status-assembly {
  background: color-mix(in srgb, #8b5cf6 28%, var(--surface-2));
  color: #d7c8ff;
}

.finishing-overview-project-status.status-first-cut {
  background: color-mix(in srgb, #d98c1f 30%, var(--surface-2));
  color: #ffd08a;
}

.finishing-overview-project-status.status-revisions {
  background: color-mix(in srgb, #2f8f5a 20%, var(--surface-2));
  color: #8fe6b9;
}

.finishing-overview-project-status.status-approved {
  background: #2f8f5a;
  color: #ffffff;
}

.finishing-overview-health-grid {
  min-width: 1120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  overflow: visible;
}

.finishing-overview-health-card {
  position: relative;
  min-height: 80px;
  padding: 10px 11px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  outline: none;
}

.finishing-overview-health-card.is-area {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--task-type-color, var(--accent)) 12%, transparent),
      color-mix(in srgb, var(--task-type-color, var(--accent)) 5%, transparent)
    ),
    color-mix(in srgb, var(--surface) 92%, transparent);
}

.finishing-overview-health-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 840;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-health-label svg,
.finishing-overview-health-label i {
  width: 14px;
  height: 14px;
}

.finishing-overview-health-card strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 860;
  line-height: 0.95;
}

.finishing-overview-health-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 660;
}

.finishing-overview-health-card.is-danger .finishing-overview-health-label,
.finishing-overview-health-card.is-danger strong {
  color: var(--danger);
}

.finishing-overview-health-card.is-warning .finishing-overview-health-label,
.finishing-overview-health-card.is-warning strong {
  color: var(--warning);
}

.finishing-overview-health-card.is-success .finishing-overview-health-label,
.finishing-overview-health-card.is-success strong {
  color: #31d0a1;
}

.finishing-overview-health-card.is-progress .finishing-overview-health-label,
.finishing-overview-health-card.is-progress strong {
  color: var(--accent);
}

.finishing-overview-health-card.is-area .finishing-overview-health-label,
.finishing-overview-health-card.is-area strong {
  color: var(--task-type-color, var(--accent));
}

.finishing-overview-health-card.is-zero strong {
  color: color-mix(in srgb, var(--ink) 72%, transparent);
}

.finishing-overview-health-card.is-zero .finishing-overview-health-label {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

.finishing-overview-health-card:hover,
.finishing-overview-health-card:focus-visible,
.finishing-overview-health-card:focus-within {
  z-index: 140;
  background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
}

.finishing-overview-health-card.is-area:hover,
.finishing-overview-health-card.is-area:focus-visible,
.finishing-overview-health-card.is-area:focus-within {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--task-type-color, var(--accent)) 16%, transparent),
      color-mix(in srgb, var(--task-type-color, var(--accent)) 8%, transparent)
    ),
    color-mix(in srgb, var(--surface-2) 78%, var(--surface));
}

.finishing-overview-health-popover {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 240;
  width: min(360px, 82vw);
  max-height: 360px;
  padding: 8px;
  display: none;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: #101724;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  overflow-y: auto;
  scrollbar-width: thin;
}

.finishing-overview-health-card:hover .finishing-overview-health-popover,
.finishing-overview-health-card:focus-within .finishing-overview-health-popover {
  display: grid;
}

.finishing-overview-health-card:nth-child(6n) .finishing-overview-health-popover,
.finishing-overview-health-card:nth-child(6n + 5) .finishing-overview-health-popover {
  right: 0;
  left: auto;
}

.finishing-overview-health-popover-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.finishing-overview-health-popover-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 840;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-health-popover-head span {
  color: var(--ink);
}

.finishing-overview-health-task-list {
  display: grid;
  gap: 3px;
}

.finishing-overview-health-task {
  min-width: 0;
  padding: 7px 8px;
  display: grid;
  gap: 3px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--control) 50%, transparent);
  color: var(--muted);
  text-decoration: none;
}

a.finishing-overview-health-task.finishing-task-open-panel {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: auto;
  height: auto;
  display: grid;
  place-items: initial;
  opacity: 1;
  transform: none;
}

a.finishing-overview-health-task:hover,
a.finishing-overview-health-task:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, var(--control));
  outline: none;
}

.finishing-overview-health-task strong,
.finishing-overview-health-task span,
.finishing-overview-health-task em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-health-task strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

.finishing-overview-health-task span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 640;
}

.finishing-overview-health-task em {
  color: color-mix(in srgb, var(--muted) 84%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 680;
}

.finishing-overview-health-more {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.finishing-overview-team {
  min-width: 960px;
  padding: 10px 12px;
  display: grid;
  gap: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.finishing-overview-team-group {
  display: grid;
  gap: 7px;
}

.finishing-overview-team-group + .finishing-overview-team-group {
  margin-top: 6px;
}

.finishing-overview-section-label,
.finishing-overview-list-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-team-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  overflow: visible;
}

.finishing-overview-team-chip {
  position: relative;
  flex: 0 0 170px;
  max-width: 170px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 38%, transparent);
  outline: none;
}

.finishing-overview-team-main {
  min-height: 48px;
  padding: 6px 7px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

span.finishing-overview-team-main {
  cursor: default;
}

.finishing-overview-team-chip:hover,
.finishing-overview-team-chip:focus-within,
.finishing-overview-team-chip.is-active {
  z-index: 140;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--control));
}

.finishing-overview-team-main:focus-visible {
  outline: none;
}

.finishing-overview-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--avatar-color, var(--accent)) 26%, var(--control));
  color: var(--ink);
  overflow: hidden;
}

.finishing-overview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finishing-overview-avatar svg,
.finishing-overview-avatar i {
  width: 15px;
  height: 15px;
  color: var(--avatar-color, var(--accent));
}

.finishing-overview-team-name {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.finishing-overview-team-name strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-team-name small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.finishing-overview-team-name .finishing-overview-team-role {
  width: fit-content;
  max-width: 100%;
  min-height: 16px;
  padding: 2px 5px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: color-mix(in srgb, var(--ink) 82%, var(--accent));
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-team-name small.is-danger {
  color: var(--danger);
}

.finishing-overview-team-name small.is-warning {
  color: var(--warning);
}

.finishing-overview-team-main > b {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.finishing-overview-team-popover {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 240;
  width: min(360px, 82vw);
  max-height: 360px;
  padding: 8px;
  display: none;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: #101724;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  overflow-y: auto;
  scrollbar-width: thin;
}

.finishing-overview-person-popover-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.finishing-overview-person-popover-role {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, var(--control));
  color: color-mix(in srgb, var(--ink) 86%, var(--accent));
  font-size: 10px;
  font-weight: 820;
}

.finishing-overview-person-contacts {
  display: grid;
  gap: 3px;
}

.finishing-overview-person-contacts small,
.finishing-overview-person-task-list-label {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.finishing-overview-person-contacts span {
  overflow-wrap: anywhere;
}

.finishing-overview-team-chip:hover .finishing-overview-team-popover,
.finishing-overview-team-chip:focus-within .finishing-overview-team-popover {
  display: grid;
}

.finishing-overview-team-chip:nth-child(6n) .finishing-overview-team-popover,
.finishing-overview-team-chip:nth-child(6n + 5) .finishing-overview-team-popover {
  right: 0;
  left: auto;
}

.finishing-overview-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.finishing-overview-active-filter a {
  color: var(--accent);
  font-weight: 780;
  text-decoration: none;
}

.finishing-overview-list-head {
  min-width: 960px;
  padding: 0;
}

.finishing-overview-column-head {
  min-height: 24px;
  padding: 0 12px 0 0;
  display: grid;
  grid-template-columns:
    4px minmax(86px, 0.42fr) minmax(118px, 0.62fr) minmax(126px, 0.66fr)
    minmax(112px, 0.56fr) minmax(124px, 0.62fr) minmax(260px, 1.45fr);
  align-items: center;
}

.finishing-overview-column-head span {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-column-head span:first-child {
  padding: 0;
}

.finishing-overview-column-head span:nth-child(2) {
  font-size: 11px;
  font-weight: 780;
}

.finishing-overview-list {
  min-width: 960px;
  display: grid;
  gap: 7px;
}

.finishing-overview-row {
  position: relative;
  border-radius: 8px;
  border: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  overflow: visible;
}

.finishing-overview-row:hover,
.finishing-overview-row:focus-within {
  z-index: 120;
}

.finishing-overview-row[open] {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.finishing-overview-summary {
  cursor: pointer;
  list-style: none;
}

.finishing-overview-summary::-webkit-details-marker {
  display: none;
}

.finishing-overview-summary--dashboard {
  min-height: 68px;
  padding: 0 12px 0 0;
  display: grid;
  grid-template-columns:
    4px minmax(86px, 0.42fr) minmax(118px, 0.62fr) minmax(126px, 0.66fr)
    minmax(112px, 0.56fr) minmax(124px, 0.62fr) minmax(260px, 1.45fr);
  align-items: stretch;
}

.finishing-overview-summary--dashboard > span:not(.finishing-overview-rail) {
  min-width: 0;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-left: 1px solid color-mix(in srgb, var(--line) 42%, transparent);
}

.finishing-overview-summary--dashboard > span:nth-child(2) {
  border-left: 0;
}

.finishing-overview-rail {
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.finishing-overview-row.is-danger .finishing-overview-rail {
  background: var(--danger);
}

.finishing-overview-row.is-warning .finishing-overview-rail {
  background: var(--warning);
}

.finishing-overview-row.is-success .finishing-overview-rail {
  background: #31d0a1;
}

.finishing-overview-row.is-progress .finishing-overview-rail {
  background: var(--accent);
}

.finishing-overview-row.is-empty .finishing-overview-rail {
  background: color-mix(in srgb, var(--muted) 42%, transparent);
}

.finishing-overview-episode-main {
  gap: 4px;
}

.finishing-overview-task-stats {
  gap: 3px;
}

.finishing-overview-episode-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.finishing-overview-episode-name svg,
.finishing-overview-episode-name i {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.14s ease;
}

.finishing-overview-row[open] .finishing-overview-episode-name svg,
.finishing-overview-row[open] .finishing-overview-episode-name i {
  transform: rotate(180deg);
}

.finishing-overview-episode-name strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.1;
}

.finishing-overview-episode-main small,
.finishing-overview-task-stats small,
.finishing-overview-inline-metric small,
.finishing-overview-edit-status small,
.finishing-overview-row-assignees small,
.finishing-overview-next-action small,
.finishing-overview-info-signal small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 840;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-episode-main small {
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.finishing-overview-task-stats small {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 720;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-task-stats small strong {
  color: var(--ink);
  font-weight: 860;
}

.finishing-overview-episode-main small.is-success,
.finishing-overview-task-stats small.is-success {
  color: #31d0a1;
}

.finishing-overview-task-stats small.is-empty {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.finishing-overview-task-stats small.is-danger,
.finishing-overview-task-stats small.is-danger strong {
  color: var(--danger);
}

.finishing-overview-task-stats small.is-warning,
.finishing-overview-task-stats small.is-warning strong {
  color: var(--warning);
}

.finishing-overview-alert {
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.finishing-overview-alert.is-urgent,
.finishing-overview-alert.is-overdue {
  background: color-mix(in srgb, var(--danger) 24%, transparent);
  color: #ff8b8b;
}

.finishing-overview-alert.is-review,
.finishing-overview-alert.is-waiting,
.finishing-overview-alert.is-unassigned {
  background: color-mix(in srgb, var(--warning) 20%, transparent);
  color: var(--warning);
}

.finishing-overview-inline-metric strong,
.finishing-overview-edit-status strong,
.finishing-overview-next-action strong,
.finishing-overview-info-signal strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-inline-metric strong.is-muted {
  color: color-mix(in srgb, var(--muted) 58%, transparent);
}

.finishing-overview-inline-metric em,
.finishing-overview-next-action em,
.finishing-overview-info-signal em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.finishing-overview-progress {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
  overflow: hidden;
}

.finishing-overview-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #31d0a1);
}

.finishing-overview-inline-metric.is-source .finishing-overview-progress span {
  background: linear-gradient(90deg, #2dbb88, #31d0a1);
}

.finishing-overview-inline-metric.is-edit .finishing-overview-progress span {
  background: linear-gradient(90deg, var(--accent), #57c7ff);
}

.finishing-overview-edit-status {
  min-width: 0;
  display: flex;
  align-items: center;
}

.finishing-overview-edit-status-pill {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 7px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: color-mix(in srgb, var(--muted) 72%, var(--ink));
}

.finishing-overview-edit-status-pill svg,
.finishing-overview-edit-status-pill i {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  stroke-width: 2.5;
}

.finishing-overview-edit-status.status-partial .finishing-overview-edit-status-pill {
  background: color-mix(in srgb, #64748b 28%, var(--surface-2));
  color: #d7dee9;
}

.finishing-overview-edit-status.status-assembly .finishing-overview-edit-status-pill {
  background: color-mix(in srgb, #8b5cf6 28%, var(--surface-2));
  color: #d7c8ff;
}

.finishing-overview-edit-status.status-first-cut .finishing-overview-edit-status-pill {
  background: color-mix(in srgb, #d98c1f 30%, var(--surface-2));
  color: #ffd08a;
}

.finishing-overview-edit-status.status-revisions .finishing-overview-edit-status-pill {
  background: color-mix(in srgb, #2f8f5a 20%, var(--surface-2));
  color: #8fe6b9;
}

.finishing-overview-edit-status.status-approved .finishing-overview-edit-status-pill {
  background: #2f8f5a;
  color: #ffffff;
}

.finishing-overview-edit-status.is-empty .finishing-overview-edit-status-pill {
  background: transparent;
  color: color-mix(in srgb, var(--muted) 58%, transparent);
  padding-inline: 0;
}

.finishing-overview-edit-status .finishing-overview-edit-status-pill strong {
  color: inherit;
}

.finishing-overview-row-assignees {
  position: relative;
  outline: none;
}

.finishing-overview-row-assignee-stack {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.finishing-overview-mini-person {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.finishing-overview-mini-person .finishing-overview-avatar {
  width: 21px;
  height: 21px;
}

.finishing-overview-more-chip {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--control) 72%, transparent);
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
}

.finishing-overview-row-assignee-popover {
  position: absolute;
  top: calc(100% - 2px);
  right: 10px;
  z-index: 140;
  width: min(300px, 72vw);
  max-height: 320px;
  padding: 9px;
  display: none;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: #101724;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  overflow-y: auto;
  scrollbar-width: thin;
}

.finishing-overview-row-assignees:hover .finishing-overview-row-assignee-popover,
.finishing-overview-row-assignees:focus-within .finishing-overview-row-assignee-popover {
  display: grid;
}

.finishing-overview-row-assignee-popover > strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-row-assignee-detail {
  min-width: 0;
  min-height: 34px;
  padding: 5px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 34%, transparent);
}

.finishing-overview-row-assignee-detail .finishing-overview-avatar {
  width: 26px;
  height: 26px;
}

.finishing-overview-row-assignee-detail > span:not(.finishing-overview-avatar) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.finishing-overview-row-assignee-detail b {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-row-assignee-detail small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-row-assignee-detail em {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}

.finishing-overview-next-action strong,
.finishing-overview-info-signal strong {
  font-size: 12px;
}

.finishing-overview-info-signal {
  position: relative;
  outline: none;
}

.finishing-overview-info-signal strong span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 860;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-next-action.is-danger strong,
.finishing-overview-info-signal.is-danger strong {
  color: #ff8b8b;
}

.finishing-overview-next-action.is-warning strong,
.finishing-overview-info-signal.is-warning strong {
  color: var(--warning);
}

.finishing-overview-next-action.is-success strong,
.finishing-overview-info-signal.is-success strong {
  color: #31d0a1;
}

.finishing-overview-info-signal.is-empty strong {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.finishing-overview-info-popover {
  position: absolute;
  top: calc(100% - 2px);
  right: 10px;
  z-index: 245;
  width: min(380px, 78vw);
  max-height: 360px;
  padding: 9px;
  display: none;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: #101724;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  overflow-y: auto;
  scrollbar-width: thin;
}

.finishing-overview-info-signal:hover .finishing-overview-info-popover,
.finishing-overview-info-signal:focus-within .finishing-overview-info-popover {
  display: grid;
}

body.js-ready .finishing-overview-info-signal > .finishing-overview-info-popover {
  display: none !important;
}

.finishing-overview-info-popover.is-portal-popover {
  position: fixed;
  top: 0;
  right: auto;
  left: 0;
  z-index: 9200;
  display: grid;
  width: min(380px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  pointer-events: auto;
}

.finishing-overview-info-popover.is-portal-popover[hidden] {
  display: none !important;
}

.finishing-overview-info-popover > strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-info-item,
.finishing-overview-info-item.finishing-task-open-panel {
  position: static;
  right: auto;
  bottom: auto;
  min-width: 0;
  padding: 7px;
  display: grid;
  gap: 3px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 34%, transparent);
  color: var(--ink);
  text-decoration: none;
}

.finishing-overview-info-item:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--control));
}

.finishing-overview-info-item > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-info-item.is-danger > span {
  color: #ff8b8b;
}

.finishing-overview-info-item.is-warning > span {
  color: var(--warning);
}

.finishing-overview-info-item b {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-info-item em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-overview-details {
  padding: 0 12px 12px 16px;
  display: grid;
  gap: 8px;
}

.finishing-overview-details--dashboard {
  padding: 0 0 10px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.finishing-overview-status-panel,
.finishing-overview-attention-panel {
  display: grid;
  gap: 8px;
}

.finishing-overview-metric,
.finishing-overview-block {
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  border: 0;
  background: color-mix(in srgb, var(--control) 44%, transparent);
}

.finishing-overview-metric {
  display: grid;
  gap: 5px;
}

.finishing-overview-metric span,
.finishing-overview-block h3 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-overview-metric strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.1;
}

.finishing-overview-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.finishing-overview-block {
  display: grid;
  gap: 7px;
}

.finishing-overview-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.finishing-overview-chip {
  min-height: 23px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--task-type-color, var(--muted)) 16%, var(--surface));
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
}

.finishing-overview-chip.is-alert.is-urgent,
.finishing-overview-chip.is-alert.is-overdue {
  --task-type-color: var(--danger);
  color: #ff8b8b;
}

.finishing-overview-chip.is-alert.is-review,
.finishing-overview-chip.is-alert.is-waiting,
.finishing-overview-chip.is-alert.is-unassigned {
  --task-type-color: var(--warning);
  color: var(--warning);
}

.finishing-overview-chip svg,
.finishing-overview-chip i {
  width: 12px;
  height: 12px;
  color: var(--task-type-color, var(--accent));
}

.finishing-overview-chip b {
  color: var(--muted);
  font-size: 10px;
}

.finishing-overview-muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.finishing-overview-task-list {
  width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 56%, transparent);
  border-radius: 7px;
  overflow: auto hidden;
  scrollbar-width: thin;
  background: #101724;
}

.finishing-overview-task-table {
  min-width: 1120px;
  font-size: 12px;
}

.finishing-task-table.finishing-overview-task-table th {
  position: static;
  height: 30px;
  padding: 5px 9px;
  background: #131c2b;
  font-size: 9px;
  font-weight: 820;
  line-height: 1.12;
}

.finishing-task-table.finishing-overview-task-table td,
.finishing-task-table.finishing-overview-task-table:not(.is-row-height-expanded) tbody td {
  height: 31px;
  padding: 4px 9px;
  vertical-align: middle;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.finishing-task-table.finishing-overview-task-table td.finishing-task-summary-cell:not(.is-finishing-column-pinned) {
  min-width: 220px;
  white-space: nowrap;
  vertical-align: middle;
}

.finishing-overview-task-table .finishing-chip {
  max-width: 100%;
}

.finishing-overview-task-table .finishing-overview-task-due {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 640;
}

.finishing-overview-task-person .finishing-person-chip {
  max-width: 100%;
}

.finishing-overview-task-person .finishing-person-avatar {
  flex-basis: 20px;
}

.finishing-overview-task-title {
  display: block;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.finishing-overview-task-title.finishing-task-open-panel {
  position: static;
  width: auto;
  height: auto;
  display: block;
  place-items: initial;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  transform: none;
  transition: color 0.14s ease;
}

a.finishing-overview-task-title:hover,
a.finishing-overview-task-title:focus-visible {
  color: var(--accent);
  background: transparent;
  outline: none;
}

@media (max-width: 1100px) {
  .finishing-overview-dashboard-head,
  .finishing-overview-section-heading,
  .finishing-overview-health-grid,
  .finishing-overview-team,
  .finishing-overview-list-head,
  .finishing-overview-list {
    min-width: 920px;
  }

  .finishing-overview-details--dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
}


.finishing-signals-chip {
  position: relative;
  gap: 7px;
  overflow: visible;
}

.finishing-signals-label {
  display: inline-flex;
  align-items: center;
}

.finishing-notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translate(50%, -50%);
  box-shadow: none;
}

.finishing-signals-chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, var(--control));
}

.finishing-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.finishing-filters::-webkit-scrollbar {
  display: none;
}

.finishing-toolbar-more {
  position: relative;
}

.finishing-toolbar-more > summary {
  list-style: none;
}

.finishing-toolbar-more > summary::-webkit-details-marker {
  display: none;
}

.finishing-toolbar-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 60;
  min-width: 170px;
  padding: 6px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow-strong);
}

.finishing-toolbar-menu-item {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.finishing-toolbar-menu-item:hover,
.finishing-toolbar-menu-item:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.finishing-signals-inbox {
  position: fixed;
  z-index: 130;
  width: min(980px, calc(100vw - 24px));
  max-height: min(780px, calc(100vh - 24px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
}

.finishing-signals-inbox[hidden] {
  display: none;
}

.finishing-signals-inbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.finishing-signals-inbox-header h2 {
  margin: 2px 0 0;
  color: var(--ink-strong);
  font-size: 19px;
}

.finishing-signals-inbox-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.finishing-signals-inbox-metrics {
  margin: 0 0 12px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.finishing-signals-inbox-metrics strong {
  color: var(--danger);
  font-size: 18px;
  font-weight: 900;
}

.finishing-signals-inbox-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.finishing-signals-inbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: start;
}

.finishing-signals-mail-list {
  display: grid;
  gap: 8px;
}

.finishing-signal-mail {
  position: relative;
  min-width: 0;
  padding: 11px;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 58%, transparent);
  color: var(--ink);
  text-decoration: none;
}

.finishing-signal-mail:hover,
.finishing-signal-mail:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  outline: none;
}

.finishing-signal-mail-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finishing-signal-mail-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.finishing-signal-mail-body strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 860;
  white-space: normal;
  line-height: 1.32;
}

.finishing-signal-mail-body small,
.finishing-signal-mail time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.finishing-signal-mail time {
  margin-left: auto;
}

.finishing-signal-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}

.finishing-signal-inbox-actions form {
  margin: 0;
}

.finishing-signal-mini-triage {
  position: relative;
}

.finishing-signal-mini-triage summary {
  min-height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.finishing-signal-mini-triage summary::-webkit-details-marker {
  display: none;
}

.finishing-signal-mini-triage .finishing-signal-note-form {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 12;
  width: 260px;
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow-strong);
}

.finishing-signal-mini-triage textarea,
.finishing-signal-mini-triage select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 8px;
}

.finishing-signal-open-link {
  justify-self: start;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  text-decoration: none;
}

.finishing-signal-open-link:hover,
.finishing-signal-open-link:focus-visible {
  color: var(--ink);
  outline: none;
}

.finishing-signals-inbox-guide {
  position: sticky;
  top: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.finishing-signals-inbox-guide h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 13px;
}

.finishing-signals-inbox-guide p,
.finishing-signals-inbox-guide dl {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.finishing-signals-inbox-guide dl {
  display: grid;
  gap: 7px;
}

.finishing-signals-inbox-guide div {
  display: grid;
  gap: 2px;
}

.finishing-signals-inbox-guide dt {
  color: var(--ink);
  font-weight: 850;
}

.finishing-signals-inbox-guide dd {
  margin: 0;
}

@media (max-width: 900px) {
  .finishing-signals-inbox-layout {
    grid-template-columns: 1fr;
  }

  .finishing-signals-inbox-guide {
    position: static;
  }
}

.finishing-page .action-button,
.finishing-page .primary-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.finishing-page .action-button {
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
}

.finishing-page .primary-button {
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  background: var(--accent);
  color: #ffffff;
  padding: 0 13px;
}

.finishing-filters label,
.finishing-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.finishing-filters label {
  min-width: 112px;
}

.finishing-filters select,
.finishing-filters input,
.finishing-form-grid input,
.finishing-form-grid select,
.finishing-form-grid textarea,
.finishing-material-editor input,
.finishing-material-editor select,
.finishing-custom-type-panel input,
.finishing-custom-type-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  padding: 9px 10px;
  outline: none;
}

.finishing-filters select:focus,
.finishing-filters input:focus,
.finishing-form-grid input:focus,
.finishing-form-grid select:focus,
.finishing-form-grid textarea:focus,
.finishing-material-editor input:focus,
.finishing-material-editor select:focus,
.finishing-custom-type-panel input:focus,
.finishing-custom-type-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.finishing-form-grid select[hidden],
.finishing-material-row select[hidden] {
  display: none !important;
}

.finishing-filter-search {
  min-width: 220px;
  flex: 1 1 260px;
}

.finishing-filter-strip {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  overflow: visible;
  border-radius: 0;
}

.finishing-page .finishing-round-action {
  position: relative;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--control);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.finishing-page .finishing-round-action:hover,
.finishing-page .finishing-round-action:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--control));
  outline: none;
}

.finishing-page .finishing-round-action > i,
.finishing-page .finishing-round-action > svg {
  width: 17px;
  height: 17px;
}

.finishing-page .finishing-round-action.is-create {
  border-color: color-mix(in srgb, #22c55e 64%, transparent);
  background: color-mix(in srgb, #22c55e 88%, #0f172a 12%);
  color: #ffffff;
}

.finishing-page .finishing-round-action.is-create:hover,
.finishing-page .finishing-round-action.is-create:focus-visible {
  background: color-mix(in srgb, #22c55e 94%, #ffffff 6%);
}

.finishing-share-popover > summary {
  list-style: none;
}

.finishing-share-popover > summary::-webkit-details-marker {
  display: none;
}

.finishing-share-menu {
  min-width: 280px;
  padding: 8px;
  gap: 5px;
  z-index: 2400;
}

.finishing-share-menu-head,
.finishing-overview-settings-menu-head {
  display: grid;
  gap: 4px;
  padding: 8px 9px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.finishing-share-menu-head strong,
.finishing-overview-settings-menu-head strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
}

.finishing-share-menu-head span,
.finishing-overview-settings-menu-head span {
  font-size: 11px;
  line-height: 1.35;
}

.finishing-overview-settings-popover > summary {
  list-style: none;
}

.finishing-overview-settings-popover > summary::-webkit-details-marker {
  display: none;
}

.finishing-overview-settings-menu {
  min-width: 230px;
  padding: 8px;
  gap: 5px;
  z-index: 2400;
}

.finishing-overview-block-toggle {
  min-height: 32px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.finishing-overview-block-toggle:hover,
.finishing-overview-block-toggle:focus-within {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.finishing-overview-block-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.finishing-overview-surface .is-overview-block-hidden {
  display: none !important;
}

.finishing-overview-block-reset {
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  text-align: left;
  cursor: pointer;
}

.finishing-overview-block-reset:hover,
.finishing-overview-block-reset:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--ink);
  outline: none;
}

.finishing-toolbar-menu-item {
  gap: 8px;
}

.finishing-toolbar-menu-item > i,
.finishing-toolbar-menu-item > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--accent);
}

.finishing-toolbar-menu-item small {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.finishing-toolbar-menu-item.is-disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

.finishing-toolbar-menu-item.is-disabled:hover,
.finishing-toolbar-menu-item.is-disabled:focus-visible {
  border-color: transparent;
  background: transparent;
}

.finishing-share-dialog[hidden] {
  display: none !important;
}

.finishing-share-dialog {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.48);
}

.finishing-share-dialog-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 13px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, #07111f 4%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.finishing-share-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.finishing-share-dialog-close:hover,
.finishing-share-dialog-close:focus-visible {
  color: var(--ink-strong);
  outline: none;
}

.finishing-share-dialog-card h2 {
  margin: -5px 32px 0 0;
  font-size: 22px;
  line-height: 1.08;
}

.finishing-share-dialog-copy,
.finishing-share-dialog-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.finishing-share-person-field,
.finishing-share-result label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finishing-share-person-field[hidden] {
  display: none !important;
}

.finishing-share-result input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--control);
  color: var(--ink-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: none;
}

.finishing-share-person-picker {
  position: relative;
  text-transform: none;
  letter-spacing: 0;
}

.finishing-share-person-trigger {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--control);
  color: var(--ink-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  text-align: left;
  cursor: pointer;
}

.finishing-share-person-trigger:hover,
.finishing-share-person-trigger:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong));
  outline: none;
}

.finishing-share-person-trigger > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.finishing-share-person-trigger .finishing-person-avatar,
.finishing-share-person-option .finishing-person-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 13px;
}

.finishing-share-person-selected-text,
.finishing-share-person-option-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.finishing-share-person-selected-text strong,
.finishing-share-person-option-copy strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-share-person-selected-text small,
.finishing-share-person-option-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-share-person-list {
  position: absolute;
  z-index: 3;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(310px, 45vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 98%, #07111f 2%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.finishing-share-person-list[hidden] {
  display: none !important;
}

.finishing-share-person-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.finishing-share-person-option:hover,
.finishing-share-person-option:focus-visible {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  outline: none;
}

.finishing-share-person-option.is-missing-email {
  opacity: 0.62;
}

.finishing-share-person-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.finishing-share-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.finishing-share-result[hidden] {
  display: none !important;
}

.finishing-share-dialog-card.finishing-share-manager-card {
  width: min(720px, calc(100vw - 32px));
}

.finishing-share-manager-list {
  display: grid;
  gap: 8px;
  max-height: min(430px, 56vh);
  overflow: auto;
  padding-right: 2px;
}

.finishing-share-manager-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--control) 72%, transparent);
  font-size: 13px;
  font-weight: 760;
}

.finishing-share-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--control) 74%, transparent);
}

.finishing-share-manager-row.is-inactive {
  opacity: 0.68;
}

.finishing-share-manager-row-main,
.finishing-share-manager-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.finishing-share-manager-kind,
.finishing-share-manager-meta span {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--control));
  color: color-mix(in srgb, var(--accent) 68%, var(--ink) 32%);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.finishing-share-manager-row strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-share-manager-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-share-manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.finishing-share-manager-actions .compact-action {
  min-height: 34px;
}

.finishing-share-manager-actions .is-danger {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
  color: color-mix(in srgb, var(--danger) 78%, #ffffff 22%);
}

.finishing-share-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.finishing-share-dialog.is-busy {
  cursor: wait;
}

@media (max-width: 760px) {
  .finishing-share-dialog {
    align-items: end;
    padding: 12px;
  }

  .finishing-share-dialog-card {
    width: 100%;
    border-radius: 16px;
  }

  .finishing-share-result,
  .finishing-share-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .finishing-share-manager-row {
    grid-template-columns: 1fr;
  }

  .finishing-share-manager-actions {
    justify-content: stretch;
  }

  .finishing-share-manager-actions .compact-action {
    width: 100%;
  }
}

.finishing-filters {
  gap: 0;
  overflow: visible;
}

.finishing-filter-strip {
  position: relative;
  --tasks-filter-width: 116px;
  flex: 1 1 auto;
  width: 100%;
  min-width: min(100%, 920px);
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow: visible;
  border-radius: 0;
}

.finishing-filter-strip--overview {
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.finishing-filter-strip--overview .finishing-overview-toolbar--inline {
  width: auto;
  min-height: 36px;
  justify-content: flex-start;
}

.finishing-filter-strip--overview .finishing-overview-total {
  padding-left: 2px;
}

.finishing-filter-reset {
  position: absolute;
  top: 2px;
  left: -34px;
  z-index: 2500;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  box-shadow: none;
}

.finishing-filter-reset:hover,
.finishing-filter-reset:focus-visible {
  color: var(--ink-strong);
  background: transparent;
  outline: none;
}

.finishing-filter-reset > i,
.finishing-filter-reset > svg {
  width: 12px;
  height: 12px;
}

.finishing-filter-combo {
  position: relative;
  flex: 0 0 var(--tasks-filter-width);
  width: var(--tasks-filter-width);
  min-width: var(--tasks-filter-width);
  min-height: 46px;
  padding: 0 9px;
  border: 0;
  background: transparent;
}

.finishing-filter-combo + .finishing-filter-combo::before,
.finishing-filter-search::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 6px;
  width: 1px;
  background: color-mix(in srgb, var(--line) 62%, transparent);
}

.finishing-filter-combo > summary {
  list-style: none;
}

.finishing-filter-combo > summary::-webkit-details-marker {
  display: none;
}

.finishing-filter-combo[open] {
  z-index: 2300;
}

.finishing-filter-combo[open],
.finishing-filter-combo:focus-within {
  box-shadow: none;
}

.finishing-filter-trigger {
  height: 100%;
  min-height: 46px;
  padding: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  cursor: pointer;
}

.finishing-filter-heading {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
  text-transform: uppercase;
}

.finishing-filter-heading > i,
.finishing-filter-heading > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--stage-token-color, var(--task-type-color, var(--accent)));
}

.finishing-filter-value {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.08;
  white-space: nowrap;
}

.finishing-filter-value > span,
.finishing-filter-trigger .finishing-person-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finishing-filter-value > i,
.finishing-filter-value > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--stage-token-color, var(--task-type-color, var(--accent)));
}

.finishing-filter-value.is-type-token,
.finishing-filter-value.is-stage-token {
  justify-self: start;
  min-height: 23px;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--stage-token-color, var(--task-type-color, var(--accent))) 72%, #172033 28%);
  color: #ffffff;
}

.finishing-filter-value .finishing-chip {
  max-width: 100%;
}

.finishing-filter-trigger .finishing-person-chip {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.finishing-filter-trigger .finishing-person-avatar {
  width: 18px;
  height: 18px;
  font-size: 8px;
}

.finishing-filter-menu {
  top: calc(100% + 8px);
  left: 9px;
  z-index: 2400;
  min-width: 260px;
  max-height: min(520px, calc(100vh - 150px));
  overflow: auto;
  margin-top: 0;
  border-color: color-mix(in srgb, var(--line) 84%, var(--accent) 16%);
  box-shadow: var(--shadow-strong);
}

.finishing-filter-combo.is-type-filter .finishing-filter-menu {
  min-width: 330px;
}

.finishing-filter-combo.is-priority-filter .finishing-filter-menu,
.finishing-filter-combo.is-sort-filter .finishing-filter-menu {
  min-width: 230px;
}

.finishing-filter-menu button {
  min-height: 34px;
}

.finishing-filter-menu button.has-type-color .finishing-stage-choice-main i,
.finishing-filter-menu button.has-type-color .finishing-stage-choice-main svg {
  color: var(--task-type-color, var(--accent));
}

.finishing-filter-menu button.has-type-color.is-selected {
  border-color: color-mix(in srgb, var(--task-type-color, var(--accent)) 48%, transparent);
  background: color-mix(in srgb, var(--task-type-color, var(--accent)) 16%, transparent);
}

.finishing-filter-menu button.is-type-group {
  font-weight: 820;
}

.finishing-filter-menu button.is-type-child {
  position: relative;
  padding-left: 34px;
}

.finishing-filter-menu button.is-type-child::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 12px;
  width: 8px;
  height: 10px;
  border-left: 1px solid color-mix(in srgb, var(--muted) 62%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 62%, transparent);
  border-bottom-left-radius: 4px;
}

.finishing-filter-menu button.is-type-child .finishing-stage-choice-main {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted) 12%);
}

.finishing-filter-menu button.has-stage-style.is-selected {
  border-color: color-mix(in srgb, var(--stage-token-color, var(--accent)) 48%, transparent);
  background: color-mix(in srgb, var(--stage-token-color, var(--accent)) 16%, transparent);
}

.finishing-filter-menu .finishing-type-choice-search {
  margin-bottom: 4px;
}

.finishing-filter-menu .finishing-person-chip {
  width: 100%;
}

.finishing-filter-search {
  position: relative;
  flex: 1 1 250px;
  min-width: 210px;
  max-width: 300px;
  min-height: 46px;
  margin-left: 4px;
  padding: 0 0 0 16px;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.finishing-filter-search input {
  min-height: 21px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.08;
  -webkit-appearance: none;
  appearance: none;
}

.finishing-filter-search input:focus {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0;
}

@media (max-width: 1180px) {
  .finishing-toolbar {
    align-items: stretch;
  }

  .finishing-filter-strip {
    min-width: 760px;
    --tasks-filter-width: 108px;
  }

  .finishing-filter-strip--overview {
    min-width: 0;
  }
}

.finishing-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(440px, 560px);
  gap: 16px;
  align-items: start;
  isolation: isolate;
}

.finishing-page.is-panel-closed .finishing-layout {
  grid-template-columns: minmax(0, 1fr);
}

.finishing-page.is-panel-closed .finishing-detail-panel {
  display: none;
}

.finishing-page.is-panel-loading .finishing-detail-panel {
  opacity: 0.64;
  pointer-events: none;
}

.finishing-page.is-overview-mode:not(.is-panel-closed) .finishing-detail-panel {
  margin-top: 74px;
  height: calc(100dvh - var(--topbar-height) - var(--finishing-panel-top-offset) - 74px);
  max-height: calc(100dvh - var(--topbar-height) - var(--finishing-panel-top-offset) - 74px);
}

.finishing-table-card,
.finishing-detail-panel,
.finishing-create-form {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.finishing-table-shell {
  --finishing-column-trigger-top: 5px;
  position: relative;
  min-width: 0;
  margin-top: 17px;
}

.finishing-table-shell.is-column-layout-editing {
  --finishing-column-edit-hatch: repeating-linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.09) 0,
    rgba(148, 163, 184, 0.09) 6px,
    transparent 6px,
    transparent 14px
  );
}

.finishing-table-shell.is-column-layout-pending .finishing-table-card {
  opacity: 0;
  animation: finishing-table-layout-fallback 900ms step-end forwards;
}

.finishing-table-shell.is-column-layout-ready .finishing-table-card {
  opacity: 1;
  transition: opacity 120ms ease;
}

@keyframes finishing-table-layout-fallback {
  to {
    opacity: 1;
  }
}

.finishing-table-card {
  position: relative;
  min-width: 0;
  overflow: auto;
}

.finishing-task-table-card {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.finishing-column-editor-trigger {
  position: absolute;
  top: var(--finishing-column-trigger-top);
  left: var(--column-layout-trigger-left, -26px);
  right: auto;
  z-index: 30;
  width: var(--column-layout-trigger-size, 28px);
  height: var(--column-layout-trigger-size, 28px);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.14s ease, visibility 0.14s ease, transform 0.14s ease, color 0.14s ease;
  transition-delay: 0s;
}

.finishing-table-shell.is-column-layout-editing .finishing-column-editor-trigger {
  top: var(--column-layout-trigger-edit-top, 9px);
  left: var(--column-layout-trigger-edit-left, -20px);
  width: var(--column-layout-trigger-edit-size, 17px);
  height: var(--column-layout-trigger-edit-size, 17px);
  color: #fff;
  border-color: color-mix(in srgb, var(--marker-green) 72%, transparent);
  background: var(--marker-green);
  box-shadow: var(--shadow);
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.finishing-column-editor-trigger:hover,
.finishing-column-editor-trigger[aria-expanded="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  color: var(--ink-strong);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transition-delay: 0s;
}

.finishing-table-shell.is-column-layout-editing .finishing-column-editor-trigger:hover,
.finishing-table-shell.is-column-layout-editing .finishing-column-editor-trigger[aria-expanded="true"] {
  color: #fff;
  border-color: color-mix(in srgb, var(--marker-green) 72%, transparent);
  background: var(--marker-green);
  box-shadow: var(--shadow);
}

.finishing-column-editor-trigger svg {
  width: var(--column-layout-trigger-icon-size, 13px);
  height: var(--column-layout-trigger-icon-size, 13px);
}

.finishing-table-shell.is-column-layout-editing .finishing-column-editor-trigger svg {
  width: var(--column-layout-trigger-edit-icon-size, 9px);
  height: var(--column-layout-trigger-edit-icon-size, 9px);
}

.finishing-column-editor-popover {
  position: fixed;
  z-index: 130;
  width: min(300px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
}

.finishing-column-editor-popover[hidden] {
  display: none;
}

.finishing-column-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.finishing-column-editor-head h2 {
  margin: 3px 0 0;
  color: var(--ink-strong);
  font-size: 14px;
}

.finishing-column-board {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 168px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--control) 70%, transparent);
}

.finishing-column-token {
  min-height: 30px;
  padding: 0 6px 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--control-muted) 82%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.finishing-column-token.is-active {
  border-color: color-mix(in srgb, var(--column-color, var(--marker-blue)) 58%, transparent);
  background: color-mix(in srgb, var(--column-color, var(--marker-blue)) 18%, var(--control));
  color: var(--ink);
}

.finishing-column-token.is-selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--column-color, var(--accent)) 48%, transparent);
}

.finishing-column-token.is-required {
  cursor: grab;
}

.finishing-column-token.is-dragging {
  opacity: 0.55;
}

.finishing-column-token.is-drop-target {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
}

.finishing-column-token small {
  color: currentColor;
  opacity: 0.72;
  font-size: 9px;
  text-transform: uppercase;
}

.finishing-column-token i,
.finishing-column-token svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.finishing-column-token b {
  min-width: 28px;
  min-height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, #000 18%, transparent);
  color: currentColor;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.finishing-column-token:not(.is-active) b {
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.finishing-column-visual-panel {
  margin-top: 10px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  border: 0;
  background: transparent;
}

.finishing-column-visual-panel strong {
  color: var(--ink-strong);
  font-size: 13px;
}

.finishing-column-visual-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.finishing-column-icon-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
}

.finishing-column-icon-grid button {
  min-height: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 62%, transparent);
  cursor: pointer;
  opacity: 0.68;
}

.finishing-column-icon-grid button.is-selected,
.finishing-column-icon-grid button:hover,
.finishing-column-icon-grid button:focus-visible {
  border-color: transparent;
  color: var(--ink-strong);
  opacity: 1;
  outline: none;
}

.finishing-column-icon-grid svg {
  width: 12px;
  height: 12px;
}

.finishing-column-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finishing-column-color-grid button {
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, #ffffff 20%, var(--line-strong));
  border-radius: 999px;
  background: var(--swatch-color);
  cursor: pointer;
}

.finishing-column-color-grid button.is-selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 58%, transparent);
}

.finishing-column-active-toggle {
  width: 100%;
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 18%, var(--control));
  color: var(--ink-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.finishing-column-active-toggle.is-inactive {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  color: var(--muted);
}

.source-column-docs-option {
  display: none;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.source-column-layout-popover.is-montage-column .source-column-docs-option:not([hidden]) {
  display: grid;
}

.source-column-docs-option input {
  accent-color: var(--accent);
}

.source-column-docs-enabled,
.source-column-docs-types label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.source-column-docs-types {
  display: grid;
  gap: 6px;
}

.source-column-docs-types[hidden] {
  display: none;
}

.source-column-docs-types label {
  align-items: flex-start;
  min-height: 30px;
  padding: 2px 0;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.source-column-docs-types svg,
.source-column-docs-types [data-lucide] {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: 0 0 14px;
  color: var(--muted);
}

.source-column-docs-custom-list {
  display: grid;
  gap: 5px;
}

.source-doc-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: start;
  gap: 6px;
}

.source-doc-custom-choice {
  min-width: 0;
}

.source-doc-custom-delete {
  width: 20px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  box-shadow: none;
  cursor: pointer;
}

.source-doc-custom-delete:hover,
.source-doc-custom-delete:focus-visible {
  outline: none;
  background: transparent;
  color: var(--danger);
}

.source-doc-custom-delete svg,
.source-doc-custom-delete [data-lucide] {
  width: 13px;
  height: 13px;
}

.source-column-docs-custom-create {
  display: grid;
  gap: 7px;
}

.source-doc-custom-reveal {
  min-height: 28px;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.source-column-docs-custom-create .source-doc-custom-reveal.secondary-action,
.source-column-docs-custom-create .source-doc-custom-add.secondary-action {
  min-height: 28px;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.source-doc-custom-editor {
  display: grid;
  gap: 7px;
}

.source-doc-custom-editor[hidden] {
  display: none;
}

.source-doc-custom-editor input {
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
}

.source-doc-custom-icon-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.source-doc-custom-icon-grid button {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.source-doc-custom-icon-grid button:hover,
.source-doc-custom-icon-grid button:focus-visible,
.source-doc-custom-icon-grid button.is-selected {
  outline: none;
  background: transparent;
  color: var(--accent);
}

.source-doc-custom-icon-grid svg,
.source-doc-custom-icon-grid [data-lucide] {
  width: 14px;
  height: 14px;
}

.source-doc-custom-add {
  min-height: 28px;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.finishing-task-table {
  --finishing-task-row-compact-height: 18px;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  font-size: 13px;
}

.finishing-task-table col.finishing-col-task {
  width: 240px;
}

.finishing-task-table col.finishing-col-row-number {
  width: 36px;
}

.finishing-task-table col.finishing-col-row-delete {
  width: 0;
}

.finishing-table-shell.is-table-editing .finishing-task-table col.finishing-col-row-delete {
  width: 38px;
}

.finishing-task-table col.finishing-col-episode {
  width: 118px;
}

.finishing-task-table col.finishing-col-stop-frame {
  width: 74px;
}

.finishing-task-table col.finishing-col-tc-in,
.finishing-task-table col.finishing-col-tc-out {
  width: 118px;
}

.finishing-task-table col.finishing-col-area {
  width: 176px;
}

.finishing-task-table col.finishing-col-status,
.finishing-task-table col.finishing-col-stage {
  width: 122px;
}

.finishing-task-table col.finishing-col-step-responsible {
  width: 150px;
}

.finishing-task-table col.finishing-col-stage-note {
  width: 180px;
}

.finishing-task-table col.finishing-col-priority {
  width: 112px;
}

.finishing-task-table col.finishing-col-assignee {
  width: 150px;
}

.finishing-task-table col.finishing-col-due {
  width: 112px;
}

.finishing-task-table col.finishing-col-updated {
  width: 150px;
}

.finishing-task-table col.finishing-col-description,
.finishing-task-table col.finishing-col-working-package,
.finishing-task-table col.finishing-col-reference-package,
.finishing-task-table col.finishing-col-return-target,
.finishing-task-table col.finishing-col-blocker-reason,
.finishing-task-table col.finishing-col-package-notes {
  width: 220px;
}

.finishing-task-table col.finishing-col-current-step,
.finishing-task-table col.finishing-col-next-action,
.finishing-task-table col.finishing-col-workflow,
.finishing-task-table col.finishing-col-coordinator,
.finishing-task-table col.finishing-col-external-contact,
.finishing-task-table col.finishing-col-package-status,
.finishing-task-table col.finishing-col-created,
.finishing-task-table col.finishing-col-created-by,
.finishing-task-table col.finishing-col-updated-by {
  width: 150px;
}

.finishing-task-table col.finishing-col-blocked {
  width: 110px;
}

.finishing-task-table col.finishing-col-revision {
  width: 90px;
}

.finishing-task-table th,
.finishing-task-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finishing-task-table td.is-inline-edit-cell {
  padding: 0;
}

.finishing-task-table:not(.is-row-height-expanded) tbody td {
  padding-top: 1px;
  padding-bottom: 1px;
  vertical-align: middle;
}

.finishing-task-table:not(.is-row-height-expanded) tbody td.is-inline-edit-cell,
.finishing-task-table:not(.is-row-height-expanded) tbody td.finishing-stop-frame-cell,
.finishing-task-table:not(.is-row-height-expanded) tbody td.finishing-stage-note-cell {
  padding: 0;
}

.finishing-task-table:not(.is-row-height-expanded) tbody td.finishing-task-summary-cell,
.finishing-task-table:not(.is-row-height-expanded) tbody td.finishing-description-cell,
.finishing-task-table:not(.is-row-height-expanded) tbody td.finishing-stage-note-cell,
.finishing-task-table:not(.is-row-height-expanded) tbody td.finishing-material-table-cell {
  vertical-align: top;
}

.finishing-task-table td.is-inline-edit-cell:focus-within {
  box-shadow: none;
}

.finishing-task-table tr.is-duplicate-highlight > td {
  animation: finishing-duplicate-row-flash 1.8s ease-out;
}

@keyframes finishing-duplicate-row-flash {
  0% {
    background-color: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  }
  100% {
    background-color: transparent;
  }
}

.finishing-task-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 40px;
  padding-top: 3px;
  padding-bottom: 3px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  vertical-align: middle;
  border-right: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
}

.finishing-task-table th:last-child {
  border-right: 0;
}

.finishing-task-row-number-header,
.finishing-task-row-number-cell {
  position: sticky;
  left: 0;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding-inline: 0 !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--line) 70%, transparent);
}

.finishing-table-shell.is-table-editing .finishing-task-row-number-header,
.finishing-table-shell.is-table-editing .finishing-task-row-number-cell {
  left: 38px;
}

.finishing-task-table .finishing-row-delete-cell {
  position: sticky;
  left: 0;
  z-index: 106;
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 0 !important;
  display: table-cell;
  text-align: center !important;
  vertical-align: middle !important;
  background: var(--surface-2);
  border-right: 0;
  box-shadow: none;
  overflow: hidden;
}

.finishing-task-table .finishing-row-delete-cell > * {
  display: none;
}

.finishing-table-shell.is-table-editing .finishing-task-table .finishing-row-delete-cell {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  border-right: 1px solid var(--line);
}

.finishing-table-shell.is-table-editing .finishing-task-table .finishing-row-delete-cell > * {
  display: inline-grid;
}

.finishing-table-shell.is-table-editing .finishing-task-table th.finishing-row-delete-cell {
  z-index: 112;
  background: var(--surface-2);
}

.finishing-task-row-number-header {
  z-index: 110 !important;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1;
}

.finishing-task-row-number-cell {
  z-index: 86;
  background: var(--surface-2);
  overflow: visible !important;
}

.finishing-task-table tbody tr:hover .finishing-task-row-number-cell,
.finishing-task-table tbody tr.is-selected .finishing-task-row-number-cell,
.finishing-task-row-number-cell:hover,
.finishing-task-row-number-cell:focus-within {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}

.finishing-task-row-number-link,
.finishing-task-row-number-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 26px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.finishing-row-actions-menu {
  position: absolute;
  top: 2px;
  left: calc(100% + 4px);
  z-index: 96;
  display: grid;
  gap: 5px;
  min-width: 148px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.finishing-row-actions-menu form {
  margin: 0;
  width: 100%;
}

.finishing-row-actions-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -8px;
  width: 8px;
  background: transparent;
}

.finishing-task-row-number-cell:hover .finishing-row-actions-menu,
.finishing-task-row-number-cell:focus-within .finishing-row-actions-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.finishing-task-row-number-cell.is-row-actions-suppressed .finishing-row-actions-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition-delay: 0s;
}

.finishing-row-action {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.finishing-row-action:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--ink-strong);
}

.finishing-row-action.is-danger:hover {
  border-color: color-mix(in srgb, var(--danger) 54%, var(--line));
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-2));
}

.finishing-row-action svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.finishing-description-cell {
  height: 1px;
  white-space: normal !important;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.3;
  vertical-align: top;
}

.finishing-table-shell.is-column-layout-editing .finishing-table-card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table-card {
  border-color: transparent;
  box-shadow: none;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table-card .finishing-task-table {
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody {
  background-image: var(--finishing-column-edit-hatch);
}

.finishing-task-table th.is-column-disabled {
  opacity: 0.14;
}

.finishing-task-table td.is-column-disabled {
  opacity: 0.18;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody td {
  background: transparent;
  pointer-events: none;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody td *,
.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody :is(label, input, button, a, summary, details) {
  pointer-events: none !important;
}

.finishing-table-shell.is-column-layout-editing .finishing-stop-frame-popover {
  display: none !important;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody tr {
  cursor: default;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody tr:hover,
.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody tr.is-selected {
  background: transparent;
}

.finishing-column-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  max-width: 100%;
  min-width: 0;
}

.finishing-column-heading i,
.finishing-column-heading svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--column-color, currentColor);
  stroke-width: 1.8;
}

.finishing-column-heading span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finishing-task-table th.is-header-compact {
  padding: 3px 6px;
  text-align: center;
}

.finishing-task-table th.is-header-compact .finishing-column-heading {
  min-height: 34px;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.finishing-task-table th.is-header-compact .finishing-column-heading i,
.finishing-task-table th.is-header-compact .finishing-column-heading svg,
.finishing-task-table th.is-header-icon-only .finishing-column-heading i,
.finishing-task-table th.is-header-icon-only .finishing-column-heading svg {
  width: 14px;
  height: 14px;
}

.finishing-task-table th.is-header-compact .finishing-column-heading span {
  max-width: 100%;
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0;
  text-overflow: clip;
}

.finishing-task-table th.is-header-icon-only {
  padding: 3px 6px;
  text-align: center;
}

.finishing-task-table th.is-header-icon-only .finishing-column-heading {
  min-height: 34px;
  width: 100%;
  justify-content: center;
}

.finishing-task-table th.is-header-icon-only .finishing-column-heading span {
  display: none;
}

.finishing-task-table th.movable-column {
  cursor: grab;
}

.finishing-task-table th .column-resizer::before {
  background: color-mix(in srgb, var(--line) 70%, transparent);
  opacity: 0.4;
}

.finishing-task-table th:hover .column-resizer::before,
.finishing-task-table th:focus-within .column-resizer::before {
  background: var(--accent);
  opacity: 1;
}

.finishing-task-table th.is-column-dragging {
  opacity: 0.5;
}

.finishing-task-table th.column-drop-before::before,
.finishing-task-table th.column-drop-after::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  z-index: 12;
}

.finishing-task-table th.column-drop-before::before {
  left: 0;
}

.finishing-task-table th.column-drop-after::after {
  right: 0;
}

.finishing-column-pin-toggle[hidden] {
  display: none;
}

.finishing-task-table .is-finishing-column-pinned {
  position: sticky;
  left: var(--finishing-sticky-left, 0);
  z-index: 80;
  background: var(--finishing-sticky-bg, var(--finishing-row-current-bg, var(--surface)));
  background-clip: padding-box;
  box-shadow: inset -1px 0 0 var(--line);
}

.finishing-task-table th.is-finishing-column-pinned {
  z-index: 90;
  --finishing-sticky-bg: var(--surface-2);
  background: var(--finishing-sticky-bg);
  box-shadow: inset -1px 0 0 var(--line);
}

.finishing-task-table tbody tr:hover td.is-finishing-column-pinned,
.finishing-task-table tbody tr.is-selected td.is-finishing-column-pinned {
  --finishing-sticky-bg: var(--finishing-row-current-bg, var(--surface));
  background: var(--finishing-sticky-bg);
  box-shadow: inset -1px 0 0 var(--line);
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody td.is-finishing-column-pinned {
  background:
    var(--finishing-column-edit-hatch),
    var(--surface);
  box-shadow: inset -1px 0 0 var(--line), inset -7px 0 0 var(--surface);
}

.finishing-task-table td.is-date-popover-host,
.finishing-task-table th.is-date-popover-host,
.finishing-task-table td.is-finishing-popover-host,
.finishing-task-table th.is-finishing-popover-host {
  position: relative;
  z-index: 1700 !important;
  overflow: visible;
}

.finishing-task-table td.is-finishing-column-pinned.is-date-popover-host,
.finishing-task-table th.is-finishing-column-pinned.is-date-popover-host,
.finishing-task-table td.is-finishing-column-pinned.is-finishing-popover-host,
.finishing-task-table th.is-finishing-column-pinned.is-finishing-popover-host {
  position: sticky;
}

.finishing-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.finishing-sort-link::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0;
  transform: rotate(45deg) translateY(-1px);
}

.finishing-sort-link:hover,
.finishing-sort-link.is-active {
  color: var(--ink-strong);
}

.finishing-sort-link.is-active::after {
  opacity: 0.82;
}

.finishing-task-table tbody tr {
  cursor: pointer;
  --finishing-row-state-bg: var(--surface);
  --finishing-row-current-bg: var(--finishing-row-state-bg);
  background: var(--finishing-row-current-bg);
}

.finishing-task-table tbody tr.stage-done,
.finishing-task-table tbody tr.stage-ready,
.finishing-task-table tbody tr.status-done {
  --finishing-row-state-bg: color-mix(in srgb, var(--marker-green) 18%, var(--surface) 82%);
}

.finishing-task-table tbody tr.has-external-update {
  --finishing-row-state-bg: color-mix(in srgb, #41b8ff 18%, var(--surface) 82%);
}

.finishing-task-table tbody tr.due-tomorrow {
  --finishing-row-state-bg: color-mix(in srgb, var(--marker-orange) 17%, var(--surface) 83%);
}

.finishing-task-table tbody tr.priority-urgent,
.finishing-task-table tbody tr.due-overdue,
.finishing-task-table tbody tr.due-today {
  --finishing-row-state-bg: color-mix(in srgb, var(--danger) 18%, var(--surface) 82%);
}

.finishing-task-table tbody tr.priority-urgent {
  --finishing-row-state-bg: color-mix(in srgb, var(--danger) 24%, var(--surface) 76%);
}

.finishing-task-table tbody tr:hover {
  --finishing-row-current-bg: color-mix(in srgb, var(--active-row) 72%, var(--finishing-row-state-bg));
  background: var(--finishing-row-current-bg);
}

.finishing-task-table tbody tr.is-selected {
  --finishing-row-current-bg: color-mix(in srgb, var(--active-row) 82%, var(--finishing-row-state-bg));
  background: var(--finishing-row-current-bg);
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody tr,
.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody tr:hover,
.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody tr.is-selected {
  --finishing-row-state-bg: transparent !important;
  --finishing-row-current-bg: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody td {
  background: transparent !important;
  pointer-events: none !important;
}

.finishing-table-shell.is-column-layout-editing .finishing-task-table tbody td.is-finishing-column-pinned {
  background:
    var(--finishing-column-edit-hatch),
    var(--surface) !important;
}

.finishing-task-table td.finishing-task-summary-cell:not(.is-finishing-column-pinned) {
  position: relative;
  min-width: 220px;
  white-space: normal;
}

.finishing-task-table td.is-finishing-column-pinned {
  position: sticky;
}

.finishing-task-table td.finishing-task-summary-cell strong,
.finishing-task-table td.finishing-task-summary-cell small {
  display: block;
}

.finishing-task-table td.finishing-task-summary-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
}

.finishing-task-title-cell {
  position: relative;
  min-width: 0;
  min-height: 100%;
}

.finishing-task-summary-cell {
  white-space: normal !important;
  overflow: visible;
  text-overflow: clip;
  vertical-align: top;
}

.finishing-task-title-cell strong,
.finishing-task-title-cell small {
  display: block;
  min-width: 0;
}

.finishing-task-title-cell small {
  color: var(--muted);
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.finishing-task-table.has-description-column .finishing-task-title-cell small {
  display: none;
}

.finishing-table-title-form,
.finishing-table-context-form,
.finishing-table-description-form,
.finishing-table-stop-frame-form {
  display: block !important;
  width: 100%;
  height: 100%;
  position: relative;
  contain: layout paint;
}

.finishing-task-table td.is-inline-edit-cell > .finishing-table-title-form,
.finishing-task-table td.is-inline-edit-cell > .finishing-table-context-form,
.finishing-task-table td.is-inline-edit-cell > .finishing-table-description-form,
.finishing-task-table td.is-inline-edit-cell > .finishing-table-stop-frame-form {
  display: block !important;
}

.finishing-task-summary-cell.is-inline-edit-cell,
.finishing-context-cell.is-inline-edit-cell,
.finishing-stop-frame-cell.is-inline-edit-cell,
.finishing-description-cell.is-inline-edit-cell {
  vertical-align: middle;
}

.finishing-task-summary-cell .finishing-table-title-input {
  min-height: 30px !important;
  padding: 0 !important;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.finishing-task-title-cell.has-inline-form {
  margin-top: 3px;
}

.finishing-task-title-cell.has-inline-form > strong {
  display: none;
}

.finishing-task-title-cell.has-inline-form > small {
  display: none;
}

.finishing-task-open-panel {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  opacity: 1;
  transform: none;
  transition: opacity 0.14s ease, transform 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.finishing-task-open-panel svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.9;
}

.finishing-task-summary-cell:hover .finishing-task-open-panel,
.finishing-task-summary-cell:focus-within .finishing-task-open-panel,
.finishing-task-open-panel:focus-visible {
  opacity: 1;
  transform: none;
}

.finishing-task-open-panel:hover,
.finishing-task-open-panel:focus-visible {
  color: var(--ink-strong);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  outline: none;
}

.finishing-overview-info-popover .finishing-overview-info-item.finishing-task-open-panel {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 7px;
  display: grid;
  place-items: initial;
  align-items: start;
  justify-items: stretch;
  gap: 3px;
  border-radius: 7px;
  color: var(--ink);
  background: color-mix(in srgb, var(--control) 34%, transparent);
  opacity: 1;
  transform: none;
  transition: background 0.14s ease, color 0.14s ease;
}

.finishing-overview-info-popover .finishing-overview-info-item.finishing-task-open-panel:hover,
.finishing-overview-info-popover .finishing-overview-info-item.finishing-task-open-panel:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, var(--control));
}

.finishing-task-row-number-link.finishing-task-open-panel {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  height: auto;
  min-height: 34px;
  border-radius: 0;
  background: transparent;
  color: var(--ink-strong);
  opacity: 1;
  transform: none;
}

.finishing-task-row-number-link.finishing-task-open-panel:hover,
.finishing-task-row-number-link.finishing-task-open-panel:focus-visible {
  color: var(--ink-strong);
  background: transparent;
  outline: none;
}

.finishing-context-cell {
  overflow: visible !important;
}

.finishing-context-cell .finishing-context-picker {
  width: 100%;
  height: 100%;
}

.finishing-context-cell .finishing-context-suggestions {
  z-index: 2147483647;
  min-width: 260px;
}

.finishing-stop-frame-upload-cell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  overflow: hidden;
  cursor: pointer;
}

.finishing-stop-frame-upload-cell input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.finishing-stop-frame-upload-cell .finishing-stop-frame-thumb,
.finishing-stop-frame-upload-cell .finishing-stop-frame-empty {
  pointer-events: auto;
}

.finishing-stop-frame-empty {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--muted) 62%, transparent);
}

.finishing-stop-frame-empty svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.05;
}

.finishing-table-description-input {
  min-height: 36px !important;
  padding: 10px !important;
  resize: none;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 300;
}

.finishing-description-cell.is-inline-edit-cell .finishing-table-description-form + span,
.finishing-description-cell.is-inline-edit-cell [data-finishing-description-preview] {
  display: none;
}

.finishing-task-table.is-row-resize-hover,
.finishing-task-table.is-row-resizing,
.finishing-task-table.is-uniform-row-resize {
  cursor: row-resize;
}

.finishing-task-table.is-row-resize-hover tbody tr.is-row-resize-target,
.finishing-task-table.is-row-resize-hover tbody tr.is-row-resize-target *,
.finishing-task-table.is-row-resizing tbody tr.is-row-resize-target,
.finishing-task-table.is-row-resizing tbody tr.is-row-resize-target * {
  cursor: row-resize !important;
}

.finishing-task-table tbody tr.is-row-resize-target > td {
  border-bottom-color: color-mix(in srgb, var(--accent) 62%, var(--line));
}

.finishing-task-table.is-uniform-row-resize tbody tr[data-finishing-task-row]:not([hidden]) > td {
  border-bottom-color: color-mix(in srgb, var(--accent) 46%, var(--line));
}

body.resizing-finishing-rows,
body.resizing-finishing-rows * {
  cursor: row-resize !important;
  user-select: none !important;
}

.finishing-task-table[data-finishing-table] th {
  font-weight: 500;
}

.finishing-task-table[data-finishing-table] tbody td,
.finishing-task-table[data-finishing-table] tbody td :where(input, textarea, select, button, summary, strong, small, span, a, label) {
  font-weight: 400;
}

.finishing-task-table[data-finishing-table] tbody td.finishing-task-summary-cell,
.finishing-task-table[data-finishing-table] tbody td.finishing-task-summary-cell :where(input, textarea, select, button, summary, strong, small, span, a, label),
.finishing-task-table[data-finishing-table] tbody td.finishing-task-summary-cell .finishing-table-title-input {
  font-weight: 400;
}

.finishing-task-table[data-finishing-table] tbody td.finishing-description-cell,
.finishing-task-table[data-finishing-table] tbody td.finishing-description-cell :where(input, textarea, select, button, summary, strong, small, span, a, label),
.finishing-task-table[data-finishing-table] tbody td.finishing-stage-note-cell,
.finishing-task-table[data-finishing-table] tbody td.finishing-stage-note-cell :where(input, textarea, select, button, summary, strong, small, span, a, label) {
  font-weight: 300;
}

.finishing-task-table[data-finishing-table] tbody td:nth-child(19),
.finishing-task-table[data-finishing-table] tbody td:nth-child(20) {
  font-weight: 720;
}

.finishing-type-choice-menu,
.finishing-stage-note-editor {
  min-width: 280px;
}

.finishing-type-choice-search {
  width: 100%;
  min-height: 36px;
  margin: 0 0 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 780;
}

.finishing-stage-note-editor {
  width: min(440px, calc(100vw - 24px));
}

.finishing-stage-note-editor label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.finishing-stage-note-editor textarea {
  width: 100%;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--control);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
  resize: vertical;
}

.finishing-stage-note-editor button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, var(--control));
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.finishing-task-preview {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 65;
  width: min(360px, calc(100vw - 40px));
  padding: 11px 12px;
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.finishing-task-title-cell:hover .finishing-task-preview,
.finishing-task-title-cell:focus-within .finishing-task-preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0.32s;
}

.finishing-task-preview.is-portal-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483647;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
}

.finishing-task-preview.is-portal-preview.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.finishing-task-preview > strong {
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.25;
}

.finishing-task-preview dl {
  margin: 0;
  display: grid;
  gap: 5px;
}

.finishing-task-preview dl div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.finishing-task-preview dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.finishing-task-preview dd {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  white-space: normal;
}

.finishing-task-preview p {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.finishing-signal-table {
  min-width: 1120px;
}

.finishing-signal-table td:nth-child(5) {
  max-width: 340px;
  white-space: normal;
}

.finishing-signal-table tbody tr.signal-status-resolved,
.finishing-signal-table tbody tr.signal-status-dismissed,
.finishing-signal-table tbody tr.signal-status-duplicate,
.finishing-signal-table tbody tr.signal-status-converted_to_task {
  opacity: 0.68;
}

.finishing-signal-table tbody tr.severity-critical {
  box-shadow: inset 2px 0 0 var(--danger);
}

.finishing-signal-table tbody tr.severity-warning {
  box-shadow: inset 2px 0 0 var(--marker-orange);
}

.finishing-signal-table tbody tr.is-selected.severity-critical,
.finishing-signal-table tbody tr.is-selected.severity-warning {
  box-shadow: inset 3px 0 0 var(--accent);
}

.finishing-severity-chip,
.finishing-signal-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--control-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.finishing-severity-chip.severity-critical {
  background: var(--marker-red);
  color: var(--token-ink);
}

.finishing-severity-chip.severity-warning {
  background: var(--marker-orange);
  color: var(--token-ink);
}

.finishing-severity-chip.severity-info {
  background: color-mix(in srgb, var(--marker-blue) 20%, transparent);
  color: var(--ink);
}

.finishing-signal-status.signal-new,
.finishing-signal-status.signal-in_review,
.finishing-signal-status.signal-waiting {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--ink-strong);
}

.finishing-signal-status.signal-converted_to_task,
.finishing-signal-status.signal-resolved {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
}

.finishing-signal-status.signal-dismissed,
.finishing-signal-status.signal-duplicate {
  background: var(--control-muted);
  color: var(--muted);
}

.finishing-empty {
  padding: 28px !important;
  color: var(--muted);
  text-align: center !important;
}

.finishing-detail-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
  z-index: 5000;
  isolation: isolate;
  height: calc(100dvh - var(--topbar-height) - var(--finishing-panel-top-offset));
  max-height: calc(100dvh - var(--topbar-height) - var(--finishing-panel-top-offset));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.finishing-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.finishing-detail-header h1,
.finishing-empty-detail h1 {
  margin: 4px 0 0;
  color: var(--ink-strong);
  font-size: 22px;
  line-height: 1.15;
}

.finishing-panel-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 0;
  background: transparent;
  border-radius: 8px;
}

.finishing-panel-close svg {
  width: 20px;
  height: 20px;
}

.finishing-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--control-muted);
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-chip > i,
.finishing-chip > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-right: 5px;
}

.finishing-chip.is-department,
.finishing-chip.is-status,
.finishing-chip.is-stage,
.finishing-chip.is-priority {
  border-radius: 4px;
}

.finishing-context-code {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.finishing-context-episode {
  color: var(--ink-strong);
  font-weight: 860;
}

.finishing-context-divider {
  color: var(--muted);
  font-weight: 760;
}

.finishing-context-picker {
  position: relative;
  display: grid;
  gap: 6px;
}

.finishing-context-picker label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}


.finishing-context-picker input {
  width: 100%;
}

.finishing-context-picker-hidden {
  display: none;
}

.finishing-context-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 2600;
  width: min(260px, 100%);
  max-height: 220px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
}

.finishing-context-suggestions.is-fixed-context-menu {
  position: fixed;
  z-index: 2147483647;
  width: 260px;
  max-width: calc(100vw - 20px);
}

.finishing-context-suggestions[hidden] {
  display: none;
}

.finishing-context-suggestions button {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.finishing-context-suggestions button:hover,
.finishing-context-suggestions button:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.finishing-context-suggestions strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 860;
}

.finishing-context-suggestions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.finishing-chip.is-department {
  background: color-mix(in srgb, var(--marker-blue) 76%, transparent);
  color: var(--token-ink);
}

.finishing-chip.is-department.has-type-color {
  background: color-mix(in srgb, var(--task-type-color, var(--marker-blue)) 78%, #111827 22%);
  color: var(--token-ink);
}

.finishing-chip.is-department.has-type-color > i,
.finishing-chip.is-department.has-type-color > svg {
  width: 0.92em;
  height: 0.92em;
  color: color-mix(in srgb, var(--task-type-color, var(--marker-blue)) 42%, #ffffff 58%);
  flex: 0 0 auto;
}

.finishing-type-chip {
  justify-content: flex-start;
  min-width: 0;
}

.finishing-type-chip-full,
.finishing-type-chip-short,
.finishing-stage-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-type-chip-short {
  display: none;
}

.finishing-cell-type-compact .finishing-type-chip-full {
  display: none;
}

.finishing-cell-type-compact .finishing-type-chip-short {
  display: inline;
}

.finishing-cell-type-icon-only .finishing-type-chip-full,
.finishing-cell-type-icon-only .finishing-type-chip-short {
  display: none;
}

.finishing-chip.is-muted {
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  color: var(--muted);
}

.finishing-chip.is-status.status-blocked,
.finishing-chip.is-stage.stage-blocked,
.finishing-chip.is-priority.priority-blocker {
  background: var(--marker-red);
  color: var(--token-ink);
}

.finishing-chip.is-status.status-done,
.finishing-chip.is-status.status-approved,
.finishing-chip.is-status.status-integrated,
.finishing-chip.is-stage.stage-done {
  background: var(--marker-green);
  color: var(--token-ink);
}

.finishing-chip.is-status.status-review,
.finishing-chip.is-status.status-revisions,
.finishing-chip.is-stage.stage-active {
  background: var(--marker-purple);
  color: var(--token-ink);
}

.finishing-chip.is-status.status-sent,
.finishing-chip.is-status.status-in_work,
.finishing-chip.is-status.status-ready,
.finishing-chip.is-stage.stage-pending {
  background: var(--marker-blue);
  color: var(--token-ink);
}

.finishing-chip.is-stage.stage-skipped {
  background: color-mix(in srgb, var(--muted) 32%, var(--surface-2));
  color: var(--ink);
}

.finishing-chip.is-stage.has-stage-style {
  background: color-mix(in srgb, var(--stage-token-color, var(--marker-blue)) 82%, transparent);
  color: var(--token-ink);
}

.finishing-chip.is-stage {
  position: relative;
  justify-content: flex-start;
  min-width: 0;
}

.finishing-chip.is-stage:has(.finishing-stage-chip-repeat) {
  padding-right: 26px;
}

.finishing-stage-chip-repeat {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.28em;
  height: 1.28em;
  min-width: 1.28em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #172033;
  font-size: 0.76em;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.16);
}

.finishing-cell-stage-narrow .finishing-chip.is-stage {
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
  padding-inline: 7px;
}

.finishing-cell-stage-icon-only .finishing-chip.is-stage {
  width: auto;
  min-width: 30px;
  justify-content: center;
  padding-inline: 4px;
  gap: 3px;
}

.finishing-cell-stage-icon-only .finishing-chip.is-stage:has(.finishing-stage-chip-repeat) {
  min-width: 46px;
  padding-right: 23px;
}

.finishing-cell-stage-icon-only .finishing-chip.is-stage .finishing-stage-chip-repeat {
  right: 4px;
}

.finishing-cell-stage-icon-only .finishing-chip.is-stage > i,
.finishing-cell-stage-icon-only .finishing-chip.is-stage > svg {
  margin-right: 0;
}

.finishing-cell-stage-icon-only .finishing-stage-chip-label {
  display: none;
}

.finishing-chip.is-priority.priority-low {
  background: color-mix(in srgb, var(--marker-slate) 82%, #0b1020 18%);
  color: var(--token-ink);
}

.finishing-chip.is-priority.priority-normal {
  background: color-mix(in srgb, #49a6ff 78%, #132033 22%);
  color: var(--token-ink);
}

.finishing-chip.is-priority.priority-high {
  background: #df7629;
  color: var(--token-ink);
}

.finishing-chip.is-priority.priority-urgent {
  background: #dc2626;
  color: #fff8f7;
}

.finishing-due-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--control-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-due-chip.due-upcoming {
  background: color-mix(in srgb, var(--marker-blue) 18%, transparent);
  color: var(--ink);
}

.finishing-due-chip.due-tomorrow {
  background: color-mix(in srgb, var(--marker-orange) 62%, transparent);
  color: var(--token-ink);
}

.finishing-due-chip.due-today {
  background: color-mix(in srgb, var(--marker-red) 82%, transparent);
  color: var(--token-ink);
}

.finishing-due-chip.due-overdue {
  background: var(--marker-red);
  color: var(--token-ink);
}


.finishing-signal-detail-panel {
  display: grid;
  gap: 12px;
}

.finishing-signal-detail {
  display: grid;
  gap: 10px;
}

.finishing-signal-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.finishing-signal-body {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--control-muted);
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.45;
}

.finishing-signal-meta {
  display: grid;
  gap: 7px;
  margin: 0;
}

.finishing-signal-meta div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.finishing-signal-meta dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 860;
  text-transform: uppercase;
}

.finishing-signal-meta dd {
  margin: 4px 0 0;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 740;
  overflow-wrap: anywhere;
}

.finishing-signal-actions {
  display: grid;
  gap: 10px;
}

.finishing-signal-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finishing-signal-action-grid form {
  margin: 0;
}

.finishing-signal-note-form {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.finishing-signal-note-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.finishing-signal-note-form select,
.finishing-signal-note-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  padding: 8px 9px;
  outline: none;
}

.finishing-tag-row.is-compact {
  flex-wrap: nowrap;
}


.finishing-panel-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 74%, transparent);
}

.finishing-panel-card h2 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 13px;
}


.finishing-inline-edit,
.finishing-inline-expand {
  position: relative;
}

.finishing-inline-edit > summary,
.finishing-inline-expand > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control);
  color: var(--ink);
  font-size: 11px;
  font-weight: 840;
  list-style: none;
  cursor: pointer;
}

.finishing-inline-edit > summary::-webkit-details-marker,
.finishing-inline-expand > summary::-webkit-details-marker {
  display: none;
}

.finishing-mini-form {
  position: absolute;
  right: 0;
  z-index: 40;
  width: min(520px, calc(100vw - 48px));
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}


.finishing-mini-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}


.finishing-choice-menu {
  position: absolute;
  left: 0;
  z-index: 1500;
  min-width: 190px;
  margin-top: 7px;
  padding: 6px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.finishing-choice-menu.is-saving {
  opacity: 0.58;
  pointer-events: none;
}

.finishing-choice-menu button {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.finishing-choice-menu select,
.finishing-choice-menu input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  padding: 7px 8px;
  outline: none;
}

.finishing-choice-menu label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 840;
  text-transform: uppercase;
}

.finishing-date-menu,
.finishing-person-menu {
  min-width: 230px;
}

.finishing-choice-menu button:hover,
.finishing-choice-menu button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.finishing-choice-menu button.is-selected {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--ink-strong);
}

.finishing-stage-choice.has-stage-style {
  background: color-mix(in srgb, var(--stage-token-color, var(--accent)) 14%, transparent);
}

.finishing-stage-choice-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.finishing-stage-choice-main i,
.finishing-stage-choice-main svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--stage-token-color, var(--muted));
}

.finishing-choice-menu button.finishing-priority-choice,
.finishing-create-priority-menu button.finishing-priority-choice {
  justify-content: space-between;
  gap: 12px;
}

.finishing-choice-menu button.finishing-priority-choice > .finishing-chip,
.finishing-create-priority-menu button.finishing-priority-choice > .finishing-chip {
  min-width: 86px;
  justify-content: center;
}

.finishing-choice-menu small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.finishing-choice-section {
  padding: 7px 8px 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finishing-task-table[data-finishing-table] tbody .finishing-chip,
.finishing-task-table[data-finishing-table] tbody .finishing-chip :where(span, small, strong, label) {
  font-weight: 820;
}

.finishing-task-table[data-finishing-table] tbody .finishing-stage-chip-repeat {
  font-weight: 950;
}

.finishing-task-table[data-finishing-table] tbody .finishing-choice-menu button,
.finishing-task-table[data-finishing-table] tbody .finishing-choice-menu button :where(span, strong, label) {
  font-weight: 760;
}

.finishing-task-table[data-finishing-table] tbody .finishing-choice-menu small {
  font-weight: 780;
}

.finishing-task-table[data-finishing-table] tbody .finishing-choice-menu .finishing-chip,
.finishing-task-table[data-finishing-table] tbody .finishing-choice-menu .finishing-chip :where(span, small, strong, label) {
  font-weight: 820;
}

.finishing-task-table[data-finishing-table] tbody .finishing-table-text-chip,
.finishing-task-table[data-finishing-table] tbody .finishing-table-text-chip :where(span, small, strong, label),
.finishing-task-table[data-finishing-table] tbody .finishing-person-chip,
.finishing-task-table[data-finishing-table] tbody .finishing-person-chip :where(span, small, strong, label) {
  font-weight: 720;
}

.finishing-task-table[data-finishing-table] tbody .finishing-person-avatar {
  font-weight: 900;
}

.finishing-task-table[data-finishing-table] tbody .finishing-person-menu button,
.finishing-task-table[data-finishing-table] tbody .finishing-person-menu button :where(span, strong, label),
.finishing-task-table[data-finishing-table] tbody .finishing-person-menu .finishing-person-chip,
.finishing-task-table[data-finishing-table] tbody .finishing-person-menu .finishing-person-chip :where(span, strong, label) {
  font-weight: 760;
}

.finishing-task-table[data-finishing-table] tbody .finishing-person-menu small,
.finishing-task-table[data-finishing-table] tbody .finishing-person-menu .finishing-person-chip :where(small) {
  font-weight: 780;
}

.finishing-table-quick {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
}

.finishing-table-quick > summary {
  max-width: 100%;
  min-width: 0;
  list-style: none;
  cursor: pointer;
}

.finishing-table-quick > summary::-webkit-details-marker {
  display: none;
}

.finishing-table-quick > summary:hover {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}

.finishing-task-table .finishing-table-quick > summary,
.finishing-task-table .finishing-table-quick > summary:hover,
.finishing-task-table .finishing-table-quick > summary:focus,
.finishing-task-table .finishing-table-quick > summary:focus-visible,
.finishing-task-table .finishing-table-quick[open] > summary {
  outline: none;
  box-shadow: none;
}

.finishing-task-table .finishing-choice-menu button:hover,
.finishing-task-table .finishing-choice-menu button:focus-visible {
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  box-shadow: none;
  outline: none;
}

.finishing-task-table .finishing-choice-menu button.is-selected {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.finishing-task-table .finishing-choice-menu button.has-type-color.is-selected {
  border-color: color-mix(in srgb, var(--task-type-color, var(--line)) 46%, transparent);
  background: color-mix(in srgb, var(--task-type-color, var(--ink)) 13%, transparent);
}

.finishing-task-table .finishing-choice-menu button.has-stage-style.is-selected,
.finishing-task-table .finishing-choice-menu button.finishing-stage-choice.has-stage-style.is-selected {
  border-color: color-mix(in srgb, var(--stage-token-color, var(--line)) 46%, transparent);
  background: color-mix(in srgb, var(--stage-token-color, var(--ink)) 13%, transparent);
}

.finishing-table-text-chip {
  max-width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-person-chip {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
}

.finishing-person-chip.is-empty {
  color: var(--muted);
}

.finishing-person-avatar {
  --person-avatar-color: var(--accent);
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--person-avatar-color) 34%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--person-avatar-color) 18%, var(--control-muted));
  color: var(--person-avatar-color);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.finishing-person-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.finishing-person-avatar svg,
.finishing-person-avatar i {
  width: 12px;
  height: 12px;
}

.finishing-person-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finishing-person-chip-body {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.12;
}

.finishing-person-chip-secondary {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-person-hover-card {
  position: fixed;
  z-index: 2147483647;
  width: min(320px, calc(100vw - 20px));
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 14px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.62);
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.finishing-person-hover-card[hidden] {
  display: none !important;
}

.finishing-person-hover-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.finishing-person-hover-card strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 900;
}

.finishing-person-hover-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.finishing-person-hover-card dl div {
  display: grid;
  gap: 1px;
}

.finishing-person-hover-card dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finishing-person-hover-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
}

.finishing-table-text-chip .finishing-person-chip,
.finishing-task-table td > .finishing-person-chip {
  width: 100%;
}

.finishing-person-menu button .finishing-person-chip,
.finishing-roadmap-responsible-section button .finishing-person-chip {
  flex: 1 1 auto;
}

.finishing-group-choice,
.finishing-group-choice-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.finishing-group-choice {
  flex: 1 1 auto;
  justify-content: space-between;
}

.finishing-group-choice-main i,
.finishing-group-choice-main svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--accent);
}

.finishing-group-choice em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-stage-note-cell {
  color: var(--muted);
  font-weight: 300;
  white-space: normal !important;
  overflow: visible;
  text-overflow: clip;
  vertical-align: top;
}

.finishing-stage-note-text {
  display: inline-grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  white-space: normal;
}

.finishing-stage-note-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.finishing-stage-note-line.is-user {
  color: var(--ink);
}

.finishing-stage-note-icon {
  --stage-note-icon: url("/static/tracker/icons/tasks/note.svg");
  width: 0.78em;
  height: 0.78em;
  flex: 0 0 auto;
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--stage-note-icon) center / contain no-repeat;
  mask: var(--stage-note-icon) center / contain no-repeat;
}

.finishing-stage-note-line > span:last-child,
.finishing-stage-note-text > span:not(.finishing-stage-note-line) {
  display: block;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.finishing-stage-note-text.is-waiting {
  color: #fbbf24;
}

.finishing-stage-note-icon.is-waiting {
  --stage-note-icon: url("/static/tracker/icons/tasks/wait.svg");
}

.finishing-stage-note-text.is-paused {
  color: #ff4b4b;
}

.finishing-stage-note-icon.is-paused {
  --stage-note-icon: url("/static/tracker/icons/tasks/pause.svg");
}

.finishing-stage-note-text.is-skipped {
  color: #94a3b8;
}

.finishing-stage-note-icon.is-skipped {
  --stage-note-icon: url("/static/tracker/icons/tasks/skip.svg");
}

.finishing-stage-note-text.is-return {
  color: #60a5fa;
}

.finishing-stage-note-icon.is-return {
  --stage-note-icon: url("/static/tracker/icons/tasks/return.svg");
}

.finishing-stage-note-text.is-note {
  color: var(--muted);
}

.finishing-stage-note-icon.is-note {
  --stage-note-icon: url("/static/tracker/icons/tasks/note.svg");
}

.finishing-table-quick .finishing-choice-menu {
  position: fixed;
  top: var(--finishing-table-menu-top, 0);
  left: var(--finishing-table-menu-left, 0);
  z-index: 5000;
  min-width: 168px;
  max-height: min(320px, calc(100vh - var(--finishing-table-menu-top, 0px) - 12px));
  overflow: auto;
}

.finishing-table-quick[open] > .finishing-choice-menu:not(.is-portal-menu) {
  opacity: 0;
  visibility: hidden;
}

.finishing-choice-menu.is-portal-menu {
  position: fixed;
  top: var(--finishing-table-menu-top, 0);
  left: var(--finishing-table-menu-left, 0);
  z-index: 2147483647;
  margin: 0;
  min-width: 168px;
  max-height: min(320px, calc(100vh - var(--finishing-table-menu-top, 0px) - 12px));
  overflow: auto;
}

.finishing-choice-menu.is-portal-menu:popover-open {
  position: fixed;
  top: var(--finishing-table-menu-top, 0);
  left: var(--finishing-table-menu-left, 0);
  z-index: 2147483647;
  margin: 0;
  display: grid;
}

.finishing-date-inline-form {
  margin: 0;
}

.finishing-table-inline-form {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  min-width: 0;
  margin: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.finishing-table-tc-form {
  width: 100%;
}

.finishing-table-inline-input {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
  outline: none;
}

.finishing-table-inline-input:hover,
.finishing-table-inline-input:focus-visible {
  background: transparent;
  outline: none;
}


.finishing-timecode-input {
  flex: 1 1 0;
  width: auto;
  padding: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.finishing-table-inline-input::placeholder,


.finishing-table-date-form {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.finishing-table-date-form .logging-date-control {
  width: 100%;
  height: 48px;
  min-height: 48px;
  min-width: 0;
}

.finishing-due-input {
  width: min(150px, 100%);
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--ink-strong);
  color-scheme: dark;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.finishing-table-date-form .finishing-due-input {
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  box-shadow: none;
}

.finishing-table-date-form .finishing-due-input::placeholder {
  color: var(--muted);
  opacity: 0.9;
}

.finishing-due-input:hover,
.finishing-due-input:focus-visible {
  outline: none;
}

.finishing-table-date-form .finishing-due-input:hover,
.finishing-table-date-form .finishing-due-input:focus-visible {
  border-color: transparent;
  background: transparent;
}

.finishing-table-date-form .finishing-due-input.due-overdue,
.finishing-table-date-form .finishing-due-input.due-today,
.finishing-table-date-form .finishing-due-input.due-tomorrow,
.finishing-table-date-form .finishing-due-input.due-upcoming {
  border-color: transparent;
  background: transparent;
}

.finishing-due-input.due-overdue {
  border-color: color-mix(in srgb, var(--danger) 48%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.finishing-due-input.due-today {
  border-color: color-mix(in srgb, var(--danger) 48%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.finishing-due-input.due-tomorrow {
  border-color: color-mix(in srgb, var(--warning) 48%, transparent);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
}

.finishing-due-input.due-upcoming {
  border-color: color-mix(in srgb, var(--ok) 34%, transparent);
  background: color-mix(in srgb, var(--ok) 9%, transparent);
}


.finishing-chip.is-package-status {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--muted);
}

.finishing-chip.package-prepared,
.finishing-chip.package-sent {
  color: var(--ok);
}

.finishing-chip.package-updated {
  color: var(--warning);
}


.finishing-roadmap {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.finishing-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  list-style: none;
  cursor: default;
}

details > .finishing-section-heading {
  cursor: pointer;
}

.finishing-roadmap[open] .finishing-section-heading {
  margin-bottom: 12px;
}

.finishing-section-heading::-webkit-details-marker {
  display: none;
}

.finishing-section-heading h2 {
  margin: 0;
  font-size: 14px;
}

.finishing-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}


.finishing-roadmap ol {
  list-style: none;
  margin: 0;
  padding: 0;
}


.finishing-create-form {
  position: absolute;
  right: 0;
  z-index: 120;
  width: min(740px, calc(100vw - 48px));
  margin-top: 8px;
  padding: 16px;
  overflow: visible;
}

.finishing-inspector-create-form {
  position: relative;
  right: auto;
  z-index: auto;
  width: auto;
  margin: 0;
  padding: 12px 16px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.finishing-create-steps {
  display: grid;
  gap: 12px;
}

.finishing-create-step {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 4px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.finishing-create-step + .finishing-create-step {
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.finishing-create-step > header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.finishing-create-step > header > div,
.finishing-create-roadmap-head > div {
  min-width: 0;
}

.finishing-create-step > header h3,
.finishing-create-roadmap-head h4 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.finishing-create-step > header > span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.finishing-create-step h3,
.finishing-create-step p,
.finishing-material-editor h4 {
  margin: 0;
}

.finishing-create-step h3 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.finishing-create-step p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.finishing-material-cell {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  overflow: visible;
}

.finishing-material-token {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 780;
  line-height: 1.1;
}

.finishing-material-token-main {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.finishing-material-token i,
.finishing-material-token svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: color-mix(in srgb, #2dd4bf 82%, var(--muted));
  stroke-width: 2;
}

.finishing-material-token > span,
.finishing-material-token > a,
.finishing-material-token-main > span,
.finishing-material-token-main > a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-material-token.has-location {
  color: var(--ink);
}

.finishing-material-token.is-muted {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.finishing-material-token.is-clickable a {
  color: #60a5fa;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.finishing-material-token .finishing-material-token-location {
  width: 100%;
  max-width: 100%;
  display: block;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-size: 11px;
  font-weight: 640;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.finishing-material-token.is-clickable a:hover,
.finishing-material-token.is-clickable a:focus-visible {
  color: #93c5fd;
  outline: none;
}

.finishing-task-table .finishing-material-token {
  max-width: 100%;
  font-size: 12px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  white-space: normal;
}

.finishing-task-table .finishing-material-token + .finishing-material-token {
  margin-left: 0;
}

.finishing-task-table td.finishing-material-table-cell {
  white-space: normal;
  overflow: auto;
  text-overflow: clip;
  vertical-align: top;
  scrollbar-width: thin;
}

.finishing-task-table .finishing-row-height-content {
  display: block;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  line-height: 1.3;
  white-space: normal;
  overflow: auto;
  overflow-wrap: anywhere;
  text-overflow: clip;
  scrollbar-width: thin;
}

.finishing-task-table .finishing-row-height-content::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.finishing-table-card,
.finishing-detail-panel,
.finishing-task-table td.finishing-material-table-cell,
.finishing-task-table .finishing-row-height-content,
.finishing-task-table td.finishing-description-cell .finishing-table-description-input,
.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary,
.finishing-stage-note-cell > .finishing-stage-note-text,
.finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 34%, transparent) transparent;
}

.finishing-table-card::-webkit-scrollbar,
.finishing-detail-panel::-webkit-scrollbar,
.finishing-task-table td.finishing-material-table-cell::-webkit-scrollbar,
.finishing-task-table .finishing-row-height-content::-webkit-scrollbar,
.finishing-task-table td.finishing-description-cell .finishing-table-description-input::-webkit-scrollbar,
.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary::-webkit-scrollbar,
.finishing-stage-note-cell > .finishing-stage-note-text::-webkit-scrollbar,
.finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.finishing-table-card::-webkit-scrollbar-track,
.finishing-detail-panel::-webkit-scrollbar-track,
.finishing-task-table td.finishing-material-table-cell::-webkit-scrollbar-track,
.finishing-task-table .finishing-row-height-content::-webkit-scrollbar-track,
.finishing-task-table td.finishing-description-cell .finishing-table-description-input::-webkit-scrollbar-track,
.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary::-webkit-scrollbar-track,
.finishing-stage-note-cell > .finishing-stage-note-text::-webkit-scrollbar-track,
.finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input::-webkit-scrollbar-track {
  background: transparent;
}

.finishing-table-card::-webkit-scrollbar-thumb,
.finishing-detail-panel::-webkit-scrollbar-thumb,
.finishing-task-table td.finishing-material-table-cell::-webkit-scrollbar-thumb,
.finishing-task-table .finishing-row-height-content::-webkit-scrollbar-thumb,
.finishing-task-table td.finishing-description-cell .finishing-table-description-input::-webkit-scrollbar-thumb,
.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary::-webkit-scrollbar-thumb,
.finishing-stage-note-cell > .finishing-stage-note-text::-webkit-scrollbar-thumb,
.finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
}

.finishing-table-card::-webkit-scrollbar-thumb:hover,
.finishing-detail-panel::-webkit-scrollbar-thumb:hover,
.finishing-task-table td.finishing-material-table-cell::-webkit-scrollbar-thumb:hover,
.finishing-task-table .finishing-row-height-content::-webkit-scrollbar-thumb:hover,
.finishing-task-table td.finishing-description-cell .finishing-table-description-input::-webkit-scrollbar-thumb:hover,
.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary::-webkit-scrollbar-thumb:hover,
.finishing-stage-note-cell > .finishing-stage-note-text::-webkit-scrollbar-thumb:hover,
.finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--muted) 48%, transparent);
}

.finishing-title-line-measurer {
  position: fixed;
  top: -10000px;
  left: -10000px;
  z-index: -1;
  visibility: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-overflow: clip;
  contain: layout style;
}

.finishing-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr);
  gap: 12px;
}

.finishing-form-grid .is-wide {
  grid-column: 1 / -1;
}

.finishing-create-compact-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.finishing-task-setup-row {
  --finishing-task-setup-gap: 10px;
  --finishing-task-setup-left: minmax(0, 1fr);
  --finishing-task-setup-right: minmax(0, 0.82fr);
  grid-column: 1 / -1;
  display: grid;
  gap: var(--finishing-task-setup-gap);
  align-items: start;
  min-width: 0;
}

.finishing-task-setup-row > * {
  min-width: 0;
}

.finishing-task-setup-row-primary {
  grid-template-columns: var(--finishing-task-setup-left) var(--finishing-task-setup-right);
}

.finishing-task-setup-row-scope {
  grid-template-columns: var(--finishing-task-setup-left) var(--finishing-task-setup-right);
}

.finishing-task-tc-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--finishing-task-setup-gap);
  min-width: 0;
}

.finishing-create-compact-grid :is(.finishing-rich-description, .finishing-stop-frame-inline) {
  grid-column: 1 / -1;
}

.finishing-create-compact-grid .finishing-tc-compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.finishing-create-inline-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.finishing-create-inline-row > span:first-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.finishing-create-inline-row > input,
.finishing-create-inline-row > select,
.finishing-create-inline-row > textarea,
.finishing-create-inline-row > .finishing-create-combo,
.finishing-create-inline-row > .finishing-create-inline-control {
  grid-column: 2;
  min-width: 0;
}

.finishing-create-inline-row > .errorlist,
.finishing-create-inline-row > .finishing-custom-type-panel,
.finishing-create-inline-row > .finishing-context-suggestions,
.finishing-create-inline-row > .finishing-context-picker-hidden {
  grid-column: 2;
}

.finishing-create-inline-control {
  display: block;
}

.finishing-create-compact-grid .finishing-create-inline-row,
.finishing-inspector-create-form .finishing-create-compact-grid .finishing-context-picker.finishing-create-inline-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.finishing-create-compact-grid .finishing-create-inline-row > span:first-child,
.finishing-create-compact-grid .finishing-context-picker.finishing-create-inline-row > span:first-child {
  grid-column: 1;
}

.finishing-create-compact-grid .finishing-create-inline-row > input,
.finishing-create-compact-grid .finishing-create-inline-row > select,
.finishing-create-compact-grid .finishing-create-inline-row > textarea,
.finishing-create-compact-grid .finishing-create-inline-row > .finishing-create-combo,
.finishing-create-compact-grid .finishing-create-inline-row > .finishing-create-inline-control,
.finishing-create-compact-grid .finishing-create-inline-row > .errorlist,
.finishing-create-compact-grid .finishing-create-inline-row > .finishing-custom-type-panel,
.finishing-create-compact-grid .finishing-create-inline-row > .finishing-context-suggestions,
.finishing-create-compact-grid .finishing-create-inline-row > .finishing-context-picker-hidden {
  grid-column: 1;
}

.finishing-context-picker.finishing-create-inline-row > .finishing-create-inline-control {
  grid-column: 2;
  width: 100%;
  justify-self: stretch;
  margin: 0;
  gap: 0;
  padding: 0;
}

.finishing-context-picker.finishing-create-inline-row > span:first-child {
  grid-column: 1;
}

.finishing-context-picker.finishing-create-inline-row > .finishing-create-inline-control input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.finishing-inspector-create-form .finishing-context-picker.finishing-create-inline-row {
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 10px;
}

.finishing-inspector-create-form .finishing-create-compact-grid .finishing-context-picker.finishing-create-inline-row {
  grid-template-columns: minmax(0, 1fr);
}

.finishing-create-compact-grid .finishing-context-picker.finishing-create-inline-row > .finishing-create-inline-control {
  grid-column: 1;
}

.finishing-inspector-create-form .finishing-form-grid input:not([type="file"]),
.finishing-inspector-create-form .finishing-form-grid select,
.finishing-inspector-create-form .finishing-create-combo-input-wrap,
.finishing-inspector-create-form .finishing-material-combo-button,
.finishing-inspector-create-form .logging-date-control {
  max-width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  height: 36px;
  padding-block: 7px;
  font-size: 12px;
  line-height: 1.2;
}

.finishing-inspector-create-form .finishing-form-grid textarea {
  font-size: 12px;
}

.finishing-admin-grid {
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 0.66fr) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 10px;
  align-items: start;
}

.finishing-admin-grid > label,
.finishing-admin-grid.finishing-form-grid > .finishing-person-select-field {
  min-width: 0;
  gap: 5px;
  line-height: 1.15;
}

.finishing-admin-grid > label,
.finishing-admin-grid.finishing-form-grid > .finishing-person-select-field {
  align-content: start;
  grid-template-rows: 14px 36px auto;
}

.finishing-admin-grid .logging-date-control,
.finishing-admin-grid .finishing-person-select-trigger,
.finishing-admin-grid select,
.finishing-admin-grid input:not([type="file"]) {
  max-width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  height: 36px;
}

.finishing-admin-grid .finishing-date-control input {
  min-height: 36px;
  height: 36px;
  padding-block: 7px;
}

.finishing-admin-grid .finishing-person-select-trigger {
  gap: 7px;
  padding: 5px 8px;
}

.finishing-admin-grid .finishing-create-priority-combo {
  min-width: 0;
  width: 100%;
  height: 36px;
}

.finishing-admin-grid .finishing-create-priority-combo > .finishing-chip {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  padding: 5px 8px;
  text-align: left;
}

.finishing-admin-grid .finishing-create-priority-combo > .finishing-chip.is-priority.priority-low {
  border-color: color-mix(in srgb, var(--marker-slate) 55%, var(--line));
  background: color-mix(in srgb, var(--marker-slate) 82%, #0b1020 18%);
  color: var(--token-ink);
}

.finishing-admin-grid .finishing-create-priority-combo > .finishing-chip.is-priority.priority-normal {
  border-color: color-mix(in srgb, #49a6ff 58%, var(--line));
  background: color-mix(in srgb, #49a6ff 78%, #132033 22%);
  color: var(--token-ink);
}

.finishing-admin-grid .finishing-create-priority-combo > .finishing-chip.is-priority.priority-high {
  border-color: color-mix(in srgb, #f59e0b 58%, var(--line));
  background: #df7629;
  color: var(--token-ink);
}

.finishing-admin-grid .finishing-create-priority-combo > .finishing-chip.is-priority.priority-urgent {
  border-color: color-mix(in srgb, #ef4444 66%, var(--line));
  background: #dc2626;
  color: #fff8f7;
}

.finishing-admin-grid .finishing-person-select-current,
.finishing-admin-grid .finishing-person-select-current > span,
.finishing-admin-grid .finishing-person-select-current .finishing-person-chip,
.finishing-admin-grid .finishing-person-select-current .finishing-person-chip-body,
.finishing-admin-grid .finishing-person-select-current .finishing-person-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .finishing-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .finishing-admin-grid > label,
  .finishing-admin-grid > .finishing-person-select-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .finishing-task-setup-row-primary,
  .finishing-task-setup-row-scope {
    grid-template-columns: minmax(0, 1fr);
  }

  .finishing-task-setup-row > * {
    grid-column: 1 / -1;
  }

  .finishing-task-tc-group {
    grid-column: 1 / -1;
  }
}

.finishing-assignee-picker {
  position: relative;
}

.finishing-form-grid .finishing-person-select-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.finishing-person-select {
  position: relative;
  min-width: 0;
}

.finishing-person-select-trigger {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.finishing-person-select-trigger:hover,
.finishing-person-select-trigger:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
}

.finishing-person-select-current {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}

.finishing-person-select-current > .finishing-person-chip {
  max-width: 100%;
}

.finishing-person-select-trigger > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

.finishing-admin-grid .finishing-person-select-trigger {
  min-height: 36px;
  height: 36px;
  gap: 7px;
  padding: 5px 8px;
}

.finishing-admin-grid .finishing-person-select-current,
.finishing-admin-grid .finishing-person-select-current > span,
.finishing-admin-grid .finishing-person-select-current .finishing-person-chip,
.finishing-admin-grid .finishing-person-select-current .finishing-person-chip-body,
.finishing-admin-grid .finishing-person-select-current .finishing-person-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-person-select-menu {
  position: absolute;
  z-index: 2600;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 280px);
  max-width: min(360px, calc(100vw - 32px));
  max-height: min(360px, calc(100vh - 160px));
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent) 16%);
  border-radius: 14px;
  background: #121b28;
  box-shadow: var(--shadow-strong);
}

.finishing-person-select-menu[hidden] {
  display: none !important;
}

.finishing-person-select-menu.is-create-portal-menu,
.finishing-create-priority-menu.is-create-portal-menu,
.finishing-create-combo-menu.is-create-portal-menu,
.finishing-material-combo-menu.is-create-portal-menu {
  position: fixed;
  inset: auto;
  right: auto;
  bottom: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overscroll-behavior: contain;
}

.finishing-person-select-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.finishing-person-select-menu button:hover,
.finishing-person-select-menu button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.finishing-person-select-menu button.is-selected {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.finishing-assignee-add-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4990;
  background: rgba(2, 6, 14, 0.66);
  backdrop-filter: blur(4px);
}

.finishing-assignee-add-backdrop[hidden] {
  display: none !important;
}

.finishing-assignee-add-panel {
  position: fixed;
  z-index: 5000;
  left: 50vw;
  top: 50dvh;
  transform: translate(-50%, -50%);
  width: min(820px, calc(100vw - 48px));
  max-height: min(86dvh, 760px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
}

.finishing-assignee-add-panel[hidden] {
  display: none !important;
}

.finishing-assignee-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finishing-assignee-add-head strong,
.finishing-assignee-add-responsibilities > span,
.finishing-assignee-access-row > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.finishing-assignee-add-close {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.finishing-assignee-add-close:hover {
  color: var(--text);
}

.finishing-assignee-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.finishing-assignee-add-panel input:not([type="checkbox"]),
.finishing-assignee-add-panel select,
.finishing-assignee-add-panel textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  outline: none;
  box-shadow: none;
}

.finishing-assignee-add-panel input:not([type="checkbox"]),
.finishing-assignee-add-panel select {
  padding: 8px 10px;
}

.finishing-assignee-add-panel input:not([type="checkbox"]):focus,
.finishing-assignee-add-panel select:focus,
.finishing-assignee-add-panel textarea:focus {
  border-color: color-mix(in srgb, var(--muted) 44%, var(--line));
  background: var(--control);
  outline: none;
  box-shadow: none;
}

.finishing-assignee-add-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
}

.finishing-assignee-add-toggle input {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.75);
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.92);
  cursor: pointer;
}

.finishing-assignee-add-toggle input:checked {
  border-color: rgba(79, 124, 255, 0.95);
  background: #4f7cff;
}

.finishing-assignee-add-toggle input:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 8px;
  border: solid #eef4ff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.finishing-assignee-access-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.finishing-assignee-access-row[hidden] {
  display: none !important;
}

.finishing-assignee-permissions[hidden] {
  display: none !important;
}

.finishing-assignee-permissions-matrix {
  margin-top: 0;
}

.finishing-assignee-permissions-matrix th,
.finishing-assignee-permissions-matrix td {
  padding: 6px 8px;
  font-size: 10px;
}

.finishing-assignee-add-responsibilities {
  display: grid;
  gap: 8px;
}

.finishing-assignee-responsibility-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.finishing-assignee-responsibility {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #141d2b;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.finishing-assignee-responsibility span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-assignee-responsibility input {
  display: none;
}

.finishing-assignee-responsibility svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.finishing-assignee-responsibility:has(input:checked) {
  border-color: rgba(79, 124, 255, 0.8);
  background: rgba(79, 124, 255, 0.16);
}

.finishing-assignee-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.finishing-assignee-add-actions .primary-button {
  background: var(--accent);
  color: #eef4ff;
  border-color: transparent;
}

.finishing-assignee-add-actions .primary-button:disabled {
  opacity: 0.55;
}

.finishing-assignee-add-panel small {
  color: var(--danger);
  font-size: 11px;
  font-weight: 780;
  text-transform: none;
}


.finishing-inline-add {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.finishing-inline-add-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
}

.finishing-inline-add-icon[hidden] {
  display: none !important;
}

.finishing-custom-type-panel {
  position: absolute;
  z-index: 260;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: min(360px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
}

.finishing-custom-type-panel label,
.finishing-custom-type-color,
.finishing-custom-type-icon {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.finishing-custom-type-panel label > span,
.finishing-custom-type-color > span,
.finishing-custom-type-icon > span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 860;
  white-space: nowrap;
}

.finishing-custom-type-name-field,
.finishing-custom-type-parent-field {
  grid-column: 1;
}

.finishing-custom-type-parent-field[hidden] {
  display: none !important;
}

.finishing-custom-type-panel .compact-action {
  grid-column: 1;
  align-self: end;
  min-height: 42px;
  height: 42px;
  justify-content: center;
  padding-inline: 12px;
  white-space: nowrap;
}

.finishing-custom-type-panel[hidden] {
  display: none !important;
}

.finishing-custom-type-color[hidden] {
  display: none !important;
}

.finishing-custom-type-icon[hidden] {
  display: none !important;
}

.finishing-custom-type-color,
.finishing-custom-type-icon {
  grid-column: 1;
}

.finishing-custom-type-color.is-disabled,
.finishing-custom-type-icon.is-disabled {
  opacity: 0.42;
}

.finishing-custom-type-color > div,
.finishing-custom-type-icon > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  flex-wrap: wrap;
}

.finishing-custom-type-color button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--task-type-color);
  cursor: pointer;
}

.finishing-custom-type-color button:disabled,
.finishing-custom-type-icon button:disabled {
  cursor: not-allowed;
}

.finishing-custom-type-color button.is-selected {
  border-color: var(--ink);
}

.finishing-custom-type-icon button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.finishing-custom-type-icon button > i,
.finishing-custom-type-icon button > svg {
  width: 14px;
  height: 14px;
}

.finishing-custom-type-icon button.is-selected {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.finishing-create-combo {
  position: relative;
  z-index: 160;
}

.finishing-type-selector {
  position: relative;
  z-index: 180;
  overflow: visible !important;
  white-space: normal !important;
}

.finishing-create-combo-input-wrap,
.finishing-material-combo-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  padding: 9px 11px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.finishing-type-selector .finishing-create-combo-input-wrap {
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  position: relative;
}

.finishing-create-combo-input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0 !important;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  padding: 0;
  font: inherit;
  font-weight: 760;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.finishing-type-selector .finishing-create-combo-input-wrap input {
  width: 100%;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  background: var(--control);
  padding: 9px 10px;
}

.finishing-create-combo-input-wrap input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.finishing-create-combo-menu button.has-type-color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.finishing-create-combo-menu button.has-type-color > i,
.finishing-create-combo-menu button.has-type-color > svg {
  width: 0.9em;
  height: 0.9em;
  color: color-mix(in srgb, var(--task-type-color, var(--marker-blue)) 42%, #ffffff 58%);
  flex: 0 0 auto;
}

.finishing-create-combo-input-wrap:focus-within,
.finishing-material-combo-button:focus-visible {
  border-color: color-mix(in srgb, var(--line) 88%, var(--ink));
  box-shadow: none;
  outline: none;
}

.finishing-type-selector .finishing-create-combo-input-wrap:focus-within {
  box-shadow: none;
}

.finishing-type-selector .finishing-create-combo-input-wrap:focus-within input {
  border-color: color-mix(in srgb, var(--line) 88%, var(--ink)) !important;
  box-shadow: none !important;
}

.finishing-inspector-create-form .finishing-form-grid input:not([type="file"]):focus,
.finishing-inspector-create-form .finishing-form-grid select:focus,
.finishing-inspector-create-form .finishing-form-grid textarea:focus,
.finishing-inspector-create-form .finishing-material-editor input:focus,
.finishing-inspector-create-form .finishing-material-editor select:focus,
.finishing-inspector-create-form .finishing-custom-type-panel input:focus,
.finishing-inspector-create-form .finishing-custom-type-panel select:focus,
.finishing-inspector-create-form .logging-date-control:focus-within,
.finishing-inspector-create-form .finishing-create-combo-input-wrap:focus-within,
.finishing-inspector-create-form .finishing-material-combo-button:focus-visible {
  border-color: color-mix(in srgb, var(--line) 88%, var(--ink));
  box-shadow: none;
  outline: none;
}

.finishing-create-form input:focus,
.finishing-create-form textarea:focus,
.finishing-create-form select:focus,
.finishing-create-form button:focus-visible {
  box-shadow: none;
  outline: none;
}

.finishing-create-combo-menu,
.finishing-material-combo-menu {
  position: absolute;
  z-index: 220;
  inset-inline: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 2px;
  max-height: min(460px, 54vh);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
}

.finishing-create-combo-menu[hidden],
.finishing-material-combo-menu[hidden] {
  display: none !important;
}

.finishing-create-combo-group {
  padding: 9px 10px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.finishing-create-combo-group.is-static {
  color: var(--muted);
}

.finishing-create-combo-menu button,
.finishing-material-combo-menu button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.finishing-create-combo-menu button.has-type-color {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finishing-combo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 4px;
  align-items: center;
  border-radius: 9px;
}

.finishing-combo-row[hidden] {
  display: none !important;
}

.finishing-combo-row > button:first-child {
  min-width: 0;
}

.finishing-combo-delete {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.finishing-combo-delete:hover,
.finishing-combo-delete:focus-visible {
  color: var(--danger);
  background: transparent;
  outline: none;
}

.finishing-create-combo-menu button.finishing-create-combo-group {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.finishing-create-combo-menu button:hover,
.finishing-create-combo-menu button:focus-visible,
.finishing-material-combo-menu button:hover,
.finishing-material-combo-menu button:focus-visible {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  outline: none;
}

.finishing-create-combo-menu .is-add,
.finishing-material-combo-menu button[data-material-choice="__custom__"] {
  margin-top: 4px;
  color: var(--accent);
}

.finishing-material-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.finishing-material-editor > div,
.finishing-material-editor > label {
  display: grid;
  gap: 8px;
}

.finishing-material-editor > .finishing-material-line {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.finishing-material-editor h4 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  padding-top: 8px;
}

.finishing-material-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(124px, 0.44fr) minmax(0, 1fr) 14px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.finishing-material-line-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finishing-material-row .finishing-material-combo-button,
.finishing-material-row input[name$="_location"] {
  min-height: 42px;
  font-size: 12px;
  font-weight: 760;
}

.finishing-material-row input[name$="_custom_type"] {
  position: absolute;
  z-index: 230;
  left: 0;
  top: calc(100% + 6px);
  width: min(320px, 80vw);
  background: #121b28;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.finishing-material-row input[name$="_custom_type"][hidden] {
  display: none !important;
}

.finishing-material-remove {
  width: 14px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.finishing-material-remove svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

.finishing-material-remove:hover,
.finishing-material-remove:focus-visible {
  color: var(--danger);
  background: transparent;
  outline: none;
}

.finishing-material-remove[hidden] {
  display: none !important;
}

.finishing-tc-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.finishing-tc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.finishing-tc-compact > label,
.finishing-tc-compact > span {
  margin: 0;
  white-space: nowrap;
}

.finishing-rich-description textarea {
  display: none;
}

.finishing-inline-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--control);
  overflow: hidden;
}

.finishing-inline-editor-toolbar {
  display: flex;
  gap: 3px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
}

.finishing-inline-editor-toolbar button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.finishing-inline-editor-toolbar button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.45;
}

.finishing-inline-editor-toolbar button:hover,
.finishing-inline-editor-toolbar button:focus-visible {
  background: transparent;
  color: var(--ink);
  outline: none;
}

.finishing-inline-editor-toolbar button:active,
.finishing-inline-editor-toolbar button[aria-pressed="true"] {
  background: transparent;
  color: var(--ink);
}

.finishing-rich-description .finishing-inline-editor-toolbar button:hover,
.finishing-rich-description .finishing-inline-editor-toolbar button:focus-visible,
.finishing-rich-description .finishing-inline-editor-toolbar button:active,
.finishing-rich-description .finishing-inline-editor-toolbar button[aria-pressed="true"] {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  outline: none;
}

.finishing-rich-description .finishing-inline-editor-toolbar button:hover svg,
.finishing-rich-description .finishing-inline-editor-toolbar button:focus-visible svg,
.finishing-rich-description .finishing-inline-editor-toolbar button:active svg,
.finishing-rich-description .finishing-inline-editor-toolbar button[aria-pressed="true"] svg {
  color: var(--muted);
  stroke: currentColor;
}

.finishing-inline-editor-surface {
  min-height: 118px;
  padding: 10px 12px;
  color: var(--ink);
  line-height: 1.45;
  outline: none;
}

.finishing-inline-editor-surface:focus {
  box-shadow: none;
}

.finishing-stop-frame-upload {
  display: grid;
  gap: 8px;
}

.finishing-stop-frame-inline {
  gap: 0;
}

.finishing-file-drop {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.finishing-file-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 56%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 20%, var(--control));
  color: var(--ink);
  padding: 5px 10px;
  font-weight: 850;
  cursor: pointer;
  pointer-events: auto;
}

.finishing-file-name {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-stop-frame-upload input[type="file"] {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  left: 0 !important;
  bottom: 0 !important;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
}

.finishing-custom-type-close {
  position: absolute;
  right: 8px;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.finishing-custom-type-close:hover,
.finishing-custom-type-close:focus-visible {
  color: var(--ink);
  background: transparent;
  outline: none;
}

.finishing-create-priority-combo {
  position: relative;
}

.finishing-create-priority-combo > .finishing-chip {
  width: max-content;
  min-width: 92px;
  min-height: 42px;
  border: 0;
  justify-content: center;
  cursor: pointer;
}

.finishing-admin-grid .finishing-create-priority-combo > .finishing-chip {
  min-width: 0;
  min-height: 36px;
  height: 36px;
  padding-inline: 8px;
}

.finishing-create-priority-menu {
  position: absolute;
  z-index: 220;
  top: calc(100% + 6px);
  left: 0;
  min-width: 116px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
}

.finishing-create-priority-menu[hidden] {
  display: none !important;
}

.finishing-create-priority-menu button {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 3px;
  text-align: left;
  cursor: pointer;
}

.finishing-create-priority-menu button:hover,
.finishing-create-priority-menu button:focus-visible,
.finishing-create-priority-menu button.is-selected {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.finishing-create-roadmap {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 680px);
  margin: 12px auto 0;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.finishing-create-roadmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finishing-create-roadmap-head h4,
.finishing-create-roadmap-head p {
  margin: 0;
}

.finishing-create-roadmap-head h4 {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.finishing-create-roadmap-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.finishing-create-roadmap-preset {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.finishing-create-roadmap-preset:hover,
.finishing-create-roadmap-preset.is-dirty {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  color: var(--ink);
}

.finishing-roadmap-preset-control {
  position: relative;
  flex: 0 0 auto;
}

.finishing-roadmap-preset-inline-icon {
  --preset-color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin: 0 3px 0 1px;
  color: var(--preset-color);
  vertical-align: -2px;
}

.finishing-roadmap-preset-inline-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

.finishing-roadmap-preset-menu,
.finishing-roadmap-preset-dialog {
  position: fixed;
  z-index: 100001;
  width: min(330px, calc(100vw - 20px));
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.54);
  overflow: auto;
}

.finishing-roadmap-preset-menu[hidden],
.finishing-roadmap-preset-dialog[hidden] {
  display: none !important;
}

.finishing-roadmap-preset-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.finishing-roadmap-preset-menu button:hover,
.finishing-roadmap-preset-menu button.is-active {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.finishing-roadmap-preset-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.finishing-roadmap-preset-dialog-head strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.finishing-roadmap-preset-dialog-head button {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.finishing-roadmap-preset-dialog input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 82%, #050b12);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.finishing-roadmap-preset-error {
  margin: 0;
  color: #fb7185;
  font-size: 12px;
  line-height: 1.35;
}

.finishing-roadmap-preset-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.finishing-roadmap-preset-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 92px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--panel) 86%, #050b12);
  color: color-mix(in srgb, var(--ink) 82%, var(--muted) 18%);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.finishing-roadmap-preset-actions button:hover,
.finishing-roadmap-preset-actions button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--panel) 78%, #050b12);
  color: var(--ink);
  outline: none;
}

.finishing-roadmap-preset-actions button:active {
  transform: translateY(1px);
}

.finishing-roadmap-preset-actions button[data-roadmap-preset-save],
.finishing-roadmap-preset-actions button[data-roadmap-preset-replace] {
  min-width: 128px;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent);
  color: #fff;
}

.finishing-roadmap-preset-actions button[data-roadmap-preset-save]:hover,
.finishing-roadmap-preset-actions button[data-roadmap-preset-save]:focus-visible,
.finishing-roadmap-preset-actions button[data-roadmap-preset-replace]:hover,
.finishing-roadmap-preset-actions button[data-roadmap-preset-replace]:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 78%, #ffffff 22%);
  background: color-mix(in srgb, var(--accent) 88%, #ffffff 12%);
  color: #fff;
}

.finishing-create-roadmap-stage.is-untitled-stage .finishing-create-roadmap-stage-main strong {
  color: var(--muted);
}

.finishing-create-roadmap-strip {
  --roadmap-line-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  --roadmap-axis: 26px;
  position: relative;
  display: grid;
  gap: 7px;
  padding: 2px 42px 4px 0;
  overflow: visible;
}

.finishing-create-roadmap-strip::before {
  display: none;
}

.finishing-create-roadmap-card {
  position: relative;
  display: grid;
  gap: 0;
  z-index: 1;
}

.finishing-roadmap-return-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.finishing-roadmap-return-arrow {
  position: absolute;
  width: 24px;
  border-top: 1.5px solid #ff4d4d;
  border-right: 1.5px solid #ff4d4d;
  border-bottom: 1.5px solid #ff4d4d;
  border-radius: 0 12px 12px 0;
  opacity: 0.94;
  pointer-events: auto;
  transition: opacity 0.14s ease, filter 0.14s ease;
}

.finishing-roadmap-return-layer.is-hovering .finishing-roadmap-return-arrow {
  opacity: 0.3;
}

.finishing-roadmap-return-layer.is-hovering .finishing-roadmap-return-arrow.is-hovered {
  opacity: 1;
  filter: saturate(1.18);
}

.finishing-roadmap-return-arrow::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 11px;
  height: 1.5px;
  border-radius: 999px;
  background: #ff4d4d;
  transform: rotate(42deg);
  transform-origin: left center;
}

.finishing-roadmap-return-arrow::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 11px;
  height: 1.5px;
  border-radius: 999px;
  background: #ff4d4d;
  transform: rotate(-42deg);
  transform-origin: left center;
}

.finishing-roadmap-return-arrow span {
  position: absolute;
  top: 50%;
  right: -8px;
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ff4d4d;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  transform: translateY(-50%);
  padding: 0 4px;
  z-index: 4;
  box-shadow: 0 0 0 5px var(--bg);
}

.finishing-create-roadmap-stage,
.finishing-create-roadmap-plus {
  color: var(--ink);
  cursor: pointer;
}

.finishing-create-roadmap-stage {
  border: 1px solid var(--line);
  background: var(--control);
}

.finishing-create-roadmap-stage {
  position: relative;
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 28px minmax(150px, 1fr) minmax(118px, 220px);
  grid-template-rows: minmax(28px, auto) minmax(22px, auto);
  align-items: start;
  column-gap: 12px;
  row-gap: 3px;
  border-radius: 14px;
  padding: 10px 12px 8px;
  text-align: left;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.finishing-create-roadmap-stage-icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 10px;
  font-weight: 940;
}

.finishing-create-roadmap-stage-icon {
  background: color-mix(in srgb, var(--stage-icon-color, #94a3b8) 16%, transparent);
  color: var(--stage-icon-color, #94a3b8);
}

.finishing-create-roadmap-stage-icon svg {
  width: 15px;
  height: 15px;
}

.finishing-create-roadmap-stage-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  align-self: center;
}

.finishing-roadmap-stage-actions {
  grid-column: 3;
  grid-row: 2;
  position: relative;
  top: auto;
  left: auto;
  z-index: 2;
  transform: none;
  display: inline-flex;
  align-items: center;
  align-self: end;
  justify-self: end;
  gap: 4px;
  margin-top: 1px;
}

.finishing-roadmap-stage-actions button {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}

.finishing-roadmap-stage-actions button:hover,
.finishing-roadmap-stage-actions button:focus-visible,
.finishing-roadmap-stage-actions button.is-active {
  background: transparent;
  outline: none;
  filter: saturate(1.12) brightness(1.08);
}

.finishing-roadmap-stage-actions button:disabled,
.finishing-roadmap-stage-actions button.is-disabled {
  opacity: 0.26;
  cursor: default;
  filter: none;
}

.finishing-roadmap-stage-actions button:disabled:hover,
.finishing-roadmap-stage-actions button.is-disabled:hover {
  filter: none;
}

.finishing-roadmap-stage-actions button.is-next {
  color: #22c55e;
}

.finishing-roadmap-stage-actions button.is-wait {
  color: #f59e0b;
}

.finishing-roadmap-stage-actions button.is-return {
  color: #60a5fa;
}

.finishing-roadmap-stage-actions button.is-pause {
  color: #ef4444;
}

.finishing-roadmap-stage-actions button.is-skip {
  color: #94a3b8;
}

.finishing-roadmap-stage-actions button.is-note {
  color: #facc15;
}

.finishing-create-roadmap-stage:not(.is-current-stage) .finishing-roadmap-stage-actions button {
  color: color-mix(in srgb, var(--muted) 78%, var(--line));
}

.finishing-create-roadmap-stage:not(.is-current-stage) .finishing-roadmap-stage-actions button:not(:disabled):not(.is-disabled) {
  opacity: 0.72;
}

.finishing-create-roadmap-stage:not(.is-current-stage) .finishing-roadmap-stage-actions button:not(:disabled):not(.is-disabled):hover,
.finishing-create-roadmap-stage:not(.is-current-stage) .finishing-roadmap-stage-actions button:not(:disabled):not(.is-disabled):focus-visible,
.finishing-create-roadmap-stage:not(.is-current-stage) .finishing-roadmap-stage-actions button:not(:disabled):not(.is-disabled).is-active {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  opacity: 0.86;
  filter: none;
}

.finishing-roadmap-action-svg {
  --roadmap-action-icon: none;
  width: 16px;
  height: 16px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--roadmap-action-icon) center / contain no-repeat;
  mask: var(--roadmap-action-icon) center / contain no-repeat;
}

.finishing-roadmap-action-svg.is-next {
  --roadmap-action-icon: url("/static/tracker/icons/tasks/next.svg");
}

.finishing-roadmap-action-svg.is-return {
  --roadmap-action-icon: url("/static/tracker/icons/tasks/return.svg");
}

.finishing-roadmap-action-svg.is-wait {
  --roadmap-action-icon: url("/static/tracker/icons/tasks/wait.svg");
}

.finishing-roadmap-action-svg.is-pause {
  --roadmap-action-icon: url("/static/tracker/icons/tasks/pause.svg");
}

.finishing-roadmap-action-svg.is-skip {
  --roadmap-action-icon: url("/static/tracker/icons/tasks/skip.svg");
}

.finishing-roadmap-action-svg.is-note {
  --roadmap-action-icon: url("/static/tracker/icons/tasks/note.svg");
}

.finishing-create-roadmap-stage-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 900;
}

.finishing-create-roadmap-stage-summary {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-self: start;
  padding-top: 1px;
}

.finishing-create-roadmap-stage-summary:empty {
  display: none;
}

.finishing-create-roadmap-stage-summary em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.25;
}

.finishing-roadmap-responsible-trigger {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  max-width: 100%;
  min-width: 0;
  height: 28px;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  cursor: pointer;
}

.finishing-roadmap-responsible-trigger:hover,
.finishing-roadmap-responsible-trigger:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--line) 32%, transparent);
  outline: none;
}

.finishing-roadmap-responsible-trigger svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.finishing-roadmap-responsible-avatar {
  --person-avatar-color: var(--accent);
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--person-avatar-color) 36%, var(--line));
  background: color-mix(in srgb, var(--person-avatar-color) 18%, var(--control-muted));
  color: var(--person-avatar-color);
  font-size: 8px;
  font-weight: 900;
}

.finishing-roadmap-responsible-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.finishing-roadmap-responsible-avatar svg,
.finishing-roadmap-responsible-avatar i {
  width: 11px;
  height: 11px;
}

.finishing-roadmap-responsible-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-roadmap-responsible-trigger.is-assigned {
  color: var(--ink);
}

@media (max-width: 640px) {
  .finishing-create-roadmap-stage {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: minmax(28px, auto) auto auto auto;
  }

  .finishing-roadmap-responsible-trigger {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
  }

  .finishing-create-roadmap-stage-summary {
    grid-column: 2;
    grid-row: 3;
  }

  .finishing-roadmap-stage-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: end;
  }
}

.finishing-create-roadmap-stage small {
  display: none;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.finishing-create-roadmap-stage.is-start {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.finishing-create-roadmap-stage.is-done {
  border-color: color-mix(in srgb, var(--marker-green) 42%, var(--line));
}

.finishing-create-roadmap-stage.is-completed-stage {
  border-color: color-mix(in srgb, var(--marker-green) 62%, var(--line));
  background: color-mix(in srgb, var(--marker-green) 14%, var(--control));
}

.finishing-create-roadmap-stage.is-current-stage {
  border-color: color-mix(in srgb, var(--marker-orange) 72%, var(--line));
  background: color-mix(in srgb, var(--marker-orange) 18%, var(--control));
}

.finishing-create-roadmap-stage-summary em.is-current-label {
  color: var(--marker-orange);
  font-weight: 900;
}

.finishing-create-roadmap-stage-summary em.is-done-label {
  color: var(--marker-green);
  font-weight: 900;
}

.finishing-create-roadmap-stage-summary em.is-waiting-label {
  color: var(--marker-orange);
  font-weight: 900;
}

.finishing-create-roadmap-stage-summary em.is-paused-label {
  color: var(--marker-red);
  font-weight: 900;
}

.finishing-create-roadmap-stage-summary em.is-skipped-label {
  color: var(--muted);
  font-weight: 900;
}

.finishing-create-roadmap-stage.is-selected {
  border-color: color-mix(in srgb, var(--line) 92%, var(--ink));
  box-shadow: none;
}

.finishing-create-roadmap-card.is-expanded .finishing-create-roadmap-stage {
  border-color: color-mix(in srgb, var(--line) 92%, var(--accent));
  border-bottom-color: color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 14px 14px 0 0;
  box-shadow: none;
}

.finishing-create-roadmap-stage.has-wait {
  border-style: dashed;
}

.finishing-create-roadmap-plus {
  position: relative;
  margin-left: 10px;
  width: 32px;
  height: 24px;
  justify-self: start;
  align-self: center;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--roadmap-line-color);
  font-size: 0;
  font-weight: 0;
  line-height: 1;
  opacity: 1;
  box-shadow: none;
  transform: none;
  z-index: 5;
}

.finishing-create-roadmap-plus::before,
.finishing-create-roadmap-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 0;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.finishing-create-roadmap-plus::before {
  width: 11px;
  height: 2px;
}

.finishing-create-roadmap-plus::after {
  width: 2px;
  height: 11px;
}

.finishing-create-roadmap-plus:hover,
.finishing-create-roadmap-plus:focus-visible {
  color: var(--ink);
  background: transparent;
  opacity: 1;
  outline: none;
  z-index: 6;
}

.finishing-create-roadmap-editor {
  position: relative;
  z-index: 4;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, var(--accent));
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: #121b28;
  box-shadow: none;
}

.finishing-create-roadmap-editor[hidden] {
  display: none !important;
}

.finishing-create-roadmap-editor [data-roadmap-return-target-wrap] {
  display: none !important;
}

.finishing-create-roadmap-editor label {
  display: grid;
  gap: 5px;
}

.finishing-create-roadmap-editor label.is-wide {
  grid-column: 1 / -1;
}

.finishing-create-roadmap-editor label > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.finishing-create-roadmap-editor input,
.finishing-create-roadmap-editor select,
.finishing-create-roadmap-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  padding: 8px 10px;
}

.finishing-create-roadmap-editor input:focus,
.finishing-create-roadmap-editor select:focus,
.finishing-create-roadmap-editor textarea:focus {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  box-shadow: none;
  outline: none;
}

.finishing-create-roadmap-editor select {
  min-height: 38px;
}

.finishing-roadmap-note-editor {
  grid-column: 1 / -1;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.finishing-roadmap-note-editor[hidden] {
  display: none !important;
}

.finishing-roadmap-note-editor .finishing-inline-editor-toolbar {
  padding: 5px 7px;
}

.finishing-roadmap-note-editor .finishing-inline-editor-toolbar button {
  width: 20px;
  height: 20px;
}

.finishing-roadmap-note-editor .finishing-inline-editor-surface {
  min-height: 88px;
  padding: 8px 10px;
}

.finishing-roadmap-title-popover {
  width: min(360px, 100%);
}

.finishing-roadmap-title-popover[hidden] {
  display: none !important;
}

.finishing-roadmap-icon-popover {
  position: fixed;
  z-index: 100000;
  width: 288px;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.54);
  max-height: calc(100vh - 16px);
  overflow: auto;
}

.finishing-roadmap-icon-popover .finishing-roadmap-remove {
  justify-self: end;
  margin-top: 2px;
}

.finishing-roadmap-icon-popover[hidden] {
  display: none !important;
}

.finishing-roadmap-responsible-popover {
  position: absolute;
  z-index: 40;
  width: min(360px, calc(100% - 16px));
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121b28;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.54);
}

.finishing-roadmap-responsible-popover.is-floating {
  position: fixed;
  z-index: 9000;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  overflow: auto;
}

.finishing-roadmap-responsible-popover[hidden] {
  display: none !important;
}

.finishing-roadmap-responsible-default-popover {
  position: fixed;
  z-index: 9100;
  width: min(430px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #121b28;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.finishing-roadmap-responsible-default-popover[hidden] {
  display: none !important;
}

.finishing-roadmap-responsible-default-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finishing-roadmap-responsible-default-head strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.finishing-roadmap-responsible-default-head button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.finishing-roadmap-responsible-default-popover > button {
  min-height: 38px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-2) 74%, transparent);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.finishing-roadmap-responsible-default-popover > button:hover,
.finishing-roadmap-responsible-default-popover > button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  outline: none;
}

.finishing-roadmap-responsible-default-popover > button span,
.finishing-roadmap-responsible-default-popover > button em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-roadmap-responsible-default-popover > button span {
  font-size: 12px;
  font-weight: 900;
}

.finishing-roadmap-responsible-default-popover > button em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
}

.finishing-roadmap-responsible-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
}

.finishing-roadmap-responsible-head button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.finishing-roadmap-responsible-list {
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
}

.finishing-roadmap-responsible-section {
  display: grid;
  gap: 3px;
}

.finishing-roadmap-responsible-section > b {
  padding: 0 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finishing-roadmap-responsible-section button {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.finishing-roadmap-responsible-section button:hover,
.finishing-roadmap-responsible-section button:focus-visible,
.finishing-roadmap-responsible-section button.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.finishing-roadmap-responsible-section button span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.finishing-roadmap-responsible-section button .finishing-person-chip {
  display: inline-flex;
}

.finishing-roadmap-responsible-section button strong,
.finishing-roadmap-responsible-section button em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-roadmap-responsible-section button strong {
  font-size: 12px;
  font-weight: 900;
}

.finishing-roadmap-responsible-section button em,
.finishing-roadmap-responsible-section button small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.finishing-roadmap-responsible-default {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.finishing-roadmap-responsible-default[hidden] {
  display: none !important;
}

.finishing-roadmap-responsible-summary {
  display: grid;
  gap: 2px;
  padding: 2px 4px 6px;
}

.finishing-roadmap-responsible-summary strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
}

.finishing-roadmap-responsible-summary em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.finishing-roadmap-responsible-default > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.finishing-roadmap-responsible-default div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finishing-roadmap-responsible-default button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 860;
  cursor: pointer;
}

.finishing-roadmap-responsible-default button span,
.finishing-roadmap-responsible-default button em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finishing-roadmap-responsible-default button em {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.finishing-roadmap-responsible-default button:hover,
.finishing-roadmap-responsible-default button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  outline: none;
}

.finishing-roadmap-title-suggestions {
  display: grid;
  gap: 3px;
  max-height: 150px;
  overflow: auto;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 10px;
  background: #0f1723;
}

.finishing-roadmap-title-suggestions[hidden] {
  display: none !important;
}

.finishing-roadmap-title-suggestions button {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  text-align: left;
  cursor: pointer;
}

.finishing-roadmap-title-suggestions button:hover,
.finishing-roadmap-title-suggestions button:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.finishing-roadmap-title-suggestion-icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage-icon-color) 24%, transparent);
  color: var(--stage-icon-color);
}

.finishing-roadmap-title-suggestion-icon svg {
  width: 12px;
  height: 12px;
}

.finishing-roadmap-icon-grid,
.finishing-roadmap-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.finishing-roadmap-icon-grid button,
.finishing-roadmap-color-grid button {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.finishing-roadmap-icon-grid button.is-active,
.finishing-roadmap-icon-grid button:hover,
.finishing-roadmap-icon-grid button:focus-visible {
  color: var(--ink);
  outline: none;
}

.finishing-roadmap-icon-grid svg {
  width: 15px;
  height: 15px;
}

.finishing-roadmap-color-grid button {
  background: var(--stage-swatch);
  opacity: 0.52;
}

.finishing-roadmap-color-grid button.is-active,
.finishing-roadmap-color-grid button:hover,
.finishing-roadmap-color-grid button:focus-visible {
  opacity: 1;
  outline: 1px solid color-mix(in srgb, var(--stage-swatch) 56%, #ffffff);
  outline-offset: 1px;
}

.finishing-inline-editor-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  opacity: 0.72;
  pointer-events: none;
}

.finishing-roadmap-action-row {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.finishing-roadmap-action-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.finishing-roadmap-action-group button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.finishing-roadmap-action-group button:hover,
.finishing-roadmap-action-group button:focus-visible {
  border-color: transparent;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.finishing-roadmap-action-group button.is-active {
  border-color: transparent;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.finishing-roadmap-action-group button[hidden] {
  display: none !important;
}

.finishing-roadmap-action-group svg {
  width: 14px;
  height: 14px;
}

.finishing-roadmap-action-panel {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.finishing-roadmap-action-panel[hidden] {
  display: none !important;
}

.finishing-roadmap-action-panel > strong {
  grid-column: 1 / -1;
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.finishing-roadmap-action-panel > select:not([hidden]) {
  display: none;
}

.finishing-roadmap-action-panel > select:not([hidden]) + input {
  grid-column: 1 / -1;
}

.finishing-roadmap-wait-options,
.finishing-roadmap-return-options {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.finishing-roadmap-wait-options[hidden],
.finishing-roadmap-return-options[hidden] {
  display: none !important;
}

.finishing-roadmap-wait-options button,
.finishing-roadmap-return-options button {
  min-height: 30px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 860;
  cursor: pointer;
}

.finishing-roadmap-wait-options button:hover,
.finishing-roadmap-wait-options button:focus-visible,
.finishing-roadmap-return-options button:hover,
.finishing-roadmap-return-options button:focus-visible {
  border-color: color-mix(in srgb, var(--line) 92%, var(--ink));
  color: var(--ink);
  outline: none;
}

.finishing-roadmap-wait-options button.is-active,
.finishing-roadmap-return-options button.is-active {
  border-color: color-mix(in srgb, var(--line) 92%, var(--ink));
  color: var(--ink);
}

.finishing-roadmap-wait-options svg {
  width: 13px;
  height: 13px;
}

.finishing-roadmap-action-panel input,
.finishing-roadmap-action-panel select,
.finishing-roadmap-title-popover input {
  min-height: 34px;
  height: 34px;
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  box-shadow: none;
}

.finishing-roadmap-action-panel input {
  grid-column: 1 / 2;
}

.finishing-roadmap-action-date-control {
  grid-column: 1 / 2;
  width: 100%;
}

.finishing-roadmap-action-date-control[hidden] {
  display: none !important;
}

.finishing-roadmap-action-date-control input {
  width: 100%;
}

.finishing-roadmap-action-date-control .logging-date-popover,
.logging-date-popover.is-roadmap-date-popover {
  position: fixed;
  top: var(--date-popover-top, 0);
  left: var(--date-popover-left, 0);
  z-index: 2147483647;
}

.logging-date-popover.is-roadmap-date-popover.is-open {
  display: block;
}

.finishing-roadmap-action-done {
  grid-column: 2 / 3;
  min-height: 34px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.finishing-roadmap-note-done {
  justify-self: end;
  margin-top: -2px;
}

.finishing-roadmap-note-done[hidden] {
  display: none !important;
}

.finishing-roadmap-action-done:hover,
.finishing-roadmap-action-done:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 82%, var(--line));
  outline: none;
}

.finishing-roadmap-action-panel input:focus,
.finishing-roadmap-action-panel select:focus,
.finishing-roadmap-title-popover input:focus {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  box-shadow: none;
  outline: none;
}

.finishing-roadmap-action-suggestions {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  max-height: 170px;
  overflow: auto;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 12px;
  background: #101824;
}

.finishing-roadmap-action-suggestions[hidden] {
  display: none !important;
}

.finishing-roadmap-action-suggestions button {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  padding: 6px 8px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.finishing-roadmap-action-suggestions button:hover,
.finishing-roadmap-action-suggestions button:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.finishing-roadmap-action-suggestions strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 860;
}

.finishing-roadmap-action-suggestions span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.finishing-roadmap-remove {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.finishing-roadmap-remove:hover,
.finishing-roadmap-remove:focus-visible {
  color: var(--danger);
  outline: none;
}

.finishing-roadmap-remove svg {
  width: 15px;
  height: 15px;
}

.cutkit-ui-tooltip {
  position: fixed;
  z-index: 200000;
  left: 0;
  top: 0;
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.cutkit-ui-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cutkit-ui-tooltip.is-below {
  transform: translate(-50%, 4px);
}

.cutkit-ui-tooltip.is-below.is-visible {
  transform: translate(-50%, 0);
}

.finishing-stop-frame-cell {
  padding: 0 !important;
  position: relative;
  height: 1px;
  min-height: 0;
  overflow: hidden;
}

.finishing-stop-frame-thumb {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
}

.finishing-stop-frame-thumb > img {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  max-height: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  border-radius: 0;
  border: 0;
}

.finishing-stop-frame-popover {
  position: absolute;
  z-index: 10000;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.finishing-stop-frame-thumb:hover > .finishing-stop-frame-popover,
.finishing-stop-frame-thumb:focus > .finishing-stop-frame-popover {
  display: block;
}

.finishing-stop-frame-popover.is-portal-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483647;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.1s ease, transform 0.1s ease, visibility 0.1s ease;
}

.finishing-stop-frame-popover.is-portal-preview.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.finishing-stop-frame-popover img {
  display: block;
  width: auto;
  max-width: min(460px, 54vw, calc(100vw - 48px));
  max-height: var(--stop-frame-preview-max-height, calc(100vh - 48px));
  object-fit: contain;
  border-radius: 8px;
}

.finishing-stop-frame-upload.finishing-stop-frame-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.finishing-stop-frame-preview {
  position: relative;
  display: block;
  width: 88px;
  height: 54px;
  flex: 0 0 auto;
}

.finishing-stop-frame-preview .finishing-stop-frame-thumb {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  overflow: visible;
}

.finishing-stop-frame-preview .finishing-stop-frame-thumb > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  transform: none;
  object-fit: cover;
  border: 0;
  border-radius: inherit;
}

.finishing-stop-frame-remove {
  position: absolute;
  left: -10px;
  top: -10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
}

.finishing-stop-frame-remove:hover,
.finishing-stop-frame-remove:focus-visible {
  color: var(--danger);
  background: transparent;
  outline: none;
}

.finishing-stop-frame-remove svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.finishing-form-errors {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--danger) 52%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.finishing-form-errors strong {
  color: color-mix(in srgb, var(--danger) 76%, #ffffff 24%);
}

.finishing-form-grid .errorlist,
.finishing-form-errors .errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: color-mix(in srgb, var(--danger) 74%, #ffffff 26%);
  font-size: 11px;
  font-weight: 780;
}

.finishing-create-form .primary-button,
.finishing-detail-form .primary-button {
  margin-top: 14px;
}

.finishing-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.finishing-create-actions .primary-button,
.finishing-create-actions .action-button {
  margin-top: 0;
}

.finishing-task-footer-delete {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}

.finishing-task-footer-delete:hover,
.finishing-task-footer-delete:focus-visible {
  color: var(--ink);
  background: transparent;
  outline: none;
}

.finishing-task-footer-delete svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}


.finishing-review-loop-card {
  margin: 0 0 12px;
  padding: 11px;
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--marker-purple) 44%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--marker-purple) 10%, transparent);
}

.finishing-review-loop-card strong {
  color: var(--ink-strong);
  font-size: 13px;
}

.finishing-review-loop-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.finishing-review-loop-card span {
  display: inline-flex;
  margin-top: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.finishing-review-action {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--marker-purple) 38%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--marker-purple) 10%, transparent);
}

.finishing-review-action input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  padding: 8px 9px;
}


.finishing-discussion,
.finishing-history {
  margin-top: 10px;
}

.finishing-comment-list,
.finishing-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.finishing-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink-strong);
  font-size: 10px;
  font-weight: 860;
  text-transform: uppercase;
}

.finishing-tag-chip.tag-revision,
.finishing-tag-chip.tag-blocker {
  background: color-mix(in srgb, var(--marker-orange) 32%, transparent);
}

.finishing-tag-chip.tag-approval {
  background: color-mix(in srgb, var(--marker-green) 28%, transparent);
}


.finishing-reply {
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.finishing-reply-form,
.finishing-comment-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.finishing-reply-form textarea,
.finishing-comment-form textarea {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  padding: 9px;
  resize: vertical;
}


.finishing-inline-expand[open] {
  flex: 1 1 100%;
}

.finishing-inline-expand[open] > summary {
  margin-bottom: 8px;
}

.finishing-empty.is-compact {
  padding: 10px !important;
  font-size: 12px;
}


.finishing-detail-form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}


.finishing-readonly-note,
.finishing-empty-detail p {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .finishing-layout {
    grid-template-columns: 1fr;
  }

  .finishing-detail-panel {
    position: static;
    max-height: none;
  }

  .finishing-review-action,
  .finishing-review-actions {
    grid-template-columns: 1fr;
  }

  .finishing-mini-form {
    left: 0;
    right: auto;
    width: min(520px, calc(100vw - 32px));
  }
}

.icon-button[data-save-indicator].is-error svg {
  color: var(--danger);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--danger) 38%, transparent));
}

.topbar-more-item[data-save-indicator].is-saving svg {
  color: color-mix(in srgb, var(--accent) 78%, #ffffff 22%);
  filter: drop-shadow(0 0 6px rgba(90, 129, 255, 0.42));
}

.topbar-more-item[data-save-indicator].is-saved svg {
  color: #42d77d;
  filter: drop-shadow(0 0 8px rgba(66, 215, 125, 0.45));
}

.topbar-more-item[data-save-indicator].is-error svg {
  color: var(--danger);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--danger) 38%, transparent));
}

.app-nav a:hover {
  background: color-mix(in srgb, #ffffff 7%, transparent);
}

.app-nav a.active {
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  box-shadow: none;
}

.brand {
  height: var(--topbar-identity-height, 20px);
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  font-weight: 700;
  line-height: 0;
}

.brand-icon {
  width: auto;
  height: var(--topbar-identity-height, 20px);
  flex: 0 0 auto;
  display: block;
}

.brand-wordmark {
  width: auto;
  height: var(--topbar-identity-height, 20px);
  flex: 0 0 auto;
  display: block;
}

.project-context {
  width: 100%;
  max-width: 100%;
  padding: 0 2px 0 0;
  height: var(--topbar-identity-height, 20px);
  min-height: var(--topbar-identity-height, 20px);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(var(--topbar-identity-height, 20px) * 0.78);
  font-weight: 820;
  line-height: var(--topbar-identity-height, 20px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.project-context-avatar,
.project-switcher-item-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--topbar-line);
  background: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 28%, var(--icon-button-bg));
  color: rgba(255, 255, 255, 0.92);
  font-weight: 820;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.project-context-avatar {
  width: var(--topbar-identity-height, 20px);
  height: var(--topbar-identity-height, 20px);
  font-size: calc(var(--topbar-identity-height, 20px) * 0.42);
}

.project-context-avatar img,
.project-switcher-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-switcher-trigger:hover,
.project-switcher-trigger:focus-visible {
  color: #fff;
  background: transparent;
}

.project-switcher-caret {
  color: rgba(255, 255, 255, 0.62);
  font-size: calc(var(--topbar-identity-height, 20px) * 0.52);
  line-height: 1;
  transform: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.project-switcher-trigger:hover .project-switcher-caret,
.project-switcher-trigger:focus-visible .project-switcher-caret,
.topbar-project-switcher.is-open .project-switcher-caret {
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1.03);
}

.project-context-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.topbar-project-switcher {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: clamp(130px, 22vw, 360px);
}

.project-switcher-trigger {
  cursor: pointer;
  min-width: 0;
}

.project-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 24px));
  background: var(--topbar);
  border: 1px solid var(--topbar-line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 120;
}

.project-switcher-menu-list {
  max-height: min(55vh, 420px);
  overflow: auto;
}

.project-switcher-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--topbar-line);
  color: rgba(255, 255, 255, 0.92);
}

.project-switcher-item-avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.project-switcher-item-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.project-switcher-item:last-child {
  border-bottom: 0;
}

.project-switcher-item:hover {
  background: var(--icon-button-bg);
}

.project-switcher-item.is-active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 48%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}

.project-switcher-item-name {
  font-size: 13px;
  font-weight: 700;
}

.project-switcher-item-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.66);
}

.topbar-status {
  min-width: 72px;
  padding-left: 8px;
  color: rgba(255, 255, 255, 0.58);
}

@media (max-width: 980px) {
  .topbar-left {
    --topbar-identity-height: 20px;
    gap: 10px;
  }

  .topbar-inner {
    column-gap: 8px;
  }

  .topbar-project-switcher {
    max-width: 220px;
  }

  .app-nav a {
    min-height: 28px;
    padding-inline: 9px;
  }

  .icon-button {
    width: 34px;
  }

  .topbar-status {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar-direct-actions {
    display: none;
  }

  .topbar-more-menu {
    display: inline-flex;
  }

  .topbar-project-switcher {
    max-width: 170px;
  }

  .topbar-actions {
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 0;
  }

  .topbar-center {
    grid-column: auto;
    justify-self: center;
    order: initial;
  }

  .project-context {
    display: none;
  }
}

@media (max-width: 680px) {
  .brand-wordmark {
    display: none;
  }

  .app-nav a {
    width: auto;
    min-width: 0;
    justify-content: center;
    padding-inline: 8px;
  }

  .nav-primary-icon {
    display: none;
  }

  .nav-tab-label {
    display: inline;
  }

  .nav-access-icon {
    display: none;
  }
}

.icon-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.icon-button {
  width: 36px;
  color: #fff;
  border: 0;
  background: transparent;
  opacity: 0.86;
  box-shadow: none;
  transition: color 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.icon-button.is-active {
  color: color-mix(in srgb, var(--accent) 62%, #ffffff 38%);
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  outline: none;
  color: color-mix(in srgb, var(--accent) 48%, #ffffff 52%);
  background: transparent;
  opacity: 1;
}

.icon-button:active {
  transform: translateY(1px);
}

@media (max-width: 840px) {
  .topbar-overview-action {
    display: none;
  }
}

.topbar-account-button {
  padding: 0;
}

.topbar-account-avatar {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--topbar-account-avatar-color, var(--accent)) 42%, var(--topbar-line));
  background: color-mix(in srgb, var(--topbar-account-avatar-color, var(--accent)) 18%, transparent);
  color: color-mix(in srgb, var(--topbar-account-avatar-color, var(--accent)) 50%, #ffffff 50%);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.topbar-account-avatar.has-avatar {
  background: color-mix(in srgb, var(--topbar-account-avatar-color, var(--accent)) 20%, var(--icon-button-bg));
}

.topbar-account-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

.topbar-account-avatar svg,
.topbar-account-avatar i {
  width: 14px;
  height: 14px;
  stroke-width: 2.15;
}

.topbar-account-button:hover .topbar-account-avatar,
.topbar-account-button:focus-visible .topbar-account-avatar,
.topbar-account-button.is-active .topbar-account-avatar {
  border-color: color-mix(in srgb, var(--topbar-account-avatar-color, var(--accent)) 72%, #ffffff 28%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--topbar-account-avatar-color, var(--accent)) 22%, transparent);
}

.icon-button svg,
.primary-action svg,
.secondary-action svg {
  width: 16px;
  height: 16px;
}

.primary-action {
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.primary-action:hover {
  background: var(--accent-dark);
}

.secondary-action {
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: var(--control);
  border-color: var(--line);
}

main.shell {
  padding: 22px 0 48px;
}

body:has(.login-shell) main.shell {
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  padding-bottom: 24px;
}

body:has([data-edit-root]) main.shell {
  padding-top: calc(var(--topbar-height) + 22px);
}

.toast-stack {
  display: grid;
  gap: 8px;
  margin: 12px clamp(16px, 2vw, 40px) 0;
  z-index: 6000;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  --toast-accent: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--toast-accent) 8%);
  box-shadow: var(--shadow);
}

.toast-body {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-close {
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toast-close:hover {
  border-color: var(--line);
  color: var(--ink);
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

.toast-success,
.toast-info {
  --toast-accent: #60a5fa;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
}

.toast-success {
  --toast-accent: #22c55e;
}

.toast-warning {
  --toast-accent: #f59e0b;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
}

.toast-error {
  --toast-accent: #ef4444;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
}

body.js-ready .toast-stack {
  position: fixed;
  top: 72px;
  right: clamp(12px, 2vw, 36px);
  width: min(420px, calc(100vw - 24px));
  margin: 0;
  pointer-events: none;
}

body.js-ready .toast {
  pointer-events: auto;
}

body.js-ready .toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cutkit-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
}

.cutkit-confirm-layer[hidden] {
  display: none;
}

.cutkit-confirm-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(79, 131, 255, 0.16), transparent 38%),
    var(--modal-backdrop);
  backdrop-filter: blur(10px);
}

.cutkit-confirm-card {
  --auth-dialog-control-bg: #e8edf3;
  --auth-dialog-control-border: #b6c1cf;
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(560px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 18px;
  overflow: hidden;
  padding: 26px;
  border: 0;
  border-radius: 13px;
  background:
    radial-gradient(circle at 16% 0%, rgba(90, 142, 255, 0.2), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, 0.14), transparent 34%),
    linear-gradient(150deg, #f7faff 0%, #eef4fb 48%, #e8eef7 100%);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 140ms ease, transform 140ms ease;
}

:root[data-theme="dark"] .cutkit-confirm-card {
  --auth-dialog-control-bg: #0d121b;
  --auth-dialog-control-border: #182234;
  background:
    radial-gradient(circle at 16% 0%, rgba(79, 131, 255, 0.18), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, 0.11), transparent 33%),
    radial-gradient(circle at 72% 88%, rgba(99, 102, 241, 0.08), transparent 42%),
    linear-gradient(152deg, #171f2d 0%, #111827 50%, #0b1019 100%);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.38),
    0 0 46px rgba(37, 99, 235, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cutkit-confirm-card::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(59, 130, 246, 0.2), transparent 38%),
    radial-gradient(circle at 78% 26%, rgba(125, 211, 252, 0.12), transparent 34%),
    radial-gradient(circle at 56% 82%, rgba(99, 102, 241, 0.1), transparent 42%);
  filter: blur(18px);
  opacity: 0.42;
}

.cutkit-confirm-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 42px rgba(79, 131, 255, 0.06);
}

.cutkit-confirm-card > * {
  position: relative;
  z-index: 1;
}

.cutkit-confirm-layer.is-open .cutkit-confirm-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cutkit-confirm-icon {
  width: 28px;
  height: 28px;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: transparent;
  border: 0;
}

.cutkit-confirm-layer.is-danger .cutkit-confirm-icon {
  color: var(--danger);
  background: transparent;
  border: 0;
}

.cutkit-confirm-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.cutkit-confirm-copy {
  min-width: 0;
}

.cutkit-confirm-brand {
  width: max-content;
  max-width: 100%;
  height: auto;
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.cutkit-confirm-brand-symbol,
.cutkit-confirm-brand-wordmark,
.cutkit-confirm-brand-logo {
  display: block;
  width: auto;
  height: 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.cutkit-confirm-brand-symbol {
  height: 16px;
}

.cutkit-confirm-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  font-weight: 760;
  letter-spacing: 0;
}

.cutkit-confirm-copy [data-cutkit-dialog-message] {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 560;
  overflow-wrap: anywhere;
}

.cutkit-confirm-input {
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  padding: 9px 10px;
  border: 1px solid var(--auth-dialog-control-border);
  border-radius: 8px;
  background: var(--auth-dialog-control-bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

.cutkit-confirm-input:focus {
  outline: none;
  border-color: var(--auth-dialog-control-border);
  box-shadow: none;
}

.cutkit-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
}

.cutkit-confirm-actions > button {
  flex: 0 1 auto;
  width: auto;
  min-width: 112px;
  min-height: 42px;
  padding-inline: 18px;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.cutkit-confirm-layer.is-alert .cutkit-confirm-actions {
  justify-content: end;
}

.source-montage-choice-layer .cutkit-confirm-actions {
  justify-content: flex-end;
}

.cutkit-confirm-submit.is-danger {
  border-color: color-mix(in srgb, var(--danger) 72%, #ffffff 10%);
  background: color-mix(in srgb, var(--danger) 82%, #111827 18%);
  color: #fff;
}

.cutkit-confirm-submit.is-danger:hover,
.cutkit-confirm-submit.is-danger:focus-visible {
  border-color: var(--danger);
  background: var(--danger);
}

@media (max-width: 560px) {
  .cutkit-confirm-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .cutkit-confirm-icon {
    width: 26px;
    height: 26px;
  }

  .cutkit-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cutkit-confirm-actions > button {
    min-width: 0;
    width: 100%;
  }
}

.edit-material-notification-center {
  position: fixed;
  top: calc(var(--topbar-height) + 16px);
  right: clamp(14px, 2vw, 30px);
  z-index: 1190;
  width: min(450px, calc(100vw - 28px));
  pointer-events: none;
}

.edit-material-notification-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - var(--topbar-height) - 28px);
  overflow: auto;
  padding: 0;
  pointer-events: auto;
}

.edit-material-notification-card {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  height: 110px;
  min-height: 110px;
  max-height: 110px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--control) 92%, var(--surface));
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.edit-material-notification-center.is-expanded .edit-material-notification-card {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.edit-material-notification-header {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.edit-material-notification-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 18%, var(--control-muted));
  color: var(--accent);
}

.edit-material-notification-card.is-ready .edit-material-notification-icon {
  background: color-mix(in srgb, var(--marker-green) 26%, var(--control-muted));
  color: color-mix(in srgb, var(--marker-green) 75%, var(--ink));
}

.edit-material-notification-icon svg,
.edit-material-notification-close svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.edit-material-notification-icon svg {
  width: 11px;
  height: 11px;
}

.edit-material-notification-header h2 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 880;
  line-height: 1.12;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.edit-material-notification-time {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.edit-material-notification-close,
.edit-material-notification-counter button {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.edit-material-notification-close:hover,
.edit-material-notification-counter button:hover {
  color: var(--ink);
  background: var(--control-muted);
}

.edit-material-notification-body {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding-right: 0;
}

.edit-material-notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
}

.edit-material-notification-meta span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edit-material-notification-meta svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.3;
}

.edit-material-notification-scenes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 43px;
  overflow: hidden;
}

.edit-material-notification-scenes .scene-token {
  font-size: 9.5px;
  min-height: 19px;
}

.edit-material-notification-counter {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: auto;
  width: 22px;
  min-width: 22px;
  min-height: 84px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 9px;
  font-weight: 820;
  line-height: 1;
}

.edit-material-notification-counter button {
  width: 22px;
  min-width: 22px;
  min-height: 18px;
  border-radius: 5px;
  color: inherit;
}

.edit-material-notification-counter.is-collapse-only {
  top: 8px;
  transform: none;
  min-height: 24px;
  justify-content: flex-start;
}

.edit-material-notification-counter.is-collapse-only button {
  min-height: 24px;
}

.edit-material-notification-counter-value {
  min-height: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.edit-material-notification-counter svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.edit-material-notification-counter-separator {
  width: 12px;
  height: 2px;
  margin: 3px 0;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.54;
}

.setup-frame {
  width: 100%;
  max-width: 1260px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.setup-sidebar,
.setup-sheet,
.narrow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.setup-sidebar {
  min-height: calc(100vh - 128px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 16px;
  border: 0 !important;
  box-shadow: none !important;
}

.account-layout {
  width: 100%;
  max-width: 1260px;
  margin-inline: auto;
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.account-settings-frame {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.account-project-sidebar {
  min-height: calc(100vh - 128px);
  padding: 18px;
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 16px;
}

.account-sidebar-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.account-project-sidebar h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 720;
  line-height: 1.15;
  text-transform: uppercase;
}

.account-project-list {
  display: grid;
  gap: 6px;
}

.account-project-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.account-project-item:hover,
.account-project-item:focus-visible,
.account-project-item.is-active {
  background: color-mix(in srgb, var(--active-row) 84%, transparent);
  outline: none;
}

.account-project-item.is-disabled {
  opacity: 0.52;
}

.account-project-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 28%, var(--control));
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
  text-transform: uppercase;
}

.account-project-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-project-avatar svg {
  width: 18px;
  height: 18px;
}

.account-project-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-project-copy strong,
.account-project-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-project-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.account-card {
  min-height: calc(100vh - 128px);
  height: 100%;
  min-width: 0;
  overflow: visible;
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  padding: 0;
}

.account-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0;
  padding: 22px 24px 10px;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.account-header-compact {
  justify-content: space-between;
  gap: 16px;
}

.account-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-avatar-picker {
  position: relative;
  flex: 0 0 auto;
}

.account-avatar-trigger {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.account-avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.account-avatar-change {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #000 56%, transparent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0;
  transition: opacity 120ms ease;
}

.account-avatar-trigger:hover .account-avatar-change,
.account-avatar-trigger:focus-visible .account-avatar-change {
  opacity: 1;
}

.account-avatar-profile-link {
  display: inline-grid;
  color: inherit;
  text-decoration: none;
}

.account-avatar-profile-link:hover .account-avatar-preview,
.account-avatar-profile-link:focus-visible .account-avatar-preview {
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 3px;
}

.account-avatar-popover {
  left: 0;
  right: auto;
  top: calc(100% + 10px);
}

.account-profile-summary {
  min-width: 0;
  max-width: 100%;
}

.account-title {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.account-profile-email,
.account-profile-title {
  max-width: min(560px, 64vw);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-profile-email {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.account-profile-title {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.account-muted {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.account-admin-link {
  width: max-content;
  min-height: 30px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 13%, var(--control));
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.account-admin-link:hover,
.account-admin-link:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: color-mix(in srgb, var(--accent) 20%, var(--control));
  outline: none;
}

.account-admin-link svg {
  width: 15px;
  height: 15px;
}

.account-password-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.account-password-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.account-password-summary::-webkit-details-marker {
  display: none;
}

.account-password-summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
}

.account-password-panel[open] .account-password-summary::after {
  content: "▴";
}

.account-password-content {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.account-password-note {
  margin-bottom: 10px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 24px 24px;
}

.account-grid-main {
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  align-items: start;
}

.account-grid-main.is-profile-mode,
.account-grid-main.is-notification-mode {
  grid-template-columns: minmax(0, 1fr);
}

.account-grid-main.is-profile-mode .account-profile-section {
  width: 100%;
  max-width: none;
}

.account-section {
  position: relative;
  display: grid;
  gap: 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 0 0;
}

.account-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.account-gear-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-gear-menu > summary {
  list-style: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.account-gear-menu > summary::-webkit-details-marker {
  display: none;
}

.account-gear-menu[open] > summary,
.account-gear-menu > summary:hover,
.account-gear-menu > summary:focus-visible {
  color: var(--ink);
  background: var(--control);
  outline: none;
}

.account-gear-menu > summary svg {
  width: 18px;
  height: 18px;
}

.account-gear-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 45;
  width: min(430px, calc(100vw - 44px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-gear-panel h2 {
  margin: 0 0 10px;
  font-size: 14px;
}

.account-danger-action {
  width: 100%;
  min-height: 38px;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger) 8%, var(--control));
  color: color-mix(in srgb, var(--danger) 80%, var(--ink));
  font-weight: 850;
}

.account-danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.account-delete-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.account-delete-block .account-danger-action {
  margin-top: 0;
}

.account-delete-form {
  margin: 0;
}

.account-deletion-reasons {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.account-notification-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-notification-grid {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.account-notification-group {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.account-notification-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-notification-channel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 70px 70px;
  gap: 10px;
  align-items: end;
  padding-bottom: 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.account-notification-channel-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.account-notification-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 70px 70px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 0;
}

.account-notification-option + .account-notification-option {
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.account-notification-check {
  min-height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0;
}

.account-notification-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.account-notification-copy {
  display: grid;
  gap: 3px;
}

.account-notification-option strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.account-notification-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.field-row {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.account-form {
  max-width: 520px;
}

.account-form > .primary-action,
.account-notification-form > .primary-action {
  width: auto;
  justify-self: start;
}

.account-notification-form,
.account-notifications-section {
  max-width: none;
}

.account-push-section {
  max-width: 620px;
}

.account-form .field-row,
.account-gear-panel .field-row {
  margin-bottom: 12px;
}

.account-consent-field {
  margin-top: 2px;
}

.account-toggle-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.account-toggle-row input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  opacity: 0;
  appearance: none;
  cursor: pointer;
}

.account-toggle-visual {
  grid-column: 1;
  grid-row: 1;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
}

.account-toggle-visual::after {
  content: "";
  width: 8px;
  height: 5px;
  display: none;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-0.5px) rotate(-45deg);
}

.account-toggle-row input[type="checkbox"]:checked + .account-toggle-visual {
  border-color: transparent;
  background: var(--accent);
}

.account-toggle-row input[type="checkbox"]:checked + .account-toggle-visual::after {
  display: block;
}

.account-toggle-copy {
  display: grid;
  gap: 3px;
}

.account-toggle-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.account-toggle-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.field-row input,
.field-row textarea,
.field-row select {
  width: 100%;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
  padding: 8px 10px;
}

.field-row textarea {
  min-height: 78px;
}

.account-card .field-row input,
.account-card .field-row textarea,
.account-card .field-row select {
  min-height: 38px;
  border-radius: 7px;
  border-color: var(--line-strong);
  outline: none;
}

.account-card .field-row textarea {
  min-height: 170px;
  line-height: 1.45;
}

.account-card .field-row input:focus,
.account-card .field-row textarea:focus,
.account-card .field-row select:focus {
  border-color: var(--line-strong);
  box-shadow: none;
}

.account-facts {
  margin: 0;
  display: grid;
  gap: 8px;
}

.account-facts div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
}

.account-facts dt {
  color: var(--muted);
}

.account-facts dd {
  margin: 0;
}

.account-help {
  margin: 0 0 10px;
  color: var(--muted);
}

.account-roles {
  width: 100%;
  border-collapse: collapse;
}

.account-roles th,
.account-roles td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
}

.platform-layout {
  width: 100%;
  max-width: 1520px;
  margin-inline: auto;
  padding: clamp(10px, 1.2vw, 18px) clamp(8px, 1.3vw, 18px) 40px;
  display: grid;
  gap: 14px;
}

.platform-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
  align-items: end;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.17);
}

.platform-header h1 {
  margin: 0;
  font-size: clamp(25px, 2vw, 34px);
  line-height: 1.1;
}

.platform-header .account-muted {
  max-width: 680px;
  margin-bottom: 0;
}

.platform-search {
  min-width: min(360px, 100%);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 86%, transparent);
}

.platform-search svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.platform-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.platform-search input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.platform-search a,
.platform-action-row a,
.platform-chip-row a.platform-chip {
  color: color-mix(in srgb, var(--accent) 62%, #ffffff 38%);
  text-decoration: none;
}

.platform-filter-tabs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: stretch;
}

.platform-filter-tab {
  min-width: 146px;
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 70%, transparent);
  color: var(--muted);
  text-decoration: none;
}

.platform-filter-tab:hover,
.platform-filter-tab:focus-visible {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  outline: none;
}

.platform-filter-tab.is-active {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  color: var(--ink);
}

.platform-filter-tab span {
  font-size: 12px;
  font-weight: 880;
  line-height: 1.1;
}

.platform-filter-tab small {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 11px;
  line-height: 1.15;
}

.platform-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.platform-stat {
  min-height: 92px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 3%, transparent), transparent 54%),
    color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.platform-stat-top {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.platform-stat-top i {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--accent) 82%, #ffffff 18%);
  opacity: 0.82;
}

.platform-stat--demo-cleanup {
  gap: 6px;
}

.platform-stat-top span,
.platform-stat small,
.platform-muted {
  color: var(--muted);
}

.platform-stat-top span {
  min-width: 0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.platform-stat strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.platform-stat small,
.platform-muted {
  font-size: 12px;
}

.platform-section {
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.13);
}

.platform-section-head {
  padding: 14px 16px 13px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.platform-section-head--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.platform-section-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
}

.platform-section-head .account-muted {
  margin-bottom: 0;
}

.platform-health-section {
  overflow: visible;
}

.platform-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  padding: 12px;
}

.platform-health-grid--operational {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0;
}

.platform-health-card {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 66%, transparent);
}

.platform-health-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.platform-health-topline span,
.platform-health-card small {
  color: var(--muted);
}

.platform-health-topline span {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-health-topline strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.platform-health-card small {
  font-size: 12px;
  line-height: 1.25;
}

.platform-health-meter {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 42%, transparent);
}

.platform-health-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3ecf8e;
}

.platform-health-card.is-watch .platform-health-meter span {
  background: #f59e0b;
}

.platform-health-card.is-high .platform-health-meter span {
  background: var(--danger);
}

.platform-health-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, #3ecf8e 50%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, #3ecf8e 12%, var(--surface-2));
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.platform-health-badge.is-watch {
  border-color: color-mix(in srgb, #f59e0b 52%, var(--line));
  background: color-mix(in srgb, #f59e0b 12%, var(--surface-2));
}

.platform-health-badge.is-high {
  border-color: color-mix(in srgb, var(--danger) 52%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-2));
}

.platform-health-badge.is-unknown {
  opacity: 0.62;
}

.platform-health-card.is-info .platform-health-topline span {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.platform-operational-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 12px 10px;
}

.platform-operational-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
  text-transform: uppercase;
}

.platform-operational-head small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  overflow-wrap: anywhere;
}

.platform-risk-list,
.platform-risk-empty {
  margin: 0 12px 12px;
  display: grid;
  gap: 8px;
}

.platform-risk-item,
.platform-risk-empty {
  min-height: 38px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.platform-risk-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px 8px;
}

.platform-risk-empty {
  display: flex;
  gap: 8px;
  color: var(--muted);
}

.platform-risk-item.is-watch {
  border-color: color-mix(in srgb, #f59e0b 45%, var(--line));
  background: color-mix(in srgb, #f59e0b 8%, var(--surface-2));
}

.platform-risk-item.is-high {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface-2));
}

.platform-risk-item svg,
.platform-risk-empty svg {
  width: 17px;
  height: 17px;
}

.platform-risk-item.is-watch svg {
  color: #f59e0b;
}

.platform-risk-item.is-high svg {
  color: var(--danger);
}

.platform-risk-empty svg {
  color: #3ecf8e;
}

.platform-risk-item span,
.platform-risk-empty span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.platform-risk-item small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.platform-table-wrap {
  width: 100%;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.platform-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.platform-feedback-table {
  min-width: 980px;
}

.platform-table th,
.platform-table td {
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--line) 52%, transparent);
  text-align: left;
  vertical-align: top;
}

.platform-table th:last-child,
.platform-table td:last-child {
  border-right: 0;
}

.platform-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--surface-2) 94%, #05070b 6%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.platform-table tbody tr:last-child td {
  border-bottom: 0;
}

.platform-table strong,
.platform-table small,
.platform-table time {
  display: block;
}

.platform-table strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.platform-project-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.platform-table small,
.platform-table time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.platform-feedback-message {
  max-width: 560px;
  max-height: 8.4em;
  margin: 0;
  overflow: auto;
  color: color-mix(in srgb, var(--ink) 90%, var(--muted));
  font-size: 12px;
  line-height: 1.4;
}

.platform-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
}

.platform-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.platform-chip.is-admin {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  background: color-mix(in srgb, var(--accent) 15%, var(--surface-2));
}

.platform-chip.is-ok {
  border-color: color-mix(in srgb, #3ecf8e 50%, var(--line));
  background: color-mix(in srgb, #3ecf8e 13%, var(--surface-2));
}

.platform-chip.is-demo {
  border-color: color-mix(in srgb, #f59e0b 52%, var(--line));
  background: color-mix(in srgb, #f59e0b 12%, var(--surface-2));
}

.platform-chip.is-demo-session {
  border-color: color-mix(in srgb, var(--danger) 52%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-2));
}

.platform-chip.is-muted {
  opacity: 0.58;
}

.platform-cleanup-form {
  margin-top: 2px;
}

.platform-cleanup-button {
  min-height: 28px;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 44%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-2));
  color: color-mix(in srgb, var(--danger) 76%, var(--ink));
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.platform-cleanup-button:hover,
.platform-cleanup-button:focus-visible {
  border-color: color-mix(in srgb, var(--danger) 64%, var(--line));
  background: color-mix(in srgb, var(--danger) 15%, var(--surface-2));
  outline: none;
}

.platform-cleanup-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.platform-metric-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.platform-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.platform-action-row a {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  font-size: 11px;
  font-weight: 820;
}

.platform-action-row a:hover,
.platform-action-row a:focus-visible,
.platform-chip-row a.platform-chip:hover,
.platform-chip-row a.platform-chip:focus-visible {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  outline: none;
}

.platform-empty {
  height: 92px;
  color: var(--muted);
  text-align: center !important;
  vertical-align: middle !important;
}

@media (max-width: 1100px) {
  .account-settings-frame,
  .account-grid,
  .account-grid-main {
    grid-template-columns: 1fr;
  }

  .account-project-sidebar,
  .platform-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-project-sidebar {
    min-height: 0;
    position: static;
  }

  .platform-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-health-grid--operational {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .platform-layout {
    padding-inline: 0;
  }

  .platform-header,
  .platform-section {
    border-radius: 0;
  }

  .platform-stat-grid,
  .platform-health-grid {
    grid-template-columns: 1fr;
  }

  .platform-section-head--inline,
  .platform-operational-head {
    align-items: flex-start;
    display: grid;
  }

  .platform-operational-head small {
    text-align: left;
  }

  .account-notification-channel-head,
  .account-notification-option {
    grid-template-columns: minmax(0, 1fr) 58px 58px 58px;
    gap: 6px;
  }

  .account-notification-channel-head span {
    font-size: 9px;
    letter-spacing: 0.04em;
  }

  .account-push-actions .secondary-action,
  .account-push-actions .primary-action {
    width: 100%;
  }
}

.members-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.setup-members-section .members-page {
  margin: 0;
}

.setup-members-section {
  position: relative;
  margin-top: 34px;
  padding-top: 0;
  border-top: 0;
  border-bottom: 0;
}

.setup-members-section::before {
  display: none;
}

.setup-members-section .members-card {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.setup-members-section .members-table-wrap {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.setup-members-section .members-table tbody td {
  border-bottom: 0;
  transition: background 140ms ease;
}

.setup-members-section .members-table thead th {
  border-bottom: 0;
}

.setup-members-section .members-table tbody tr:hover td,
.setup-members-section .members-table tbody tr:focus-within td {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.setup-members-section .members-layout {
  margin-top: 0;
}

.setup-members-heading {
  margin-bottom: 14px;
}

.members-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 780;
  line-height: 1.15;
}

.members-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.members-layout {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
}

.members-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.members-editor-card {
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.members-editor-card h2 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
}

.member-single-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.member-single-editor .field-row {
  margin: 0;
}

.member-single-editor .field-row > label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

.members-editor-actions {
  margin: 12px -12px -12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  position: sticky;
  bottom: -12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.members-table-wrap,
.members-form-wrap {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  max-width: 100%;
}

.setup-members-card .members-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  overflow-x: clip;
  overflow-y: visible;
}

.members-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  contain: paint;
  overflow-x: auto;
  overflow-y: clip;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 34%, transparent) transparent;
}

@supports not (overflow: clip) {
  .members-table-scroll {
    overflow-y: hidden;
  }
}

.members-table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.members-table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.members-table-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.members-table th,
.members-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 5px;
  text-align: left;
  vertical-align: middle;
}

.members-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.members-table td {
  font-size: 12.75px;
  font-weight: 500;
  line-height: 1.4;
}

.members-table th:nth-child(1),
.members-table td:nth-child(1) {
  width: 210px;
}

.members-table th:nth-child(2),
.members-table td:nth-child(2) {
  width: auto;
}

.members-table th:nth-child(3),
.members-table td:nth-child(3) {
  width: 120px;
}

.members-table th:nth-child(4),
.members-table td:nth-child(4) {
  width: 96px;
}

.members-table th:nth-child(5),
.members-table td:nth-child(5) {
  width: 132px;
}

.members-table th:nth-child(6),
.members-table td:nth-child(6) {
  width: 94px;
}

.members-table th:nth-child(7),
.members-table td:nth-child(7) {
  width: 104px;
}

.member-external-wrap {
  margin-top: 12px;
}

.member-access-request-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.member-access-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--active-row) 42%, transparent);
}

.member-access-request-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.members-subheader {
  margin: 2px 0 10px;
}

.members-subheader-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.members-subheader h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}

.member-user-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.member-user-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-user-meta strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.member-user-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.member-contact-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-contact-stack strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-contact-stack small {
  color: var(--muted);
  font-size: 11px;
}

.member-summary {
  color: var(--ink);
  font-size: 12px;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  max-width: 100%;
  align-items: flex-start;
}

.member-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--active-row) 52%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
  white-space: normal;
}

.member-tag-custom {
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  color: var(--muted);
}

.member-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--control-muted);
  display: grid;
  place-items: center;
  overflow: visible;
  position: relative;
  font-size: 15px;
  font-weight: 700;
}

.member-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.member-avatar svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.member-avatar-icon {
  --member-avatar-color: var(--muted);
  color: var(--member-avatar-color);
  background: color-mix(in srgb, var(--member-avatar-color) 13%, var(--control-muted));
}

.members-table-unified {
  table-layout: fixed;
}

.members-table-unified th:nth-child(1),
.members-table-unified td:nth-child(1) {
  width: auto;
  min-width: 0;
}

.members-table-unified th:nth-child(2),
.members-table-unified td:nth-child(2),
.members-table-unified th:nth-child(3),
.members-table-unified td:nth-child(3),
.members-table-unified th:nth-child(4),
.members-table-unified td:nth-child(4),
.members-table-unified th:nth-child(5),
.members-table-unified td:nth-child(5) {
  width: 76px;
  min-width: 0;
  text-align: center;
}

.members-table-unified th:nth-child(6),
.members-table-unified td:nth-child(6) {
  width: 112px;
  text-align: center;
}

.members-table .member-status-cell {
  text-align: center;
}

.members-table-unified th:nth-child(7),
.members-table-unified td:nth-child(7) {
  width: 42px;
  padding-right: 0;
  text-align: right;
}

.member-user-cell-with-popover {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
}

.member-user-cell-with-popover:hover,
.member-user-cell-with-popover:focus-within {
  z-index: 90;
}

.member-avatar-link {
  position: relative;
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.member-avatar-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}

.member-avatar-virtual {
  position: relative;
}

.member-virtual-badge {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  z-index: 3;
}

.member-virtual-ghost-icon {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  -webkit-mask: url("/static/tracker/icons/virtual-participant-ghost.svg") center / contain no-repeat;
  mask: url("/static/tracker/icons/virtual-participant-ghost.svg") center / contain no-repeat;
}

.member-owner-badge {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--warning);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
  z-index: 3;
}

.member-owner-badge svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.member-realized-badge {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--ok) 55%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--ok) 90%, var(--surface));
  color: #07130b;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.member-realized-badge svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.member-avatar-info-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 120;
  width: min(280px, 80vw);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.member-user-cell-with-popover:hover .member-avatar-info-popover,
.member-user-cell-with-popover:focus-within .member-avatar-info-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.member-avatar-info-popover strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.member-avatar-info-popover span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.member-compact-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  padding: 6px 28px 6px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.member-compact-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.member-access-menu {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.member-edit-access-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.member-edit-access-controls .member-access-menu {
  flex: 0 0 auto;
  width: auto;
}

.member-access-menu > summary {
  list-style: none;
}

.member-access-menu > summary::-webkit-details-marker {
  display: none;
}

.member-access-trigger,
.member-access-static {
  width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.member-status-toggle {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.member-access-static {
  cursor: default;
}

.member-access-trigger svg,
.member-access-static svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted);
}

.member-access-trigger span:not(.member-access-dot),
.member-access-static span {
  display: none;
}

.member-color-trigger {
  width: 18px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.member-access-trigger:hover,
.member-access-trigger:focus-visible {
  outline: none;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.member-color-trigger:hover,
.member-color-trigger:focus-visible {
  outline: none;
  background: transparent;
}

.member-status-toggle:hover,
.member-status-toggle:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: color-mix(in srgb, var(--active-row) 58%, var(--control));
}

.member-access-menu[open] .member-access-trigger {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.member-access-menu[open] .member-color-trigger {
  background: transparent;
}

.member-access-popover {
  position: absolute;
  z-index: 130;
  left: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  display: none;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.member-access-popover.is-portaled {
  position: fixed;
  z-index: 2400;
  left: var(--member-access-left, 0);
  top: var(--member-access-top, 0);
  right: auto;
}

.member-access-menu[open] .member-access-popover {
  display: grid;
}

.member-access-popover.is-portaled.is-open {
  display: grid;
}

.member-access-popover-right {
  right: 0;
  left: auto;
}

.member-access-popover-right.is-portaled {
  right: auto;
  left: var(--member-access-left, 0);
}

.member-edit-access-popover {
  min-width: 190px;
}

.member-color-popover {
  left: 50%;
  top: 50%;
  min-width: 0;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.member-color-popover.is-portaled {
  left: var(--member-access-left, 0);
  top: var(--member-access-top, 0);
  transform: none;
}

.member-access-option {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.member-access-option svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.member-access-option:hover,
.member-access-option:focus-visible,
.member-access-option.is-selected {
  outline: none;
  background: color-mix(in srgb, var(--active-row) 72%, transparent);
}

.member-access-option.is-selected svg {
  color: var(--accent);
}

.member-access-dot,
.member-access-color-option {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 999px;
  background: var(--edit-workflow-dot-color, var(--accent));
}

.member-access-dot {
  box-shadow: none;
}

.member-access-color-option {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 80%, transparent);
}

.member-access-popover-divider {
  height: 1px;
  margin: 3px 0;
  background: var(--line);
}

.member-access-color-section {
  display: grid;
  gap: 6px;
  padding: 3px 2px 2px;
}

.member-access-color-section > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.member-access-color-grid {
  position: relative;
  width: 100%;
  height: 100%;
}

.member-access-color-option {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 19px;
  height: 19px;
  border: 0;
  padding: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.member-access-color-option.is-selected {
  box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--edit-workflow-dot-color, var(--accent));
}

.member-access-color-grid .member-access-color-option:nth-child(1) {
  transform: translate(-50%, -50%) translate(0, -28px);
}

.member-access-color-grid .member-access-color-option:nth-child(2) {
  transform: translate(-50%, -50%) translate(22px, -17px);
}

.member-access-color-grid .member-access-color-option:nth-child(3) {
  transform: translate(-50%, -50%) translate(27px, 6px);
}

.member-access-color-grid .member-access-color-option:nth-child(4) {
  transform: translate(-50%, -50%) translate(12px, 25px);
}

.member-access-color-grid .member-access-color-option:nth-child(5) {
  transform: translate(-50%, -50%) translate(-12px, 25px);
}

.member-access-color-grid .member-access-color-option:nth-child(6) {
  transform: translate(-50%, -50%) translate(-27px, 6px);
}

.member-access-color-grid .member-access-color-option:nth-child(7) {
  transform: translate(-50%, -50%) translate(-22px, -17px);
}

.member-status-toggle {
  border-color: transparent;
}

.member-status-toggle.is-active {
  background: color-mix(in srgb, var(--ok) 18%, var(--control));
  color: var(--ok);
}

.member-status-toggle.is-inactive {
  background: color-mix(in srgb, var(--muted) 12%, var(--control));
  color: var(--muted);
}

.member-edit-access-cell {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.member-edit-dot-menu {
  position: relative;
}

.member-edit-dot-menu > summary {
  width: 38px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  list-style: none;
}

.member-edit-dot-menu > summary::-webkit-details-marker {
  display: none;
}

.member-edit-dot-menu > summary svg {
  width: 13px;
  height: 13px;
}

.member-edit-dot-menu .edit-workflow-color-popover {
  right: 0;
  left: auto;
}

.member-compact-actions {
  text-align: right;
  white-space: nowrap;
}

.compact-action {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.compact-action svg {
  width: 16px;
  height: 16px;
}

.member-row-inactive {
  opacity: 0.58;
}

.member-row-virtual .member-compact-select,
.members-table-draft .member-compact-select {
  pointer-events: none;
}

.member-inline-form {
  display: inline-flex;
  align-items: center;
  margin-right: 0;
  margin-bottom: 0;
}

.member-inline-form select {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
  padding: 6px 8px;
}

.member-action-btn {
  min-height: 32px;
  width: auto;
}

.members-table:not(.members-table-external) td:nth-child(7),
.members-table-external td:nth-child(7) {
  white-space: nowrap;
}

.members-table:not(.members-table-external) td:nth-child(7) .member-inline-form,
.members-table-external td:nth-child(7) .member-inline-form {
  vertical-align: middle;
}

.members-table-unified td:nth-child(6) .member-inline-form {
  width: 100%;
}

.members-table .member-status-cell .member-inline-form {
  width: 100%;
}

.member-remove-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-strong);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.78;
  transition: color 120ms ease, opacity 120ms ease, background 120ms ease;
}

.member-remove-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

.member-remove-btn:hover,
.member-remove-btn:focus-visible {
  outline: none;
  opacity: 1;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.member-access-cell {
  display: grid;
  gap: 3px;
}

.member-access-cell strong {
  font-size: 12px;
  font-weight: 750;
}

.member-access-cell small {
  color: var(--muted);
  font-size: 11px;
}

.member-access-cell-muted strong {
  color: var(--muted);
}

.member-status-stack {
  display: grid;
  gap: 6px;
}

.member-status-form {
  margin: 0;
}

.member-details-editor {
  margin: 0 0 8px;
}

.member-details-editor summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.member-edit-trigger {
  width: auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.member-edit-trigger::-webkit-details-marker {
  display: none;
}

.member-details-form {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  gap: 8px;
  min-width: 280px;
}

.member-details-form > label {
  display: grid;
  gap: 6px;
}

.member-responsibility-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.member-responsibility-item,
.member-responsibility-grid li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
}

.member-responsibility-grid input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.member-responsibility-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  align-items: flex-start;
}

.member-responsibility-grid-compact .member-responsibility-item {
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px 3px 6px;
  background: color-mix(in srgb, var(--control) 72%, transparent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.member-responsibility-grid-compact .member-responsibility-item:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--control));
  color: var(--ink);
}

.member-responsibility-grid-compact .member-responsibility-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.member-responsibility-icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
  flex: 0 0 auto;
  stroke-width: 2.3;
}

.member-responsibility-grid-compact .member-responsibility-item:has(input:checked) .member-responsibility-icon {
  color: var(--accent);
}

.member-permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.member-permission-item {
  margin: 0;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
}

.member-permission-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.member-advanced-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}

.member-advanced-block.is-hidden {
  display: none;
}

.member-virtual-toggle {
  align-self: end;
  min-height: 36px;
}

.member-virtual-hint {
  margin: -4px 0 0;
}

.member-avatar-editor {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 58%, transparent);
}

.member-avatar-editor.is-readonly,
.member-avatar-editor.is-disabled {
  opacity: 0.72;
}

.member-avatar-editor-copy {
  display: flex;
  align-items: center;
  gap: 9px;
}

.member-avatar-editor-copy strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
}

.member-avatar-editor-copy small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.member-avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.member-avatar-editor.is-disabled .member-avatar-picker {
  pointer-events: none;
}

.member-avatar-option {
  min-width: 66px;
  min-height: 44px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 54%, transparent);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.member-avatar-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.member-avatar-option svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.member-avatar-option small {
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
}

.member-avatar-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--control));
  color: var(--ink);
}

.member-avatar-compact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-height: 52px;
}

.member-avatar-compact > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.member-avatar-trigger {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  position: relative;
  cursor: pointer;
}

.member-avatar-trigger:disabled {
  cursor: default;
}

.member-avatar-large {
  --member-avatar-color: var(--muted);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--member-avatar-color) 34%, var(--line));
  background: color-mix(in srgb, var(--member-avatar-color) 16%, var(--control-muted));
  color: var(--member-avatar-color);
  font-size: 18px;
  font-weight: 850;
}

.member-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar-large svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.15;
}

.account-avatar-preview.member-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.member-avatar-change {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  color: var(--ink-strong);
  font-size: 10px;
  font-weight: 850;
  opacity: 0;
  transition: opacity 120ms ease;
}

.member-avatar-trigger:hover .member-avatar-change,
.member-avatar-trigger:focus-visible .member-avatar-change {
  opacity: 1;
}

.member-avatar-compact.is-readonly .member-avatar-change {
  display: none;
}

.member-avatar-compact.is-disabled {
  opacity: 0.62;
}

.member-avatar-compact.is-disabled .member-avatar-trigger {
  pointer-events: none;
}

.member-avatar-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(280px, calc(100vw - 48px));
  z-index: 30;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 18px 44px color-mix(in srgb, #000 28%, transparent);
}

.member-avatar-popover.is-open {
  display: grid;
  gap: 10px;
}

.member-avatar-icon-grid {
  display: grid;
  grid-template-columns: repeat(7, 28px);
  gap: 7px;
}

.member-avatar-icon-choice {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--control) 66%, transparent);
  cursor: pointer;
}

.member-avatar-icon-choice input,
.member-avatar-color-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.member-avatar-icon-choice svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.15;
}

.member-avatar-icon-choice:has(input:checked) {
  border-color: var(--accent);
  color: var(--ink-strong);
  background: color-mix(in srgb, var(--accent) 20%, var(--control));
}

.member-avatar-none-choice:has(input:checked) {
  border-color: var(--muted);
  background: color-mix(in srgb, var(--muted) 14%, var(--control));
}

.member-avatar-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.member-avatar-color-choice {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}

.member-avatar-color-choice span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 25%, transparent);
}

.member-avatar-color-choice:has(input:checked) {
  border-color: var(--ink-strong);
}

.member-avatar-color-choice.is-no-color span {
  position: relative;
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.member-avatar-color-choice.is-no-color span::before,
.member-avatar-color-choice.is-no-color span::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1.5px;
  border-radius: 999px;
  background: var(--muted);
}

.member-avatar-color-choice.is-no-color span::before {
  transform: rotate(45deg);
}

.member-avatar-color-choice.is-no-color span::after {
  transform: rotate(-45deg);
}

.member-avatar-file {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.member-avatar-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.member-avatar-cropper {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.member-avatar-cropper[hidden] {
  display: none;
}

.member-avatar-crop-frame {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--surface) 10%, transparent);
}

.member-avatar-crop-frame:active {
  cursor: grabbing;
}

.member-avatar-crop-frame img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  max-height: none;
  user-select: none;
  pointer-events: none;
  transform-origin: center;
}

.member-avatar-cropper input[type="range"] {
  width: 180px;
}

.member-avatar-cropper small {
  max-width: 180px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.member-advanced-hint {
  margin: 8px 0 0;
  max-width: 560px;
}

.member-permissions-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 12px;
  align-items: end;
}

.member-permissions-header h3 {
  align-self: center;
}

.member-permissions-preset {
  display: grid;
  gap: 5px;
}

.member-permissions-preset label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.member-permissions-matrix {
  width: 100%;
  margin-top: 10px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 50%, transparent);
  table-layout: fixed;
  overflow: hidden;
}

.member-permissions-matrix th {
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 760;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--control) 36%, transparent);
}

.member-permissions-matrix th:nth-child(1),
.member-permissions-matrix td:nth-child(1) {
  width: auto;
}

.member-permissions-matrix th:nth-child(2),
.member-permissions-matrix th:nth-child(3),
.member-permissions-matrix td:nth-child(2),
.member-permissions-matrix td:nth-child(3) {
  width: 118px;
  text-align: center;
}

.member-permissions-matrix td {
  min-height: 36px;
  padding: 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  font-size: 12px;
  color: var(--ink);
  vertical-align: middle;
}

.member-permissions-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.member-permission-dash {
  color: var(--muted);
}

.member-permission-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 20px;
}

.member-permission-mini input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.member-permission-scope {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.member-permission-scope input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.member-custom-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.member-row-inactive {
  opacity: 0.72;
}

.member-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
}

.member-status-button {
  font-family: inherit;
  cursor: pointer;
}

.member-status-button:hover,
.member-status-button:focus {
  border-color: var(--accent);
  outline: none;
}

.member-status-chip.is-active {
  color: #1dbf73;
  background: color-mix(in srgb, #1dbf73 16%, transparent);
}

.member-status-chip.is-inactive {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}

.inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.members-form-wrap h2 {
  margin: 0 0 10px;
  font-size: 14px;
}

.members-table-footer {
  padding: 10px 6px 2px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.member-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--topbar-height) + 16px) 24px 24px;
}

.member-modal.is-open {
  display: flex;
}

.member-modal-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #000 58%, transparent);
}

.member-modal-panel {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - var(--topbar-height) - 44px);
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px;
}

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

.member-modal-header h2 {
  font-size: 15px;
  margin: 0;
}

.member-modal-form {
  display: block;
}

.member-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.member-modal-main {
  display: grid;
  gap: 8px;
  align-content: start;
}

.member-modal-side {
  display: none;
}

.member-form-section {
  display: grid;
  gap: 6px;
}

.member-form-section h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.member-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.member-field-full {
  grid-column: 1 / -1;
}

.member-active-edit {
  min-height: 34px;
  align-items: center;
}

.member-custom-responsibility-row {
  margin-top: 2px;
}

.member-access-section {
  background: color-mix(in srgb, var(--surface) 35%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.member-access-section select {
  min-height: 36px;
}

.member-preset-helper {
  margin: 2px 0 0;
}

.member-preset-note {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12px;
}

.member-preset-note strong {
  color: var(--ink);
}

.member-preset-note span {
  color: var(--muted);
  line-height: 1.35;
}

.member-modal-close {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.members-add-panel {
  min-width: 320px;
}

.members-add-panel > summary {
  list-style: none;
  cursor: pointer;
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.members-add-panel > summary::-webkit-details-marker {
  display: none;
}

.members-add-panel-body {
  margin-top: 10px;
  width: min(520px, 92vw);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

@media (max-width: 1200px) {
  .members-layout {
    grid-template-columns: 1fr;
  }

  .member-single-editor {
    grid-template-columns: 1fr;
  }

  .member-personal-grid {
    grid-template-columns: 1fr;
  }

  .member-modal-side {
    border-left: 0;
    padding-left: 0;
  }

  .members-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .members-add-panel {
    min-width: 0;
  }

  .members-add-panel-body {
    width: 100%;
  }

  .member-responsibility-grid ul,
  .member-permissions-grid {
    grid-template-columns: 1fr;
  }

  .member-permissions-matrix th:nth-child(2),
  .member-permissions-matrix th:nth-child(3),
  .member-permissions-matrix td:nth-child(2),
  .member-permissions-matrix td:nth-child(3) {
    width: 88px;
  }

  .member-modal {
    padding: 12px;
  }

  .member-modal-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}

@media (max-width: 760px) {
  .member-permissions-header {
    grid-template-columns: 1fr;
  }

  .member-custom-preset-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  font-size: 23px;
  line-height: 1.15;
}

h3 {
  font-size: 15px;
}

.project-switcher {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-list {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.project-row.archived {
  opacity: 0.72;
}

.project-row {
  min-height: 56px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  background: var(--control);
  border-radius: 8px;
  position: relative;
}

.projects-page {
  display: grid;
  gap: 12px;
}

.projects-header-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.projects-header-row h1 {
  margin-top: 2px;
}

.projects-subtitle {
  margin-top: 8px;
}

.projects-new-action {
  width: auto;
  min-width: 140px;
}

.projects-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
}

.projects-table th,
.projects-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.projects-table th {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.projects-table tbody tr:hover {
  background: color-mix(in srgb, var(--active-row) 72%, transparent);
}

.projects-table tbody tr:last-child td {
  border-bottom: 0;
}

.projects-name-cell strong {
  font-size: 14px;
}

.projects-action-col {
  width: 130px;
}

.projects-action-cell {
  text-align: right;
}

.projects-action-cell .compact-action {
  width: auto;
}

.projects-empty {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
}

.projects-empty-card {
  width: min(680px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px 22px;
  text-align: center;
}

.projects-empty-card .eyebrow {
  margin-bottom: 10px;
}

.projects-empty-card .hint {
  max-width: 560px;
  margin: 12px auto 0;
}

@media (max-width: 900px) {
  .projects-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-new-action {
    width: 100%;
  }

  .projects-table th,
  .projects-table td {
    padding: 10px 8px;
  }
}

.project-row.active {
  background: color-mix(in srgb, var(--active-row) 84%, transparent);
  box-shadow: none;
}

.project-switcher > .secondary-action {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.project-switcher > .secondary-action:hover,
.project-switcher > .secondary-action:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.project-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 28%, var(--control));
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
  text-transform: uppercase;
  overflow: hidden;
  flex: 0 0 auto;
}

.project-avatar img,
.project-avatar-preview img,
.setup-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-avatar svg,
.project-context-avatar svg,
.project-switcher-item-avatar svg,
.project-avatar-preview svg {
  width: 54%;
  height: 54%;
  stroke-width: 2.2;
}

.project-avatar-icon {
  background: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 78%, var(--surface-2));
  border-color: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 64%, var(--line));
  color: #fff;
}

.project-row-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.project-row-title {
  font-size: 13.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.project-row small,
.empty-state {
  color: var(--muted);
}

.project-row small {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.project-row-body > small {
  padding-right: 48px;
}

.project-role-chip {
  position: absolute;
  right: 10px;
  bottom: 7px;
  display: block;
  max-width: 78px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.setup-tabs {
  padding: 12px 16px 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: var(--surface);
}

.setup-tab {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  cursor: pointer;
}

.setup-tab:hover,
.setup-tab:focus-visible {
  color: var(--ink);
  background: var(--control);
}

.setup-tab.is-active {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--active-row);
}

.setup-tab-panel[hidden] {
  display: none;
}

.setup-tab-panel .form-section:last-child {
  border-bottom: 0;
}

.empty-state {
  padding: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.setup-sheet {
  --setup-main-control-width: min(520px, 100%);
  --setup-side-control-width: 280px;
  --setup-action-width: 132px;
  min-height: calc(100vh - 128px);
  height: 100%;
  overflow: visible;
  min-width: 0;
  border: 0;
  box-shadow: none;
}

.setup-frame .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.setup-frame .field-label {
  font-size: 12px;
  font-weight: 700;
}

.setup-frame .field-help {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.setup-frame .account-muted,
.members-page .account-muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.setup-project-identity {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.project-avatar-picker {
  position: relative;
  width: max-content;
}

.project-avatar-trigger {
  position: relative;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.project-avatar-preview {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 28%, var(--surface-2));
  color: var(--ink);
  font-size: 28px;
  font-weight: 850;
  text-transform: uppercase;
}

.project-avatar-trigger:hover .project-avatar-preview,
.project-avatar-trigger:focus-visible .project-avatar-preview {
  border-color: color-mix(in srgb, var(--project-avatar-color, var(--accent)) 72%, var(--line));
}

.project-avatar-change {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  transition: opacity 120ms ease;
}

.project-avatar-trigger:hover .project-avatar-change,
.project-avatar-trigger:focus-visible .project-avatar-change {
  opacity: 1;
}

.project-avatar-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(292px, calc(100vw - 48px));
  z-index: 35;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 18px 44px color-mix(in srgb, #000 28%, transparent);
}

.project-avatar-popover.is-open {
  display: grid;
  gap: 10px;
}

.project-avatar-icon-grid {
  display: grid;
  grid-template-columns: repeat(7, 28px);
  gap: 7px;
}

.project-avatar-icon-choice,
.project-avatar-color-choice {
  position: relative;
}

.project-avatar-icon-choice {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--control) 66%, transparent);
  cursor: pointer;
}

.project-avatar-icon-choice input,
.project-avatar-color-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.project-avatar-icon-choice svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.15;
}

.project-avatar-icon-choice:has(input:checked) {
  border-color: var(--accent);
  color: var(--ink-strong);
  background: color-mix(in srgb, var(--accent) 20%, var(--control));
}

.project-avatar-none-choice:has(input:checked) {
  border-color: var(--muted);
  background: color-mix(in srgb, var(--muted) 14%, var(--control));
}

.project-avatar-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-avatar-color-choice {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}

.project-avatar-color-choice span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 25%, transparent);
}

.project-avatar-color-choice:has(input:checked) {
  border-color: var(--ink-strong);
}

.project-avatar-color-choice.is-no-color span {
  position: relative;
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.project-avatar-color-choice.is-no-color span::before,
.project-avatar-color-choice.is-no-color span::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1.5px;
  border-radius: 999px;
  background: var(--muted);
}

.project-avatar-color-choice.is-no-color span::before {
  transform: rotate(45deg);
}

.project-avatar-color-choice.is-no-color span::after {
  transform: rotate(-45deg);
}

.project-avatar-file {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.project-avatar-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.setup-avatar-upload {
  min-height: 38px;
  margin: 0;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.setup-avatar-upload:hover,
.setup-avatar-upload:focus-within,
.setup-avatar-upload.is-uploading {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--control));
}

.setup-avatar-upload.is-error {
  border-color: var(--danger);
}

.setup-avatar-preview {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-2));
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.setup-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.setup-avatar-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.setup-avatar-copy strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.1;
}

.setup-avatar-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .setup-project-identity {
    grid-template-columns: 1fr;
  }

  .setup-project-hero,
  .setup-project-hero-main {
    align-items: flex-start;
  }

  .setup-project-hero {
    flex-direction: column;
  }

  .setup-project-settings {
    grid-template-columns: 1fr;
  }

  .setup-project-identity-row {
    align-items: end;
  }
}

.sheet-header {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.setup-project-hero {
  align-items: flex-start;
  padding-bottom: 10px;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.setup-project-hero-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.setup-project-hero-avatar .project-avatar-trigger,
.setup-project-hero-avatar .project-avatar-preview {
  width: 56px;
  height: 56px;
}

.setup-project-hero-avatar .project-avatar-preview {
  font-size: 22px;
}

.setup-project-hero-copy {
  min-width: 0;
}

.setup-project-hero-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
}

.setup-project-title-link {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.setup-project-title-link:hover,
.setup-project-title-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.setup-project-hero-type {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.setup-project-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.setup-project-hero-stats span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.setup-project-hero-stats strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.setup-project-hero-stats small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.project-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-actions .secondary-action {
  width: auto;
}

.setup-project-gear-link {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.setup-project-gear-link:hover,
.setup-project-gear-link:focus-visible,
.setup-project-gear-link.is-active {
  color: var(--ink);
  background: var(--control);
}

.setup-project-gear-link svg {
  width: 19px;
  height: 19px;
}

.setup-project-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 0;
}

.setup-project-activity-link {
  color: color-mix(in srgb, var(--accent) 78%, var(--muted));
}

.setup-project-gear-panel {
  width: min(260px, calc(100vw - 44px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  background-color: var(--surface);
  box-shadow: var(--shadow);
}

.setup-project-gear-menu > summary {
  border: 0 !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.setup-project-gear-menu[open] > summary,
.setup-project-gear-menu > summary:hover,
.setup-project-gear-menu > summary:focus-visible {
  border-color: transparent;
  background: none;
  box-shadow: none;
}

.setup-project-gear-panel .project-actions {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.setup-project-gear-panel .project-actions .secondary-action,
.setup-project-delete-action {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
}

.setup-project-delete-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: color-mix(in srgb, var(--danger) 18%, var(--control));
  color: color-mix(in srgb, var(--danger) 88%, var(--ink));
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.setup-project-delete-action svg {
  width: 16px;
  height: 16px;
}

.setup-tools-panel {
  min-width: 0;
  display: grid;
  gap: 30px;
}

.setup-tool-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.setup-tool-block,
.setup-danger-zone {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.setup-danger-zone {
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  background: transparent;
}

.setup-transfer-section {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.setup-transfer-section > div:first-child {
  padding: 0;
}

.setup-transfer-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, auto);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 0;
}

.setup-transfer-row .setup-tool-head {
  align-items: center;
}

.setup-tool-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.setup-tool-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--control));
  color: var(--ink);
}

.setup-tool-icon svg {
  width: 17px;
  height: 17px;
}

.setup-tool-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0;
}

.setup-tool-head p {
  display: none;
}

.setup-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.setup-transfer-row .setup-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  justify-content: flex-end;
  min-width: min(100%, 575px);
}

.setup-transfer-row .tag-settings-export-form,
.setup-transfer-row .tag-settings-import-form {
  width: 100%;
}

.setup-transfer-row .tag-settings-import-form,
.setup-transfer-row .setup-tool-disabled {
  grid-column: 1 / -1;
}

.setup-transfer-row .secondary-action,
.setup-transfer-row .tag-settings-file {
  width: 100%;
  justify-content: center;
}

.setup-transfer-section > div:first-child .field-label,
.setup-danger-zone > div:first-child .field-label {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.setup-tools-panel .field-help,
.tag-settings-panel > div:first-child .field-help,
.tag-settings-panel > .field-help {
  display: none;
}

.setup-tool-disabled {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--control-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.setup-tool-disabled svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.setup-ready-rule-block {
  gap: 14px;
}

.setup-date-format-block {
  gap: 14px;
}

.setup-date-format-block > .setup-tool-head {
  grid-template-columns: minmax(0, 1fr);
}

.setup-date-format-block .source-ready-row strong,
.setup-date-format-block .source-ready-row small {
  white-space: nowrap;
  overflow-wrap: normal;
}

.setup-ready-rule-block > .setup-tool-head,
.setup-tags-section > .setup-tool-head {
  grid-template-columns: minmax(0, 1fr);
}

.setup-ready-rule-block > .setup-tool-head .setup-tool-icon {
  display: none;
}

.setup-tags-section {
  gap: 14px;
}

.source-ready-rule-form {
  display: grid;
  gap: 12px;
}

.source-ready-table {
  display: grid;
  gap: 4px;
}

.source-ready-row {
  position: relative;
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(156px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  cursor: pointer;
  transition: background 140ms ease;
}

.source-ready-row input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.source-ready-check {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 999px;
}

.source-ready-check::after {
  content: "";
  width: 7px;
  height: 4px;
  display: none;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-0.5px) rotate(-45deg);
}

.source-ready-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 840;
  overflow-wrap: anywhere;
}

.source-ready-row small {
  min-width: 0;
  position: relative;
  padding-left: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.source-ready-row small::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.source-ready-row:hover,
.source-ready-row:focus-within {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.source-ready-row:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 18%, var(--control));
}

.source-ready-row:has(input:checked) .source-ready-check {
  border-color: transparent;
  background: var(--accent);
}

.source-ready-row:has(input:checked) .source-ready-check::after {
  display: block;
}

.setup-ready-actions,
.setup-danger-actions {
  justify-content: flex-end;
}

.setup-danger-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  min-width: 0;
  justify-self: end;
}

.setup-danger-actions .secondary-action,
.setup-danger-actions .setup-project-delete-action {
  width: 100%;
  justify-content: center;
}

.no-settings-access-panel {
  padding: 22px 24px;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.no-settings-access-panel h3 {
  margin: 0;
  font-size: 15px;
}

.no-settings-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.no-settings-access-actions .secondary-action {
  width: auto;
  min-width: 148px;
}

.scenes-panel {
  margin: 24px;
  overflow: hidden;
}

.scenes-header,
.scenes-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.scenes-header h1 {
  margin: 2px 0;
  font-size: 22px;
}

.scenes-header-actions,
.scenes-filter {
  flex-wrap: wrap;
}

.scenes-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scenes-filter {
  justify-content: flex-start;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.scenes-filter input {
  width: min(420px, 100%);
}

.scenes-filter select {
  width: 180px;
}

.scenes-table-shell {
  overflow-x: auto;
}

.scenes-table {
  width: 100%;
  border-collapse: collapse;
}

.scenes-table th,
.scenes-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.scenes-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.scene-source-chip {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.scene-status-stack {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.scene-status-stack .pill {
  font-size: 10px;
}

.scene-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.scene-modal.is-open {
  display: flex;
}

.scene-modal-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #000 58%, transparent);
}

.scene-modal-panel {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.scene-delete-panel {
  width: min(680px, calc(100vw - 48px));
}

.scene-modal-header,
.scene-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scene-modal-header {
  margin-bottom: 12px;
}

.scene-modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.scene-modal-close {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}

.scene-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scene-modal-footer {
  position: sticky;
  bottom: -12px;
  margin: 14px -12px -12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.scene-delete-summary {
  display: grid;
  gap: 12px;
}

.scene-delete-target {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.scene-delete-target strong {
  color: var(--accent);
  font-size: 18px;
}

.danger-copy {
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.scene-impact-warnings {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
}

.scene-impact-warnings p {
  margin: 0;
}

.scene-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.scene-impact-grid div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.scene-impact-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.scene-impact-grid dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.scene-impact-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.scene-impact-list small {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control-muted);
  color: var(--ink);
  font-weight: 800;
}

.form-section {
  display: block;
  padding: 20px 24px 24px;
  border-bottom: 1px solid var(--line);
}

.setup-main-section {
  padding-top: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}

.form-section.setup-members-section {
  padding-top: 24px;
}

.setup-main-section .form-grid {
  gap: 0;
}

.setup-main-section .form-grid > .setup-main-card.span-2 {
  border-top: 0;
  margin-top: 34px;
  padding-top: 0;
}

.setup-main-section .form-grid > .setup-main-card.span-2:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 8px;
}

.form-section:last-child {
  border-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  min-width: 0;
}

.setup-main-card {
  position: relative;
  width: 100%;
  max-width: none;
  display: grid;
  gap: 12px;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.setup-members-card {
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
}

.setup-members-card .members-page,
.setup-members-card .members-card,
.setup-members-card .members-layout {
  min-width: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}

.setup-main-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 0;
}

.setup-main-card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 0;
}

.setup-main-card-head-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.setup-main-card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.setup-main-card-head-row > .setup-main-card-head-actions {
  display: inline-flex;
}

.member-add-icon-action {
  width: 40px;
  min-width: 40px;
  min-height: 36px;
  padding: 0;
  gap: 2px;
}

.member-add-icon-action svg {
  width: 17px;
  height: 17px;
}

.setup-info-button {
  -webkit-appearance: none;
  appearance: none;
  position: static;
  z-index: 5;
  width: 24px;
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--muted);
  cursor: pointer;
  box-shadow: none !important;
  outline: 0;
  transition: color 140ms ease;
}

.setup-info-button:hover,
.setup-info-button:focus-visible,
.setup-info-button[aria-expanded="true"] {
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--ink);
  box-shadow: none !important;
  outline: 0;
}

.setup-info-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.setup-info-popover {
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 110;
  width: min(460px, calc(100vw - 56px));
  max-height: min(70vh, 640px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, #050810);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.setup-info-popover[hidden] {
  display: none;
}

.setup-info-popover.is-floating {
  position: fixed;
  top: var(--setup-info-popover-top, 38px);
  right: auto;
  left: var(--setup-info-popover-left, 0);
  z-index: 200000;
  max-height: min(var(--setup-info-popover-max-height, 70vh), calc(100vh - 16px));
}

.setup-info-popover-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.setup-info-popover-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.setup-info-popover-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  color: var(--accent);
}

.setup-info-popover-icon svg,
.setup-info-popover-icon .cutkit-anchor-icon {
  width: 16px;
  height: 16px;
}

.setup-info-popover p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.setup-info-popover ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-info-popover li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.setup-info-popover li::before {
  content: "";
  width: 4px;
  height: 4px;
  min-width: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.setup-info-section {
  display: grid;
  gap: 7px;
}

.setup-info-section > strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.setup-info-note {
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 58%, transparent);
}

.setup-info-popover li:has(.setup-info-dot)::before,
.setup-info-popover li:has(.setup-info-day-chip)::before {
  display: none;
}

.setup-info-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--muted);
}

.setup-info-dot.is-shooting {
  background: #2f6f3f;
}

.setup-info-dot.is-selected {
  background: var(--accent);
}

.setup-info-day-chip {
  width: 26px;
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.setup-info-day-chip.is-shooting {
  background: #2f6f3f;
  color: #fff;
}

.setup-info-day-chip.is-planned {
  background: var(--accent);
  color: #fff;
}

.setup-info-day-chip.is-today {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #fff 86%, var(--ink));
}

.setup-info-project-demo,
.setup-info-structure-demo,
.setup-info-members-demo,
.setup-info-calendar-demo,
.setup-info-file-demo,
.setup-info-code-demo,
.setup-info-anchor-demo {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.setup-info-project-demo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.setup-info-project-demo span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.setup-info-project-demo svg {
  width: 14px;
  height: 14px;
}

.setup-info-project-demo span:first-child {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.setup-info-calendar-demo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
}

.setup-info-calendar-demo span,
.setup-info-calendar-demo b {
  min-height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.setup-info-calendar-demo b {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--ink);
}

.setup-info-calendar-demo b.is-shooting {
  background: #2f6f3f;
}

.setup-info-calendar-demo b.is-selected {
  background: var(--accent);
}

.setup-info-structure-demo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
}

.setup-info-structure-demo span {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.setup-info-structure-demo svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.setup-info-file-demo,
.setup-info-code-demo,
.setup-info-anchor-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px;
}

.setup-info-file-demo span,
.setup-info-code-demo span,
.setup-info-anchor-demo span:not(.cutkit-anchor-icon) {
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.setup-info-file-demo span {
  color: var(--accent);
}

.setup-info-anchor-demo .cutkit-anchor-icon {
  width: 18px;
  height: 18px;
  background: var(--accent);
}

.setup-info-members-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.setup-info-members-demo span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.setup-info-members-demo svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.setup-info-ghost-icon {
  width: 13px;
  height: 13px;
  display: inline-block;
  background: var(--ink);
  -webkit-mask: url("/static/tracker/icons/virtual-participant-ghost.svg") center / contain no-repeat;
  mask: url("/static/tracker/icons/virtual-participant-ghost.svg") center / contain no-repeat;
}

.setup-main-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0;
}

.setup-main-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.setup-project-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.setup-project-identity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.setup-project-name-field {
  flex: 0 1 var(--setup-main-control-width);
  width: var(--setup-main-control-width);
  min-width: min(100%, 260px);
}

.setup-project-type-field {
  flex: 0 1 var(--setup-side-control-width);
  min-width: min(100%, 220px);
}

.setup-project-settings .setup-project-type-field {
  max-width: none;
}

.setup-project-name-field input {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.project-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 10px;
  max-width: 540px;
}

.project-type-card {
  margin: 0;
  cursor: pointer;
}

.project-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.project-type-card-body {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control);
  color: var(--muted);
  padding: 12px 14px;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.project-type-card-body i {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--muted);
  stroke-width: 1.8;
}

.project-type-card-body strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.project-type-card-body small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.project-type-card input:checked + .project-type-card-body {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--control));
  color: var(--ink);
}

.project-type-card input:checked + .project-type-card-body i {
  color: var(--accent);
}

.project-type-card input:focus-visible + .project-type-card-body {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.setup-project-type-field {
  max-width: none;
}

.setup-project-type-compact {
  width: 100%;
  height: 42px;
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  box-sizing: border-box;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 78%, var(--panel));
  overflow: hidden;
}

.setup-project-type-compact .project-type-card-body {
  min-height: 36px;
  justify-content: center;
  gap: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: center;
  transition: background 0.16s ease, color 0.16s ease;
}

.setup-project-type-compact .project-type-card + .project-type-card {
  position: relative;
}

.setup-project-type-compact .project-type-card + .project-type-card::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -1px;
  width: 1px;
  background: color-mix(in srgb, var(--line-strong) 64%, transparent);
  pointer-events: none;
}

.setup-project-type-compact .project-type-card-body strong {
  color: inherit;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.setup-project-type-compact .project-type-card input:checked + .project-type-card-body {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 78%, var(--control));
  color: #fff;
}

.setup-project-type-compact .project-type-card:has(input:checked)::before,
.setup-project-type-compact .project-type-card:has(input:checked) + .project-type-card::before {
  opacity: 0;
}

.setup-action-segmented {
  flex: 0 1 var(--setup-side-control-width);
  width: var(--setup-side-control-width);
  max-width: 100%;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  box-sizing: border-box;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 78%, var(--panel));
  overflow: hidden;
}

.setup-action-segmented .setup-action-segment {
  position: relative;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 6px;
  box-sizing: border-box;
  background: transparent;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease, filter 0.16s ease;
}

.setup-action-segmented .setup-action-segment + .setup-action-segment::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -1px;
  width: 1px;
  background: color-mix(in srgb, var(--line-strong) 64%, transparent);
  pointer-events: none;
}

.setup-action-segmented .shooting-plan-file-button:hover,
.setup-action-segmented .shooting-plan-file-button.is-drag-over {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.setup-action-segmented .shooting-plan-parse-action {
  background: color-mix(in srgb, var(--accent) 78%, var(--control));
  color: #fff;
}

.setup-action-segmented .shooting-plan-parse-action::before {
  opacity: 0;
}

.setup-action-segmented .shooting-plan-parse-action:hover {
  filter: brightness(1.08);
}

.setup-action-segmented .shooting-plan-file-button:focus-within,
.setup-action-segmented .shooting-plan-parse-action:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.project-structure-control.is-processing .setup-action-segmented .project-structure-add-action {
  min-width: 0;
}

.setup-number-field {
  max-width: 260px;
}

.setup-number-control {
  max-width: 118px;
}

.setup-number-control input {
  height: 44px;
  text-align: center;
  font-size: 19px;
  font-weight: 760;
  padding-inline: 8px;
}

.setup-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.setup-overview-card {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.setup-overview-card:hover,
.setup-overview-card:focus-visible {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--control) 72%, var(--surface-2));
}

.setup-overview-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.setup-overview-card-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 860;
  letter-spacing: 0;
}

.setup-overview-card-head small,
.setup-overview-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.setup-overview-card-head i {
  width: 24px;
  height: 24px;
  color: var(--muted);
  stroke-width: 1.8;
}

.setup-overview-calendar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.setup-overview-month {
  flex: 0 0 150px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.setup-overview-month-title {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.setup-overview-weekdays,
.setup-overview-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.setup-overview-weekdays span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  text-align: center;
}

.setup-overview-day {
  min-height: 18px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.setup-overview-day.is-outside {
  opacity: 0.22;
}

.setup-overview-day.is-shooting {
  background: color-mix(in srgb, var(--accent) 72%, #fff 8%);
  color: #fff;
}

.setup-overview-day.is-status-received {
  background: var(--marker-orange);
}

.setup-overview-day.is-status-ready {
  background: var(--marker-green);
}

.setup-overview-day.is-status-mounted {
  background: color-mix(in srgb, var(--marker-green) 72%, #6fd48a);
}

.setup-overview-day.is-today {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #fff 86%, var(--ink));
}

.span-2 {
  grid-column: span 2;
}

label {
  display: block;
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

input,
select,
textarea,
button {
  font: inherit;
  letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.45;
}

input[type="file"] {
  padding: 7px 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.setup-sheet input[type="text"]:focus,
.setup-sheet input[type="email"]:focus,
.setup-sheet input[type="number"]:focus,
.setup-sheet input[type="password"]:focus,
.setup-sheet textarea:focus {
  border-color: var(--line-strong);
  box-shadow: none;
}

.segmented-control ul,
.segmented-control > div {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.segmented-control.compact ul,
.segmented-control.compact > div {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented-control li,
.segmented-control > div > div {
  min-width: 0;
}

.segmented-control label {
  min-height: 38px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  text-align: center;
  cursor: pointer;
}

.segmented-control input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.switch-label {
  min-height: 38px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control);
  padding: 8px 10px;
  cursor: pointer;
}

.switch-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.ingest-required-field {
  align-self: end;
}

.checklist-grid > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.checklist-grid label {
  min-height: 38px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.checklist-grid input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.source-column-add-trigger {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--control);
  color: var(--muted-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.source-column-add-trigger:hover,
.source-column-add-trigger:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.source-column-add-trigger i {
  width: 15px;
  height: 15px;
}

.source-column-add-popover {
  --source-icon-preview-color: var(--muted-ink);
  position: fixed;
  z-index: 1400;
  top: 12px;
  left: 12px;
  width: min(500px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.source-column-add-popover[hidden] {
  display: none;
}

.source-column-icon-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
}

.source-icon-option {
  position: relative;
  border: 1px solid transparent;
  border-radius: 5px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: color-mix(in srgb, var(--control) 82%, transparent);
}

.source-icon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-icon-option i {
  width: 8px;
  height: 8px;
  color: var(--source-icon-preview-color);
  opacity: 0.42;
}

.source-icon-option i,
.source-icon-option svg {
  stroke-width: 1.35;
  color: var(--source-icon-preview-color);
  opacity: 0.42;
}

.source-icon-option input:checked + i {
  opacity: 1;
}

.source-icon-option:has(input:checked) svg {
  opacity: 1;
}

.source-icon-option:hover i,
.source-icon-option:hover svg {
  opacity: 0.72;
}

.source-icon-button {
  min-height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 62%, transparent);
  cursor: pointer;
  opacity: 0.68;
}

.source-icon-button svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.45;
}

.source-icon-button:hover,
.source-icon-button:focus-visible,
.source-icon-button.is-selected {
  color: var(--ink);
  opacity: 1;
  outline: none;
}

.source-column-edit-popover {
  width: min(520px, calc(100vw - 24px));
}

.source-column-edit-title {
  display: grid;
  gap: 3px;
  color: var(--muted-ink);
  font-size: 12px;
  line-height: 1.35;
}

.source-column-edit-title strong {
  color: var(--ink);
  font-size: 13px;
}

.source-token-active-chip {
  justify-self: start;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 9px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.source-token-active-chip.is-inactive {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 74%, transparent);
  color: var(--muted);
}

.source-column-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.source-column-edit-footer .primary-action {
  min-height: 30px;
  padding: 6px 11px;
}

.source-token-delete-action {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
  border-color: color-mix(in srgb, #ef4444 55%, var(--line-strong));
}

.source-token-delete-action svg {
  width: 14px;
  height: 14px;
}

.source-column-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-color-option {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  cursor: pointer;
}

.source-color-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-color-option span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--swatch-color);
  border: 1px solid color-mix(in srgb, #ffffff 24%, var(--line-strong));
}

.source-color-option:has(input:checked) span {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 58%, transparent);
}

.source-color-button {
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, #ffffff 24%, var(--line-strong));
  border-radius: 999px;
  background: var(--swatch-color);
  cursor: pointer;
}

.source-color-button.is-selected,
.source-color-button:hover,
.source-color-button:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 48%, transparent);
  outline: none;
}

.source-column-add-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-column-add-actions--end {
  justify-content: flex-end;
}

.source-column-add-actions--end .primary-action {
  min-height: 30px;
  padding: 6px 11px;
}

.ghost-action {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--muted-ink);
  padding: 7px 12px;
  cursor: pointer;
}

.source-order-board {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.source-order-token {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--control);
  color: var(--muted-ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: grab;
  user-select: none;
  max-width: 100%;
}

.source-order-token-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-order-token i,
.source-order-token svg {
  width: 11px;
  height: 11px;
  color: var(--muted);
  flex: 0 0 auto;
}

.source-order-token-label {
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
}

.source-order-token:not(.is-disabled) {
  background: color-mix(in srgb, var(--accent) 20%, var(--control));
  border-color: transparent;
  color: var(--ink);
}

.source-order-token:not(.is-disabled) i,
.source-order-token:not(.is-disabled) svg {
  color: color-mix(in srgb, var(--ink) 86%, var(--accent));
}

.source-order-token.is-disabled {
  background: color-mix(in srgb, var(--surface) 62%, var(--control));
  border-color: var(--line-strong);
  color: var(--muted);
}

.source-order-token.is-custom {
  border-style: dashed;
}

.source-order-add {
  display: inline-flex;
  align-items: center;
}

.source-order-token.is-dragging {
  opacity: 0.62;
}

.source-order-token.is-drop-target {
  border-color: var(--accent);
}

.custom-fields-panel {
  display: grid;
  gap: 16px;
}

.custom-field-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.custom-field-form .form-grid {
  align-items: end;
}

.checkbox-field,
.submit-field {
  align-self: end;
}

.custom-field-list {
  display: grid;
  gap: 8px;
}

.custom-field-row {
  min-height: 46px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
}

.custom-field-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.custom-field-row small,
.custom-field-row > span {
  color: var(--muted);
  font-size: 12px;
}

.setup-placeholder-panel,
.tag-settings-panel,
.edit-workflow-settings-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.setup-placeholder-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.setup-placeholder-panel h3 {
  margin: 0;
  font-size: 17px;
}

.tag-settings-table {
  min-width: 0;
  display: grid;
  gap: 4px;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.tag-settings-table-form {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.edit-workflow-settings-table {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.edit-workflow-settings-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(126px, 0.8fr) minmax(78px, 0.44fr) repeat(2, minmax(54px, 0.3fr)) 64px;
  gap: 0;
  align-items: center;
  min-height: 48px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.edit-workflow-settings-row:first-child {
  border-top: 0;
}

.edit-workflow-settings-row.is-header {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.edit-workflow-settings-row > span,
.edit-workflow-settings-row > label {
  min-height: 34px;
  padding-inline: 8px;
}

.edit-workflow-settings-row > .edit-workflow-icon-head,
.edit-workflow-settings-row > .edit-workflow-rough-cell,
.edit-workflow-settings-row > .edit-workflow-permission-cell,
.edit-workflow-settings-row > .edit-workflow-actions {
  border-left: 1px solid color-mix(in srgb, var(--line) 82%, transparent 18%);
}

.edit-workflow-icon-head {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
  line-height: 1.05;
}

.edit-workflow-icon-head svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.3;
}

.edit-workflow-icon-head small {
  max-width: 100%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  overflow: visible;
  white-space: normal;
}

.edit-workflow-icon-head.is-wide small {
  white-space: normal;
}

.edit-workflow-icon-head[data-workflow-help]::after {
  content: attr(data-workflow-help);
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  z-index: 40;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease 260ms, transform 140ms ease 260ms;
}

.edit-workflow-icon-head[data-workflow-help]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  z-index: 41;
  width: 8px;
  height: 8px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px) rotate(45deg);
  transition: opacity 140ms ease 260ms, transform 140ms ease 260ms;
}

.edit-workflow-icon-head[data-workflow-help]:hover::after,
.edit-workflow-icon-head[data-workflow-help]:hover::before,
.edit-workflow-icon-head[data-workflow-help]:focus-visible::after,
.edit-workflow-icon-head[data-workflow-help]:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.edit-workflow-user-cell,
.edit-workflow-quick-cell {
  display: inline-flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.edit-workflow-user-cell .member-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  flex-basis: 34px;
  border-radius: 9px;
  font-size: 13px;
}

.edit-workflow-user-cell .member-avatar img {
  border-radius: 9px;
}

.edit-workflow-user-cell .member-avatar svg {
  width: 18px;
  height: 18px;
}

.edit-workflow-user-cell small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-workflow-user-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-workflow-permission-cell {
  display: grid;
  place-items: center;
  min-width: 0;
}

.edit-workflow-permission-cell input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.edit-workflow-rough-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.edit-workflow-rough-cell {
  gap: 6px;
  min-width: 0;
}

.edit-workflow-rough-toggle {
  flex: 0 0 auto;
}

.edit-workflow-color-menu {
  position: relative;
  flex: 0 0 auto;
}

.edit-workflow-color-menu > summary {
  width: 28px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  cursor: pointer;
  list-style: none;
}

.edit-workflow-color-menu > summary::-webkit-details-marker {
  display: none;
}

.edit-workflow-color-menu > summary svg {
  width: 10px;
  height: 10px;
  color: var(--muted);
}

.edit-workflow-color-current {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--edit-workflow-dot-color, #4f7cff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--edit-workflow-dot-color, #4f7cff) 55%, var(--line));
}

.edit-workflow-color-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 130;
  display: grid;
  grid-template-columns: repeat(4, 20px);
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.edit-workflow-color-choice {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.edit-workflow-color-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.edit-workflow-color-choice span {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--edit-workflow-dot-color, #4f7cff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--edit-workflow-dot-color, #4f7cff) 40%, var(--line));
}

.edit-workflow-color-choice:has(input:checked) span {
  box-shadow:
    0 0 0 2px var(--surface-2),
    0 0 0 4px color-mix(in srgb, var(--edit-workflow-dot-color, #4f7cff) 78%, var(--accent));
}

.edit-workflow-actions {
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
}

.edit-workflow-add-form {
  display: inline-flex;
  position: relative;
  gap: 8px;
  align-items: center;
  justify-self: start;
}

.edit-workflow-add-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--accent);
}

.edit-workflow-select {
  position: relative;
  min-width: 0;
}

.edit-workflow-add-form .edit-workflow-select {
  width: min(360px, 72vw);
}

.edit-workflow-select-trigger {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.edit-workflow-select-trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted);
}

.edit-workflow-select-trigger [data-edit-workflow-select-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-workflow-role-select .edit-workflow-select-trigger {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.edit-workflow-role-select .edit-workflow-select-trigger svg {
  width: 14px;
  height: 14px;
}

.edit-workflow-select-menu {
  position: absolute;
  z-index: 120;
  left: 0;
  top: calc(100% + 6px);
  width: min(max(100%, 220px), 92vw);
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.edit-workflow-role-select .edit-workflow-select-menu {
  width: min(max(100%, 168px), 100%);
}

.edit-workflow-select-menu[hidden] {
  display: none;
}

.edit-workflow-select-menu button {
  width: 100%;
  min-height: 34px;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.edit-workflow-select-menu .edit-workflow-member-option {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 46px;
}

.edit-workflow-option-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex-basis: 30px;
  border-radius: 9px;
  font-size: 12px;
}

.edit-workflow-option-avatar img {
  border-radius: 9px;
}

.edit-workflow-option-avatar svg {
  width: 16px;
  height: 16px;
}

.edit-workflow-option-copy {
  min-width: 0;
}

.edit-workflow-option-copy > span,
.edit-workflow-option-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-workflow-select-menu button:hover,
.edit-workflow-select-menu button.is-selected {
  background: var(--surface-3);
}

.edit-workflow-select-menu small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.tag-settings-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.3fr) minmax(220px, 0.9fr) 32px;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  padding: 5px 8px;
  border-top: 0;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  transition: background 140ms ease;
}

.tag-settings-row:first-child {
  border-top: 0;
}

.tag-settings-row.is-header {
  min-height: 34px;
  padding-block: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 880;
  text-transform: uppercase;
}

.tag-settings-row:not(.is-header):hover,
.tag-settings-row:not(.is-header):focus-within {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.tag-settings-row.is-inactive {
  opacity: 0.54;
}

.tag-settings-row-new {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}

.tag-settings-input-cell {
  margin: 0;
}

.tag-settings-input-cell input {
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.tag-settings-input-cell input:focus {
  background: color-mix(in srgb, var(--control-muted) 72%, transparent);
  box-shadow: none;
}

.tag-task-type-cell {
  position: relative;
  min-width: 0;
}

.tag-task-type-trigger {
  width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.tag-task-type-trigger:hover,
.tag-task-type-trigger:focus-visible,
.tag-task-type-cell.is-open .tag-task-type-trigger {
  background: color-mix(in srgb, var(--control-muted) 72%, transparent);
}

.tag-task-type-trigger-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tag-task-type-trigger-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-task-type-trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--muted);
}

.tag-task-type-trigger.has-type-color [data-tag-task-type-icon] {
  color: var(--task-type-color);
}

.tag-task-type-menu {
  position: absolute;
  z-index: 150;
  left: 0;
  top: calc(100% + 6px);
  width: min(max(100%, 300px), 82vw);
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  box-shadow: var(--shadow-lg);
}

.tag-task-type-menu[hidden] {
  display: none;
}

.tag-task-type-menu button {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  text-align: left;
}

.tag-task-type-menu button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.tag-task-type-menu button.has-type-color svg {
  color: var(--task-type-color);
}

.tag-task-type-menu button:hover,
.tag-task-type-menu button:focus-visible,
.tag-task-type-menu button.is-selected {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.tag-task-type-menu .tag-task-type-group {
  margin-top: 4px;
  background: color-mix(in srgb, var(--task-type-color, var(--accent)) 11%, transparent);
}

.tag-task-type-menu .is-add {
  margin-top: 5px;
  color: var(--accent);
}

.tag-task-custom-type-panel {
  position: absolute;
  z-index: 155;
  left: 0;
  top: calc(100% + 6px);
  width: min(520px, 82vw);
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(140px, 0.8fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  box-shadow: var(--shadow-lg);
}

.tag-task-custom-type-panel[hidden] {
  display: none;
}

.tag-task-custom-type-panel label,
.tag-task-custom-type-color,
.tag-task-custom-type-icon {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tag-task-custom-type-panel label > span,
.tag-task-custom-type-color > span,
.tag-task-custom-type-icon > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.tag-task-custom-type-panel input,
.tag-task-custom-type-panel select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.tag-task-custom-type-color,
.tag-task-custom-type-icon {
  grid-column: span 2;
}

.tag-task-custom-type-color.is-disabled,
.tag-task-custom-type-icon.is-disabled {
  opacity: 0.45;
}

.tag-task-custom-type-color > div,
.tag-task-custom-type-icon > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-task-custom-type-color button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--task-type-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--task-type-color) 40%, var(--line));
}

.tag-task-custom-type-color button.is-selected {
  box-shadow:
    0 0 0 2px var(--surface-2),
    0 0 0 4px color-mix(in srgb, var(--task-type-color) 78%, var(--accent));
}

.tag-task-custom-type-icon button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.tag-task-custom-type-icon button.is-selected {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}

.tag-task-custom-type-icon svg {
  width: 16px;
  height: 16px;
}

.tag-task-custom-type-close {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.tag-task-custom-type-close:hover,
.tag-task-custom-type-close:focus-visible {
  color: var(--danger);
}

.tag-active-head {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  position: relative;
  color: var(--muted);
  justify-self: center;
  outline: none;
}

.tag-active-head svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.tag-active-head-tooltip {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 92%, var(--accent));
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tag-active-head:hover .tag-active-head-tooltip,
.tag-active-head:focus-visible .tag-active-head-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tag-active-control {
  width: 24px;
  height: 24px;
  margin: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.tag-active-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-active-control span {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  background: transparent;
  position: relative;
}

.tag-active-control span::after {
  content: "";
  width: 7px;
  height: 4px;
  display: none;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-0.5px) rotate(-45deg);
}

.tag-active-control input:checked + span {
  border-color: transparent;
  background: var(--accent);
}

.tag-active-control input:checked + span::after {
  display: block;
}

.tag-settings-delete {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  color: var(--muted);
  box-shadow: none !important;
  transition: color 140ms ease;
}

.tag-settings-delete svg {
  width: 16px;
  height: 16px;
}

.tag-settings-delete:hover,
.tag-settings-delete:focus-visible {
  color: var(--danger);
  background: transparent !important;
  box-shadow: none !important;
}

.tag-settings-actions,
.tag-settings-reset-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-settings-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.tag-settings-divider {
  display: none;
}

.tag-settings-add-row {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  box-shadow: none;
  transition: background 140ms ease, color 140ms ease;
}

.tag-settings-add-row svg {
  width: 17px;
  height: 17px;
}

.tag-settings-add-row:hover,
.tag-settings-add-row:focus-visible {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
}

.tag-settings-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.tag-settings-utility-group {
  flex: 0 1 430px;
  min-width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
  background: var(--control);
}

.tag-settings-utility-form {
  min-width: 0;
  margin: 0;
}

.tag-settings-utility-form + .tag-settings-utility-form {
  border-left: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
}

.tag-settings-segment,
.tag-settings-utility-group .tag-settings-file {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
  transition: background 140ms ease, color 140ms ease;
}

.tag-settings-segment svg,
.tag-settings-utility-group .tag-settings-file svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.25;
}

.tag-settings-segment:hover,
.tag-settings-segment:focus-visible,
.tag-settings-utility-group .tag-settings-file:hover,
.tag-settings-utility-group .tag-settings-file:focus-within {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
  outline: none;
}

.tag-settings-save-action {
  min-width: 168px;
  justify-content: center;
}

.tag-settings-transfer {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(260px, 1.2fr);
  gap: 10px;
  align-items: stretch;
}

.tag-settings-export-form,
.tag-settings-import-form {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tag-settings-import-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tag-settings-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  background: var(--control);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.tag-settings-export-form .secondary-action,
.tag-settings-import-form .secondary-action {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.tag-settings-file input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.icon-danger {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--danger-line);
  border-radius: 7px;
  background: var(--danger-bg);
  color: var(--danger);
  cursor: pointer;
}

.icon-danger svg {
  width: 15px;
  height: 15px;
}

.tag-settings-delete.icon-danger {
  border: 0 !important;
  background: transparent !important;
  color: var(--muted);
  box-shadow: none !important;
}

.tag-settings-delete.icon-danger:hover,
.tag-settings-delete.icon-danger:focus-visible {
  color: var(--danger);
}

.file-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--control);
  padding: 5px;
}

.file-control span,
.file-control small,
.field-help {
  color: var(--muted);
  font-size: 12px;
}

.file-control input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-button {
  min-height: 28px;
  margin: 0;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--dark-button);
  color: var(--dark-button-ink);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.file-control [data-file-name] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shooting-plan-control {
  display: grid;
  gap: 12px;
}

.shooting-plan-composer,
.project-structure-composer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: start;
}

.shooting-plan-storage {
  display: none;
}

.shooting-plan-composer textarea,
.shooting-plan-source-input,
.project-structure-source-input {
  flex: 0 1 var(--setup-main-control-width);
  width: var(--setup-main-control-width);
  max-width: 100%;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  resize: vertical;
  background: var(--control);
}

.shooting-plan-file-button {
  flex: 0 0 var(--setup-action-width);
  width: var(--setup-action-width);
  min-width: var(--setup-action-width);
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.shooting-plan-file-button:hover,
.shooting-plan-file-button.is-drag-over {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong));
}

.shooting-plan-file-button input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shooting-plan-parse-action {
  flex: 0 0 var(--setup-action-width);
  width: var(--setup-action-width);
  min-width: var(--setup-action-width);
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 78%, var(--control));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 78%, var(--control));
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  transition: filter 140ms ease, background 140ms ease;
}

.shooting-plan-parse-action:hover {
  filter: brightness(1.08);
}

.project-structure-control {
  display: grid;
  gap: 12px;
}

.project-structure-processing-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, #04070d 68%, transparent);
  backdrop-filter: blur(6px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 120ms ease,
    visibility 0s linear 120ms;
}

.project-structure-processing-active .project-structure-processing-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 120ms ease,
    visibility 0s linear 0s;
}

.project-structure-processing-dialog {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 16px 17px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, #0d1320), color-mix(in srgb, var(--surface) 88%, #060912));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: translateY(8px) scale(0.985);
  transition: transform 140ms ease;
}

.project-structure-processing-active .project-structure-processing-dialog {
  transform: translateY(0) scale(1);
}

.project-structure-control.is-processing .project-structure-file-button {
  pointer-events: none;
  opacity: 0.72;
}

.project-structure-control.is-processing .project-structure-add-action {
  min-width: 102px;
}

.project-structure-processing-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-structure-processing-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 860;
  line-height: 1.25;
}

.project-structure-processing-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.project-structure-processing-bar {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--line));
  overflow: hidden;
}

.project-structure-processing-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 82%, #ffffff 18%), var(--accent));
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: width 700ms ease;
}

.project-structure-processing-overlay.is-final-stage .project-structure-processing-bar span {
  animation: projectStructureProcessingPulse 1.8s ease-in-out infinite;
}

@keyframes projectStructureProcessingPulse {
  0% {
    opacity: 0.82;
    filter: saturate(0.96);
  }
  100% {
    opacity: 1;
    filter: saturate(1.16);
  }
}

.project-structure-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 2px;
}

.project-structure-breakdown {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.project-structure-breakdown-head {
  display: grid;
  gap: 3px;
}

.project-structure-breakdown-toggle {
  width: 100%;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
  opacity: 0.78;
  transition: color 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.project-structure-breakdown-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.15;
  transform: rotate(180deg);
  transition: transform 120ms ease;
}

.project-structure-breakdown.is-collapsed .project-structure-breakdown-toggle svg {
  transform: rotate(0deg);
}

.project-structure-breakdown-toggle:hover,
.project-structure-breakdown-toggle:focus-visible {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.project-structure-breakdown-toggle:active {
  transform: translateY(1px);
}

.project-structure-breakdown.is-collapsed {
  gap: 0;
}

.project-structure-breakdown-panel {
  display: grid;
  gap: 18px;
}

.project-structure-breakdown-panel[hidden] {
  display: none !important;
}

.project-structure-breakdown-section {
  display: grid;
  gap: 4px;
}

.project-structure-episode-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-structure-episode-tile {
  width: 116px;
  min-height: 58px;
  padding: 9px 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--control));
  color: var(--ink);
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 120ms ease;
}

a.project-structure-episode-tile:hover,
a.project-structure-episode-tile:focus-visible {
  background: color-mix(in srgb, var(--accent) 17%, var(--control));
  color: #fff;
  outline: none;
}

a.project-structure-episode-tile:active {
  transform: translateY(1px);
}

.project-structure-episode-tile strong {
  color: inherit;
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.project-structure-episode-tile small {
  color: color-mix(in srgb, currentColor 68%, var(--muted));
  font-size: 11px;
  font-weight: 680;
  line-height: 1.1;
}

.scene-import-format-block {
  display: grid;
  gap: 10px;
  --scene-format-episode-color: var(--accent);
  --scene-format-scene-color: color-mix(in srgb, var(--marker-green) 72%, #7ee0b4);
}

.scene-import-format-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.scene-format-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.scene-format-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.scene-format-legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.scene-format-episode {
  color: var(--scene-format-episode-color);
}

.scene-format-scene {
  color: var(--scene-format-scene-color);
}

.scene-import-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 6px;
}

.scene-import-format-option {
  position: relative;
  min-width: 0;
  display: block;
  cursor: pointer;
}

.scene-import-format-option[hidden] {
  display: none !important;
}

.scene-import-format-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scene-import-format-card {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.scene-import-format-option:hover .scene-import-format-card {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--control));
}

.scene-import-format-option input:checked + .scene-import-format-card {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--control));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent);
}

.scene-import-format-sample {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  min-height: 20px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.scene-import-format-sample .is-episode {
  color: var(--scene-format-episode-color);
}

.scene-import-format-sample .is-scene {
  color: var(--scene-format-scene-color);
}

.scene-import-format-sample .is-separator,
.scene-import-format-sample .is-neutral {
  color: var(--muted);
}

.scene-import-format-caption {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.scene-import-format-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.scene-import-format-description {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.scene-import-format-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(320px, 72vw);
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: #f7f9fc;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

:root[data-theme="dark"] .scene-import-format-tooltip {
  background: #121823;
}

.scene-import-format-option.is-tooltip-left .scene-import-format-tooltip {
  left: auto;
  right: 0;
}

.scene-import-format-option.is-tooltip-right .scene-import-format-tooltip {
  left: 0;
  right: auto;
}

.scene-import-format-option:hover .scene-import-format-tooltip,
.scene-import-format-option:focus-within .scene-import-format-tooltip {
  display: grid;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scene-import-format-tooltip-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.scene-import-format-tooltip-body {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.scene-import-format-tooltip-examples-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.scene-import-format-tooltip-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.scene-import-format-tooltip-examples span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--control) 82%, transparent);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.project-structure-episode-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.project-structure-episode-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr) minmax(140px, auto);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.project-structure-episode-row:first-child {
  border-top: 0;
}

.project-structure-episode-row.is-head {
  min-height: 34px;
  background: color-mix(in srgb, var(--surface-2) 75%, transparent);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.project-structure-episode-row strong {
  display: block;
  color: var(--ink);
  font-weight: 850;
}

.project-structure-episode-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.muted-dash {
  color: var(--muted);
}

.shooting-plan-calendar-tools {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 30;
  display: none;
  justify-content: flex-end;
  min-height: 0;
}

.shooting-plan-control.has-calendar .shooting-plan-calendar-tools {
  display: flex;
}

.shooting-calendar-settings {
  position: relative;
}

.shooting-calendar-settings summary {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.shooting-calendar-settings summary::-webkit-details-marker {
  display: none;
}

.shooting-calendar-settings summary:hover,
.shooting-calendar-settings summary:focus-visible,
.shooting-calendar-settings[open] summary {
  background: color-mix(in srgb, var(--control) 72%, transparent);
  color: var(--ink);
  outline: none;
}

.shooting-calendar-settings summary svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.35;
}

.shooting-calendar-settings-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: 178px;
  padding: 9px;
  display: grid;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, #050810);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.shooting-calendar-week-start {
  height: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 2px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 78%, var(--panel));
}

.shooting-calendar-week-start label {
  margin: 0;
  min-width: 0;
  cursor: pointer;
}

.shooting-calendar-week-start input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shooting-calendar-week-start span {
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.shooting-calendar-week-start input:checked + span {
  background: color-mix(in srgb, var(--accent) 78%, var(--control));
  color: #fff;
}

.shooting-plan-calendar-preview {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  gap: 10px;
  align-items: start;
}

.shooting-plan-month {
  width: 220px;
  height: 224px;
  box-sizing: border-box;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--control));
  padding: 10px;
}

.shooting-plan-month-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shooting-plan-weekdays,
.shooting-plan-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.shooting-plan-days {
  grid-template-rows: repeat(6, 24px);
}

.shooting-plan-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-align: center;
}

.shooting-plan-day,
.shooting-plan-empty {
  min-height: 24px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 24px;
  text-align: center;
}

.shooting-plan-day {
  cursor: pointer;
}

.shooting-plan-day:not(.is-shooting):hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--ink);
}

.shooting-plan-day.is-shooting {
  background: color-mix(in srgb, var(--accent) 78%, #ffffff 8%);
  color: #fff;
  cursor: grab;
}

.shooting-plan-day.is-status-received {
  background: var(--marker-orange);
}

.shooting-plan-day.is-status-ready {
  background: var(--marker-green);
}

.shooting-plan-day.is-status-mounted {
  background: color-mix(in srgb, var(--marker-green) 72%, #6fd48a);
}

.shooting-plan-day.is-today {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #fff 86%, var(--ink));
}

.shooting-plan-day.is-drop-target {
  outline: 2px solid color-mix(in srgb, var(--accent) 78%, #fff);
  outline-offset: 2px;
}

.shooting-plan-date-popover {
  position: fixed;
  z-index: 1200;
  display: none;
  width: 230px;
  padding: 10px;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.shooting-plan-date-popover.is-open {
  display: grid;
}

.shooting-plan-date-popover strong {
  font-size: 12px;
  font-weight: 800;
}

.shooting-plan-date-popover span,
.shooting-plan-date-popover small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.shooting-plan-date-popover button {
  min-height: 30px;
  margin-top: 4px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line-strong));
  border-radius: 7px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
}

.shooting-plan-date-popover button:hover {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
}

.shooting-plan-date-popover button.is-primary {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line-strong));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.shooting-plan-date-popover button.is-primary:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

@media (max-width: 720px) {
  .shooting-plan-composer {
    display: flex;
  }

  .project-structure-composer {
    display: flex;
  }

  .project-structure-processing-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-structure-processing-spinner {
    justify-self: start;
  }

  .project-structure-settings-grid {
    grid-template-columns: 1fr;
  }

  .scene-import-format-head {
    align-items: start;
    flex-direction: column;
  }

  .project-structure-episode-row {
    grid-template-columns: 1fr;
  }

  .shooting-plan-file-button {
    min-height: 38px;
  }

  .shooting-plan-parse-action {
    min-height: 38px;
  }
}

.script-list {
  margin-top: 2px;
  display: grid;
  gap: 8px;
}

.script-row {
  min-height: 40px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.script-row-compact {
  min-height: 34px;
  padding: 4px 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: background 140ms ease;
}

.project-structure-breakdown-panel .script-row-compact:hover,
.project-structure-breakdown-panel .script-row-compact:focus-within {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.script-row-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.script-file-type {
  width: 20px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #fff;
}

.script-file-type svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.15;
}

.script-row-main > span {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.script-row-compact .script-row-main > span {
  font-size: 12px;
  font-weight: 720;
}

.script-row small {
  color: var(--muted);
  white-space: nowrap;
}

.script-row .inline-action {
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.script-row .inline-action svg {
  width: 14px;
  height: 14px;
}

.script-row-delete-form {
  margin: 0;
}

.script-row-delete {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.script-row-delete:hover,
.script-row-delete:focus-visible {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  outline: none;
}

.script-row-delete svg {
  width: 15px;
  height: 15px;
}

.project-structure-manual-scenes .script-row-main > span {
  font-variant-numeric: tabular-nums;
}

.project-structure-manual-scenes .script-row-main small {
  white-space: normal;
}

.script-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.script-review-action {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
}

.script-parse-action {
  width: fit-content;
  margin-top: 8px;
}

.script-preview-page {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.script-preview-page > * {
  min-width: 0;
}

.script-review-project-hero {
  width: fit-content;
  max-width: min(760px, 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.script-review-project-hero:hover .script-review-project-title,
.script-review-project-hero:focus-visible .script-review-project-title {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.script-review-project-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}

.script-review-project-title {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 860;
  line-height: 1.14;
  overflow: hidden;
  text-overflow: ellipsis;
}

.script-review-titlebar {
  margin-top: 4px;
}

.script-review-titlebar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 720;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.script-missing-panel {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #d98c1f 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #d98c1f 10%, var(--surface));
}

.script-missing-form {
  display: grid;
  gap: 12px;
}

.script-missing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.script-missing-head div {
  display: grid;
  gap: 4px;
}

.script-missing-panel strong {
  color: var(--ink-strong);
}

.script-missing-panel span {
  color: var(--muted);
  font-size: 12px;
}

.script-missing-list {
  display: grid;
  gap: 6px;
}

.script-missing-row {
  display: grid;
  grid-template-columns: 20px 94px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, #d98c1f 22%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  cursor: pointer;
}

.script-missing-row.is-static {
  grid-template-columns: 94px minmax(0, 1fr);
  cursor: default;
}

.script-missing-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.script-missing-code {
  color: var(--ink-strong) !important;
  font-size: 13px !important;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.script-missing-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.script-missing-meta strong {
  color: var(--ink-strong);
  font-size: 12px;
}

.script-missing-meta span,
.script-missing-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-missing-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.script-reconciliation-panel {
  padding: 12px 14px;
  display: grid;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.script-reconciliation-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.script-reconciliation-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.script-reconciliation-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.script-reconciliation-icon svg {
  width: 18px;
  height: 18px;
}

.script-reconciliation-panel strong {
  color: var(--ink-strong);
  font-weight: 860;
}

.script-reconciliation-panel span,
.script-reconciliation-panel small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.script-reconciliation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.script-reconciliation-grid > div {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.script-reconciliation-grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-reconciliation-details summary {
  width: fit-content;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.script-reconciliation-details .script-missing-list {
  margin-top: 8px;
}

.script-reconciliation-decisions {
  flex-wrap: wrap;
}

.script-preview-table-shell {
  min-width: 0;
  height: var(--script-review-shell-height, calc(100dvh - 260px));
  max-height: var(--script-review-shell-height, calc(100dvh - 260px));
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.script-review-split-workspace {
  min-height: 0;
}

.script-preview-table-shell .logging-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.script-review-split-workspace.is-split-mode .logging-scroll {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.script-review-split-workspace.is-split-mode .script-preview-table {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 100%;
}

.script-review-split-workspace.is-split-mode .script-preview-table thead {
  display: block;
  position: relative;
  z-index: 2;
}

.script-review-split-workspace.is-split-mode .script-preview-table tbody {
  display: block;
  height: calc(100% - var(--script-anchor-viewer-header-height, 45px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.script-review-split-workspace.is-split-mode .script-preview-table th.movable-column,
.script-review-split-workspace.is-split-mode .script-preview-table th.resizable-column {
  cursor: default;
}

.script-review-split-workspace.is-split-mode .script-preview-table th.column-drop-before::before,
.script-review-split-workspace.is-split-mode .script-preview-table th.column-drop-after::after {
  display: none;
}

.script-review-split-workspace.is-split-mode .script-preview-table th[data-column-key="heading"] .column-resizer,
.script-review-split-workspace.is-split-mode .script-preview-table th[data-column-key="chron"] .column-resizer,
.script-review-split-workspace.is-split-mode .script-preview-table th[data-column-key="file"] .column-resizer {
  display: none;
}

.script-review-split-workspace.is-split-mode .script-preview-table th[data-column-key="episode"] .column-resizer,
.script-review-split-workspace.is-split-mode .script-preview-table th[data-column-key="code"] .column-resizer,
.script-review-split-workspace.is-split-mode .script-preview-table th[data-column-key="quote"] .column-resizer {
  display: block;
}

.script-review-split-workspace.is-split-mode .script-preview-table tr {
  display: table;
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.script-review-split-workspace.is-split-mode .script-preview-table th,
.script-review-split-workspace.is-split-mode .script-preview-table td {
  box-sizing: border-box;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(1),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(1) {
  width: 24px;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(2),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(2) {
  width: 52px;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(3),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(3) {
  width: 72px;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(4),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(4) {
  width: 280px;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(5),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(5) {
  width: 360px;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(6),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(6) {
  width: 82px;
}

.script-review-split-workspace.is-split-mode .script-preview-table th:nth-child(7),
.script-review-split-workspace.is-split-mode .script-preview-table td:nth-child(7) {
  width: 210px;
}

.script-episode-filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
}

.script-episode-token {
  min-width: 118px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.script-episode-token.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.script-episode-token strong {
  color: var(--ink-strong);
}

.script-episode-token small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.script-preview-actions {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.script-preview-actions > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.script-preview-actions strong {
  color: var(--ink-strong);
}

.script-preview-actions span {
  color: var(--muted);
  font-size: 12px;
}

.script-preview-actions .script-preview-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.script-review-inline-warning {
  color: #f0b429 !important;
  font-weight: 780;
}

.script-review-quality-help {
  flex-basis: 100%;
  max-width: 980px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.script-review-quality-help p {
  margin: 0;
}

.script-review-table-gap-details {
  margin-top: 4px;
}

.script-review-table-gap-details summary {
  width: fit-content;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.script-review-table-gap-details .script-review-gap-list {
  max-width: min(760px, calc(100vw - 96px));
}

.script-review-table-gap-details .script-missing-row {
  padding: 7px 8px;
}

.script-review-gap-strip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.script-review-gap-strip > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.script-review-gap-tokens {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.script-review-gap-token {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, #d98c1f 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #d98c1f 16%, var(--surface));
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.script-review-gap-token:hover,
.script-review-gap-token:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 66%, #d98c1f);
  color: var(--accent);
}

.script-review-gap-token.is-static {
  opacity: 0.72;
}

.script-review-header-import-form,
.script-review-header-add-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.script-review-header-add-form input {
  width: 128px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control);
  color: var(--ink);
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
}

.script-review-import-form {
  margin: 0;
  display: grid;
  justify-items: stretch;
  gap: 8px;
}

.script-review-import-note {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.script-review-import-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.script-display-format-prompt {
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.script-display-format-prompt summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.script-display-format-prompt summary::-webkit-details-marker {
  display: none;
}

.script-display-format-prompt strong {
  color: var(--ink-strong);
}

.script-display-format-prompt span {
  color: var(--muted);
  font-size: 12px;
}

.script-display-format-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
}

.script-review-warning-panel {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid color-mix(in srgb, #d98c1f 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #d98c1f 12%, var(--surface));
}

.script-review-warning-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.script-review-warning-copy > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.script-review-warning-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, #d98c1f 20%, transparent);
  color: #f0b429;
}

.script-review-warning-icon svg {
  width: 18px;
  height: 18px;
}

.script-review-warning-panel strong {
  color: var(--ink-strong);
  font-weight: 860;
}

.script-review-warning-panel span {
  color: var(--muted);
  font-size: 12px;
}

.script-review-warning-filter {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.script-review-warning-filter:hover,
.script-review-warning-filter:focus-visible {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.script-review-format-notice {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.script-review-format-notice summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.script-review-format-notice summary::-webkit-details-marker {
  display: none;
}

.script-review-format-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}

.script-review-format-icon svg {
  width: 17px;
  height: 17px;
}

.script-review-format-notice strong {
  color: var(--ink-strong);
  font-weight: 850;
}

.script-review-format-notice span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.script-review-summary-panel {
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.script-review-summary-panel.is-ready {
  border-color: color-mix(in srgb, var(--success) 34%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.script-review-summary-panel.is-review {
  border-color: color-mix(in srgb, #d98c1f 42%, var(--line));
  background: color-mix(in srgb, #d98c1f 10%, var(--surface));
}

.script-review-summary-panel.is-blocked {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.script-review-summary-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.script-review-summary-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.script-review-summary-panel.is-ready .script-review-summary-icon {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 16%, transparent);
}

.script-review-summary-panel.is-blocked .script-review-summary-icon {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, transparent);
}

.script-review-summary-icon svg {
  width: 18px;
  height: 18px;
}

.script-review-summary-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.script-review-summary-head strong,
.script-review-summary-next strong {
  color: var(--ink-strong);
  font-weight: 860;
}

.script-review-summary-head span,
.script-review-summary-panel p,
.script-review-summary-next span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.script-review-summary-status {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}

.script-review-summary-next {
  display: grid;
  gap: 3px;
}

.script-review-structure-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 8px;
}

.script-review-structure-list > span {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.script-review-structure-list strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 860;
}

.script-review-structure-list small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-review-decision-block {
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.script-review-decision-block > div:first-child {
  display: grid;
  gap: 3px;
}

.script-review-decision-block strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 860;
}

.script-review-decision-block span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.script-review-decision-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.script-review-gap-details {
  padding-top: 2px;
}

.script-review-gap-details summary {
  width: fit-content;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.script-review-gap-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.script-review-gap-list span {
  color: var(--muted);
  font-size: 12px;
}

.script-review-gap-list strong {
  margin-right: 6px;
  color: var(--ink-strong);
}

.script-calibration-panel {
  padding: 12px 14px;
  display: grid;
  gap: 12px;
  border: 1px solid color-mix(in srgb, #d98c1f 44%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #d98c1f 10%, var(--surface));
}

.script-calibration-head {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.script-calibration-head::-webkit-details-marker {
  display: none;
}

.script-calibration-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.script-calibration-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, #d98c1f 20%, transparent);
  color: #f0b429;
}

.script-calibration-icon svg {
  width: 18px;
  height: 18px;
}

.script-calibration-panel strong {
  color: var(--ink-strong);
  font-weight: 850;
}

.script-calibration-panel span,
.script-calibration-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.script-calibration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.script-calibration-grid > div {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.script-calibration-grid strong {
  overflow-wrap: anywhere;
}

.script-calibration-list,
.script-calibration-suggestions ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.script-calibration-suggestions {
  display: grid;
  gap: 5px;
}

.script-calibration-note {
  margin: 0;
}

.script-calibration-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.script-calibration-actions a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.script-calibration-actions a:hover,
.script-calibration-actions a:focus-visible {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.script-review-choice-label {
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.script-review-choice-label input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.script-review-choice-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.script-review-choice-content strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
}

.script-review-choice-content small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.script-review-choice-label .script-review-choice-content {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .script-calibration-grid,
  .script-reconciliation-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .script-calibration-grid,
  .script-reconciliation-grid {
    grid-template-columns: 1fr;
  }

  .script-calibration-head,
  .script-calibration-actions,
  .script-reconciliation-head {
    align-items: flex-start;
  }

  .script-review-import-form {
    justify-items: stretch;
  }

  .script-review-import-actions {
    justify-content: flex-start;
  }
}

.script-preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

.script-review-col-confidence {
  width: 24px;
}

.script-review-col-episode {
  width: 58px;
}

.script-review-col-code {
  width: 80px;
}

.script-review-col-quote {
  width: 300px;
}

.script-review-col-heading {
  width: 360px;
}

.script-review-col-chron {
  width: 82px;
}

.script-review-col-file {
  width: 210px;
}

.script-preview-table th,
.script-preview-table td {
  padding: 6px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  vertical-align: middle;
}

.script-preview-table .script-confidence-col {
  width: 24px;
  min-width: 24px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

.script-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.script-preview-table th[data-column-key] {
  user-select: none;
}

.script-preview-table th.is-column-dragging {
  opacity: 0.5;
}

.script-preview-table th.column-drop-before::before,
.script-preview-table th.column-drop-after::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  z-index: 12;
}

.script-preview-table th.column-drop-before::before {
  left: 0;
}

.script-preview-table th.column-drop-after::after {
  right: 0;
}

.script-review-th-label {
  display: inline-block;
  max-width: calc(100% - 10px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.script-confidence-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  vertical-align: middle;
}

.script-confidence-dot.is-high {
  background: #2e7d46;
}

.script-confidence-dot.is-medium {
  background: #f0b429;
}

.script-confidence-dot.is-low {
  background: #ff5b5b;
}

.script-episode-cell,
.script-code-cell,
.script-chron-cell {
  white-space: nowrap;
  color: var(--ink-strong);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.script-code-cell {
  position: relative;
}

.script-code-cell-inner {
  min-height: 30px;
  margin: -6px -10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
}

.script-code-edit-form {
  min-width: 0;
  margin: 0;
}

.script-code-edit-form input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-strong);
  font: inherit;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.script-code-edit-form input:hover,
.script-code-edit-form input:focus {
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.script-review-delete-form {
  margin: 0;
}

.script-review-delete-scene {
  width: 22px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.script-review-delete-scene:hover,
.script-review-delete-scene:focus-visible {
  outline: 0;
  color: var(--danger);
}

.script-review-delete-scene svg {
  width: 14px;
  height: 14px;
}

.script-quote-cell {
  min-width: 260px;
  max-width: 360px;
  position: relative;
  padding-right: 40px !important;
}

.script-source-quote {
  min-height: 30px;
  display: block;
  color: var(--ink);
  line-height: 1.35;
  font-family: var(--font-script);
}

.script-source-quote-code {
  display: inline;
  padding: 0 4px;
  border-radius: 3px;
  background: color-mix(in srgb, #f0b429 42%, transparent);
  color: var(--ink-strong);
  font: inherit;
  font-weight: 700;
  line-height: inherit;
}

.script-source-quote-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.script-anchor-edit {
  width: 26px;
  height: 26px;
  position: absolute;
  top: 6px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.script-anchor-edit:hover,
.script-anchor-edit:focus-visible {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.script-anchor-edit svg {
  width: 15px;
  height: 15px;
}

.script-heading-cell {
  min-width: 260px;
  max-width: 420px;
}

.script-chron-cell {
  color: var(--muted);
}

.script-heading-cell-main {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.script-review-heading-text {
  display: -webkit-box;
  overflow: hidden;
  min-width: 0;
  color: var(--ink);
  line-height: 1.35;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.script-review-heading-meta {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-3) 75%, transparent);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.script-review-inline-form {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.script-review-inline-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-overflow: ellipsis;
}

.script-review-inline-input:hover,
.script-review-inline-input:focus {
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.script-review-inline-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.script-review-inline-input.is-heading {
  white-space: nowrap;
}

.script-anchor-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.script-anchor-dialog::backdrop {
  background: rgba(0, 0, 0, 0.54);
}

.script-anchor-form {
  min-height: 0;
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto auto minmax(240px, 1fr) auto;
}

.script-anchor-table-header {
  position: absolute;
  top: 0;
  right: 0;
  left: var(--script-anchor-viewer-left, 538px);
  z-index: 5;
  box-sizing: border-box;
  height: var(--script-anchor-viewer-header-height, 45px);
  min-height: 0;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line-strong);
  background: var(--surface-2);
}

.script-anchor-table-header[hidden] {
  display: none;
}

.script-anchor-table-header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-anchor-table-header .icon-button {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  min-height: 0;
}

.script-anchor-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.script-anchor-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.script-anchor-header h2 {
  margin: 2px 0 4px;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.2;
}

.script-anchor-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.script-anchor-document-field {
  width: min(520px, 100%);
  margin: 6px 0 7px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.script-anchor-document-field[hidden] {
  display: none;
}

.script-anchor-document-field select {
  min-width: 0;
  min-height: 0;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.script-anchor-document-field select:hover,
.script-anchor-document-field select:focus,
.script-anchor-document-field select:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  color: #fff;
  outline: none;
  box-shadow: none;
}

.script-anchor-selected {
  min-height: 34px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.script-anchor-selected strong {
  color: var(--ink-strong);
}

.script-anchor-lines {
  overflow: auto;
  padding: 10px 0;
  background: var(--surface-2);
}

.script-anchor-line {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 22px 48px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.script-anchor-line-marker {
  min-height: 1.4em;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  opacity: 0;
}

.script-anchor-line-marker svg,
.script-anchor-line-marker .cutkit-anchor-icon {
  width: 13px;
  height: 13px;
}

.script-anchor-line.is-current .script-anchor-line-marker,
.script-anchor-line.is-selected .script-anchor-line-marker {
  opacity: 1;
}

.script-anchor-line:hover,
.script-anchor-line:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.script-anchor-line.is-current {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.script-anchor-line.is-selected {
  background: color-mix(in srgb, #f0b429 15%, transparent);
}

.script-anchor-line.is-current.is-selected {
  background: color-mix(in srgb, #f0b429 18%, transparent);
  box-shadow: inset 3px 0 0 #f0b429;
}

.script-anchor-line-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.script-anchor-line-text {
  font-family: var(--font-script);
  white-space: pre-wrap;
}

.script-anchor-actions {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.script-anchor-viewer {
  position: absolute;
  top: var(--script-anchor-viewer-header-height, 45px);
  right: 0;
  bottom: 0;
  left: var(--script-anchor-viewer-left, 538px);
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -10px 0 24px rgba(0, 0, 0, 0.18);
}

.script-anchor-viewer[hidden] {
  display: none;
}

.script-anchor-menu {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 4;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

.script-anchor-menu strong,
.script-anchor-menu label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-strong);
  font-size: 12px;
}

.script-anchor-menu > button,
.script-anchor-menu-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.script-anchor-menu > button {
  width: 100%;
  margin-bottom: 6px;
  text-align: left;
}

.script-anchor-menu > button:hover,
.script-anchor-menu > button:focus-visible,
.script-anchor-menu-actions button:hover,
.script-anchor-menu-actions button:focus-visible {
  outline: 0;
  border-color: var(--accent);
  color: var(--ink-strong);
}

.script-anchor-menu-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.script-anchor-menu-danger {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line)) !important;
  color: var(--danger) !important;
}

.script-anchor-menu input {
  width: 100%;
  height: 30px;
  margin-bottom: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
}

.script-anchor-menu small {
  display: block;
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.script-preview-table tr.is-active-anchor-row td {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

@media (max-width: 980px) {
  .script-anchor-viewer {
    left: 0;
  }
}

.scene-suggest {
  position: fixed;
  z-index: 100;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.scene-suggest button {
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  display: block;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.scene-suggest button:hover,
.scene-suggest button.is-active {
  background: var(--active-row);
  color: var(--accent);
}

.logging-page {
  display: grid;
  gap: 8px;
  margin-top: -8px;
  min-width: 0;
  max-width: 100%;
}

.logging-title {
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: start;
}

.readonly-notice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.readonly-notice svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.logging-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.logging-subtitle span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.65;
}

.logging-meta {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.logging-meta span {
  color: var(--muted);
  font-weight: 750;
}

.compact-action {
  width: auto;
  padding: 0 12px;
}

.header-actions-vertical {
  display: grid;
  grid-template-columns: 58px;
  gap: 6px;
  align-self: flex-start;
}

.icon-stack-action {
  width: 58px;
  min-height: 44px;
  padding: 4px 4px;
  display: grid;
  grid-template-rows: 17px auto;
  gap: 1px;
  justify-items: center;
  align-items: center;
}

.icon-stack-action svg {
  width: 17px;
  height: 17px;
}

.icon-stack-action span {
  color: inherit;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.compact-action.is-active {
  border-color: color-mix(in srgb, var(--accent) 62%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.logging-toolbar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 36px;
}

.logging-search-strip {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.logging-search {
  width: 250px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.logging-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.logging-search > i,
.logging-search > svg,
.finishing-filter-search--source-like .finishing-filter-search-box > i,
.finishing-filter-search--source-like .finishing-filter-search-box > svg {
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.logging-search.is-search-active {
  gap: 0;
}

.logging-search.is-search-active > i,
.logging-search.is-search-active > svg,
.finishing-filter-search--source-like.is-search-active .finishing-filter-search-box > i,
.finishing-filter-search--source-like.is-search-active .finishing-filter-search-box > svg {
  display: none;
}

.finishing-filter-search--source-like .finishing-filter-token-list:empty {
  display: none;
}

.logging-search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 34px;
  -webkit-appearance: none;
  appearance: none;
}

.logging-search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.logging-search input:focus {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0;
}

.logging-search input[type="search"]::-webkit-search-decoration,
.logging-search input[type="search"]::-webkit-search-cancel-button,
.finishing-filter-search input[type="search"]::-webkit-search-decoration,
.finishing-filter-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.logging-search-count {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
  line-height: 34px;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  transform: translateY(-1px);
}

.logging-search-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  z-index: 70;
}

.logging-search-menu[hidden] {
  display: none;
}

.logging-search-menu-title {
  padding: 5px 7px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.logging-search-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.logging-search-option:hover,
.logging-search-option.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.logging-search-option-command {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.logging-grid tr.is-hidden {
  display: none;
}

.logging-grid-shell {
  position: relative;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.source-column-editor-trigger {
  position: absolute;
  top: 3px;
  left: var(--column-layout-trigger-left, -26px);
  right: auto;
  z-index: 55;
  width: var(--column-layout-trigger-size, 28px);
  height: var(--column-layout-trigger-size, 28px);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.14s ease, visibility 0.14s ease, transform 0.14s ease, color 0.14s ease;
  transition-delay: 0s;
}

.source-column-editor-trigger svg {
  width: var(--column-layout-trigger-icon-size, 13px);
  height: var(--column-layout-trigger-icon-size, 13px);
}

.logging-grid-shell.is-source-column-layout-editing {
  border-color: transparent;
  box-shadow: none;
}

.logging-grid-shell > .table-preset-tabs {
  position: absolute;
  top: -20px;
  left: 14px;
  z-index: 62;
  margin: 0;
}

.logging-grid-shell > .table-preset-tabs.is-empty {
  display: none;
}

.logging-grid-shell.is-source-column-layout-editing > .table-preset-tabs.is-empty {
  display: flex;
  min-height: 20px;
}

.logging-grid-shell > .table-preset-tabs.is-dialog-open {
  z-index: 200000;
}

.finishing-table-shell > .table-preset-tabs {
  position: absolute;
  top: -20px;
  left: 14px;
  z-index: 62;
  margin: 0;
}

.finishing-table-shell > .table-preset-tabs.is-empty {
  display: none;
}

.finishing-table-shell.is-column-layout-editing > .table-preset-tabs.is-empty {
  display: flex;
  min-height: 20px;
}

.logging-grid-shell.is-source-column-layout-editing .source-column-editor-trigger {
  top: var(--column-layout-trigger-edit-top, 9px);
  left: var(--column-layout-trigger-edit-left, -21px);
  width: var(--column-layout-trigger-edit-size, 17px);
  height: var(--column-layout-trigger-edit-size, 17px);
  color: #fff;
  border-color: color-mix(in srgb, var(--marker-green) 72%, transparent);
  background: var(--marker-green);
  box-shadow: var(--shadow);
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.logging-grid-shell.is-source-column-layout-editing .source-column-editor-trigger svg {
  width: var(--column-layout-trigger-edit-icon-size, 9px);
  height: var(--column-layout-trigger-edit-icon-size, 9px);
}

.logging-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 126px);
  overflow: auto;
  overscroll-behavior-x: contain;
  border-radius: 8px;
}

.logging-grid-shell.is-source-column-layout-editing .logging-grid tbody {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.09) 0,
    rgba(148, 163, 184, 0.09) 6px,
    transparent 6px,
    transparent 14px
  );
}

.logging-table-surface {
  display: inline-block;
  max-width: none;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  overflow: clip;
  vertical-align: top;
}

.table-empty-row .table-empty-cell,
.finishing-empty.finishing-empty--showcase,
.edit-empty-state.edit-empty-state--showcase {
  padding: 0 !important;
  color: var(--ink);
  text-align: left !important;
  background: transparent;
}

.table-empty-showcase {
  position: relative;
  isolation: isolate;
  min-height: clamp(320px, calc(100vh - 260px), 560px);
  width: 100%;
  min-width: 0;
  display: block;
  padding: clamp(28px, 5vh, 52px) clamp(18px, 4vw, 42px);
  overflow: visible;
  border-radius: 0 0 8px 8px;
  background: transparent;
}

.table-empty-showcase--edit {
  min-height: clamp(330px, calc(100vh - 240px), 560px);
  min-width: 0;
  border-radius: 0;
  background: transparent;
}

.table-empty-showcase--edit::after {
  background: transparent;
}

.table-empty-showcase--tasks {
  min-height: clamp(320px, calc(100vh - 250px), 540px);
  min-width: 0;
  padding: clamp(28px, 5vh, 52px) clamp(18px, 4vw, 42px);
}

.table-empty-showcase::after {
  content: none;
  display: none;
}

.table-empty-showcase__ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  align-content: start;
  gap: 0;
  padding: 0;
  opacity: 0.48;
  filter: blur(2px) saturate(0.88);
  transform: scale(1.018);
  transform-origin: center;
  pointer-events: none;
}

.table-empty-showcase--source .table-empty-showcase__ghost {
  transform: none;
  transform-origin: top left;
}

.table-empty-real-row,
.table-empty-task-row,
.table-empty-edit-row {
  color: var(--ink);
  font-weight: 760;
  letter-spacing: 0;
}

.table-empty-real-row--source {
  display: grid;
  grid-template-columns: 44px 92px 92px 62px repeat(5, 42px) minmax(230px, 1fr) 220px;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.table-empty-real-row--source > span {
  box-sizing: border-box;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-right: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  overflow: hidden;
  white-space: nowrap;
}

.table-empty-real-row--source .is-index {
  justify-content: center;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
}

.table-empty-real-row--source .is-muted {
  color: var(--muted);
}

.table-empty-real-row--source .is-check,
.table-empty-real-row--source .is-ring {
  position: relative;
  justify-content: center;
  padding: 0;
}

.table-empty-real-row--source .is-check::before,
.table-empty-real-row--source .is-ring::before {
  content: "";
  width: 23px;
  height: 23px;
  border-radius: 999px;
}

.table-empty-real-row--source .is-check::before {
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(79, 131, 255, 0.28);
}

.table-empty-real-row--source .is-check::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 6px;
  margin-top: -1px;
  border-left: 3px solid rgba(255, 255, 255, 0.94);
  border-bottom: 3px solid rgba(255, 255, 255, 0.94);
  transform: rotate(-45deg);
}

.table-empty-real-row--source .is-ring::before {
  border: 2px solid var(--muted);
  opacity: 0.72;
}

.table-empty-real-row--source .is-tokens {
  gap: 6px;
  flex-wrap: wrap;
  align-content: center;
  white-space: normal;
}

.table-empty-real-row--source .is-tokens b {
  min-width: 40px;
  padding: 3px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--marker-green) 70%, #0e1a14 30%);
  color: #dff8e7;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
}

.table-empty-real-row--source .is-note::before {
  content: "";
  width: 80%;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 22%, transparent);
}

.table-empty-real-row--source .is-note.is-short::before {
  width: 52%;
}

.table-empty-task-row {
  display: grid;
  grid-template-columns: 54px 90px minmax(320px, 1fr) 132px 132px 128px 138px 92px;
  min-width: 1120px;
  min-height: 58px;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.table-empty-task-row > span,
.table-empty-task-row > b,
.table-empty-task-row > em {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.table-empty-task-row > b,
.table-empty-task-row > em {
  height: auto;
  min-height: 24px;
  margin: 0 10px;
  padding: 4px 10px;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  color: #eef5ff;
  font-size: 12px;
  font-style: normal;
  line-height: 1.1;
}

.table-empty-task-row > b {
  background: color-mix(in srgb, var(--accent) 72%, #17223a 28%);
}

.table-empty-task-row > em {
  background: color-mix(in srgb, var(--marker-green) 64%, #172315 36%);
}

.table-empty-task-row .is-avatar {
  justify-content: center;
}

.table-empty-task-row .is-avatar::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 34%, rgba(255,255,255,0.5) 0 18%, transparent 20%),
    linear-gradient(135deg, #4f83ff, #22c55e);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--line) 70%, transparent);
}

.table-empty-ghost-row,
.table-empty-ghost-row--tasks {
  display: grid;
  grid-template-columns: 34px 92px 92px 34px 34px minmax(180px, 0.9fr) minmax(220px, 1.2fr);
  gap: 8px;
  min-height: 36px;
}

.table-empty-ghost-cell {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

.table-empty-ghost-cell.is-index,
.table-empty-ghost-cell.is-dot {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 26%, var(--surface-2));
}

.table-empty-ghost-cell.is-token {
  background: color-mix(in srgb, var(--marker-green) 24%, var(--surface-2));
}

.table-empty-ghost-cell.is-muted,
.table-empty-edit-scene.is-muted {
  opacity: 0.62;
}

.table-empty-showcase__ghost--edit {
  align-content: start;
  justify-content: start;
  gap: 17px;
  padding: clamp(30px, 4vh, 46px) 26px 36px;
  opacity: 0.6;
  filter: blur(1.18px) saturate(0.92);
  transform: none;
  transform-origin: top left;
}

.table-empty-edit-row {
  display: grid;
  grid-template-columns: 76px max-content;
  width: max-content;
  min-height: 58px;
  align-items: stretch;
  box-shadow: none;
}

.table-empty-edit-episode {
  min-width: 0;
  display: grid !important;
  align-content: center;
  justify-items: start;
  gap: 4px;
  padding: 0 7px;
  border-right: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 5px 0 0 5px;
  background: color-mix(in srgb, var(--marker-green) 64%, #111827);
  color: #dff8e7 !important;
}

.table-empty-edit-episode.is-partial {
  background: color-mix(in srgb, var(--marker-green) 52%, #111827);
}

.table-empty-edit-episode.is-warning {
  background: color-mix(in srgb, #d9772b 58%, #111827);
}

.table-empty-edit-episode.is-purple {
  background: color-mix(in srgb, #6d4cc2 58%, #111827);
}

.table-empty-edit-episode.is-muted {
  background: color-mix(in srgb, var(--surface-2) 86%, #05080d);
  color: var(--muted) !important;
}

.table-empty-edit-episode b {
  color: currentColor;
  font-size: 15px;
  line-height: 1;
  font-weight: 860;
}

.table-empty-edit-episode small {
  color: color-mix(in srgb, currentColor 82%, transparent);
  font-size: 10px;
  line-height: 1;
  font-weight: 780;
}

.table-empty-edit-scenes {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(30, 48px);
}

.table-empty-edit-scenes > span {
  position: relative;
  min-width: 0;
  height: 58px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  align-content: center;
  justify-content: center;
  justify-items: center;
  border-right: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-bottom: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--marker-green) 68%, #102019);
  color: #eef8f0;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.table-empty-edit-scenes > span::after {
  content: "";
  width: 11px;
  height: 6px;
  margin-top: -1px;
  border-left: 2px solid color-mix(in srgb, #ffffff 86%, transparent);
  border-bottom: 2px solid color-mix(in srgb, #ffffff 86%, transparent);
  transform: rotate(-45deg);
}

.table-empty-edit-scenes > span.is-orange {
  background: color-mix(in srgb, #d9772b 74%, #121827);
}

.table-empty-edit-scenes > span.is-orange::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid #9fb4d8;
  transform: none;
}

.table-empty-edit-scenes > span.is-purple {
  background: color-mix(in srgb, #6d4cc2 70%, #111827);
}

.table-empty-edit-scenes > span.is-dark {
  background: color-mix(in srgb, var(--surface-2) 86%, #05080d);
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.table-empty-edit-scenes > span.is-dark::after {
  width: 0;
  height: 0;
  border: 0;
  transform: none;
}

.table-empty-edit-scenes > span:last-child {
  border-radius: 0 5px 5px 0;
}

.table-empty-showcase__message {
  --empty-message-width: min(760px, max(280px, calc(var(--empty-message-available-width, 100vw) - 64px)));
  position: absolute;
  top: var(--empty-message-center-y, 50%);
  left: var(--empty-message-center-x, 50%);
  z-index: 2;
  isolation: isolate;
  width: var(--empty-message-width);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
  padding: 30px 34px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background:
    radial-gradient(circle at 16% 0%, rgba(79, 131, 255, 0.18), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, 0.11), transparent 33%),
    radial-gradient(circle at 72% 88%, rgba(99, 102, 241, 0.08), transparent 42%),
    linear-gradient(152deg, #171f2d 0%, #111827 50%, #0b1019 100%);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.38),
    0 0 46px rgba(37, 99, 235, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--ink);
  transform: translate(-50%, -50%);
  white-space: normal;
}

.table-empty-showcase--tasks .table-empty-showcase__message {
  position: absolute;
  top: var(--empty-message-center-y, 50%);
  left: var(--empty-message-center-x, 50%);
  transform: translate(-50%, -50%);
}

.table-empty-showcase__message::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(59, 130, 246, 0.2), transparent 38%),
    radial-gradient(circle at 78% 26%, rgba(125, 211, 252, 0.12), transparent 34%),
    radial-gradient(circle at 56% 82%, rgba(99, 102, 241, 0.1), transparent 42%);
  filter: blur(18px);
  opacity: 0.42;
}

.table-empty-showcase__message::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 42px rgba(79, 131, 255, 0.06);
}

.table-empty-showcase__message > * {
  position: relative;
  z-index: 1;
}

.table-empty-showcase__icon {
  width: 28px;
  height: 28px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: transparent;
  border: 0;
}

.table-empty-showcase__icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.table-empty-showcase__copy {
  min-width: 0;
}

.table-empty-showcase__brand {
  width: max-content;
  max-width: 100%;
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.table-empty-showcase__brand img {
  display: block;
  width: auto;
  height: 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.table-empty-showcase__message h2 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  font-weight: 760;
  letter-spacing: 0;
}

.table-empty-showcase__message p:not(.section-eyebrow) {
  margin: 14px 0 0;
  max-width: 640px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 560;
  white-space: normal;
  overflow-wrap: anywhere;
}

.table-empty-showcase__actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.table-empty-showcase__actions .primary-action,
.table-empty-showcase__actions .secondary-action {
  min-height: 42px;
  width: auto;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
}

.edit-empty-state--showcase .table-empty-showcase {
  min-width: 0;
}

@media (max-width: 900px) {
  .table-empty-showcase {
    min-width: 0;
    min-height: clamp(300px, calc(100vh - 190px), 520px);
    padding: 22px 12px;
  }

  .table-empty-showcase__message {
    --empty-message-width: min(520px, max(260px, calc(var(--empty-message-available-width, 100vw) - 24px)));
    padding: 22px;
    grid-template-columns: 1fr;
    transform: translate(-50%, -50%);
  }

  .table-empty-showcase--tasks .table-empty-showcase__message {
    position: absolute;
    transform: translate(-50%, -50%);
  }

  .table-empty-showcase__message h2 {
    font-size: 23px;
  }

  .table-empty-showcase__message p:not(.section-eyebrow) {
    font-size: 15px;
  }

  .table-empty-real-row--source {
    grid-template-columns: 44px 92px 92px 62px repeat(3, 42px) minmax(240px, 1fr);
  }

  .table-empty-real-row--source > span:nth-child(n + 8):not(.is-tokens) {
    display: none;
  }

  .table-empty-showcase__ghost--edit {
    gap: 12px;
    padding: 48px 16px 28px;
  }

  .table-empty-edit-row {
    grid-template-columns: 68px max-content;
  }

  .table-empty-edit-episode b {
    font-size: 13px;
  }

  .table-empty-edit-scenes {
    grid-template-columns: repeat(10, 42px);
  }

  .table-empty-edit-scenes > span {
    height: 52px;
    font-size: 11px;
  }

  .table-empty-edit-scenes > span:nth-child(n + 11) {
    display: none;
  }

  .table-empty-task-row {
    grid-template-columns: 46px 78px minmax(260px, 1fr) 118px 118px 112px;
    min-width: 760px;
  }

  .table-empty-task-row > :nth-child(n + 7) {
    display: none;
  }
}

@media (max-width: 560px) {
  .table-empty-showcase__message {
    --empty-message-width: min(100vw - 24px, max(260px, calc(var(--empty-message-available-width, 100vw) - 24px)));
    padding: 20px;
  }

  .table-empty-showcase--tasks .table-empty-showcase__message {
    position: absolute;
  }

  .table-empty-showcase__actions {
    align-items: stretch;
  }

  .table-empty-showcase__actions .primary-action,
  .table-empty-showcase__actions .secondary-action {
    justify-content: center;
    width: 100%;
  }
}

.logging-grid {
  width: auto;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.logging-grid col.col-day {
  width: 44px;
}

.logging-grid col.col-row-delete {
  width: 0;
}

.logging-grid-shell.is-table-editing col.col-row-delete {
  width: 38px;
}

.logging-grid col.col-date {
  width: 92px;
}

.logging-grid col.col-received-date {
  width: 92px;
}

.logging-grid col.col-volume {
  width: 62px;
}

.logging-grid col.col-status {
  width: 42px;
}

.logging-grid col.col-scenes {
  width: 150px;
}

.logging-grid col.col-custom {
  width: 72px;
}

.logging-grid col.col-custom-wide {
  width: 160px;
}

.logging-grid col.col-text {
  width: 220px;
}

.logging-grid th,
.logging-grid td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  vertical-align: middle;
}

.logging-grid th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 34px;
  padding: 5px 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  overflow: hidden;
}

.logging-grid th.movable-column {
  cursor: grab;
}

.logging-grid th.is-column-dragging {
  opacity: 0.5;
}

.logging-grid-shell.is-source-column-layout-editing .logging-grid tbody {
  pointer-events: none;
}

.logging-grid-shell.is-source-column-layout-editing .logging-grid tbody td {
  background: transparent;
}

.logging-grid th.is-column-disabled {
  color: color-mix(in srgb, var(--muted) 50%, transparent);
  opacity: 0.42;
}

.logging-grid td.is-column-disabled {
  opacity: 0.2;
}

.source-inline-column-add-trigger {
  position: absolute;
  top: 0;
  z-index: 45;
  width: 38px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.logging-grid-shell.is-source-column-layout-editing .source-inline-column-add-trigger {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.source-inline-column-add-trigger:hover,
.source-inline-column-add-trigger:focus-visible {
  background: transparent;
  color: var(--accent);
}

.source-inline-column-add-trigger svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.source-column-pin-toggle[hidden] {
  display: none;
}

.source-column-custom-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.source-column-custom-panel[hidden] {
  display: none;
}

.source-column-custom-panel input,
.source-column-custom-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  padding: 8px 9px;
  outline: none;
}

.source-column-custom-panel input:focus,
.source-column-custom-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.source-column-custom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.source-column-custom-actions .secondary-action {
  min-height: 28px;
  padding: 5px 9px;
}

.source-column-custom-actions .icon-danger {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logging-grid th.column-drop-before::before,
.logging-grid th.column-drop-after::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  z-index: 12;
}

.logging-grid th.column-drop-before::before {
  left: 0;
}

.logging-grid th.column-drop-after::after {
  right: 0;
}

.th-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.th-label svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
  opacity: 0.9;
}

.th-label.icon-first {
  width: 100%;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
}

.th-label.icon-first svg {
  width: 15px;
  height: 15px;
}

.th-label.icon-first span {
  font-size: 9px;
  line-height: 1;
}

.th-label.icon-only {
  width: 100%;
  justify-content: center;
}

.th-label.icon-only svg {
  width: 15px;
  height: 15px;
}

.th-label.icon-only span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.column-insight-trigger {
  position: relative;
}

.logging-grid th.column-insight-trigger {
  overflow: visible;
}

.column-insight-tooltip {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 5px;
  width: 260px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 94%, #000000 6%);
  box-shadow: var(--shadow-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.column-insight-tooltip--compact {
  width: 160px;
}

.column-insight-tooltip--compact .column-insight-row {
  grid-template-columns: 1fr max-content;
}

.column-insight-tooltip--row-edit {
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 236px;
  max-width: none;
  transform: translateY(-3px);
}

.column-insight-tooltip--row-edit .column-insight-row {
  grid-template-columns: 1fr;
}

.row-edit-mode-trigger {
  cursor: pointer;
}

.row-edit-mode-trigger.is-active {
  color: var(--accent);
}

.logging-grid th.row-edit-mode-trigger:hover .column-insight-tooltip,
.logging-grid th.row-edit-mode-trigger:focus-within .column-insight-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.column-insight-row {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) max-content;
  align-items: baseline;
  gap: 14px;
  color: var(--ink-strong);
  white-space: nowrap;
}

.column-insight-row strong {
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
  text-align: right;
  white-space: nowrap;
}

.column-insight-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  line-height: 1.35;
}

.logging-grid th.column-insight-trigger .column-insight-tooltip {
  top: calc(100% + 8px);
  left: 0;
  transform: translateY(-3px);
}

.logging-grid td.column-insight-trigger .column-insight-tooltip {
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%) translateX(-3px);
}

.column-insight-trigger:hover .column-insight-tooltip,
.column-insight-trigger:focus-within .column-insight-tooltip {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.35s;
}

.logging-grid th.column-insight-trigger:hover .column-insight-tooltip,
.logging-grid th.column-insight-trigger:focus-within .column-insight-tooltip {
  transform: translateY(0);
}

.logging-grid td.column-insight-trigger:hover .column-insight-tooltip,
.logging-grid td.column-insight-trigger:focus-within .column-insight-tooltip {
  transform: translateY(-50%) translateX(0);
}

.logging-volume-tooltip {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 6px;
  min-width: 152px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 94%, #000000 6%);
  box-shadow: var(--shadow-strong);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1.42;
  pointer-events: none;
}

.logging-volume-tooltip[hidden] {
  display: none;
}

.logging-volume-tooltip-row {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 12px;
  align-items: baseline;
  white-space: nowrap;
}

.logging-volume-tooltip-row strong {
  color: var(--accent);
  font-weight: 840;
}

.logging-volume-tooltip-note {
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.38;
  white-space: normal;
}

.logging-volume-tooltip-note-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 2px;
  border-radius: 999px;
}

.logging-volume-tooltip-note-dot.is-low {
  background: color-mix(in srgb, var(--marker-blue) 82%, #ffffff 18%);
}

.logging-volume-tooltip-note-dot.is-high {
  background: color-mix(in srgb, var(--danger) 82%, #ffffff 18%);
}

.logging-volume-tooltip-note-line {
  display: block;
}

.logging-volume-tooltip-note-value {
  color: var(--accent);
  font-weight: 840;
}

.logging-grid td {
  height: 34px;
  padding: 0;
}

.logging-grid .col-day,
.logging-grid .day-cell {
  position: sticky;
  left: 0;
  z-index: 32;
  width: 44px;
  min-width: 44px;
  text-align: center;
  overflow: visible;
}

.logging-grid th.col-day {
  z-index: 38;
  background: var(--surface-2);
}

.logging-grid-shell.is-table-editing .logging-grid .col-day,
.logging-grid-shell.is-table-editing .logging-grid .day-cell {
  left: 38px;
}

.logging-grid .is-source-column-pinned {
  position: sticky;
  left: var(--source-sticky-left, 44px);
  z-index: 28;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}

.logging-grid th.is-source-column-pinned {
  z-index: 36;
  background: var(--surface-2);
}

.logging-grid-shell.is-source-column-layout-editing .logging-grid tbody td.is-source-column-pinned {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.09) 0,
      rgba(148, 163, 184, 0.09) 6px,
      transparent 6px,
      transparent 14px
    ),
    var(--surface);
}

.logging-grid .day-cell {
  background: var(--surface-2);
  color: var(--ink-strong);
  font-weight: 850;
}

.logging-grid-shell.is-source-column-layout-editing .logging-grid tbody .day-cell {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.09) 0,
      rgba(148, 163, 184, 0.09) 6px,
      transparent 6px,
      transparent 14px
    ),
    var(--surface-2);
}

.logging-grid td.is-date-popover-host,
.logging-grid th.is-date-popover-host {
  z-index: 1700 !important;
  overflow: visible;
}

.logging-grid td.is-date-popover-host:not(.is-source-column-pinned),
.logging-grid th.is-date-popover-host:not(.is-source-column-pinned) {
  position: relative;
}

.day-cell-number {
  position: relative;
  z-index: 1;
}

.logging-row-actions-menu {
  position: absolute;
  top: 2px;
  left: calc(100% + 4px);
  z-index: 34;
  display: grid;
  gap: 5px;
  min-width: 148px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.logging-row-actions-menu.is-portaled {
  position: fixed;
  top: var(--logging-row-actions-top, 0);
  left: var(--logging-row-actions-left, 0);
  z-index: 220000;
}

.logging-row-actions-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -8px;
  width: 8px;
  background: transparent;
}

.logging-grid .col-day:hover .logging-row-actions-menu,
.logging-grid .col-day:focus-within .logging-row-actions-menu,
.logging-grid .day-cell:hover .logging-row-actions-menu,
.logging-grid .day-cell:focus-within .logging-row-actions-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.logging-row-actions-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.logging-row-action {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.1;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.logging-row-action:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--ink-strong);
}

.logging-row-action.is-danger:hover {
  border-color: color-mix(in srgb, var(--danger) 54%, var(--line));
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-2));
}

.logging-row-action svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.logging-grid .row-delete-cell {
  position: sticky;
  left: 0;
  z-index: 34;
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 0;
  display: table-cell;
  text-align: center;
  background: var(--surface-2);
  border-right: 0;
  overflow: hidden;
}

.logging-grid .row-delete-cell > * {
  display: none;
}

.logging-grid-shell.is-table-editing .logging-grid .row-delete-cell {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  border-right: 1px solid var(--line);
}

.logging-grid-shell.is-table-editing .logging-grid .row-delete-cell > * {
  display: inline-grid;
}

.logging-grid-shell.is-table-editing .logging-grid th.row-delete-cell {
  z-index: 40;
  background: var(--surface-2);
}

.row-delete-submit,
.row-select-checkbox {
  width: 100%;
  height: 33px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.row-delete-submit {
  background: transparent;
}

.row-delete-submit:disabled {
  cursor: default;
  opacity: 0.34;
}

.row-delete-submit:not(:disabled):hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.row-delete-submit svg {
  width: 14px;
  height: 14px;
}

.row-select-checkbox {
  position: relative;
}

.row-select-checkbox input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
}

.row-select-checkbox span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 42%, transparent);
}

.row-select-checkbox input:checked + span {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, #ffffff 30%);
}

.row-select-checkbox input:checked + span::after {
  content: "";
  width: 7px;
  height: 4px;
  display: block;
  margin: 4px auto 0;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}

.logging-grid th.col-date,
.logging-grid td.col-date {
  width: 92px;
  min-width: 92px;
}

.logging-grid th.col-volume,
.logging-grid td.col-volume {
  width: 62px;
  min-width: 62px;
}

.logging-grid th.col-scenes,
.logging-grid td.col-scenes {
  width: 230px;
  min-width: 94px;
}

.logging-scene-cell {
  position: relative;
  min-height: 33px;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}

.logging-scene-cell input[data-scenes-input] {
  display: none;
}

.logging-material-cell {
  min-height: 33px;
  padding: 4px 5px;
  cursor: pointer;
}

.material-token-storage {
  display: none;
}

.scene-token-list {
  min-height: 22px;
  display: flex;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 3px;
  margin: -3px -4px;
  padding: 3px 4px;
  overflow: visible;
}

.scene-token,
.scene-token-empty {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.scene-token {
  position: relative;
  padding: 3px 7px;
  border: 1px solid transparent;
  background: var(--marker-green);
  color: var(--token-ink);
}

.scene-token[data-project-structure="true"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--marker-green);
  box-shadow: 0 0 0 1px rgba(9, 14, 24, 0.92);
  pointer-events: none;
}

.scene-token--new {
  background: var(--marker-purple);
  color: var(--token-ink);
}

.scene-token--repeated {
  background: var(--marker-orange);
  color: var(--token-ink);
}

.scene-token[data-repeat-origin="true"] {
  border-color: var(--marker-orange);
}

.scene-token--review {
  background: var(--marker-blue);
  color: var(--token-ink);
}

.scene-token--invalid {
  background: var(--marker-red);
  color: var(--token-ink);
}

.scene-token--pickup,
.scene-token--reshoot,
.scene-token--alternate,
.scene-token--additional {
  border-color: transparent;
}

.scene-token[data-repeat-origin="true"] {
  border-color: var(--marker-orange);
}

.scene-token-empty {
  padding: 3px 0;
  color: var(--muted);
}

.logging-scene-warning {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logging-scene-warning[hidden] {
  display: none;
}

.logging-scene-warning--dedupe {
  color: color-mix(in srgb, #7fb1ff 75%, var(--muted));
}

.logging-scene-warning--repeat {
  color: color-mix(in srgb, var(--warning) 76%, var(--muted));
}

.logging-scene-warning--invalid {
  color: var(--danger);
}

.scene-cell-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.scene-cell-editor-modal[hidden] {
  display: none;
}

.scene-cell-editor-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

.scene-cell-editor-dialog {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.scene-cell-editor-header,
.scene-cell-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.scene-cell-editor-footer {
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: color-mix(in srgb, var(--surface-2) 56%, transparent);
}

.scene-cell-editor-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-cell-editor-clear {
  width: auto;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  color: color-mix(in srgb, var(--muted) 84%, var(--ink));
}

.scene-cell-editor-footer-actions .secondary-action,
.scene-cell-editor-footer-actions .primary-action {
  width: auto;
  min-height: 38px;
}

.scene-cell-editor-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.1;
}

.scene-cell-editor-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.scene-cell-editor-close {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 84%, transparent);
  color: var(--ink);
  cursor: pointer;
}

.scene-cell-editor-close:hover {
  border-color: var(--line);
  background: var(--control);
}

.scene-cell-editor-close svg {
  width: 16px;
  height: 16px;
}

.scene-cell-editor-body {
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.scene-cell-editor-review h3 {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.scene-cell-editor-sourcebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: start;
  position: relative;
}

.scene-cell-editor-sourcebar.is-dragging::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px dashed color-mix(in srgb, var(--accent) 70%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  pointer-events: none;
}

.scene-cell-editor-source-input {
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.35;
}

.scene-cell-editor-source-input:focus,
.scene-cell-editor-source-input:focus-visible {
  outline: none;
  box-shadow: none;
}

.scene-cell-editor-file-trigger,
.scene-cell-editor-parse {
  width: auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.scene-cell-editor-parse:hover {
  background: color-mix(in srgb, var(--accent) 88%, #ffffff);
}

@media (max-width: 860px) {
  .scene-cell-editor-sourcebar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .scene-cell-editor-file-trigger,
  .scene-cell-editor-parse {
    width: 100%;
  }
}

.scene-cell-editor-review {
  display: block;
}

.scene-editor-review-frame {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  padding: 10px;
}

.scene-editor-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  padding: 0;
}

.scene-editor-summary[hidden] {
  display: none;
}

.scene-editor-summary-chip {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  padding: 0 3px 0 0;
  font-size: 10px;
  font-weight: 850;
}

.scene-token-list--review,
.material-token-list,
.scene-editor-row-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
}

.scene-token-list--review.is-drop-target,
.material-token-list.is-drop-target {
  outline: 1px dashed color-mix(in srgb, var(--accent) 58%, var(--line));
  outline-offset: 3px;
  border-radius: 8px;
}

.material-token-list--cell {
  min-height: 22px;
  max-height: 42px;
  margin: -3px -4px;
  padding: 3px 4px;
  overflow: hidden;
}

.material-token,
.excluded-token {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 7px;
  border: 1px solid transparent;
  background: var(--marker-teal);
  color: var(--token-ink);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.logging-scene-cell .scene-token,
.logging-scene-cell .material-token,
.scene-cell-editor-dialog .scene-token,
.scene-cell-editor-dialog .material-token {
  border-radius: 4px;
}

.excluded-token {
  background: var(--marker-red);
  color: var(--token-ink);
}

.scene-token .token-remove,
.material-token .token-remove,
.excluded-token .token-remove {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--control) 62%, transparent);
  color: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.scene-token .token-remove:hover,
.material-token .token-remove:hover,
.excluded-token .token-remove:hover {
  background: color-mix(in srgb, var(--danger) 22%, var(--control));
}

.scene-editor-warning-list,
.scene-editor-review-list,
.scene-editor-row-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  min-height: 26px;
  padding: 2px 0;
}

.scene-editor-row-list.is-drop-target,
.scene-editor-warning-list.is-drop-target,
.material-token-list.is-drop-target {
  outline: 1px dashed color-mix(in srgb, var(--accent) 58%, var(--line));
  outline-offset: 3px;
  border-radius: 8px;
}

.scene-editor-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--token-bg);
  color: var(--token-ink);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 860;
  line-height: 1;
  cursor: grab;
}

.scene-editor-token:hover,
.scene-editor-token:focus-visible {
  filter: brightness(1.12);
  color: var(--token-ink);
}

.scene-editor-token--normal {
  background: var(--marker-green);
}

.scene-editor-token--review {
  background: var(--marker-blue);
}

.scene-editor-token--new {
  background: var(--marker-purple);
}

.scene-editor-token--repeated {
  background: var(--marker-orange);
}

.scene-editor-token--repeat-origin {
  border-color: var(--marker-orange);
}

.scene-editor-token--material {
  background: var(--marker-teal);
}

.scene-editor-token--excluded,
.scene-editor-token--unresolved {
  background: var(--marker-red);
}

.scene-token-popover {
  position: absolute;
  z-index: 220;
  width: min(320px, calc(100vw - 40px));
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--muted) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, #05070c);
  box-shadow: var(--shadow);
  padding: 10px;
}

.scene-token-popover[hidden] {
  display: none;
}

.scene-token-popover-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.scene-token-popover-raw {
  color: color-mix(in srgb, var(--muted) 72%, var(--ink));
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.scene-token-popover-info {
  display: grid;
  gap: 3px;
  color: color-mix(in srgb, var(--warning) 78%, var(--ink));
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.scene-token-popover-section {
  display: grid;
  gap: 5px;
}

.scene-token-popover-section strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.scene-token-popover-options,
.scene-token-popover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.scene-token-popover-action {
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--token-bg);
  color: var(--token-ink);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.scene-token-popover-action:hover,
.scene-token-popover-action.is-selected {
  background: var(--marker-green);
  color: var(--token-ink);
}

.scene-token-popover-action.is-danger:hover {
  background: var(--marker-red);
  color: var(--token-ink);
}

.scene-token-popover-arrow {
  min-width: 30px;
  padding-inline: 9px;
  border-color: transparent;
  background: color-mix(in srgb, var(--marker-green) 88%, #111821);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.scene-token-popover-arrow:hover {
  background: color-mix(in srgb, var(--marker-green) 76%, #ffffff);
}

.scene-token-popover-custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.scene-token-popover-custom input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  padding: 5px 7px;
  font: inherit;
  font-size: 10px;
}

.scene-editor-warning {
  color: color-mix(in srgb, var(--warning) 78%, var(--ink));
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.scene-editor-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.32fr);
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.scene-editor-review-item--simple {
  background: transparent;
}

.scene-editor-review-item--simple .scene-editor-review-task:empty::after {
  content: "";
}

.scene-editor-review-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.scene-editor-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.scene-editor-choice {
  position: relative;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--token-bg);
  color: var(--token-ink);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.scene-editor-choice:not(.is-selected):hover {
  filter: brightness(1.12);
  color: var(--token-ink);
}

.scene-editor-choice.is-selected {
  background: var(--marker-green);
  color: var(--token-ink);
}

.scene-editor-choice.is-recommended:not(.is-selected) {
  background: var(--token-bg);
  color: var(--token-ink);
}

.scene-editor-choice--plain {
  background: var(--token-bg);
  color: var(--token-ink);
}

.scene-editor-choice[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--muted) 24%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, #000);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 150;
}

.scene-editor-choice[data-tooltip]:hover::after,
.scene-editor-choice[data-tooltip]:focus-visible::after {
  opacity: 1;
}

.scene-editor-custom-link,
.scene-editor-remove-link {
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.scene-editor-custom-link:hover,
.scene-editor-remove-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.scene-editor-remove-link {
  width: 20px;
  text-decoration: none;
}

.scene-token.scene-token--new.scene-editor-choice.is-selected {
  background: var(--marker-purple);
  color: var(--token-ink);
}

.scene-token.scene-token--repeated.scene-editor-choice.is-selected {
  background: var(--marker-orange);
  color: var(--token-ink);
}

.scene-editor-relation-task {
  display: grid;
  gap: 7px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--marker-orange) 14%, var(--surface-2));
}

.scene-editor-relation-title {
  color: color-mix(in srgb, var(--warning) 76%, var(--ink));
  font-size: 11px;
  font-weight: 850;
}

.scene-editor-relation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.scene-editor-review-label {
  color: color-mix(in srgb, var(--muted) 78%, var(--ink));
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.scene-editor-review-frame h3:not(:first-child) {
  margin-top: 16px;
}

.scene-editor-review-task {
  display: grid;
  gap: 4px;
  color: color-mix(in srgb, var(--warning) 76%, var(--ink));
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.scene-editor-custom-parse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.scene-editor-custom-parse[hidden] {
  display: none;
}

.scene-editor-review-item input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  padding: 6px 7px;
  font: inherit;
  font-size: 11px;
}

.scene-cell-editor-future {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  border: 1px dashed color-mix(in srgb, var(--muted) 24%, var(--line));
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
  font-size: 11px;
  font-weight: 760;
}

.scene-cell-editor-future svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px) {
  .scene-editor-review-item {
    grid-template-columns: 1fr;
  }
}

.logging-grid th.col-text,
.logging-grid td.col-text {
  width: 220px;
  min-width: 70px;
}

.logging-grid th.col-custom,
.logging-grid td.col-custom {
  width: 72px;
  min-width: 36px;
}

.logging-grid th.col-custom-wide,
.logging-grid td.col-custom-wide {
  width: 160px;
  min-width: 70px;
}

.logging-grid th.source-custom-header--compact {
  padding: 0;
  text-align: center;
}

.logging-grid th.source-custom-header--compact .th-label.icon-stack {
  min-height: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 0 1px;
}

.logging-grid th.source-custom-header--compact .th-label.icon-stack span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.86;
}

.logging-grid th.source-custom-header--compact .th-label.icon-stack svg {
  width: 14px;
  height: 14px;
}

.logging-grid .status-col {
  min-width: 42px;
  width: 42px;
  text-align: center;
}

.logging-grid th.status-col {
  padding: 0;
}

.logging-grid th.status-col .th-label.icon-first {
  min-height: 34px;
  gap: 1px;
  padding: 2px 0 1px;
}

.logging-grid th.status-col .th-label.icon-first span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 6.5px;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.82;
}

.logging-grid th.status-col .th-label.icon-first svg {
  width: 14px;
  height: 14px;
}

.logging-grid th.status-col .column-insight-tooltip {
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
}

.logging-grid th.status-col:hover .column-insight-tooltip,
.logging-grid th.status-col:focus-within .column-insight-tooltip {
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

.logging-grid th.status-col .column-insight-tooltip--status {
  width: max-content;
  max-width: min(220px, calc(100vw - 32px));
  min-width: 118px;
  padding: 8px 10px;
}

.logging-grid th.status-col .column-insight-tooltip--status .column-insight-row {
  grid-template-columns: 1fr;
  gap: 0;
  white-space: normal;
}

.logging-grid th.status-col .column-insight-tooltip--status-tight {
  min-width: 0;
  max-width: max-content;
}

.logging-grid th.status-col .column-insight-tooltip--status-tight .column-insight-row {
  white-space: nowrap;
}

.logging-grid input,
.logging-grid select {
  width: 100%;
  min-width: 0;
  height: 33px;
  border: 0;
  border-radius: 0;
  background: var(--control);
  color: var(--ink);
  padding: 6px 8px;
  box-shadow: none;
}

.logging-page.is-read-only .logging-grid input:not([type="hidden"]),
.logging-page.is-read-only .logging-grid select,
.logging-page.is-read-only .logging-grid textarea,
.edit-page.is-read-only input,
.edit-page.is-read-only textarea,
.edit-page.is-read-only select {
  cursor: default;
  opacity: 0.72;
}

.logging-page.is-read-only .grid-text-edit,
.edit-page.is-read-only .grid-text-edit,
.edit-page.is-read-only .danger-action,
.edit-page.is-read-only .edit-check-button {
  cursor: default;
  opacity: 0.52;
}

.logging-grid .text-preview-cell {
  position: relative;
}

.logging-grid .text-preview-cell.has-overflow::after {
  content: none;
}

.logging-grid .cell-preview-input {
  text-overflow: clip;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 30px;
  position: relative;
  z-index: 2;
}

.logging-grid .text-preview-cell.has-overflow .cell-preview-input {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 46px), transparent calc(100% - 24px));
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 46px), transparent calc(100% - 24px));
}

.grid-link-field {
  position: relative;
  display: flex;
  align-items: center;
}

.grid-link-field input {
  padding-right: 30px;
}

.grid-link-open {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
  opacity: 0.9;
}

.grid-link-open:hover {
  color: var(--accent);
}

.grid-link-open.is-hidden {
  display: none;
}

.grid-link-open svg {
  width: 13px;
  height: 13px;
}

.grid-multi-select {
  position: relative;
  min-width: 0;
}

.grid-multi-select-trigger {
  width: 100%;
  height: 33px;
  border: 0;
  border-radius: 0;
  background: var(--control);
  color: var(--ink);
  padding: 6px 24px 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font: inherit;
  cursor: pointer;
}

.grid-multi-select-trigger span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grid-multi-select-trigger svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
  flex: 0 0 auto;
}

.grid-multi-select-menu {
  position: absolute;
  z-index: 9;
  top: calc(100% + 3px);
  left: 4px;
  min-width: calc(100% - 8px);
  max-width: min(240px, calc(100vw - 24px));
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  padding: 4px;
}

.grid-multi-select-menu[hidden] {
  display: none;
}

.grid-multi-select-option {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 5px;
  padding: 5px 7px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.grid-multi-select-option:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.grid-multi-select-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.grid-rich-text {
  position: relative;
  display: flex;
  align-items: center;
}

.cell-preview-token-layer {
  position: absolute;
  inset: 0 30px 0 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  color: var(--ink);
}

.grid-rich-text.has-token-layer .cell-preview-input:not(:focus) {
  color: transparent;
  caret-color: var(--ink);
  background: transparent;
}

.grid-rich-text.has-token-layer .cell-preview-input:not(:focus)::placeholder {
  color: transparent;
}

.grid-rich-text:focus-within .cell-preview-token-layer {
  display: none;
}

.inline-text-token {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin: 0 2px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: color-mix(in srgb, var(--control-muted) 86%, var(--accent));
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
  vertical-align: baseline;
}

.inline-text-token--scene {
  background: color-mix(in srgb, #15803d 58%, var(--control-muted));
}

.inline-text-token--scene.is-out-of-day {
  background: color-mix(in srgb, #b91c1c 58%, var(--control-muted));
}

.inline-text-token--sound,
.inline-text-token--noise,
.inline-text-token--audio-defect,
.inline-text-token--sync-audio,
.inline-text-token--dubbing,
.inline-text-token--voiceover,
.inline-text-token--foley,
.inline-text-token--music,
.inline-text-token--mix,
.inline-text-token--m-and-e {
  background: color-mix(in srgb, #0f766e 52%, var(--control-muted));
}

.inline-text-token--graphics,
.inline-text-token--infographics,
.inline-text-token--cleanup,
.inline-text-token--compositing,
.inline-text-token--titles,
.inline-text-token--stabilization {
  background: color-mix(in srgb, #1d4ed8 52%, var(--control-muted));
}

.inline-text-token--color,
.inline-text-token--exposure,
.inline-text-token--white-balance,
.inline-text-token--match-color {
  background: color-mix(in srgb, #4f46e5 52%, var(--control-muted));
}

.inline-text-token--edit,
.inline-text-token--continuity,
.inline-text-token--timing,
.inline-text-token--pickup {
  background: color-mix(in srgb, #64748b 52%, var(--control-muted));
}

.inline-text-token--source-file,
.inline-text-token--offline,
.inline-text-token--proxy,
.inline-text-token--backup,
.inline-text-token--reports,
.inline-text-token--metadata,
.inline-text-token--problem,
.inline-text-token--qc,
.inline-text-token--export,
.inline-text-token--aaf,
.inline-text-token--xml-edl,
.inline-text-token--integration {
  background: color-mix(in srgb, #b45309 56%, var(--control-muted));
}

.inline-text-token--defect,
.inline-text-token--visual-defect,
.inline-text-token--urgent {
  background: color-mix(in srgb, #b91c1c 66%, var(--control-muted));
}

.inline-text-token--comment,
.inline-text-token--stock,
.inline-text-token--rights,
.inline-text-token--brand,
.inline-text-token--music-rights,
.inline-text-token--release,
.inline-text-token--question,
.inline-text-token--subtitles {
  background: color-mix(in srgb, #475569 52%, var(--control-muted));
}

.grid-text-storage {
  display: none;
}

.grid-text-edit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.9;
  z-index: 2;
}

.grid-text-edit:hover {
  color: var(--accent);
}

.grid-text-edit.is-hidden {
  display: none;
}

.grid-text-edit svg {
  width: 13px;
  height: 13px;
}

.logging-grid .col-volume input {
  text-align: center;
}

.logging-grid [data-volume-cell] {
  position: relative;
}

.logging-grid [data-volume-cell]::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

.logging-grid [data-volume-cell].is-volume-low::before {
  opacity: 0.96;
  background: color-mix(in srgb, var(--marker-blue) 82%, #ffffff 18%);
}

.logging-grid [data-volume-cell].is-volume-high::before {
  opacity: 0.96;
  background: color-mix(in srgb, var(--danger) 82%, #ffffff 18%);
}

.logging-grid .status-toggle {
  position: relative;
  width: 100%;
  height: 33px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateZ(0);
}

.logging-grid .status-toggle input {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 22px;
  min-width: 0;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  transform: translate(-50%, -50%);
}

.logging-grid .status-toggle span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  box-shadow:
    inset 0 0 0 1.35px color-mix(in srgb, var(--muted) 52%, transparent);
  transition: background 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}

.logging-grid .status-toggle span::before {
  position: absolute;
  content: "";
  width: 5.8px;
  height: 9.2px;
  border-right: 1.65px solid #ffffff;
  border-bottom: 1.65px solid #ffffff;
  opacity: 0;
  transform: translateY(-1px) rotate(42deg) scale(0.72);
  transition: transform 150ms ease, opacity 150ms ease;
}

.logging-grid .status-toggle span::after {
  position: absolute;
  inset: -8px;
  content: "";
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

.logging-grid .status-toggle input:checked + span {
  background: var(--accent);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--accent) 24%, transparent);
}

.logging-grid .status-toggle input:checked + span::before {
  opacity: 1;
  transform: translateY(-1px) rotate(42deg) scale(1);
}

.logging-grid .status-toggle.is-pulsing input:checked + span::after {
  animation: logging-checkbox-pulse-low 420ms ease-out;
}

.logging-grid .status-toggle:hover span {
  box-shadow:
    inset 0 0 0 1.35px color-mix(in srgb, var(--accent) 45%, var(--muted) 55%);
}

.logging-grid .status-toggle:hover input:checked + span {
  box-shadow: 0 2px 7px color-mix(in srgb, var(--accent) 24%, transparent);
}

.logging-grid .status-toggle input:focus-visible + span {
  box-shadow:
    inset 0 0 0 1.35px color-mix(in srgb, var(--muted) 52%, transparent),
    0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
}

.logging-grid .status-toggle input:checked:focus-visible + span {
  box-shadow:
    0 2px 7px color-mix(in srgb, var(--accent) 24%, transparent),
    0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
}

.source-montage-cell {
  position: relative;
  padding: 0;
}

.source-montage-cell-inner {
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.source-montage-cell-inner .status-toggle {
  width: 24px;
  min-width: 24px;
}

.source-montage-cell.has-batches {
  cursor: pointer;
}

.source-montage-cell.has-batches .status-toggle input:checked + span {
  background: var(--marker-green);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--marker-green) 28%, transparent);
}

.source-montage-cell.has-batches .status-toggle input:checked + span::before {
  border-color: #ffffff;
}

.source-docs-cell {
  min-width: 42px;
  height: 33px;
}

.logging-page[data-source-docs-mode="uploads"] .logging-grid th[data-column-key="production_reports"] {
  cursor: pointer;
}

.source-docs-cell.source-docs-status-manual .status-toggle input:checked + span {
  background: var(--accent);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--accent) 24%, transparent);
}

.source-docs-cell.source-docs-status-partial .status-toggle input:checked + span {
  background: #c77a2e;
  box-shadow: 0 2px 7px color-mix(in srgb, #c77a2e 30%, transparent);
}

.source-docs-cell.source-docs-status-done .status-toggle input:checked + span {
  background: var(--marker-green);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--marker-green) 28%, transparent);
}

.source-docs-slots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
  height: 33px;
  min-height: 33px;
  padding: 0 2px;
  overflow: hidden;
}

.source-docs-cell.is-docs-detailed .source-montage-cell-inner {
  display: none;
}

.source-docs-cell.is-docs-detailed .source-docs-slots {
  display: flex;
}

.source-doc-slot {
  width: 34px;
  min-width: 34px;
  height: 31px;
  padding: 0 1px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font: inherit;
  font-size: 7.5px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.source-doc-slot svg,
.source-doc-slot [data-lucide] {
  width: 12px;
  height: 12px;
}

.source-doc-slot--done {
  color: color-mix(in srgb, var(--marker-green) 62%, var(--ink-strong));
}

.source-doc-slot--review {
  color: color-mix(in srgb, #e8a34f 72%, var(--ink-strong));
}

.source-doc-slot:hover,
.source-doc-slot:focus-visible {
  outline: none;
  color: var(--ink-strong);
}

.source-doc-slot span {
  max-width: 34px;
  min-height: 12px;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  text-align: center;
  line-height: 1.04;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.source-docs-type-hint {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  z-index: 86;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 96%, black 4%);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  transform: translateX(-50%);
  pointer-events: none;
}

.source-docs-type-hint.is-portaled {
  position: fixed;
  top: var(--source-docs-hint-top, 0);
  left: var(--source-docs-hint-left, 0);
  z-index: 200000;
  transform: none;
}

.source-docs-setup-menu {
  width: 332px;
}

.source-docs-setup-types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 2px 0 6px;
}

.source-docs-setup-types input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-docs-setup-types label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-height: 42px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 820;
  cursor: pointer;
}

.source-docs-setup-types label::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 2px;
  border: 1px solid color-mix(in srgb, var(--muted) 62%, transparent);
  border-radius: 4px;
  background: transparent;
}

.source-docs-setup-types label:has(input:checked) {
  color: var(--ink-strong);
}

.source-docs-setup-types label:has(input:checked)::before {
  content: "✓";
  display: grid;
  place-items: center;
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.source-docs-setup-types label:has(input:checked) svg,
.source-docs-setup-types label:has(input:checked) [data-lucide] {
  color: var(--accent);
}

.source-docs-setup-types svg,
.source-docs-setup-types [data-lucide] {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  flex: 0 0 13px;
}

.source-docs-setup-help {
  margin-top: -1px !important;
  color: color-mix(in srgb, var(--muted) 86%, transparent) !important;
  font-size: 10px !important;
  font-weight: 680 !important;
  line-height: 1.28 !important;
}

.source-doc-type-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.12;
}

.source-doc-type-copy > span {
  color: currentColor;
}

.source-doc-type-copy small {
  display: block;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 9.5px;
  font-weight: 680;
  line-height: 1.18;
}

.source-montage-receipt-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 85;
  width: 190px;
  padding: 5px;
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 98%, black 4%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, -3px);
  pointer-events: none;
  transition: opacity 110ms ease, transform 110ms ease;
}

.source-montage-receipt-menu--setup {
  width: 238px;
}

.source-montage-receipt-menu--attached {
  position: fixed;
  top: var(--source-montage-menu-top, 50%);
  left: var(--source-montage-menu-left, 50%);
  width: 260px;
}

.source-montage-receipt-menu.is-portaled {
  position: fixed;
  top: var(--source-montage-menu-top, 0);
  left: var(--source-montage-menu-left, 0);
  z-index: 200000;
  max-height: min(var(--source-montage-menu-max-height, 420px), calc(100vh - 16px));
  overflow: auto;
  transform: translateY(-3px);
}

.source-montage-receipt-menu p {
  margin: 0 0 2px;
  padding: 5px 6px 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
}

.source-montage-receipt-menu.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.source-montage-receipt-menu.is-portaled.is-open {
  transform: translateY(0);
}

.source-montage-receipt-menu button {
  min-height: 28px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.source-montage-receipt-menu button:hover,
.source-montage-receipt-menu button:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--accent) 14%, var(--control));
}

.source-montage-receipt-menu button.is-danger {
  color: color-mix(in srgb, var(--danger) 82%, var(--ink-strong));
}

.source-montage-receipt-menu button.is-danger:hover,
.source-montage-receipt-menu button.is-danger:focus-visible {
  background: color-mix(in srgb, var(--danger) 15%, var(--control));
}

.source-montage-drawer {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 42px);
}

.source-montage-drawer[hidden] {
  display: none;
}

.source-document-drawer {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 42px);
}

.source-document-drawer[hidden] {
  display: none;
}

.source-document-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 28px));
  height: min(760px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.source-document-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.source-document-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 88%, var(--accent) 5%);
}

.source-document-upload.is-dragging {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 44%, transparent);
}

.source-document-upload [data-source-document-upload-name] {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-document-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.source-document-content {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(420px, 1fr);
  gap: 12px;
  overflow: hidden;
}

.source-document-empty {
  padding: 18px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.source-document-empty.is-error {
  color: color-mix(in srgb, var(--danger) 78%, var(--ink-strong));
}

.source-document-file {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  border: 1px solid transparent;
  cursor: pointer;
}

.source-document-file.is-active {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
}

.source-document-file > svg,
.source-document-file > [data-lucide] {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.source-document-file strong,
.source-document-file span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-document-file strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 820;
}

.source-document-file span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.source-document-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-document-download-link {
  width: 34px;
  min-width: 34px;
  padding-inline: 0;
  display: inline-grid;
  place-items: center;
}

.source-document-download-link svg,
.source-document-download-link [data-lucide] {
  width: 16px;
  height: 16px;
}

.source-document-preview {
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.source-document-preview-stack {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
}

.source-document-preview-empty {
  min-height: 240px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 66%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.source-document-preview-empty.is-error {
  color: color-mix(in srgb, var(--danger) 78%, var(--ink-strong));
}

.source-document-preview-pane {
  min-width: 0;
  min-height: 0;
}

.source-document-preview-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: #f2f2f0;
  color: #333;
}

.source-document-preview-head strong,
.source-document-preview-head span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-document-preview-head strong {
  font-size: 11px;
  font-weight: 820;
}

.source-document-preview-head span {
  margin-top: 1px;
  color: #707070;
  font-size: 9px;
  font-weight: 720;
}

.source-document-preview-frame {
  min-height: 0;
  height: 100%;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: #f8f8f6;
}

.source-document-preview-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  display: block;
  background: #f8f8f6;
}

.source-document-preview-text {
  min-height: 0;
  padding: 14px;
  border-radius: 0 0 8px 8px;
  overflow: auto;
  background: #f8f8f6;
  color: #171717;
}

.source-document-preview-text pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.source-document-preview-note {
  margin-top: 12px;
  color: #707070;
  font-size: 10px;
  font-weight: 760;
}

@media (max-width: 900px) {
  .source-document-panel {
    height: min(760px, calc(100vh - 22px));
  }

  .source-document-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(320px, 1fr);
  }

  .source-document-list {
    max-height: 180px;
  }
}

.source-montage-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

.source-montage-panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 28px));
  height: min(820px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.source-montage-drawer.is-upload-empty .source-montage-panel {
  width: min(560px, calc(100vw - 28px));
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 28px);
}

.source-montage-header,
.source-montage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface-2) 54%, transparent);
}

.source-montage-footer {
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 0;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.source-montage-footer > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

.source-montage-footer [hidden],
.source-montage-upload [hidden] {
  display: none !important;
}

.source-montage-footer .primary-action,
.source-montage-footer .secondary-action {
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding-inline: 12px;
  font-size: 12px;
  font-weight: 800;
}

.source-montage-footer [data-source-montage-mark-only],
.source-montage-footer [data-source-montage-clear] {
  margin-right: auto;
}

.source-montage-header [data-source-montage-close] {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink-strong);
}

.source-montage-header [data-source-montage-close]:hover,
.source-montage-header [data-source-montage-close]:focus-visible {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.source-montage-panel .source-montage-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 840;
}

.source-montage-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.source-montage-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 12px;
  overflow: auto;
}

.source-montage-upload {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, 0.38fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 14px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 88%, var(--accent) 5%);
  transition: background 120ms ease, box-shadow 120ms ease;
}

.source-montage-upload.is-dragging {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 44%, transparent);
}

.source-montage-drawer.is-reviewing .source-montage-upload {
  display: none;
}

.source-montage-drawer.is-loading .source-montage-upload,
.source-montage-drawer.is-loading .source-montage-review {
  display: none;
}

.source-montage-drawer.is-loading .source-montage-body {
  grid-template-rows: auto minmax(0, 1fr);
}

.source-montage-drawer.is-upload-empty .source-montage-body {
  display: block;
  overflow: visible;
}

.source-montage-drawer.is-upload-empty .source-montage-upload {
  display: grid;
  min-height: 210px;
  align-content: center;
  justify-items: center;
  text-align: center;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 24px;
  background: color-mix(in srgb, var(--surface-2) 88%, var(--accent) 5%);
}

.source-montage-drawer.is-upload-empty .source-montage-summary,
.source-montage-drawer.is-upload-empty .source-montage-review {
  display: none;
}

.source-montage-drawer.is-upload-empty [data-source-montage-clear],
.source-montage-drawer.is-upload-empty [data-source-montage-apply-shell] {
  display: none !important;
}

.source-montage-upload span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-montage-upload-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.source-montage-upload-copy strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 840;
}

.source-montage-upload-copy span {
  font-size: 11px;
}

.source-montage-upload-actions {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-montage-drawer.is-upload-empty .source-montage-upload-copy {
  max-width: 390px;
}

.source-montage-drawer.is-upload-empty .source-montage-upload-copy strong {
  font-size: 16px;
  line-height: 1.1;
  font-weight: 840;
}

.source-montage-drawer.is-upload-empty .source-montage-upload-copy span {
  font-size: 12px;
  line-height: 1.35;
}

.source-montage-upload [data-source-montage-file-trigger] {
  min-height: 34px;
  font-size: 12px;
  font-weight: 800;
}

.source-montage-drawer.is-upload-empty .source-montage-upload [data-source-montage-file-trigger] {
  width: auto;
  min-height: 40px;
  padding: 9px 15px;
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 18%, var(--control));
  color: var(--ink-strong);
}

.source-montage-drawer.is-upload-empty .source-montage-upload [data-source-montage-file-trigger]:hover,
.source-montage-drawer.is-upload-empty .source-montage-upload [data-source-montage-file-trigger]:focus-visible {
  background: color-mix(in srgb, var(--accent) 24%, var(--control));
}

.source-montage-upload [data-source-montage-file-trigger] span,
.source-montage-upload [data-source-montage-file-trigger] svg,
.source-montage-upload [data-source-montage-file-trigger] i {
  color: inherit;
  opacity: 1;
}

.source-montage-phone-panel {
  width: min(340px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
}

.source-montage-phone-panel[hidden] {
  display: none;
}

.source-montage-phone-qr {
  width: min(300px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  color: #101828;
  overflow: hidden;
}

.source-montage-phone-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.source-montage-phone-copy,
.source-montage-phone-status {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.source-montage-phone-copy strong {
  color: var(--ink-strong);
  font-size: 12.5px;
  font-weight: 840;
}

.source-montage-phone-copy span,
.source-montage-phone-copy a,
.source-montage-phone-status {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1.35;
}

.source-montage-phone-copy a {
  width: fit-content;
  color: var(--accent);
  text-decoration: none;
}

.source-montage-phone-copy a:hover,
.source-montage-phone-copy a:focus-visible {
  color: var(--ink-strong);
}

.source-montage-phone-status.is-error {
  color: color-mix(in srgb, var(--danger) 74%, var(--ink-strong));
}

.source-montage-drawer.is-upload-empty .source-montage-upload [data-source-montage-upload-name] {
  max-width: min(460px, 100%);
  justify-self: center;
  opacity: 0.82;
}

.source-montage-summary,
.source-montage-review {
  display: grid;
  gap: 8px;
}

.source-montage-review {
  min-height: 0;
  height: 100%;
  min-width: 0;
  overflow: auto;
}

.source-montage-review-grid {
  --source-montage-field-width: clamp(220px, 20vw, 280px);
  --source-montage-action-width: 22px;
  --source-montage-preview-min-width: 420px;
  min-height: 0;
  height: 100%;
  min-width: calc(
    var(--source-montage-field-width)
    + var(--source-montage-action-width)
    + var(--source-montage-preview-min-width)
    + 27px
  );
  display: grid;
  grid-template-columns: max-content minmax(var(--source-montage-preview-min-width), 1fr);
  align-items: stretch;
  gap: 10px;
  overflow: visible;
}

.source-montage-candidate-list {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 2px 4px 4px;
  overflow: auto;
}

.source-montage-candidate-page-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: max-content;
  max-width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
}

.source-montage-candidate-page-group::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--source-montage-field-width);
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--ink) 46%, transparent);
  border-radius: 7px;
  pointer-events: none;
  z-index: 2;
}

.source-montage-batch-row,
.source-montage-candidate-row {
  display: grid;
  grid-template-columns: var(--source-montage-field-width) var(--source-montage-action-width);
  align-items: center;
  justify-content: start;
  gap: 7px;
  min-height: 36px;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.source-montage-batch-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  gap: 7px;
  padding: 6px 8px;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
}

.source-montage-candidate-row {
  cursor: pointer;
}

.source-montage-candidate-row.is-active .source-montage-candidate-token {
  background: color-mix(in srgb, var(--marker-green) 50%, var(--surface-2));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 72%, transparent),
    0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.source-montage-candidate-row:focus-visible {
  outline: none;
}

.source-montage-batch-row button,
.source-montage-candidate-row button {
  width: auto;
}

.source-montage-candidate-token {
  min-width: 0;
  width: var(--source-montage-field-width);
  box-sizing: border-box;
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
}

.source-montage-row-title {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-montage-row-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.source-montage-candidate-code {
  min-width: 0;
  width: 100%;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 860;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-montage-candidate-code-input {
  appearance: none;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink-strong);
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.22;
  box-shadow: none !important;
  outline: none !important;
  caret-color: var(--ink-strong);
}

.source-montage-candidate-code-input:focus {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.source-montage-candidate-code-input:focus-visible {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.source-montage-candidate-score {
  color: color-mix(in srgb, var(--ink) 76%, transparent);
  font-size: 10px;
  font-weight: 820;
  min-width: 30px;
  text-align: right;
}

.source-montage-confidence--high .source-montage-candidate-token {
  background: color-mix(in srgb, var(--marker-green) 24%, var(--surface-2));
}

.source-montage-confidence--mid .source-montage-candidate-token {
  background: color-mix(in srgb, #b9822e 28%, var(--surface-2));
}

.source-montage-confidence--low .source-montage-candidate-token {
  background: color-mix(in srgb, var(--danger) 20%, var(--surface-2));
}

.source-montage-candidate-open,
.source-montage-candidate-remove {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 82%, white 18%);
  cursor: pointer;
}

.source-montage-candidate-open {
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}

.source-montage-candidate-open:hover,
.source-montage-candidate-open:focus-visible {
  outline: none;
  color: var(--ink-strong);
  background: transparent;
}

.source-montage-candidate-remove:hover,
.source-montage-candidate-remove:focus-visible {
  outline: none;
  color: var(--danger);
  background: transparent;
}

.source-montage-candidate-open svg,
.source-montage-candidate-remove svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.source-montage-manual-row {
  display: grid;
  grid-template-columns: var(--source-montage-field-width) var(--source-montage-action-width);
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}

.source-montage-manual-row .secondary-action {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  align-self: center;
  justify-self: center;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: color-mix(in srgb, var(--muted) 82%, white 18%);
  line-height: 0;
  transform: translateY(1px);
}

.source-montage-manual-row .secondary-action:hover,
.source-montage-manual-row .secondary-action:focus-visible {
  outline: none;
  background: transparent;
  box-shadow: none;
  color: var(--ink-strong);
}

.source-montage-manual-row .secondary-action span {
  display: none;
}

.source-montage-manual-row .secondary-action svg,
.source-montage-manual-row .secondary-action i {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.source-montage-manual-row [data-source-montage-manual-code] {
  min-height: 36px;
}

.source-montage-manual-row [data-source-montage-manual-code]:focus {
  outline: none;
  box-shadow: none;
  border-color: color-mix(in srgb, var(--line) 75%, transparent);
}

.source-montage-manual-row [data-source-montage-manual-code]:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: color-mix(in srgb, var(--line) 75%, transparent);
}

.source-montage-apply-option {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}

.source-montage-apply-option input {
  flex: 0 0 auto;
}

.source-montage-preview-pane {
  position: relative;
  min-width: var(--source-montage-preview-min-width, 420px);
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: #f7f7f5;
  color: #171717;
  overflow: hidden;
}

.source-montage-preview-active-code {
  position: absolute;
  top: 38px;
  left: 10px;
  z-index: 8;
  max-width: min(220px, calc(100% - 20px));
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 860;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.source-montage-preview-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  background: #f2f2f0;
  color: #555;
  font-size: 10px;
  font-weight: 800;
}

.source-montage-preview-page-switcher {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.source-montage-preview-page-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.source-montage-preview-page-label.is-evidence-target {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(245, 166, 35, 0.32);
}

.source-montage-preview-page-nav .secondary-action {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-color: transparent;
  background: #f8f8f6;
  color: #222;
  font-size: 16px;
}

.source-montage-preview-page-nav .secondary-action:disabled {
  opacity: 0.35;
  cursor: default;
}

.source-montage-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 8px 10px;
  background: #ededeb;
}

.source-montage-preview-title {
  width: fit-content;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 5px;
  color: #111;
  font-size: 12px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-montage-preview-title.is-evidence-target,
.source-montage-preview-cell.is-evidence-target {
  background: rgba(245, 166, 35, 0.32);
}

.source-montage-preview-meta {
  color: #666;
  font-size: 10px;
  font-weight: 720;
}

.source-montage-preview-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: #555;
  font-size: 10px;
  font-weight: 820;
}

.source-montage-preview-tools .secondary-action {
  min-height: 24px;
  height: 24px;
  padding: 0 7px;
  border-color: transparent;
  background: #f8f8f6;
  color: #222;
  font-size: 10px;
}

.source-montage-preview-tools .secondary-action i {
  width: 14px;
  height: 14px;
}

.source-montage-preview-tools .source-montage-rotate-action {
  min-width: 30px;
  width: 30px;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.07);
}

.source-montage-preview-tools .source-montage-rotate-action:hover,
.source-montage-preview-tools .source-montage-rotate-action:focus-visible {
  background: #e9eefb;
  color: #1f4fd8;
}

.source-montage-preview-tools .source-montage-rotate-action i {
  width: 18px;
  height: 18px;
}

.source-montage-preview-viewport {
  min-height: 0;
  height: 100%;
  overflow: auto;
  cursor: grab;
  background: #f8f8f6;
  overscroll-behavior: contain;
  user-select: none;
}

.source-montage-preview-viewport.is-panning {
  cursor: grabbing;
}

.source-montage-preview-stage {
  position: relative;
  min-width: 1px;
  min-height: 1px;
}

.source-montage-preview-canvas {
  width: max-content;
  min-width: 100%;
  transform-origin: top left;
}

.source-montage-preview-viewport--ocr .source-montage-preview-canvas {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.source-montage-preview-viewport--image .source-montage-preview-canvas {
  min-width: 0;
  padding: 0;
  background: #f8f8f6;
}

.source-montage-preview-image-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  background: #f8f8f6;
}

.source-montage-preview-page-surface {
  position: relative;
  display: inline-block;
  line-height: 0;
  transform-origin: center center;
}

.source-montage-preview-image-frame.is-rotated .source-montage-preview-page-surface {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--montage-page-rotation, 0deg));
}

.source-montage-preview-image-frame img {
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.source-montage-preview-viewport.is-image-loading .source-montage-preview-image-frame img {
  opacity: 0;
}

.source-montage-preview-viewport.is-image-loading .source-montage-preview-ocr-highlight {
  visibility: hidden;
}

.source-montage-preview-ocr-highlight {
  position: absolute;
  display: block;
  border-radius: 3px;
  background: rgba(245, 166, 35, 0.34);
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.42);
  pointer-events: auto;
}

.source-montage-preview-image-frame.is-rotated .source-montage-preview-ocr-highlight {
  background: rgba(245, 166, 35, 0.22);
  box-shadow: inset 0 0 0 2px rgba(245, 166, 35, 0.72);
}

.source-montage-preview-ocr-hud {
  position: absolute;
  left: 0;
  bottom: calc(100% + 2px);
  display: none;
  align-items: center;
  gap: 3px;
  transform: rotate(var(--montage-page-hud-rotation, 0deg)) scale(var(--montage-preview-inverse-scale, 1));
  transform-origin: left bottom;
  pointer-events: auto;
  white-space: nowrap;
}

.source-montage-preview-ocr-label {
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    1px 0 1px rgba(0, 0, 0, 0.8),
    -1px 0 1px rgba(0, 0, 0, 0.8),
    0 -1px 1px rgba(0, 0, 0, 0.8);
}

.source-montage-preview-ocr-remove {
  width: 14px;
  height: 14px;
  border: 0;
  padding: 0;
  color: #cbd5e1;
  background: transparent;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    1px 0 1px rgba(0, 0, 0, 0.8),
    -1px 0 1px rgba(0, 0, 0, 0.8),
    0 -1px 1px rgba(0, 0, 0, 0.8);
}

.source-montage-preview-ocr-remove:hover,
.source-montage-preview-ocr-remove:focus-visible {
  color: #ef4444;
  outline: none;
}

.source-montage-preview-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 6px;
  color: #171717;
  background: #fff;
  font-size: 11px;
  line-height: 1.35;
}

.source-montage-preview-line span {
  color: #6c6c68;
  font-weight: 820;
}

.source-montage-preview-line p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.source-montage-preview-line.is-evidence-target {
  background: rgba(245, 166, 35, 0.22);
}

.source-montage-preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 11px;
  line-height: 1.2;
}

.source-montage-preview-cell {
  padding: 3px 5px;
  border: 1px solid #b9b9b9;
  color: #111;
  background: #fff;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-montage-preview-cell.is-bold {
  font-weight: 820;
}

.source-montage-preview-cell.is-wrapped {
  white-space: pre-wrap;
}

.source-montage-preview-empty {
  align-self: center;
  justify-self: center;
  padding: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-align: center;
}

@media (max-width: 720px) {
  .source-montage-drawer {
    padding: 0;
  }

  .source-montage-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .source-montage-upload-actions,
  .source-montage-phone-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@keyframes logging-checkbox-pulse-low {
  0% {
    opacity: 0.52;
    transform: scale(0.58);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 68%, transparent);
  }
  70% {
    opacity: 0.18;
    transform: scale(1.62);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent);
  }
  100% {
    opacity: 0;
    transform: scale(1.78);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logging-grid .status-toggle.is-pulsing input:checked + span::after {
    animation: none;
  }
}

.logging-grid input:not([type="checkbox"]):focus,
.logging-grid select:focus {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  box-shadow: none;
}

.logging-grid .shoot-date-input {
  color: var(--ink-strong);
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.logging-grid .received-date-input {
  color: var(--muted);
  font-weight: 430;
  font-variant-numeric: tabular-nums;
}

.logging-date-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 33px;
}

.logging-date-control:hover,
.logging-date-control.is-calendar-open {
  z-index: 1600;
}

.logging-date-control .date-mask {
  padding-right: 8px;
}

.logging-date-popover {
  position: fixed;
  top: var(--date-popover-top, 0);
  left: var(--date-popover-left, 0);
  z-index: 1600;
  display: none;
  width: 212px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
}

.finishing-choice-menu.is-portal-menu .logging-date-popover {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  width: 100%;
  margin-top: 8px;
  box-shadow: none;
}

.finishing-choice-menu.is-portal-menu .logging-date-calendar-head {
  grid-template-columns: 32px 1fr 32px;
}

.finishing-choice-menu.is-portal-menu .logging-date-day,
.finishing-choice-menu.is-portal-menu .logging-date-empty {
  height: 30px;
}

.finishing-choice-menu.is-portal-menu .logging-date-day {
  font-size: 12px;
}

.logging-date-control.is-calendar-open .logging-date-popover {
  display: block;
}

.logging-page.is-read-only .logging-date-popover {
  display: none !important;
}

.logging-date-calendar-head {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.logging-date-calendar-head button,
.logging-date-day {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.logging-date-calendar-head button {
  width: 28px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
}

.logging-date-calendar-head button:hover,
.logging-date-day:hover {
  background: var(--control-muted);
  color: var(--ink-strong);
}

.logging-date-weekdays,
.logging-date-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.logging-date-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.logging-date-day,
.logging-date-empty {
  height: 24px;
}

.logging-date-day {
  font-size: 11px;
  font-weight: 820;
}

.logging-date-day.is-selected {
  background: var(--accent);
  color: #fff;
}

.logging-grid tr:hover td,
.logging-grid tr:hover .day-cell {
  background: var(--control-muted);
}

.search-text-hit {
  display: inline;
  padding: 0 2px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--search-accent) 46%, transparent);
  color: var(--ink);
}

.scene-token.is-search-hit,
.material-token.is-search-hit {
  box-shadow: none;
}

.scene-token[data-repeat-origin="true"].is-search-hit {
  border-color: var(--marker-orange);
}

.inline-text-token.is-search-hit {
  border-color: var(--search-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--search-accent) 62%, transparent);
}

.logging-grid td.col-scenes.has-token-search-hit .scene-token:not(.is-search-hit),
.logging-grid td.col-scenes.has-token-search-hit .material-token:not(.is-search-hit),
.logging-grid td.col-scenes.has-token-search-miss .scene-token,
.logging-grid td.col-scenes.has-token-search-miss .material-token {
  opacity: 0.32;
  filter: saturate(0.72) brightness(0.78);
}

.logging-grid .date-mask.is-search-hit {
  background: color-mix(in srgb, var(--search-accent) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--search-accent) 62%, transparent);
}

.resizable-column {
  position: relative;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: 6px;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}

.column-resizer::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 1px;
  background: transparent;
}

.column-resizer:hover::before,
.resizing-columns .column-resizer::before {
  background: var(--accent);
}

.cell-preview-popover {
  position: fixed;
  z-index: 50;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.text-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--modal-backdrop);
}

.text-editor-modal[hidden] {
  display: none;
}

.text-editor-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.text-editor-header {
  min-height: 46px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.text-editor-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-strong);
}

.text-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.text-editor-tool {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
  cursor: pointer;
}

.text-editor-tool:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  color: var(--accent);
}

.text-editor-tool svg {
  width: 14px;
  height: 14px;
}

.text-editor-close,
.text-editor-save {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.text-editor-save {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.text-editor-save:hover {
  background: var(--accent-dark);
}

.text-editor-body {
  padding: 12px;
}

.text-editor-surface {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.45;
  overflow: auto;
  white-space: normal;
}

.text-editor-surface:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.text-editor-surface ul,
.text-editor-surface ol {
  margin: 0 0 0 20px;
  padding: 0;
}

.text-editor-surface p,
.text-editor-surface div {
  margin: 0;
}

.text-editor-surface p:last-child,
.text-editor-surface div:last-child {
  margin-bottom: 0;
}

.cell-preview-popover ul,
.cell-preview-popover ol {
  margin: 0 0 0 18px;
  padding: 0;
}

.cell-preview-popover p,
.cell-preview-popover div {
  margin: 0;
}

.cell-preview-popover p:last-child,
.cell-preview-popover div:last-child {
  margin-bottom: 0;
}

.resizing-columns,
.resizing-columns * {
  cursor: col-resize !important;
  user-select: none !important;
}

.edit-page {
  min-width: 0;
  display: grid;
  gap: 14px;
  margin-top: -22px;
  padding-top: calc(var(--edit-top-panel-height) + 22px);
  --edit-production-block-accent: #8bd3ff;
  --edit-production-block-hover-accent: #f5fbff;
  --edit-repeat-day-accent: var(--marker-orange);
  --edit-scene-note-accent: #5f8cff;
  --edit-approved-green: #2f8f5a;
  --edit-action-available: color-mix(in srgb, var(--edit-approved-green) 72%, #b9ffd0);
  --edit-vertical-episode-sticky-top: calc(var(--topbar-height) + var(--edit-top-panel-height) + 8px);
}

.edit-page.is-edit-empty {
  min-height: calc(100vh - var(--topbar-height) - 24px);
  margin-top: 0;
  padding-top: 0;
}

.edit-page.is-edit-empty .edit-header {
  display: none;
}

.edit-page.is-edit-empty .edit-board,
.edit-page.is-edit-empty .edit-vertical-board {
  width: 100%;
  min-height: calc(100vh - var(--topbar-height) - 48px);
  padding: 0;
}

.edit-page.is-edit-empty .edit-scroll {
  width: 100%;
  overflow: visible;
  padding-bottom: 0;
}

.edit-page.is-edit-empty .edit-progress-grid {
  width: 100%;
  min-width: 0;
}

.edit-header {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  z-index: 1100;
  width: auto;
  height: var(--edit-top-panel-height);
  min-width: 0;
  align-items: flex-start;
  padding: 16px clamp(16px, 2vw, 40px) 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
  background: var(--page-backdrop);
  box-shadow: 0 12px 0 var(--page-backdrop);
  overflow: visible;
}

.edit-header-layout {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: visible;
}

.edit-page.has-selected-scene .edit-header-layout {
  grid-template-columns: minmax(0, 1fr);
}

.edit-page.has-selected-scene .edit-scene-panel {
  grid-column: 1;
}

.edit-scene-panel {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(0, 420px) minmax(0, 1fr);
  align-items: stretch;
  column-gap: clamp(8px, 1.2vw, 14px);
  row-gap: 0;
  min-height: 110px;
  height: 110px;
  max-height: 110px;
  margin: 0;
  padding: 0;
  padding-right: 84px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.edit-scene-summary {
  min-width: 0;
  align-self: start;
  display: grid;
  align-content: start;
  gap: 7px;
  padding-right: 2px;
}

.edit-scene-info-token {
  --edit-scene-token-bg: color-mix(in srgb, var(--marker-slate) 42%, var(--control-muted));
  --edit-scene-token-ink: var(--ink);
  width: fit-content;
  max-width: 220px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: var(--edit-scene-token-bg);
  color: var(--edit-scene-token-ink);
}

.edit-scene-info-token.is-received {
  --edit-scene-token-bg: color-mix(in srgb, #9a4f1c 82%, var(--control-muted));
  --edit-scene-token-ink: #fff7ed;
}

.edit-scene-info-token.is-ready {
  --edit-scene-token-bg: color-mix(in srgb, #1f5b37 82%, var(--control-muted));
  --edit-scene-token-ink: #f0fff4;
}

.edit-scene-info-token.is-edited {
  --edit-scene-token-bg: var(--edit-approved-green);
  --edit-scene-token-ink: #ffffff;
}

.edit-scene-info-token.is-in-progress {
  --edit-scene-token-bg: color-mix(in srgb, #3b82f6 36%, var(--control-muted));
  --edit-scene-token-ink: #dbeafe;
}

.edit-scene-info-token.is-assembled {
  --edit-scene-token-bg: var(--marker-green);
  --edit-scene-token-ink: #ecfdf5;
}

.edit-scene-info-token.is-revision {
  --edit-scene-token-bg: color-mix(in srgb, #f59e0b 42%, var(--control-muted));
  --edit-scene-token-ink: #fff7ed;
}

.edit-scene-info-token.is-removed {
  --edit-scene-token-bg: color-mix(in srgb, var(--danger) 46%, var(--control-muted));
  --edit-scene-token-ink: #fff1f2;
}

.edit-scene-info-token.is-episode {
  --edit-scene-token-bg: color-mix(in srgb, var(--marker-blue) 34%, var(--control-muted));
  --edit-scene-token-ink: var(--ink);
}

.edit-scene-title {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--edit-scene-token-ink);
  font-size: 16px;
  font-weight: 880;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.edit-scene-state-icons {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.edit-scene-state-icon {
  position: relative;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: color-mix(in srgb, var(--edit-scene-token-ink) 82%, transparent);
}

.edit-scene-state-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.8;
}

.edit-scene-state-icon.is-received {
  color: color-mix(in srgb, var(--edit-scene-token-ink) 88%, transparent);
}

.edit-scene-state-icon.is-ready {
  color: color-mix(in srgb, var(--edit-scene-token-ink) 88%, transparent);
}

.edit-scene-state-icon.is-edited {
  color: color-mix(in srgb, var(--edit-scene-token-ink) 88%, transparent);
}

.edit-scene-state-icon.is-removed {
  color: color-mix(in srgb, var(--edit-scene-token-ink) 88%, transparent);
}

.edit-scene-state-icon.is-script-deleted {
  color: color-mix(in srgb, #cbd5e1 82%, transparent);
}

.edit-scene-state-icon.is-warning {
  color: color-mix(in srgb, var(--marker-purple) 72%, var(--ink));
}

.edit-scene-state-icon.is-info {
  color: color-mix(in srgb, var(--marker-blue) 76%, var(--ink));
}

.edit-scene-state-icon[data-edit-tooltip]::after {
  content: attr(data-edit-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  min-width: max-content;
  max-width: 240px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 1200;
}

.edit-scene-state-icon[data-edit-tooltip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.edit-scene-meta-stack {
  width: min(180px, 100%);
  min-width: 0;
  display: grid;
  gap: 4px;
  align-items: start;
}

.edit-scene-meta-line,
.edit-scene-duration-row,
.edit-episode-duration-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.edit-scene-meta-line > span {
  min-width: 0;
  justify-self: end;
  text-align: right;
}

.edit-scene-meta-line[hidden],
.edit-scene-duration-row[hidden],
.edit-episode-duration-row[hidden],
.edit-scene-duration-popover[hidden] {
  display: none;
}

.edit-scene-meta-line.is-muted {
  color: var(--muted);
}

.edit-scene-meta-line svg,
.edit-scene-duration-row svg,
.edit-episode-duration-row svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  stroke-width: 2.5;
}

.edit-scene-duration-row,
.edit-episode-duration-row {
  position: relative;
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  width: 100%;
}

.edit-scene-duration-item {
  min-height: 14px;
  width: 100%;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.edit-episode-duration-row .edit-scene-duration-item {
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

.edit-scene-duration-item > span:last-child {
  justify-self: end;
  text-align: right;
}

.edit-duration-caption {
  color: color-mix(in srgb, var(--muted) 84%, transparent);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.edit-scene-duration-button {
  cursor: pointer;
}

.edit-scene-duration-button:hover:not(:disabled),
.edit-scene-duration-button:focus-visible {
  color: var(--ink);
  outline: none;
}

.edit-scene-duration-popover {
  position: absolute;
  left: 22px;
  top: calc(100% + 6px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  z-index: 1220;
}

.edit-scene-duration-popover input {
  width: 82px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.edit-scene-duration-popover button {
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.scene-script-toggle {
  min-height: 32px;
  min-width: 132px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--control);
}

.scene-script-toggle svg {
  width: 15px;
  height: 15px;
}

.scene-script-toggle:disabled {
  opacity: 0.46;
  cursor: default;
}

.edit-scene-panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-scene-panel-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.edit-scene-panel-content {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(0, auto);
  align-items: center;
  margin-top: 0;
}

.edit-scene-panel-actions {
  position: absolute;
  top: auto;
  right: 34px;
  bottom: 0;
  z-index: 3;
  padding-top: 0;
  padding-left: 0;
  border-left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}

.edit-scene-panel-actions .scene-script-toggle,
.edit-scene-anchor-corner {
  min-height: 36px;
  height: 36px;
  width: 32px;
  min-width: 32px;
  padding: 0;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  outline: none;
}

.edit-scene-anchor-corner {
  right: 0;
  bottom: 0;
}

.edit-layout-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  z-index: 3;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.edit-layout-toggle-button {
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.edit-layout-toggle-button:hover,
.edit-layout-toggle-button:focus-visible,
.edit-layout-toggle-button.is-active {
  color: var(--ink);
  background: transparent;
  outline: none;
}

.edit-layout-toggle-button.is-active {
  color: var(--accent);
}

.edit-layout-mode-icon {
  position: relative;
  display: block;
  color: currentColor;
  pointer-events: none;
}

.edit-layout-mode-icon::before {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: currentColor;
}

.edit-layout-mode-icon.is-horizontal {
  width: 18px;
  height: 18px;
}

.edit-layout-mode-icon.is-horizontal::before {
  left: 0;
  top: 0;
  width: 18px;
  height: 2px;
  box-shadow: 0 8px 0 currentColor, 0 16px 0 currentColor;
}

.edit-layout-mode-icon.is-vertical {
  width: 18px;
  height: 18px;
}

.edit-layout-mode-icon.is-vertical::before {
  left: 0;
  top: 0;
  width: 2px;
  height: 18px;
  box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
}

.edit-layout-toggle .edit-action-tooltip {
  right: auto;
  left: 50%;
  transform: translate(-50%, -3px);
}

.edit-layout-toggle .edit-scene-icon-action:hover .edit-action-tooltip,
.edit-layout-toggle .edit-scene-icon-action:focus-visible .edit-action-tooltip {
  transform: translate(-50%, 0);
}

.edit-scene-panel-actions .scene-script-toggle .cutkit-script-icon {
  width: 28px;
  height: 28px;
}

.edit-scene-anchor-corner .cutkit-anchor-icon {
  width: 22px;
  height: 22px;
}

.edit-scene-anchor-corner.is-unlinked {
  color: var(--marker-purple);
}

.edit-scene-panel-actions .scene-script-toggle.is-available {
  color: var(--edit-action-available);
  opacity: 1;
}

.edit-scene-panel-actions .scene-script-toggle:hover:not(:disabled),
.edit-scene-anchor-corner:hover:not(:disabled),
.edit-scene-anchor-corner:focus,
.edit-scene-anchor-corner:focus-visible,
.edit-scene-panel-actions .scene-script-toggle.is-active,
.edit-scene-panel-actions .scene-script-toggle[aria-pressed="true"],
.edit-scene-panel-actions .scene-script-toggle:focus,
.edit-scene-panel-actions .scene-script-toggle:focus-visible {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  outline: none;
}

.edit-scene-panel-actions .scene-script-toggle.is-available:hover:not(:disabled),
.edit-scene-panel-actions .scene-script-toggle.is-available:focus,
.edit-scene-panel-actions .scene-script-toggle.is-available:focus-visible,
.edit-scene-panel-actions .scene-script-toggle.is-available.is-active,
.edit-scene-panel-actions .scene-script-toggle.is-available[aria-pressed="true"] {
  color: var(--edit-action-available);
}

.edit-scene-icon-action {
  position: relative;
}

.edit-scene-anchor-corner.edit-scene-icon-action {
  position: absolute;
}

.edit-scene-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.edit-action-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 1200;
}

.edit-scene-icon-action:hover .edit-action-tooltip,
.edit-scene-icon-action:focus-visible .edit-action-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.edit-scene-panel-flags-table {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(230px, 285px) minmax(390px, 560px) 34px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 18px;
  row-gap: 4px;
  width: fit-content;
  max-width: 100%;
  border-top: 0;
  margin-top: 0;
}

.scene-flag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 0;
  border-bottom: 0;
}

.scene-context-row {
  min-height: 34px;
}

.scene-title-row {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.scene-context-row {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}

.scene-context-row > span,
.tagged-note-row > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.scene-context-strip {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--ink);
  font-size: 11px;
  font-weight: 780;
}

.scene-context-strip > span:not(:empty) {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  background: var(--control-muted);
  color: var(--muted);
}

.scene-context-strip > span[data-scene-material-summary]:not(:empty) {
  color: var(--ink);
  background: color-mix(in srgb, var(--marker-slate) 42%, var(--control-muted));
}

.scene-context-strip > span[data-scene-material-summary][data-material-status="received"]:not(:empty) {
  border-color: color-mix(in srgb, var(--marker-teal) 88%, transparent);
  background: color-mix(in srgb, var(--marker-teal) 42%, var(--control-muted));
}

.scene-context-strip > span[data-scene-material-summary][data-material-status="ready"]:not(:empty) {
  border-color: color-mix(in srgb, var(--marker-green) 88%, transparent);
  background: color-mix(in srgb, var(--marker-green) 44%, var(--control-muted));
}

.scene-relation-badge {
  color: color-mix(in srgb, var(--warning) 82%, var(--ink));
}

.scene-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tagged-note-editor {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 4px;
}

.edit-scene-note-block {
  grid-column: 2;
  align-self: stretch;
  min-width: 0;
  max-width: none;
  height: 100%;
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  overflow: visible;
}

.tagged-note-source {
  display: none;
}

.tagged-note-composer {
  width: 100%;
  min-height: 100px;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  outline: none;
  white-space: pre-wrap;
}

.tagged-note-composer.has-inline-tokens {
  display: block;
  cursor: text;
}

.tagged-note-composer.has-inline-tokens .inline-text-token {
  margin-top: 1px;
  margin-bottom: 1px;
}

.danger-action.edit-scene-remove-action {
  display: none;
  grid-column: 3;
  align-self: start;
  justify-self: center;
  min-height: 34px;
  width: 34px;
  padding: 0;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--danger);
  box-shadow: none;
}

.danger-action.edit-scene-remove-action:hover:not(:disabled),
.danger-action.edit-scene-remove-action.is-restore:hover:not(:disabled) {
  border-color: transparent;
  background: transparent;
  color: color-mix(in srgb, var(--danger) 82%, var(--ink));
}

.danger-action.edit-scene-remove-action.is-restore {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}

.tagged-note-composer:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.tagged-note-composer:focus {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

.tagged-note-composer[contenteditable="false"] {
  opacity: 0.66;
}

.tagged-note-inline-token {
  display: inline;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--accent) 88%, var(--ink));
  font: inherit;
  font-weight: 850;
  text-transform: none;
}

.tagged-note-inline-token.is-sound,
.tagged-note-inline-token.is-noise,
.tagged-note-inline-token.is-audio-defect,
.tagged-note-inline-token.is-sync-audio,
.tagged-note-inline-token.is-dubbing,
.tagged-note-inline-token.is-voiceover,
.tagged-note-inline-token.is-foley,
.tagged-note-inline-token.is-music,
.tagged-note-inline-token.is-mix,
.tagged-note-inline-token.is-m-and-e {
  color: color-mix(in srgb, #25f3d6 70%, var(--ink));
}

.tagged-note-inline-token.is-graphics,
.tagged-note-inline-token.is-infographics,
.tagged-note-inline-token.is-cleanup,
.tagged-note-inline-token.is-compositing,
.tagged-note-inline-token.is-titles,
.tagged-note-inline-token.is-stabilization {
  color: color-mix(in srgb, #458cf9 82%, var(--ink));
}

.tagged-note-inline-token.is-problem,
.tagged-note-inline-token.is-qc,
.tagged-note-inline-token.is-export,
.tagged-note-inline-token.is-defect,
.tagged-note-inline-token.is-visual-defect,
.tagged-note-inline-token.is-urgent,
.tagged-note-inline-token.is-source-file,
.tagged-note-inline-token.is-offline,
.tagged-note-inline-token.is-backup,
.tagged-note-inline-token.is-reports,
.tagged-note-inline-token.is-aaf,
.tagged-note-inline-token.is-xml-edl,
.tagged-note-inline-token.is-integration {
  color: color-mix(in srgb, #e87232 82%, var(--ink));
}

.tagged-note-inline-token.is-color,
.tagged-note-inline-token.is-exposure,
.tagged-note-inline-token.is-white-balance,
.tagged-note-inline-token.is-match-color {
  color: color-mix(in srgb, #458cf9 82%, var(--ink));
}

.tagged-note-inline-token.is-rights,
.tagged-note-inline-token.is-brand,
.tagged-note-inline-token.is-music-rights,
.tagged-note-inline-token.is-stock,
.tagged-note-inline-token.is-release,
.tagged-note-inline-token.is-edit,
.tagged-note-inline-token.is-continuity,
.tagged-note-inline-token.is-timing,
.tagged-note-inline-token.is-pickup,
.tagged-note-inline-token.is-proxy,
.tagged-note-inline-token.is-metadata,
.tagged-note-inline-token.is-subtitles,
.tagged-note-inline-token.is-comment,
.tagged-note-inline-token.is-question {
  color: color-mix(in srgb, #af8bb0 82%, var(--ink));
}

.tagged-note-suggestions {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(100%, 360px);
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow);
  z-index: 1240;
}

.tagged-note-suggestions[hidden] {
  display: none;
}

.source-tag-suggestions {
  position: fixed;
  top: auto;
  left: auto;
  z-index: 1540;
}

.tagged-note-suggestion-group {
  padding: 6px 8px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tagged-note-suggestion {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tagged-note-suggestion:hover,
.tagged-note-suggestion.is-active {
  background: color-mix(in srgb, var(--accent) 16%, var(--control-muted));
}

.tagged-note-suggestion-label {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 880;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tagged-note-suggestion-aliases {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
}

.tagged-note-suggestion-empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.tagged-note-editor textarea {
  width: 100%;
  min-height: 34px;
  height: 34px;
  resize: none;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
}

.tagged-note-editor textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: -1px;
}

.tagged-note-footer {
  min-height: 0;
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.tagged-note-tags {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tagged-note-tags[hidden] {
  display: none;
}

.tagged-note-chip {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--control-muted));
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.tagged-note-chip.is-sound,
.tagged-note-chip.is-noise,
.tagged-note-chip.is-audio-defect,
.tagged-note-chip.is-sync-audio,
.tagged-note-chip.is-dubbing,
.tagged-note-chip.is-voiceover,
.tagged-note-chip.is-foley,
.tagged-note-chip.is-music,
.tagged-note-chip.is-mix,
.tagged-note-chip.is-m-and-e {
  background: color-mix(in srgb, #0f766e 24%, var(--control-muted));
}

.tagged-note-chip.is-graphics,
.tagged-note-chip.is-infographics,
.tagged-note-chip.is-cleanup,
.tagged-note-chip.is-compositing,
.tagged-note-chip.is-titles,
.tagged-note-chip.is-stabilization {
  background: color-mix(in srgb, #1d4ed8 24%, var(--control-muted));
}

.tagged-note-chip.is-color,
.tagged-note-chip.is-exposure,
.tagged-note-chip.is-white-balance,
.tagged-note-chip.is-match-color {
  background: color-mix(in srgb, #1d4ed8 24%, var(--control-muted));
}

.tagged-note-chip.is-edit,
.tagged-note-chip.is-continuity,
.tagged-note-chip.is-timing,
.tagged-note-chip.is-pickup {
  background: color-mix(in srgb, #64748b 22%, var(--control-muted));
}

.tagged-note-chip.is-problem,
.tagged-note-chip.is-qc,
.tagged-note-chip.is-export,
.tagged-note-chip.is-source-file,
.tagged-note-chip.is-offline,
.tagged-note-chip.is-backup,
.tagged-note-chip.is-reports,
.tagged-note-chip.is-aaf,
.tagged-note-chip.is-xml-edl,
.tagged-note-chip.is-integration {
  background: color-mix(in srgb, #b45309 26%, var(--control-muted));
}

.tagged-note-chip.is-defect,
.tagged-note-chip.is-visual-defect,
.tagged-note-chip.is-urgent {
  background: color-mix(in srgb, #b91c1c 32%, var(--control-muted));
}

.tagged-note-chip.is-rights,
.tagged-note-chip.is-brand,
.tagged-note-chip.is-music-rights,
.tagged-note-chip.is-stock,
.tagged-note-chip.is-release,
.tagged-note-chip.is-proxy,
.tagged-note-chip.is-metadata,
.tagged-note-chip.is-subtitles,
.tagged-note-chip.is-comment,
.tagged-note-chip.is-question {
  background: color-mix(in srgb, #7e22ce 22%, var(--control-muted));
}

.tagged-note-save {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tagged-note-save svg {
  width: 13px;
  height: 13px;
}

.tagged-note-save:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--accent);
}

.edit-scene-panel textarea:disabled,
.edit-scene-panel input:disabled,
.edit-scene-panel button:disabled {
  opacity: 0.66;
}

.edit-scene-panel[data-has-scene="false"] > * {
  visibility: hidden;
  pointer-events: none;
}

.edit-scene-panel[data-has-scene="false"] > .edit-layout-toggle {
  visibility: visible;
  pointer-events: auto;
}

.edit-scene-panel[data-panel-mode="episode"] .edit-scene-remove-action {
  display: none;
}

.edit-summary-strip {
  display: grid;
  grid-template-columns: minmax(78px, auto) minmax(70px, auto);
  align-items: baseline;
  column-gap: 18px;
  row-gap: 0;
  width: max-content;
  padding: 0;
}

.edit-summary-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(78px, auto) minmax(70px, auto);
  column-gap: 18px;
  align-items: baseline;
  min-width: 160px;
  min-height: 31px;
  padding: 6px 0 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
}

.edit-summary-card:last-child {
  border-bottom: 0;
}

.edit-summary-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.edit-summary-card strong {
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.edit-status-summary {
  width: max-content;
  max-width: min(100%, 640px);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(132px, auto);
  align-items: start;
  align-content: stretch;
  gap: 0;
}

.edit-status-summary span {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.05;
  white-space: nowrap;
  min-height: 19px;
  padding: 1px 0 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
}

.edit-status-summary span:last-child {
  border-bottom: 0;
}

.edit-status-summary svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

.edit-status-summary b {
  color: var(--ink-strong);
  font: inherit;
}

.edit-status-summary em {
  font-style: normal;
}

.edit-header-stats {
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.edit-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.edit-workspace.is-script-open {
  display: block;
}

.edit-workspace.is-script-open .edit-script-panel {
  position: fixed;
  top: var(--edit-script-panel-top);
  right: var(--edit-script-panel-side);
  bottom: auto;
  z-index: 1040;
  width: var(--edit-script-panel-width);
  height: calc(100vh - var(--edit-script-panel-top) - 16px);
}

.edit-board {
  min-width: 0;
  max-width: 100%;
  background: transparent;
  overflow: visible;
}

.edit-scroll {
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow-x: scroll;
  overflow-y: visible;
  padding-bottom: 12px;
}

.edit-workspace.is-script-open .edit-scroll {
  width: min(
    100%,
    calc(100vw - var(--edit-script-panel-width) - var(--edit-script-panel-side) - clamp(16px, 2vw, 40px) - 18px)
  );
  padding-right: 0;
}

.edit-progress-grid {
  width: max-content;
  min-width: max-content;
  margin-top: 8px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

.edit-page.is-edit-layout-grid .edit-vertical-board,
.edit-page.is-edit-layout-vertical .edit-board {
  display: none;
}

.edit-vertical-board {
  width: min(100%, 940px);
  display: grid;
  gap: 30px;
  padding: 8px 0 28px;
}

.edit-workspace.is-script-open .edit-vertical-board {
  width: min(
    100%,
    calc(100vw - var(--edit-script-panel-width) - var(--edit-script-panel-side) - clamp(16px, 2vw, 40px) - 18px)
  );
}

.edit-vertical-episode {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.edit-vertical-episode-head {
  position: sticky;
  top: var(--edit-vertical-episode-sticky-top);
  z-index: 40;
  align-self: start;
  isolation: isolate;
  width: min(100%, 880px);
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: var(--page-backdrop);
  color: var(--muted);
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.edit-vertical-episode-head::before {
  content: "";
  position: absolute;
  inset: -14px -28px -8px;
  z-index: -1;
  background: var(--page-backdrop);
  pointer-events: none;
}

.edit-vertical-episode-code {
  color: var(--accent);
}

.edit-vertical-episode-progress {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: color-mix(in srgb, var(--ink-strong) 62%, var(--muted) 38%);
  font-size: 1em;
  font-weight: 520;
  line-height: 1;
  text-transform: uppercase;
}

.edit-vertical-episode-progress .episode-summary-status-token {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
}

.edit-vertical-episode-progress .episode-summary-status-label[hidden] {
  display: none;
}

.edit-vertical-episode-progress .episode-summary-status-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.edit-vertical-episode-progress .episode-summary-status-icon svg {
  width: 21px;
  height: 21px;
}

.edit-vertical-episode-head:hover .edit-vertical-episode-code,
.edit-vertical-episode-head:focus-visible .edit-vertical-episode-code,
.edit-vertical-episode-head.status-approved .edit-vertical-episode-code {
  color: #ffffff;
}

.edit-vertical-episode-head:focus-visible {
  outline: none;
}

.edit-vertical-episode-head.status-partial {
  color: #d7dee9;
}

.edit-vertical-episode-head.status-assembly {
  color: #d7c8ff;
}

.edit-vertical-episode-head.status-first-cut {
  color: #ffd08a;
}

.edit-vertical-episode-head.status-revisions {
  color: #8fe6b9;
}

.edit-vertical-episode-head.status-approved {
  color: #ffffff;
}

.edit-vertical-scenes {
  --edit-vertical-row-gap: 10px;
  min-width: 0;
  width: min(100%, 880px);
  display: grid;
  gap: 0;
}

.edit-vertical-scene-row {
  --edit-vertical-details-bg: var(--control-muted);
  --edit-vertical-details-ink: var(--ink-strong);
  --edit-vertical-details-muted: var(--muted);
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: stretch;
  margin-bottom: var(--edit-vertical-row-gap);
}

.edit-vertical-scene-track {
  width: 34px;
  display: grid;
  grid-template-rows: 28px 24px;
}

.edit-vertical-scene-cell,
.edit-vertical-check-cell {
  --edit-cell-bg: var(--control-muted);
  --edit-cell-separator-color: var(--bg);
  position: relative;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0;
  color: var(--ink-strong);
  overflow: visible;
}

.edit-vertical-scene-cell {
  background: var(--edit-cell-bg);
  border-top-left-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.edit-vertical-check-cell {
  background: var(--edit-cell-bg);
  border-bottom-left-radius: 6px;
  color: #fff;
}

.edit-vertical-scene-details {
  min-width: 0;
  height: 52px;
  padding: 6px 10px 6px 12px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  position: relative;
  border: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  background: var(--edit-vertical-details-bg);
  color: var(--edit-vertical-details-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.edit-vertical-scene-details.has-shooting-date {
  padding-right: 154px;
}

.edit-vertical-scene-row:hover .edit-vertical-scene-details,
.edit-vertical-scene-details:focus-visible {
  background: color-mix(in srgb, var(--edit-vertical-details-bg) 90%, var(--accent) 10%);
  outline: none;
}

.edit-vertical-scene-row.is-done {
  --edit-vertical-details-bg: var(--edit-approved-green);
  --edit-vertical-details-ink: #ffffff;
  --edit-vertical-details-muted: rgba(255, 255, 255, 0.84);
}

.edit-vertical-scene-row.is-removed {
  --edit-vertical-details-bg: color-mix(in srgb, var(--danger) 48%, var(--surface));
  --edit-vertical-details-ink: rgba(255, 255, 255, 0.9);
  --edit-vertical-details-muted: rgba(255, 255, 255, 0.68);
}

.edit-vertical-scene-row.has-multiple-shooting-days::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: var(--edit-repeat-day-accent);
  z-index: 14;
  pointer-events: none;
}

.edit-vertical-scene-row.is-partial-group,
.edit-vertical-scene-row.is-script-group,
.edit-vertical-scene-row.is-production-block {
  --edit-vertical-group-line: rgba(229, 236, 255, 0.82);
}

.edit-vertical-scene-row.is-script-group {
  --edit-vertical-group-line: rgba(238, 244, 255, 0.86);
}

.edit-vertical-scene-row.is-production-block {
  --edit-vertical-group-line: color-mix(in srgb, var(--edit-production-block-accent) 86%, transparent);
}

.edit-vertical-scene-row.is-partial-group::after,
.edit-vertical-scene-row.is-script-group::after,
.edit-vertical-scene-row.is-production-block::after {
  content: "";
  position: absolute;
  inset: -2px -2px;
  z-index: 12;
  border-color: var(--edit-vertical-group-line);
  border-style: solid;
  border-width: 0 1px;
  pointer-events: none;
}

.edit-vertical-scene-row.is-partial-group-start::after,
.edit-vertical-scene-row.is-partial-group-single::after,
.edit-vertical-scene-row.is-script-group-start::after,
.edit-vertical-scene-row.is-script-group-single::after,
.edit-vertical-scene-row.is-production-block-start::after,
.edit-vertical-scene-row.is-production-block-single::after {
  border-top-width: 1px;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}

.edit-vertical-scene-row.is-partial-group-start:not(.is-partial-group-single)::after,
.edit-vertical-scene-row.is-partial-group-middle::after,
.edit-vertical-scene-row.is-script-group-start:not(.is-script-group-single)::after,
.edit-vertical-scene-row.is-script-group-middle::after,
.edit-vertical-scene-row.is-production-block-start:not(.is-production-block-single)::after,
.edit-vertical-scene-row.is-production-block-middle::after {
  bottom: calc(-2px - var(--edit-vertical-row-gap));
}

.edit-vertical-scene-row.is-partial-group-end::after,
.edit-vertical-scene-row.is-partial-group-single::after,
.edit-vertical-scene-row.is-script-group-end::after,
.edit-vertical-scene-row.is-script-group-single::after,
.edit-vertical-scene-row.is-production-block-end::after,
.edit-vertical-scene-row.is-production-block-single::after {
  border-bottom-width: 1px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
}

.edit-vertical-scene-row.is-production-block-highlight:not(.is-production-block)::after {
  border-color: color-mix(in srgb, var(--edit-production-block-hover-accent) 96%, transparent);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--edit-production-block-accent) 54%, transparent));
}

.edit-vertical-scene-row.is-production-block-highlight .edit-vertical-scene-details,
.edit-vertical-scene-row.is-production-block-highlight .edit-vertical-scene-cell,
.edit-vertical-scene-row.is-production-block-highlight .edit-vertical-check-cell {
  filter: brightness(1.12) saturate(1.06);
}

.edit-vertical-scene-row.has-scene-marker-line .edit-vertical-scene-cell {
  z-index: 15;
}

.edit-vertical-scene-heading {
  min-width: 0;
  max-width: 100%;
  display: block;
  overflow: hidden;
  color: var(--edit-vertical-details-ink);
  font-size: 12px;
  font-weight: 880;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-vertical-scene-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  color: var(--edit-vertical-details-muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.edit-vertical-scene-meta span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-vertical-scene-meta svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  stroke-width: 2.6;
}

.edit-vertical-scene-date-badge {
  position: absolute;
  top: 7px;
  right: 9px;
  max-width: 142px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--edit-vertical-details-muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.edit-vertical-scene-date-badge svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  stroke-width: 2.6;
}

.edit-progress-grid th,
.edit-progress-grid td {
  box-sizing: border-box;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 26px;
  border: 0;
  background: var(--surface);
  background-clip: border-box;
  text-align: center;
  vertical-align: middle;
}

.edit-progress-grid th {
  position: sticky;
  left: 0;
  z-index: 90;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  padding: 0;
  background: var(--surface-2);
}

.edit-scenes-row th,
.edit-scenes-row td {
  height: 28px;
  border-top: 0;
  border-bottom: 0;
}

.edit-status-row th,
.edit-status-row td {
  height: 24px;
  border-bottom: 0;
}

.edit-episode-summary-cell {
  isolation: isolate;
  height: 52px;
  color: var(--muted);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  box-shadow: -24px 0 0 var(--page-backdrop);
  overflow: visible;
}

.edit-episode-summary-cell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
  z-index: 3;
  background: var(--page-backdrop);
  pointer-events: none;
}

.edit-episode-summary-cell::after {
  content: "";
  position: absolute;
  left: -24px;
  right: 0;
  bottom: -11px;
  height: 11px;
  z-index: 3;
  background: var(--page-backdrop);
  pointer-events: none;
}

.edit-episode-summary-button {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  padding: 3px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-content: stretch;
  gap: 2px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-transform: inherit;
  line-height: 1;
  white-space: nowrap;
}

.episode-summary-code {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.episode-summary-code {
  align-self: start;
  justify-content: flex-start;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0;
}

.episode-summary-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 14px;
  align-items: center;
  column-gap: 4px;
  color: var(--ink-strong);
  font-size: 9px;
  line-height: 1;
}

.episode-summary-percent {
  justify-self: start;
}

.episode-summary-status-icon {
  justify-self: end;
  display: inline-flex;
  width: 14px;
  height: 14px;
  opacity: 0;
}

.episode-summary-status-icon[data-lucide],
.episode-summary-status-icon svg {
  opacity: 1;
}

.episode-summary-status-icon svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  stroke-width: 2.6;
}

.edit-episode-summary-cell.has-progress {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}

.edit-episode-summary-cell.status-partial {
  background: color-mix(in srgb, #64748b 28%, var(--surface-2));
  color: #d7dee9;
}

.edit-episode-summary-cell.status-assembly {
  background: color-mix(in srgb, #8b5cf6 28%, var(--surface-2));
  color: #d7c8ff;
}

.edit-episode-summary-cell.status-first-cut {
  background: color-mix(in srgb, #d98c1f 30%, var(--surface-2));
  color: #ffd08a;
}

.edit-episode-summary-cell.status-revisions {
  background: color-mix(in srgb, var(--edit-approved-green) 20%, var(--surface-2));
  color: #8fe6b9;
}

.edit-episode-summary-cell.status-approved {
  background: var(--edit-approved-green);
  color: #ffffff;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-partial {
  color: #3f4a5d;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-assembly {
  color: #553d7a;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-first-cut {
  color: #7b4c16;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-revisions {
  color: #246644;
}

:root:not([data-theme="dark"]) .edit-progress-grid th:not(.edit-episode-summary-cell) {
  background: color-mix(in srgb, var(--surface-2) 88%, var(--line) 12%);
}

.edit-episode-summary-cell.status-partial .episode-summary-code,
.edit-episode-summary-cell.status-assembly .episode-summary-code,
.edit-episode-summary-cell.status-first-cut .episode-summary-code,
.edit-episode-summary-cell.status-revisions .episode-summary-code,
.edit-episode-summary-cell.status-approved .episode-summary-code,
.edit-episode-summary-cell.status-partial .episode-summary-meta,
.edit-episode-summary-cell.status-assembly .episode-summary-meta,
.edit-episode-summary-cell.status-first-cut .episode-summary-meta,
.edit-episode-summary-cell.status-revisions .episode-summary-meta,
.edit-episode-summary-cell.status-approved .episode-summary-meta {
  color: inherit;
}

.edit-episode-summary-cell.status-approved .episode-summary-meta,
.edit-episode-summary-cell.status-approved .episode-summary-code {
  color: #ffffff;
}

:root:not([data-theme="dark"]) .edit-progress-grid .edit-scene-cell,
:root:not([data-theme="dark"]) .edit-progress-grid .edit-check-cell,
:root:not([data-theme="dark"]) .edit-vertical-scene-cell,
:root:not([data-theme="dark"]) .edit-vertical-check-cell {
  --edit-cell-separator-color: #eef3f8;
}

:root:not([data-theme="dark"]) .edit-progress-grid .edit-scene-cell:not(.is-ready):not(.is-received):not(.is-manual):not(.is-done),
:root:not([data-theme="dark"]) .edit-vertical-scene-cell:not(.is-ready):not(.is-received):not(.is-manual):not(.is-done) {
  --edit-cell-bg: #dce5ef;
  color: #273449;
}

:root:not([data-theme="dark"]) .edit-progress-grid .edit-check-cell:not(.is-done):not(.is-in-progress):not(.is-assembled):not(.is-revision):not(.is-removed),
:root:not([data-theme="dark"]) .edit-vertical-check-cell:not(.is-done):not(.is-in-progress):not(.is-assembled):not(.is-revision):not(.is-removed) {
  --edit-cell-bg: #dce5ef;
  color: #607086;
}

.edit-progress-grid .edit-scene-cell {
  --edit-cell-bg: var(--control-muted);
  --edit-cell-left-separator-width: 0px;
  --edit-cell-right-separator-width: 1px;
  --edit-cell-separator-color: var(--bg);
  position: relative;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0;
  background:
    linear-gradient(
      to right,
      var(--edit-cell-separator-color) 0 var(--edit-cell-left-separator-width),
      var(--edit-cell-bg) var(--edit-cell-left-separator-width) calc(100% - var(--edit-cell-right-separator-width)),
      var(--edit-cell-separator-color) calc(100% - var(--edit-cell-right-separator-width)) 100%
    );
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.edit-scenes-row .edit-scene-cell:first-of-type {
  --edit-cell-left-separator-width: 1px;
}

.edit-scenes-row .edit-scene-cell:last-child {
  --edit-cell-right-separator-width: 0px;
  border-top-right-radius: 6px;
}

.edit-status-row .edit-check-cell:last-child {
  --edit-cell-right-separator-width: 0px;
  border-bottom-right-radius: 6px;
}

.edit-scene-cell.is-partial-group,
.edit-check-cell.is-partial-group {
  --partial-group-line: rgba(229, 236, 255, 0.82);
  --partial-group-line-width: 1px;
  position: relative;
  overflow: visible;
}

.edit-scene-cell.is-script-group,
.edit-check-cell.is-script-group,
.edit-scene-cell.is-production-block,
.edit-check-cell.is-production-block {
  --partial-group-line-width: 1px;
  position: relative;
  overflow: visible;
}

.edit-scene-cell.is-partial-group::before,
.edit-check-cell.is-partial-group::before,
.edit-scene-cell.is-script-group::before,
.edit-check-cell.is-script-group::before,
.edit-scene-cell.is-production-block::before,
.edit-check-cell.is-production-block::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}

.edit-scene-cell.is-partial-group::before,
.edit-scene-cell.is-script-group::before,
.edit-scene-cell.is-production-block::before {
  top: -1px;
  bottom: -1px;
  border-top: var(--partial-group-line-width, 1px) solid var(--partial-group-line);
}

.edit-check-cell.is-partial-group::before,
.edit-check-cell.is-script-group::before,
.edit-check-cell.is-production-block::before {
  top: -1px;
  bottom: -1px;
  border-bottom: var(--partial-group-line-width, 1px) solid var(--partial-group-line);
}

.edit-scene-cell.is-partial-group-start::before,
.edit-scene-cell.is-partial-group-single::before,
.edit-check-cell.is-partial-group-start::before,
.edit-check-cell.is-partial-group-single::before,
.edit-scene-cell.is-script-group-start::before,
.edit-scene-cell.is-script-group-single::before,
.edit-check-cell.is-script-group-start::before,
.edit-check-cell.is-script-group-single::before,
.edit-scene-cell.is-production-block-start::before,
.edit-scene-cell.is-production-block-single::before,
.edit-check-cell.is-production-block-start::before,
.edit-check-cell.is-production-block-single::before {
  left: 0;
  border-left: var(--partial-group-line-width, 1px) solid var(--partial-group-line);
}

.edit-scene-cell.is-partial-group-end::before,
.edit-scene-cell.is-partial-group-single::before,
.edit-check-cell.is-partial-group-end::before,
.edit-check-cell.is-partial-group-single::before,
.edit-scene-cell.is-script-group-end::before,
.edit-scene-cell.is-script-group-single::before,
.edit-check-cell.is-script-group-end::before,
.edit-check-cell.is-script-group-single::before,
.edit-scene-cell.is-production-block-end::before,
.edit-scene-cell.is-production-block-single::before,
.edit-check-cell.is-production-block-end::before,
.edit-check-cell.is-production-block-single::before {
  right: 0;
  border-right: var(--partial-group-line-width, 1px) solid var(--partial-group-line);
}

.edit-scene-cell.is-partial-group-start,
.edit-scene-cell.is-partial-group-middle,
.edit-check-cell.is-partial-group-start,
.edit-check-cell.is-partial-group-middle,
.edit-scene-cell.is-script-group-start,
.edit-scene-cell.is-script-group-middle,
.edit-check-cell.is-script-group-start,
.edit-check-cell.is-script-group-middle,
.edit-scene-cell.is-production-block-start,
.edit-scene-cell.is-production-block-middle,
.edit-check-cell.is-production-block-start,
.edit-check-cell.is-production-block-middle {
  --edit-cell-separator-width: 0px;
}

.edit-scene-cell.is-script-group,
.edit-check-cell.is-script-group {
  --partial-group-line: rgba(238, 244, 255, 0.86);
}

.edit-scene-cell.is-production-block,
.edit-check-cell.is-production-block {
  --partial-group-line: color-mix(in srgb, var(--edit-production-block-accent) 86%, transparent);
}

.edit-vertical-scene-cell.is-partial-group::before,
.edit-vertical-check-cell.is-partial-group::before,
.edit-vertical-scene-cell.is-script-group::before,
.edit-vertical-check-cell.is-script-group::before,
.edit-vertical-scene-cell.is-production-block::before,
.edit-vertical-check-cell.is-production-block::before,
.edit-vertical-scenes .edit-vertical-check-cell.has-multiple-shooting-days::after {
  content: none;
  border: 0;
}

.edit-scene-cell.has-production-block-corner .edit-scene-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: var(--edit-cell-left-separator-width, 0px);
  width: 12px;
  height: 12px;
  z-index: 9;
  background: var(--edit-production-block-accent);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  filter: drop-shadow(0 1px 1px rgba(3, 7, 18, 0.38));
  pointer-events: none;
  transition: background 120ms ease, filter 120ms ease;
}

.edit-scene-cell.has-scene-marker-line .edit-scene-button::before {
  content: "";
  position: absolute;
  top: -6px;
  left: calc(75% - 4px);
  z-index: 10;
  width: 8px;
  height: 12px;
  border-radius: 2px 2px 0 0;
  background: var(--edit-scene-note-accent);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
  filter: drop-shadow(0 1px 0 rgba(3, 7, 18, 0.24));
  pointer-events: none;
}

.edit-scene-note-marker-shadow {
  position: absolute;
  top: -6px;
  left: calc(75% - 4px);
  z-index: 8;
  width: 8px;
  height: 12px;
  border-radius: 2px 2px 0 0;
  background: rgba(2, 6, 23, 0.48);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
  transform: translate(1px, 1px);
  pointer-events: none;
}

.edit-scene-hover-tooltip {
  position: fixed;
  z-index: 200000;
  left: 0;
  top: 0;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, #7c8cff 52%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 96%, #000 4%);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.edit-scene-hover-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.edit-scene-hover-tooltip-title {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
}

.edit-scene-hover-tooltip-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: 3px;
  text-align: left;
}

.edit-scene-hover-tooltip-row span {
  color: var(--muted);
  font-weight: 820;
}

.edit-scene-hover-tooltip-row strong {
  color: var(--ink);
  font: inherit;
  font-weight: 820;
}

.edit-scene-hover-tooltip-note {
  margin-top: 6px;
  color: var(--ink-strong);
  font-weight: 860;
}

.scene-cell-flags {
  position: absolute;
  left: 50%;
  bottom: 1px;
  display: none;
  align-items: center;
  gap: 1px;
  transform: translateX(-50%);
  pointer-events: none;
}

.scene-cell-flags svg {
  width: 10px;
  height: 10px;
  color: #1d4ed8;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.75));
  stroke-width: 3;
}

.scene-cell-flags [data-flag-icon="sound"] {
  color: #0f766e;
}

.scene-cell-flags [data-flag-icon="problem"] {
  color: #dc2626;
}

.scene-cell-flags [data-flag-icon="has_comment"] {
  color: #f59e0b;
}

.scene-cell-flags .is-hidden {
  display: none;
}

:root[data-theme="dark"] .scene-cell-flags svg {
  color: #dbeafe;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

:root[data-theme="dark"] .scene-cell-flags [data-flag-icon="sound"] {
  color: #bfdbfe;
}

:root[data-theme="dark"] .scene-cell-flags [data-flag-icon="problem"] {
  color: #ff7b7b;
}

:root[data-theme="dark"] .scene-cell-flags [data-flag-icon="has_comment"] {
  color: #ffd08a;
}

.edit-scene-cell.is-small-code {
  font-size: 10px;
}

.edit-scene-cell.is-tiny-code {
  font-size: 8px;
}

.edit-scene-button,
.edit-check-button {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  line-height: 1;
  white-space: nowrap;
}

.edit-scene-code {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

.edit-scene-code-main,
.edit-scene-code-slash {
  font-size: 1em;
  line-height: 1;
}

.edit-scene-code-sub {
  margin-left: 1px;
  font-size: 1em;
  line-height: 1;
  opacity: 0.68;
}

.edit-scene-cell.is-ready {
  --edit-cell-bg: var(--marker-green);
  color: var(--token-ink);
}

.edit-scene-cell.is-received {
  --edit-cell-bg: var(--marker-orange);
  color: var(--token-ink);
}

.edit-scene-cell.is-manual {
  --edit-cell-bg: var(--marker-purple);
  color: var(--token-ink);
}

.edit-scene-cell.is-done {
  --edit-cell-bg: var(--edit-approved-green);
  color: #ffffff;
}

.edit-progress-grid .edit-check-cell {
  --edit-cell-bg: var(--control-muted);
  --edit-cell-left-separator-width: 0px;
  --edit-cell-right-separator-width: 1px;
  --edit-cell-separator-color: var(--bg);
  position: relative;
  color: #fff;
  background:
    linear-gradient(
      to right,
      var(--edit-cell-separator-color) 0 var(--edit-cell-left-separator-width),
      var(--edit-cell-bg) var(--edit-cell-left-separator-width) calc(100% - var(--edit-cell-right-separator-width)),
      var(--edit-cell-separator-color) calc(100% - var(--edit-cell-right-separator-width)) 100%
    );
  overflow: visible;
}

.edit-status-row .edit-check-cell:first-child {
  --edit-cell-left-separator-width: 1px;
}

.edit-check-cell.has-multiple-shooting-days::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -6px;
  z-index: 7;
  height: 2px;
  border-radius: 999px;
  background: var(--edit-repeat-day-accent);
  pointer-events: none;
}

.edit-scene-cell.is-production-block-highlight,
.edit-check-cell.is-production-block-highlight {
  z-index: 12;
}

.edit-scene-cell.is-production-block-highlight::before,
.edit-check-cell.is-production-block-highlight::before {
  --partial-group-line-width: 2px;
  --partial-group-line: var(--edit-production-block-accent);
}

.edit-scene-cell.has-production-block-corner.is-production-block-highlight,
.edit-check-cell.is-production-block-highlight:not(.is-production-block) {
  outline: none;
}

.edit-scene-cell.has-production-block-corner.is-production-block-highlight::before,
.edit-check-cell.is-production-block-highlight:not(.is-production-block)::before {
  content: "";
  position: absolute;
  left: var(--edit-cell-left-separator-width, 0px);
  right: 0;
  z-index: 8;
  pointer-events: none;
  border-color: color-mix(in srgb, var(--edit-production-block-accent) 92%, transparent);
  border-style: solid;
  border-width: 0;
  animation: edit-production-outline-pulse 1.45s ease-in-out infinite;
}

.edit-scene-cell.has-production-block-corner.is-production-block-highlight::before {
  top: 0;
  bottom: -1px;
  border-top-width: 1px;
  border-left-width: 1px;
  border-right-width: 1px;
}

.edit-check-cell.is-production-block-highlight:not(.is-production-block)::before {
  top: -1px;
  bottom: 0;
  border-bottom-width: 1px;
  border-left-width: 1px;
  border-right-width: 1px;
}

.edit-scene-cell.has-production-block-corner.is-production-block-highlight::after {
  content: none;
}

.edit-scene-cell.has-production-block-corner.is-production-block-highlight .edit-scene-button::after {
  background: var(--edit-production-block-hover-accent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--edit-production-block-accent) 72%, transparent));
  animation: edit-production-corner-pulse 1.45s ease-in-out infinite;
}

.edit-vertical-scene-row.is-production-block-highlight:not(.is-production-block)::after {
  content: "";
  position: absolute;
  inset: -2px -2px;
  z-index: 12;
  border: 1px solid color-mix(in srgb, var(--edit-production-block-hover-accent) 96%, transparent);
  border-radius: 7px;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--edit-production-block-accent) 54%, transparent));
  pointer-events: none;
}

.edit-vertical-scene-cell.is-production-block-highlight,
.edit-vertical-check-cell.is-production-block-highlight {
  z-index: auto;
}

.edit-vertical-scene-cell.is-production-block-highlight::before,
.edit-vertical-check-cell.is-production-block-highlight::before,
.edit-vertical-scene-cell.has-production-block-corner.is-production-block-highlight::before,
.edit-vertical-check-cell.is-production-block-highlight:not(.is-production-block)::before {
  content: none;
  border: 0;
  animation: none;
}

.edit-scene-cell.is-production-block.is-production-block-highlight .edit-scene-button,
.edit-check-cell.is-production-block.is-production-block-highlight .edit-check-button {
  filter: brightness(1.14) saturate(1.08);
}

@keyframes edit-production-corner-pulse {
  0%,
  100% {
    background: var(--edit-production-block-accent);
    filter: drop-shadow(0 0 2px color-mix(in srgb, var(--edit-production-block-accent) 45%, transparent));
  }

  50% {
    background: var(--edit-production-block-hover-accent);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--edit-production-block-accent) 76%, transparent));
  }
}

@keyframes edit-production-outline-pulse {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--edit-production-block-accent) 86%, transparent);
    filter: drop-shadow(0 0 1px color-mix(in srgb, var(--edit-production-block-accent) 28%, transparent));
  }

  50% {
    border-color: color-mix(in srgb, var(--edit-production-block-hover-accent) 96%, transparent);
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--edit-production-block-accent) 52%, transparent));
  }
}

.edit-check-button svg {
  display: none;
}

.edit-check-button .assembled-dot {
  display: none;
}

.edit-check-button .script-deleted-icon {
  display: none;
  color: #64748b;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.5;
}

.edit-check-cell svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.edit-check-cell.is-done {
  --edit-cell-bg: var(--edit-approved-green);
}

.edit-check-cell.is-done .edit-check-button [data-lucide="check"] {
  display: block;
}

.edit-check-cell.is-in-progress {
  --edit-cell-bg: color-mix(in srgb, #60a5fa 28%, var(--control-muted));
}

.edit-check-cell.is-in-progress .edit-check-button .in-progress-icon {
  display: block;
  color: #bfdbfe;
}

.edit-check-cell.is-assembled {
  --edit-cell-bg: var(--marker-green);
}

.edit-check-cell.is-assembled .edit-check-button .assembled-icon {
  display: none;
}

.edit-check-cell.is-assembled .edit-check-button .assembled-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--edit-assembled-color, #4f7cff);
}

.edit-check-cell.is-revision {
  --edit-cell-bg: color-mix(in srgb, #f5a524 36%, var(--control-muted));
}

.edit-check-cell.is-revision .edit-check-button .revision-icon {
  display: block;
  color: #ffd08a;
}

.edit-check-cell.is-script-deleted:not(.is-done):not(.is-in-progress):not(.is-assembled):not(.is-revision):not(.is-removed) .edit-check-button .script-deleted-icon {
  display: block;
}

.edit-check-cell.is-removed {
  --edit-cell-bg: color-mix(in srgb, var(--danger) 72%, var(--surface));
}

.edit-check-cell.is-removed .edit-check-button svg {
  display: none;
}

.edit-check-cell.is-removed .edit-check-button .removed-icon {
  display: block;
}

.edit-status-menu {
  position: fixed;
  z-index: 200000;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.edit-status-menu.is-episode-status-menu {
  min-width: 190px;
}

.edit-status-menu[hidden] {
  display: none;
}

.edit-status-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.edit-status-menu button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--muted);
  stroke-width: 2.6;
}

.edit-status-menu button.is-selected {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.edit-status-menu button.is-selected svg {
  color: var(--accent);
}

.edit-status-menu button:hover {
  background: var(--surface-3);
}

.edit-status-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.edit-spacer-row td {
  height: 20px;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
}

.edit-progress-grid .edit-spacer-summary-cell {
  position: sticky;
  left: 0;
  z-index: 91;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 20px;
  padding: 0;
  border: 0;
  background: var(--page-backdrop);
  box-shadow: -24px 0 0 var(--page-backdrop);
}

.edit-empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: left;
}

.edit-script-panel {
  min-width: 0;
  width: var(--edit-script-panel-width);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  align-self: start;
  position: fixed;
  top: var(--edit-script-panel-top);
  right: var(--edit-script-panel-side);
  bottom: auto;
  z-index: 1040;
  height: calc(100vh - var(--edit-script-panel-top) - 16px);
  --script-bg: #111822;
  --script-ink: #edf3ff;
  --script-muted: #9da9bb;
  --script-line: rgba(151, 164, 184, 0.22);
  --script-active: rgba(74, 128, 255, 0.12);
}

.edit-script-panel[data-script-theme="light"] {
  --script-bg: #f5f2ea;
  --script-ink: #171a20;
  --script-muted: #646b78;
  --script-line: rgba(28, 35, 48, 0.16);
  --script-active: rgba(74, 128, 255, 0.12);
}

:root:not([data-theme="dark"]) .edit-script-panel[data-script-theme="light"] {
  --script-bg: var(--bg);
  --script-ink: var(--ink);
  --script-muted: var(--muted);
  --script-line: color-mix(in srgb, var(--line) 72%, transparent);
  --script-active: color-mix(in srgb, var(--accent) 10%, transparent);
}

.edit-script-panel.has-anchor-preview .scene-document-viewer {
  display: block;
}

.scene-document-anchor {
  display: none !important;
}

.scene-document-anchor.is-visible {
  display: block;
}

.scene-document-anchor-code {
  display: block;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.scene-document-anchor-heading {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.edit-script-panel.is-hidden {
  display: none;
}

.edit-script-panel-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.edit-script-panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.edit-script-panel.is-away-from-scene [data-scene-document-label] {
  color: var(--accent);
  cursor: pointer;
}

.edit-script-panel.is-away-from-scene [data-scene-document-label]:hover,
.edit-script-panel.is-away-from-scene [data-scene-document-label]:focus-visible {
  outline: none;
  color: color-mix(in srgb, var(--accent) 82%, var(--ink));
}

.edit-script-panel-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edit-script-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scene-document-action-separator {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: color-mix(in srgb, var(--line) 72%, transparent);
}

.scene-document-icon-button,
.scene-document-refocus {
  position: relative;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.scene-document-icon-button:hover,
.scene-document-icon-button:focus-visible,
.scene-document-refocus:hover,
.scene-document-refocus:focus-visible {
  outline: none;
  background: transparent;
  color: var(--ink);
}

.scene-document-clean-copy-toggle.is-active,
.scene-document-clean-copy-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.scene-document-clean-copy-toggle.is-active:hover,
.scene-document-clean-copy-toggle.is-active:focus-visible,
.scene-document-clean-copy-toggle[aria-pressed="true"]:hover,
.scene-document-clean-copy-toggle[aria-pressed="true"]:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: color-mix(in srgb, var(--accent) 78%, var(--ink));
}

.scene-document-icon-button svg,
.scene-document-refocus svg {
  width: 17px;
  height: 17px;
}

.scene-document-refocus {
  width: 24px;
  min-width: 24px;
  height: 24px;
  color: var(--accent);
}

.edit-script-panel-title .scene-document-montage-toggle {
  width: 24px;
  min-width: 24px;
  height: 24px;
  color: var(--accent);
}

.edit-script-panel-title .scene-document-montage-toggle svg {
  width: 15px;
  height: 15px;
}

.scene-document-refocus svg {
  width: 15px;
  height: 15px;
}

.scene-document-refocus.is-hidden,
.scene-document-montage-toggle.is-hidden,
.scene-document-open.is-hidden {
  display: none;
}

.scene-document-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.scene-document-icon-button[data-script-tooltip]::after {
  content: attr(data-script-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: max-content;
  max-width: min(240px, calc(100vw - 32px));
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  white-space: normal;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 1200;
}

.scene-document-icon-button[data-script-tooltip]:hover::after,
.scene-document-icon-button[data-script-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.scene-document-section {
  min-height: 0;
}

.scene-document-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scene-document-subtitle {
  margin-top: 4px;
  color: var(--muted) !important;
  font-size: 12px;
  line-height: 1.4;
}

.scene-document-viewer {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.scene-document-placeholder,
.scene-document-text {
  min-height: 0;
  height: 100%;
  padding: 14px 16px;
  color: var(--ink);
}

.scene-document-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
}

.scene-document-placeholder.is-script-unlinked {
  color: var(--script-muted);
}

.scene-document-unlinked-state {
  max-width: 360px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.scene-document-unlinked-state strong {
  color: var(--script-ink);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.25;
}

.scene-document-anchor-link {
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  cursor: pointer;
}

.scene-document-anchor-link:hover,
.scene-document-anchor-link:focus-visible {
  color: color-mix(in srgb, var(--accent) 82%, var(--script-ink));
  outline: none;
}

.scene-document-anchor-link .cutkit-anchor-icon {
  width: 18px;
  height: 18px;
}

.scene-document-frame {
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.scene-document-pdf {
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: transparent;
  padding: 0;
}

.scene-document-montage {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.scene-document-montage-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f7f7f4;
  color: #252525;
}

.scene-document-montage-toolbar {
  min-height: 42px;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #f2f1ee;
  color: #4a4a4a;
  font-size: 13px;
  font-weight: 850;
}

.scene-document-montage-page-switcher,
.scene-document-montage-tools {
  display: inline-flex;
  align-items: center;
}

.scene-document-montage-page-switcher {
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.scene-document-montage-tools {
  justify-content: flex-end;
  gap: 5px;
  color: #555;
  font-size: 11px;
  font-weight: 820;
}

.scene-document-montage-page-button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #4b4b4b;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.scene-document-montage-page-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.scene-document-montage-tool {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #292929;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.scene-document-montage-tool:hover,
.scene-document-montage-tool:focus-visible {
  outline: none;
  background: #fff;
}

.scene-document-montage-tools .scene-document-montage-rotate-action {
  min-width: 30px;
  width: 30px;
  padding: 0;
  border-radius: 8px;
}

.scene-document-montage-tools .scene-document-montage-rotate-action i {
  width: 18px;
  height: 18px;
}

.scene-document-montage-preview {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.scene-document-montage-active-code {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 8;
  max-width: min(260px, calc(100% - 20px));
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 860;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.scene-document-montage-preview-viewport {
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  cursor: grab;
  background: #f8f8f6;
  user-select: none;
}

.scene-document-montage-preview-viewport.is-panning {
  cursor: grabbing;
}

.scene-document-montage-preview-stage {
  position: relative;
  min-width: 1px;
  min-height: 1px;
}

.scene-document-montage-preview-canvas {
  width: max-content;
  min-width: 100%;
  transform-origin: top left;
}

.scene-document-montage-image-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  background: #fff;
}

.scene-document-montage-page-surface {
  position: relative;
  display: inline-block;
  line-height: 0;
  transform-origin: center center;
}

.scene-document-montage-image-frame.is-rotated .scene-document-montage-page-surface {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--montage-page-rotation, 0deg));
}

.scene-document-montage-image-frame img {
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.scene-document-montage-highlight {
  position: absolute;
  display: block;
  border-radius: 4px;
  background: rgba(245, 167, 47, 0.34);
  box-shadow: inset 0 0 0 1px rgba(245, 167, 47, 0.42);
  pointer-events: none;
}

.scene-document-montage-image-frame.is-rotated .scene-document-montage-highlight {
  background: rgba(245, 167, 47, 0.22);
  box-shadow: inset 0 0 0 2px rgba(245, 167, 47, 0.72);
}

.scene-document-montage-table-wrap {
  min-height: 100%;
  padding: 14px;
  overflow: auto;
  background: #fff;
}

.scene-document-montage-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  color: #111;
  font-size: 12px;
  line-height: 1.35;
}

.scene-document-montage-table td {
  min-width: 54px;
  padding: 5px 7px;
  border: 1px solid #c9c9c9;
  vertical-align: top;
}

.scene-document-montage-empty,
.scene-document-montage-loading {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #6b7280;
  text-align: center;
  font-weight: 800;
}

.scene-document-pdf-page {
  position: relative;
  width: fit-content;
  margin: 0 auto 14px;
  background: #ffffff;
  box-shadow: none;
}

.scene-document-pdf-page:last-child {
  margin-bottom: 0;
}

.scene-document-pdf-page canvas {
  display: block;
}

.scene-document-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.scene-document-text-layer span {
  position: absolute;
  white-space: pre;
  transform-origin: 0 0;
}

.scene-document-text {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 18px 24px 28px;
  border-radius: 6px;
  background: var(--script-bg);
  color: var(--script-ink);
  white-space: normal;
}

.scene-document-text .scene-document-line {
  font-family: var(--font-script);
  font-size: 16px;
}

.scene-document-script-scene {
  padding: 14px 0 32px;
  border-top: 1px solid var(--script-line);
}

.scene-document-script-scene.is-active {
  scroll-margin-top: 0;
}

.scene-document-script-heading {
  max-width: 92%;
  margin: 0 0 20px;
  color: var(--script-ink);
  font-family: var(--font-script);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.32;
  white-space: pre-wrap;
}

.scene-document-script-body {
  margin: 0;
  color: var(--script-ink);
  font-family: var(--font-script);
  font-size: 16px;
  line-height: 1.45;
}

.scene-document-script-body .scene-document-line {
  display: block;
}

.scene-document-line {
  display: block;
  padding: 0;
  margin: 0 0 0.42em;
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.scene-document-line.is-layout {
  margin-bottom: 0;
  line-height: 1.28;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: normal;
}

.scene-document-line.is-action {
  max-width: 94%;
  margin-left: 0;
  text-align: left;
}

.scene-document-line.is-heading {
  max-width: 94%;
  margin: 0.72em 0 0.82em;
  color: var(--script-ink);
  font-weight: 850;
  text-align: left;
}

.scene-document-line.is-scene-meta {
  max-width: 94%;
  margin-left: 0;
  color: var(--script-ink);
  font-weight: 800;
  text-align: left;
}

.scene-document-line.is-character {
  max-width: 48%;
  margin-left: 25%;
  margin-top: 0.72em;
  margin-bottom: 0.08em;
  text-align: center;
  font-weight: 800;
}

.scene-document-line.is-dialogue {
  max-width: 58%;
  margin-left: 22%;
}

.scene-document-line.is-parenthetical {
  max-width: 50%;
  margin-left: 28%;
  color: var(--script-muted);
}

.scene-document-line.is-transition {
  max-width: 45%;
  margin-left: auto;
  text-align: right;
  font-weight: 800;
}

.scene-document-line.is-empty {
  min-height: 0.82em;
  margin-bottom: 0;
}

.scene-document-line.is-scene-anchor {
  padding-left: 8px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  background: var(--script-active);
}

.scene-document-frame.is-hidden,
.scene-document-pdf.is-hidden,
.scene-document-text.is-hidden,
.scene-document-montage.is-hidden,
.scene-document-placeholder.is-hidden {
  display: none;
}

.danger-action {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--danger-line);
  border-radius: 7px;
  background: var(--danger-bg);
  color: var(--danger);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.danger-action.is-restore {
  border-color: color-mix(in srgb, #2fbf71 45%, var(--line));
  background: color-mix(in srgb, #2fbf71 12%, var(--surface));
  color: #2fbf71;
}

.danger-action svg {
  width: 15px;
  height: 15px;
}

.danger-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.autosave-status {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.autosave-status.is-saving {
  color: var(--accent);
}

.autosave-status.is-saved {
  color: #2fbf71;
}

.autosave-status.is-error {
  color: var(--danger);
}

:root[data-theme="dark"] .topbar-status.is-saving,
:root[data-theme="light"] .topbar-status.is-saving {
  color: #7fb1ff;
}

:root[data-theme="dark"] .topbar-status.is-saved,
:root[data-theme="light"] .topbar-status.is-saved {
  color: #5fd38f;
}

:root[data-theme="dark"] .topbar-status.is-error,
:root[data-theme="light"] .topbar-status.is-error {
  color: #ff8c8c;
}

@media (max-width: 620px) {
  .edit-scene-panel {
    padding-right: 0;
  }

  .edit-scene-panel-actions,
  .edit-scene-anchor-corner {
    display: none;
  }
}

@media (max-width: 460px) {
  .edit-header-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .edit-scene-panel {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    padding-top: 0;
  }

  .edit-scene-summary {
    grid-column: 1;
  }

  .edit-scene-note-block {
    grid-column: 1;
    max-width: none;
    display: none;
  }

  .danger-action.edit-scene-remove-action {
    grid-column: 1;
  }

  .edit-workspace.is-script-open {
    grid-template-columns: 1fr;
  }

  .edit-workspace.is-script-open .edit-scroll {
    width: 100%;
    padding-right: 0;
  }

  .edit-script-panel {
    position: static;
    width: auto;
    height: auto;
    bottom: auto;
  }

}

:root:not([data-theme="dark"]) .column-insight-tooltip,
:root:not([data-theme="dark"]) .logging-row-actions-menu,
:root:not([data-theme="dark"]) .finishing-row-actions-menu,
:root:not([data-theme="dark"]) .logging-date-popover,
:root:not([data-theme="dark"]) .logging-search-menu,
:root:not([data-theme="dark"]) .scene-token-popover,
:root:not([data-theme="dark"]) .cell-preview-popover,
:root:not([data-theme="dark"]) .edit-scene-duration-popover,
:root:not([data-theme="dark"]) .cutkit-ui-tooltip,
:root:not([data-theme="dark"]) .edit-scene-hover-tooltip,
:root:not([data-theme="dark"]) .edit-action-tooltip,
:root:not([data-theme="dark"]) .edit-scene-state-icon[data-edit-tooltip]::after,
:root:not([data-theme="dark"]) .scene-document-icon-button[data-script-tooltip]::after,
:root:not([data-theme="dark"]) .scene-editor-choice[data-tooltip]::after {
  background: color-mix(in srgb, var(--surface) 96%, var(--bg) 4%);
  border-color: var(--line);
  box-shadow: var(--shadow-strong);
}

:root:not([data-theme="dark"]) .scene-cell-editor-dialog,
:root:not([data-theme="dark"]) .text-editor-dialog,
:root:not([data-theme="dark"]) .member-modal-panel,
:root:not([data-theme="dark"]) .scene-modal-panel {
  background: var(--surface);
  box-shadow: var(--shadow);
}

:root:not([data-theme="dark"]) .logging-grid .day-cell,
:root:not([data-theme="dark"]) .logging-grid .shoot-date-input {
  color: color-mix(in srgb, var(--ink) 92%, var(--muted) 8%);
}

:root:not([data-theme="dark"]) .edit-vertical-scene-row:not(.is-done):not(.is-removed) {
  --edit-vertical-details-bg: #dfe7f1;
  --edit-vertical-details-ink: #273449;
  --edit-vertical-details-muted: #647388;
}

:root:not([data-theme="dark"]) .edit-scene-cell.is-partial-group:not(.is-production-block),
:root:not([data-theme="dark"]) .edit-check-cell.is-partial-group:not(.is-production-block) {
  --partial-group-line: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
}

:root:not([data-theme="dark"]) .edit-scene-cell.is-script-group:not(.is-production-block),
:root:not([data-theme="dark"]) .edit-check-cell.is-script-group:not(.is-production-block) {
  --partial-group-line: color-mix(in srgb, var(--accent) 28%, var(--line-strong));
}

:root:not([data-theme="dark"]) .edit-vertical-scene-row.is-partial-group:not(.is-production-block) {
  --edit-vertical-group-line: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
}

:root:not([data-theme="dark"]) .edit-vertical-scene-row.is-script-group:not(.is-production-block) {
  --edit-vertical-group-line: color-mix(in srgb, var(--accent) 28%, var(--line-strong));
}

:root:not([data-theme="dark"]) .edit-scene-cell.is-manual {
  color: var(--token-ink);
}

:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="file"],
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line);
  background: var(--control);
}

:root[data-theme="dark"] .segmented-control label,
:root[data-theme="dark"] .switch-label,
:root[data-theme="dark"] .checklist-grid label,
:root[data-theme="dark"] .file-control {
  border-color: var(--line);
}

:root[data-theme="dark"] .logging-grid input,
:root[data-theme="dark"] .logging-grid select {
  background: transparent;
}

.errorlist {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 12px;
}

.form-errors {
  padding: 12px 24px;
  background: var(--danger-bg);
  border-bottom: 1px solid var(--danger-line);
  color: var(--danger);
}

.narrow {
  max-width: 390px;
  margin: 52px auto;
  padding: 24px;
}

.narrow h1 {
  margin-bottom: 18px;
}

.narrow p {
  margin: 0 0 14px;
}

.narrow .hint {
  color: var(--muted);
}

.stacked-panels {
  display: grid;
  gap: 10px;
}

.login-shell {
  --auth-control-bg: #e8edf3;
  --auth-control-border: #b6c1cf;
  position: relative;
  isolation: isolate;
  width: min(560px, 100%);
  max-width: 560px;
  margin: 30px auto 22px;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(90, 142, 255, 0.2), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, 0.14), transparent 34%),
    linear-gradient(150deg, #f7faff 0%, #eef4fb 48%, #e8eef7 100%);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

:root[data-theme="dark"] .login-shell {
  --auth-control-bg: #0d121b;
  --auth-control-border: #182234;
  background:
    radial-gradient(circle at 16% 0%, rgba(79, 131, 255, 0.18), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, 0.11), transparent 33%),
    radial-gradient(circle at 72% 88%, rgba(99, 102, 241, 0.08), transparent 42%),
    linear-gradient(152deg, #171f2d 0%, #111827 50%, #0b1019 100%);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.38),
    0 0 46px rgba(37, 99, 235, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(59, 130, 246, 0.2), transparent 38%),
    radial-gradient(circle at 78% 26%, rgba(125, 211, 252, 0.12), transparent 34%),
    radial-gradient(circle at 56% 82%, rgba(99, 102, 241, 0.1), transparent 42%);
  filter: blur(18px);
  opacity: 0.42;
  transform-origin: center;
  animation: auth-panel-breathe 12s ease-in-out infinite;
  will-change: opacity, transform;
}

.login-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 42px rgba(79, 131, 255, 0.06);
}

.login-shell > * {
  position: relative;
  z-index: 1;
}

@keyframes auth-panel-breathe {
  0%,
  100% {
    opacity: 0.36;
    transform: translate3d(-1.2%, -0.8%, 0) scale(1);
  }

  50% {
    opacity: 0.58;
    transform: translate3d(1.2%, 0.8%, 0) scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell::before {
    animation: none;
  }
}

.login-shell h1 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 720;
  line-height: 1.15;
}

.login-shell > .hint {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-brand {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-logo {
  width: min(220px, 68%);
  height: auto;
  display: block;
}

.auth-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(220px, 68%);
  line-height: 0;
}

.auth-brand-link .auth-brand-logo {
  width: 100%;
}

.auth-brand-logo,
.brand-icon,
.brand-wordmark {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  filter: none;
}

.error-page {
  min-height: 100dvh;
  padding: clamp(38px, 8vh, 88px) 16px;
  display: grid;
  align-items: start;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 42%),
    radial-gradient(circle at 18% 82%, color-mix(in srgb, var(--success) 9%, transparent), transparent 34%),
    var(--bg);
}

.error-shell {
  width: min(720px, calc(100vw - 32px));
  margin: 0;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 56%),
    color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: var(--shadow);
}

.error-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(20px, 3vw, 30px);
}

.error-brand .auth-brand-logo {
  width: min(300px, 64vw);
}

.error-code {
  color: color-mix(in srgb, var(--muted) 86%, transparent);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1;
}

.error-shell h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  color: var(--ink-strong);
}

.error-shell .hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-actions .primary-action {
  width: fit-content;
}

.security-page {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vh, 40px) 0 52px;
  display: grid;
  gap: 18px;
}

.security-doc-header,
.security-doc-section {
  display: grid;
  gap: 11px;
}

.security-doc-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.security-doc-section {
  padding-top: 2px;
}

.security-doc-section + .security-doc-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.security-page h1,
.security-page h2 {
  margin: 0;
  color: var(--ink-strong);
  letter-spacing: 0;
}

.security-page h1 {
  max-width: 780px;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.08;
}

.security-page h2 {
  font-size: 16px;
  line-height: 1.2;
}

.security-doc-subtitle,
.security-page p,
.security-clause-list {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.security-doc-subtitle {
  color: var(--muted);
  font-size: 15px;
}

.security-page .security-doc-meta {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink) 14%);
  font-size: 12px;
  line-height: 1.45;
}

.security-doc-footer-meta {
  padding-top: 4px;
}

.security-clause-list {
  padding-left: 20px;
  display: grid;
  gap: 8px;
  list-style: disc;
}

.security-clause-list li {
  padding-left: 4px;
}

.security-notes-list {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 7px;
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 12.5px;
  line-height: 1.52;
  list-style: none;
}

.security-notes-list li {
  padding-left: 0;
  scroll-margin-top: 72px;
}

.security-page a {
  color: var(--accent);
  text-decoration: none;
}

.security-page a:hover {
  text-decoration: underline;
}

.security-note-ref {
  margin-left: 1px;
  font-size: 9px;
  line-height: 0;
  vertical-align: super;
}

.security-note-ref a,
.security-note-back {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  text-decoration: none;
}

.security-note-back {
  min-width: 18px;
  margin-right: 6px;
  display: inline-block;
  font-size: 11px;
}

.security-notes-section {
  color: var(--muted);
}

.feedback-page {
  width: min(760px, 100%);
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.feedback-field {
  display: grid;
  gap: 6px;
}

.feedback-field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 82%, transparent);
  color: var(--ink-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.feedback-field input,
.feedback-field select {
  min-height: 44px;
  padding: 0 12px;
}

.feedback-field textarea {
  min-height: 150px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.45;
}

.feedback-field select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 11px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 78%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}

.feedback-field-error,
.feedback-form-errors {
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.feedback-form-actions {
  display: flex;
  justify-content: flex-start;
}

.feedback-form-actions .primary-action {
  width: auto;
  min-width: 190px;
}

.feedback-messages {
  display: grid;
  gap: 8px;
}

.feedback-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 82%, transparent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.feedback-message-success {
  border-color: color-mix(in srgb, var(--marker-green) 48%, var(--line));
  background: color-mix(in srgb, var(--marker-green) 20%, var(--surface-1));
  color: color-mix(in srgb, var(--marker-green) 76%, var(--ink-strong));
}

.feedback-message-error {
  border-color: color-mix(in srgb, var(--danger) 46%, var(--line));
  background: color-mix(in srgb, var(--danger) 18%, var(--surface-1));
  color: color-mix(in srgb, var(--danger) 76%, var(--ink-strong));
}

@media (max-width: 760px) {
  .feedback-form-grid {
    grid-template-columns: 1fr;
  }

  .feedback-form-actions .primary-action {
    width: 100%;
  }
}

.invite-page {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4.5vh, 48px) 0 60px;
}

body:has(.invite-page) main.shell {
  min-height: 100dvh;
  padding-top: clamp(16px, 4vh, 34px);
  padding-bottom: 24px;
  background: var(--page-backdrop);
}

body:has(.invite-page) .site-footer {
  width: min(900px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.invite-letter {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: clamp(30px, 4.4vw, 46px);
  padding: clamp(30px, 5.2vw, 56px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 18%, rgba(58, 119, 255, 0.1), transparent 34%),
    radial-gradient(circle at 14% 94%, rgba(14, 165, 233, 0.08), transparent 36%),
    linear-gradient(150deg, #101827 0%, #0d1420 48%, #080d15 100%);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.38),
    0 0 46px rgba(37, 99, 235, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.invite-letter::before {
  content: "";
  position: absolute;
  inset: -24%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 12%, rgba(59, 130, 246, 0.12), transparent 34%),
    radial-gradient(circle at 28% 84%, rgba(125, 211, 252, 0.08), transparent 38%),
    radial-gradient(circle at 58% 58%, rgba(99, 102, 241, 0.07), transparent 46%);
  filter: blur(22px);
  opacity: 0.2;
}

.invite-letter > * {
  position: relative;
  z-index: 1;
}

.invite-hero,
.invite-section,
.invite-note {
  display: grid;
  gap: 12px;
}

.invite-hero {
  position: relative;
  justify-items: center;
  padding-bottom: 2px;
  border-bottom: 0;
  text-align: left;
}

.invite-logo {
  width: min(214px, 68vw);
  height: auto;
  display: block;
  margin: 0 auto 12px;
}

.invite-kicker {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 82%, #ffffff 18%);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.invite-page h1,
.invite-page h2,
.invite-page h3,
.invite-page p {
  margin: 0;
}

.invite-page h1 {
  color: var(--ink-strong);
  font-size: clamp(28px, 4.1vw, 40px);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: 0;
}

.invite-page h2 {
  color: var(--ink-strong);
  font-size: clamp(23px, 2.4vw, 30px);
  font-weight: 760;
  line-height: 1.16;
  letter-spacing: 0;
}

.invite-page h3 {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: 0;
}

.invite-page p {
  color: color-mix(in srgb, var(--ink-strong) 70%, var(--muted));
  font-size: 15.5px;
  line-height: 1.66;
}

.invite-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.invite-intro {
  display: grid;
  grid-template-columns: minmax(0, 680px) 76px;
  align-items: start;
  justify-content: center;
  gap: 26px;
  width: min(820px, 100%);
  padding-top: 12px;
}

.invite-page a:not(.primary-action):not(.secondary-action) {
  color: color-mix(in srgb, var(--accent) 84%, #ffffff 16%);
  font-weight: 760;
  text-decoration: none;
}

.invite-page a:not(.primary-action):not(.secondary-action):hover {
  text-decoration: underline;
}

.invite-lead {
  color: color-mix(in srgb, var(--ink-strong) 84%, var(--muted));
  font-size: 16px;
  font-weight: 650;
  line-height: 1.6;
}

.invite-author-photo {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 0;
  object-fit: cover;
  object-position: 50% 68%;
  box-shadow: none;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 6px;
}

.invite-actions .primary-action,
.invite-actions .secondary-action {
  width: auto;
  min-width: 176px;
  min-height: 42px;
  text-decoration: none;
}

.invite-workflows {
  display: grid;
  gap: 18px;
  padding-top: 10px;
}

.invite-workflow-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.invite-screen {
  min-height: 168px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 72%, transparent), color-mix(in srgb, var(--bg) 78%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.invite-screen-source {
  display: grid;
  grid-template-rows: 34px 1fr;
}

.invite-source-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.invite-source-toolbar span {
  color: color-mix(in srgb, var(--accent) 78%, var(--ink-strong));
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-source-toolbar b {
  min-width: 31px;
  padding: 3px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: color-mix(in srgb, var(--muted) 86%, var(--ink-strong));
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.invite-source-table {
  display: grid;
  padding: 8px 9px;
}

.invite-source-row {
  display: grid;
  grid-template-columns: 20px 50px 42px 34px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 25px;
  padding: 3px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 46%, transparent);
  color: color-mix(in srgb, var(--muted) 86%, var(--ink-strong));
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1;
}

.invite-source-row:last-child {
  border-bottom: 0;
}

.invite-source-head {
  min-height: 20px;
  padding-top: 0;
  color: color-mix(in srgb, var(--muted) 62%, transparent);
  font-size: 8.5px;
  font-weight: 850;
  text-transform: uppercase;
}

.invite-source-row strong {
  color: var(--ink-strong);
  font-size: 11px;
}

.invite-source-row i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 88%, transparent);
  color: var(--ink-strong);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.invite-source-row i.empty {
  border: 2px solid color-mix(in srgb, var(--muted) 50%, transparent);
  background: transparent;
}

.invite-source-row em {
  min-width: 0;
  padding: 5px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--marker-green) 38%, transparent);
  color: color-mix(in srgb, var(--ink-strong) 82%, transparent);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-screen-edit {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 12px 10px;
}

.invite-edit-row {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(22px, 1fr));
  gap: 2px;
  align-items: stretch;
}

.invite-edit-row span {
  min-height: 27px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: color-mix(in srgb, var(--marker-green) 64%, #1b2636);
  color: color-mix(in srgb, var(--ink-strong) 84%, transparent);
  font-size: 11px;
  font-weight: 800;
}

.invite-edit-row .episode {
  justify-items: start;
  padding-left: 6px;
  background: color-mix(in srgb, var(--accent) 24%, #111827);
  color: color-mix(in srgb, var(--accent) 76%, var(--ink-strong));
}

.invite-edit-row .episode.alt {
  background: color-mix(in srgb, #7c3aed 24%, #111827);
  color: color-mix(in srgb, #a78bfa 72%, var(--ink-strong));
}

.invite-edit-row .done::after {
  content: "✓";
  margin-left: 2px;
}

.invite-edit-row .warn {
  background: color-mix(in srgb, #e8792f 72%, #1b2636);
}

.invite-screen-tasks {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 11px 10px;
}

.invite-task-head,
.invite-task-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 42px 54px;
  gap: 6px;
  align-items: center;
}

.invite-task-head {
  color: color-mix(in srgb, var(--muted) 62%, transparent);
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.invite-task-row {
  min-height: 25px;
  padding: 5px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-2) 58%, transparent);
  color: color-mix(in srgb, var(--muted) 86%, var(--ink-strong));
  font-size: 10px;
  font-weight: 780;
  line-height: 1.1;
}

.invite-task-row strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-task-row em {
  padding: 4px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: color-mix(in srgb, var(--accent) 78%, var(--ink-strong));
  font-style: normal;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-task-row b {
  padding: 4px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, #f97316 58%, transparent);
  color: var(--ink-strong);
  font-size: 8.5px;
  font-weight: 850;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-task-row b.blue {
  background: color-mix(in srgb, var(--accent) 68%, transparent);
}

.invite-task-row b.green {
  background: color-mix(in srgb, var(--marker-green) 60%, transparent);
}

.invite-workflow-card > div:last-child {
  display: grid;
  gap: 8px;
}

.invite-workflow-card p,
.invite-note p {
  color: color-mix(in srgb, var(--muted) 82%, var(--ink-strong));
  font-size: 14.25px;
  line-height: 1.58;
}

.invite-note {
  padding-top: 8px;
}

@media (max-width: 760px) {
  .invite-intro {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 14px;
  }

  .invite-workflow-card {
    grid-template-columns: 1fr;
  }

  .invite-screen {
    min-height: 150px;
  }
}

@media (max-width: 560px) {
  .invite-page {
    padding-top: 14px;
  }

  .invite-letter {
    padding: 24px 20px;
  }

  .invite-page h1 {
    font-size: 30px;
  }

  .invite-author-photo {
    width: 58px;
    height: 58px;
  }

  .invite-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .invite-actions .primary-action,
  .invite-actions .secondary-action {
    width: 100%;
  }

  .invite-edit-row {
    grid-template-columns: 54px repeat(7, minmax(20px, 1fr));
  }
}

.guide-page {
  width: min(1120px, 100%);
  gap: 24px;
}

.guide-doc-header {
  gap: 9px;
}

.guide-orientation,
.guide-section-header {
  display: grid;
  gap: 9px;
}

.guide-section-kicker {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 86%, var(--ink));
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-route {
  min-height: 114px;
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  color: var(--ink);
  text-decoration: none;
}

.guide-route:hover,
.guide-route:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  text-decoration: none;
}

.guide-route span {
  color: color-mix(in srgb, var(--muted) 84%, transparent);
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.guide-route strong {
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.2;
}

.guide-route p {
  font-size: 12.5px;
  line-height: 1.45;
}

.guide-flow-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.guide-flow-step {
  position: relative;
  min-height: 126px;
  padding: 13px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 58%, transparent);
}

.guide-flow-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
}

.guide-flow-step:last-child::after {
  display: none;
}

.guide-flow-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: color-mix(in srgb, var(--accent) 86%, var(--ink-strong));
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.guide-flow-step strong {
  color: var(--ink-strong);
  font-size: 14px;
  line-height: 1.2;
}

.guide-flow-step p {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 12.5px;
  line-height: 1.45;
}

.guide-toc {
  position: sticky;
  top: calc(var(--topbar-height, 58px) + 8px);
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.guide-toc a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  color: var(--ink-strong);
  text-decoration: none;
}

.guide-section {
  scroll-margin-top: calc(var(--topbar-height, 58px) + 74px);
}

.guide-section > p {
  max-width: 820px;
}

.guide-section h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.2;
}

.guide-section code {
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--ink-strong);
  font-size: 12px;
}

.guide-steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.guide-steps li {
  padding-left: 3px;
}

.guide-steps-compact {
  gap: 6px;
  font-size: 13px;
}

.guide-steps-numbered {
  padding-left: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-steps-numbered li {
  position: relative;
  min-height: 32px;
  padding-left: 44px;
}

.guide-steps-numbered li::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  position: absolute;
  top: 0;
  left: 0;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-2));
  color: var(--ink-strong);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.guide-context-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 0 2px;
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.guide-context-row section {
  display: grid;
  gap: 5px;
  align-content: start;
}

.guide-context-row p {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 12.5px;
  line-height: 1.5;
}

.guide-procedure {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.guide-procedure > section,
.guide-aside {
  display: grid;
  gap: 9px;
  align-content: start;
}

.guide-aside {
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 50%, transparent);
}

.guide-check-grid,
.guide-action-grid,
.guide-doc-type-grid,
.guide-troubleshooting {
  display: grid;
  gap: 10px;
}

.guide-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-doc-type-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-troubleshooting {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-action-card,
.guide-doc-type,
.guide-check-grid > section,
.guide-troubleshooting > section {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.guide-doc-type strong {
  color: color-mix(in srgb, var(--marker-green) 78%, var(--ink-strong));
  font-size: 12px;
  line-height: 1.35;
}

.guide-action-card p,
.guide-doc-type p,
.guide-troubleshooting p {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 12.5px;
  line-height: 1.5;
}

.guide-troubleshooting a {
  color: color-mix(in srgb, var(--accent) 90%, var(--ink-strong));
  font-weight: 800;
  text-decoration: none;
}

.guide-troubleshooting a:hover,
.guide-troubleshooting a:focus-visible {
  text-decoration: underline;
}

.guide-check-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.5;
}

.guide-check-list li {
  padding-left: 2px;
}

.guide-state-list {
  margin: 0;
  display: grid;
  gap: 6px;
}

.guide-state-list div {
  display: grid;
  grid-template-columns: minmax(88px, 0.5fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
}

.guide-state-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-state-list dt {
  color: var(--ink-strong);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.guide-state-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}

.guide-media-block {
  margin: 2px 0 0;
  display: grid;
  gap: 8px;
}

.guide-media-block.is-compact {
  width: min(820px, 100%);
}

.guide-media-block.is-compact img {
  width: auto;
  max-width: 100%;
}

.guide-media-block img {
  width: 100%;
  display: block;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.guide-media-block figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.guide-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.guide-copy-grid section {
  display: grid;
  gap: 6px;
  align-content: start;
}

.guide-callout {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.guide-callout strong {
  color: var(--ink-strong);
}

@media (max-width: 760px) {
  .guide-page {
    gap: 18px;
  }

  .guide-flow-map,
  .guide-route-grid,
  .guide-check-grid,
  .guide-action-grid,
  .guide-doc-type-grid,
  .guide-troubleshooting,
  .guide-context-row,
  .guide-procedure {
    grid-template-columns: 1fr;
  }

  .guide-flow-step::after {
    display: none;
  }

  .guide-toc {
    position: static;
  }

  .guide-toc a {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .guide-copy-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .guide-flow-map,
  .guide-action-grid,
  .guide-doc-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.site-footer {
  width: min(920px, 100%);
  margin: 18px auto 34px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

body:has(.login-shell) .site-footer {
  margin: auto auto 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 9px;
  text-align: center;
}

.site-footer-links a {
  color: color-mix(in srgb, var(--muted) 86%, var(--ink) 14%);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer-separator {
  color: color-mix(in srgb, var(--muted) 55%, transparent);
  user-select: none;
}

/* Dashboard */
.dashboard-page {
  min-height: calc(100vh - var(--topbar-height));
  padding: 28px 0 36px;
  display: grid;
  gap: 16px;
}

.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.dashboard-title-block {
  display: grid;
  gap: 4px;
}

.section-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-title-block h1,
.dashboard-library-header h2,
.dashboard-widget h2 {
  margin: 0;
  color: var(--ink-strong);
  letter-spacing: 0;
}

.dashboard-title-block h1 {
  font-size: 28px;
  line-height: 1.05;
}

.dashboard-subtitle,
.dashboard-muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.dashboard-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-action {
  min-height: 34px;
  border-radius: 7px;
}

.dashboard-library {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  box-shadow: var(--shadow);
}

.dashboard-library-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.dashboard-library-item {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  color: var(--ink);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.dashboard-library-item:hover,
.dashboard-library-item:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--control) 82%, var(--accent));
}

.dashboard-library-item:disabled {
  cursor: default;
  opacity: 0.42;
}

.dashboard-library-item.is-on-dashboard .dashboard-library-size::after {
  content: " · на панели";
  text-transform: none;
}

.dashboard-library-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.dashboard-library-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-library-item-copy strong {
  color: var(--ink-strong);
}

.dashboard-library-item-copy small,
.dashboard-library-size {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.dashboard-library-size {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--control-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 184px;
  grid-auto-flow: dense;
  gap: 12px;
  align-items: stretch;
}

.dashboard-widget {
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: hidden;
}

.dashboard-widget-medium {
  grid-column: span 1;
  grid-row: span 1;
}

.dashboard-widget-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.dashboard-widget-large {
  grid-column: span 2;
  grid-row: span 2;
}

.dashboard-widget-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-widget-header h2 {
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.1;
}

.dashboard-widget-header > svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.dashboard-widget-token,
.dashboard-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--control-muted);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-widget-token {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--control));
}

.dashboard-rings {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-ring {
  --ring-color: var(--marker-green);
  width: 86px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 56%, transparent 57%),
    conic-gradient(var(--ring-color) calc(var(--value) * 1%), var(--control-muted) 0);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
}

.dashboard-ring.is-sync {
  --ring-color: var(--marker-blue);
}

.dashboard-ring.is-edit {
  --ring-color: var(--marker-orange);
}

.dashboard-ring span {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-ring small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-progress-stack {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
}

.dashboard-progress-line span,
.dashboard-metric-pair span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-progress-line strong,
.dashboard-metric-pair strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
}

.dashboard-progress-line i,
.dashboard-episode-row i {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) var(--value), transparent 0),
    var(--control-muted);
  overflow: hidden;
}

.dashboard-feature-code {
  width: fit-content;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--marker-blue);
  color: var(--token-ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 850;
}

.dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-chip.is-done {
  background: var(--marker-green);
  color: var(--token-ink);
}

.dashboard-metric-pair {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.dashboard-episode-list,
.dashboard-activity-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-episode-list {
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-episode-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-episode-row:last-child {
  border-bottom: 0;
}

.dashboard-episode-row strong {
  color: var(--accent);
  font-size: 14px;
}

.dashboard-episode-row span {
  justify-self: end;
  color: var(--ink-strong);
  font-weight: 850;
}

.dashboard-episode-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-activity-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.dashboard-activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-activity-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.dashboard-activity-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-activity-item strong {
  color: var(--ink-strong);
  font-size: 13px;
}

.dashboard-activity-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-empty-widget,
.dashboard-empty-layout {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-empty-layout {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}

.dashboard-widget-edit-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: none;
  gap: 4px;
}

.dashboard-page.is-customizing-dashboard .dashboard-widget-edit-actions {
  display: flex;
}

.dashboard-widget-edit-actions button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: var(--control-muted);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dashboard-widget-edit-actions button:hover {
  color: var(--accent);
}

.dashboard-widget-edit-actions svg {
  width: 15px;
  height: 15px;
}

.dashboard-page.is-customizing-dashboard .dashboard-widget {
  outline: 1px dashed color-mix(in srgb, var(--accent) 56%, transparent);
  outline-offset: -5px;
  cursor: grab;
}

.dashboard-page.is-customizing-dashboard .dashboard-widget:active {
  cursor: grabbing;
}

.dashboard-widget.is-dragging {
  opacity: 0.48;
  transform: scale(0.992);
}

.dashboard-widget.is-drop-before,
.dashboard-widget.is-drop-after {
  outline-color: color-mix(in srgb, var(--accent) 88%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, var(--accent));
}

.dashboard-widget.is-drop-before::before,
.dashboard-widget.is-drop-after::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.dashboard-widget.is-drop-before::before {
  top: 5px;
}

.dashboard-widget.is-drop-after::after {
  bottom: 5px;
}

.is-future-widget {
  background: color-mix(in srgb, var(--surface) 88%, var(--control-muted));
}

.dashboard-page {
  --dashboard-gap: 12px;
  --dashboard-cell: clamp(136px, calc((100vw - 112px - var(--dashboard-gap) * 5) / 6), 220px);
  min-height: calc(100vh - var(--topbar-height));
  padding: 14px 0 24px;
  display: block;
  overflow-x: auto;
}

.dashboard-grid {
  --dashboard-grid-line: color-mix(in srgb, var(--line) 78%, transparent);
  position: relative;
  width: calc(var(--dashboard-cell) * 6 + var(--dashboard-gap) * 5);
  min-width: calc(var(--dashboard-cell) * 6 + var(--dashboard-gap) * 5);
  min-height: calc(var(--dashboard-cell) * 10 + var(--dashboard-gap) * 9);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(6, var(--dashboard-cell));
  grid-template-rows: repeat(10, var(--dashboard-cell));
  grid-auto-flow: row;
  gap: var(--dashboard-gap);
  padding: 0;
  align-items: stretch;
  background:
    linear-gradient(var(--dashboard-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--dashboard-grid-line) 1px, transparent 1px);
  background-size:
    calc(var(--dashboard-cell) + var(--dashboard-gap)) calc(var(--dashboard-cell) + var(--dashboard-gap)),
    calc(var(--dashboard-cell) + var(--dashboard-gap)) calc(var(--dashboard-cell) + var(--dashboard-gap));
}

.dashboard-widget {
  position: relative;
  z-index: 2;
  min-height: 0;
  height: auto;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.dashboard-widget:active {
  cursor: grabbing;
}

.dashboard-widget.is-dragging {
  opacity: 0.55;
  transform: scale(0.99);
}

.dashboard-drop-preview {
  z-index: 1;
  border: 2px solid color-mix(in srgb, var(--accent) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  pointer-events: none;
}

.dashboard-widget-header {
  min-width: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-widget-header h2 {
  margin: 2px 0 0;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.05;
}

.dashboard-widget-header > svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.dashboard-widget-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--control));
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-project-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-mini-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: baseline;
}

.dashboard-mini-stats span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-mini-stats strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-widget-progress {
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-widget-latest-shift {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 14px;
}

.dashboard-widget-latest-shift .dashboard-widget-header,
.dashboard-widget-latest-shift .dashboard-shift-day,
.dashboard-widget-latest-shift .dashboard-chip-row,
.dashboard-widget-latest-shift .dashboard-empty-widget {
  grid-column: 1 / -1;
}

.dashboard-rings {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.dashboard-ring {
  --ring-color: var(--marker-green);
  width: min(108px, 28%);
  min-width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 56%, transparent 57%),
    conic-gradient(var(--ring-color) calc(var(--value) * 1%), var(--control-muted) 0);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
}

.dashboard-ring.is-sync {
  --ring-color: var(--marker-blue);
}

.dashboard-ring.is-edit {
  --ring-color: var(--marker-orange);
}

.dashboard-ring span {
  color: var(--ink-strong);
  font-size: 21px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-ring small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-shift-day {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-shift-day strong {
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1;
}

.dashboard-shift-day span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-shift-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.dashboard-shift-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-shift-meta strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--control-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-chip.is-done {
  background: var(--marker-green);
  color: var(--token-ink);
}

.dashboard-chip.is-alert,
.dashboard-chip.is-problem,
.dashboard-chip.is-defect,
.dashboard-chip.is-backup,
.dashboard-chip.is-reports,
.dashboard-chip.is-aaf,
.dashboard-chip.is-xml-edl,
.dashboard-chip.is-integration {
  background: var(--marker-red);
  color: var(--token-ink);
}

.dashboard-chip.is-sound,
.dashboard-chip.is-dubbing,
.dashboard-chip.is-music,
.dashboard-chip.is-mix,
.dashboard-chip.is-m-and-e {
  background: var(--marker-teal);
  color: var(--token-ink);
}

.dashboard-chip.is-graphics,
.dashboard-chip.is-vfx,
.dashboard-chip.is-infographics {
  background: var(--marker-blue);
  color: var(--token-ink);
}

.dashboard-chip.is-color {
  background: var(--marker-purple);
  color: var(--token-ink);
}

.dashboard-chip.is-rights,
.dashboard-chip.is-stock,
.dashboard-chip.is-brand,
.dashboard-chip.is-music-rights {
  background: var(--marker-slate);
  color: var(--token-ink);
}

.dashboard-token-cloud {
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
  overflow: hidden;
}

.dashboard-scene-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--scene-ready-bg);
  color: var(--token-ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-progress-stack {
  display: grid;
  gap: 8px;
}

.dashboard-progress-stack.is-compact {
  gap: 7px;
}

.dashboard-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}

.dashboard-progress-line span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-progress-line strong {
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-progress-line i {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--marker-green) var(--value), transparent 0),
    var(--control-muted);
}

.dashboard-feed-list {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.dashboard-feed-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  align-items: baseline;
}

.dashboard-feed-item strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-feed-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-feed-item .dashboard-chip-row {
  grid-column: 1 / -1;
}

.dashboard-feed-detail {
  grid-column: 1 / -1;
  min-width: 0;
  margin: -1px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-feed-item em {
  font-style: normal;
}

.dashboard-episode-progress-list {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow: hidden;
}

.dashboard-episode-progress-row {
  display: grid;
  grid-template-columns: 44px 12px minmax(44px, 1fr);
  gap: 4px 7px;
  align-items: center;
}

.dashboard-episode-progress-row strong {
  grid-row: span 3;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-episode-progress-row span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.dashboard-episode-progress-row i {
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--marker-blue) var(--value), transparent 0),
    var(--control-muted);
}

.dashboard-empty-widget {
  color: var(--muted);
  font-weight: 750;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: repeat(6, var(--dashboard-cell));
  }
}

@media (max-width: 760px) {
  .security-page {
    gap: 16px;
    padding-top: 20px;
  }

  .security-doc-section + .security-doc-section {
    padding-top: 16px;
  }

  .site-footer {
    margin-bottom: 26px;
  }

  .site-footer-links {
    align-items: flex-start;
  }

  .dashboard-toolbar {
    display: grid;
  }

  .dashboard-toolbar-actions {
    justify-content: start;
  }

  .dashboard-grid {
    grid-template-columns: repeat(6, var(--dashboard-cell));
  }

  .dashboard-widget,
  .dashboard-widget-medium,
  .dashboard-widget-wide,
  .dashboard-widget-large {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.panel.compact {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.login-panel {
  display: grid;
  gap: 11px;
}

.panel.compact h2 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.login-fields {
  display: grid;
  gap: 13px;
}

.login-shell .login-field input[type="email"],
.login-shell .login-field input[type="password"],
.login-shell .login-field input[type="text"] {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid var(--auth-control-border);
  border-radius: 8px;
  background: var(--auth-control-bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  outline: none;
}

.login-shell .login-field input[type="email"]:focus,
.login-shell .login-field input[type="password"]:focus,
.login-shell .login-field input[type="text"]:focus {
  border-color: var(--auth-control-border);
  box-shadow: none;
}

.login-panel .primary-action,
.login-panel .secondary-action {
  width: 100%;
}

.login-panel .form-field {
  display: grid;
  gap: 3px;
}

.login-panel .form-field > label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.legal-consent-field {
  margin: 5px 0 6px;
}

.legal-consent-field-optional {
  margin-top: -1px;
}

.legal-consent-row {
  position: relative;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.legal-consent-row input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
  width: 17px;
  height: 17px;
  min-height: 17px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  opacity: 0;
  appearance: none;
  cursor: pointer;
}

.legal-consent-check {
  grid-column: 1;
  grid-row: 1;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
}

.legal-consent-check::after {
  content: "";
  width: 7px;
  height: 4px;
  display: none;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-0.5px) rotate(-45deg);
}

.legal-consent-row input[type="checkbox"]:checked + .legal-consent-check {
  border-color: transparent;
  background: var(--accent);
}

.legal-consent-row input[type="checkbox"]:checked + .legal-consent-check::after {
  display: block;
}

.legal-consent-row span:not(.legal-consent-check) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.legal-consent-row label {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.42;
}

.legal-consent-row .legal-consent-help {
  display: block;
  margin-top: 2px;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.legal-consent-row a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.legal-consent-row a:hover {
  text-decoration: underline;
}

.field-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
}

.auth-switch-link {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-switch-link a {
  color: var(--accent);
  font-weight: 700;
}

.auth-switch-link a:hover {
  text-decoration: underline;
}

.narrow button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

@media (max-width: 880px) {
  .shell {
    margin-inline: 12px;
  }

  .setup-frame {
    grid-template-columns: 1fr;
  }

  .setup-sidebar {
    min-height: 0;
    position: static;
  }

  .form-grid,
  .setup-tool-grid,
  .tag-settings-reset-form,
  .tag-settings-transfer,
  .tag-settings-import-form,
  .project-type-options,
  .setup-overview-grid,
  .segmented-control ul,
  .segmented-control > div,
  .segmented-control.compact > div,
  .segmented-control.compact ul,
  .checklist-grid > div,
  .custom-field-row {
    grid-template-columns: 1fr;
  }

  .setup-project-type-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-main-card-head-row {
    align-items: center;
    flex-direction: row;
  }

  .setup-main-card-head-actions .primary-action {
    width: 40px;
    justify-content: center;
  }

  .setup-main-card-head-row .member-add-icon-action {
    width: 40px;
    align-self: flex-end;
  }

  .source-ready-row {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
  }

  .source-ready-row small {
    grid-column: 2;
    padding-left: 0;
  }

  .source-ready-row small::before {
    display: none;
  }

  .tag-settings-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .tag-task-type-menu,
  .tag-task-custom-type-panel {
    width: min(100%, 88vw);
  }

  .tag-task-custom-type-panel {
    grid-template-columns: 1fr;
  }

  .tag-task-custom-type-color,
  .tag-task-custom-type-icon {
    grid-column: auto;
  }

  .tag-settings-transfer,
  .tag-settings-import-form {
    flex-direction: column;
    align-items: stretch;
  }

  .tag-settings-footer {
    align-items: stretch;
  }

  .tag-settings-utility-group {
    width: 100%;
    flex-basis: 100%;
  }

  .tag-settings-save-action {
    width: 100%;
  }

  .tag-settings-export-form,
  .tag-settings-import-form,
  .tag-settings-file {
    width: 100%;
  }

  .span-2 {
    grid-column: auto;
  }

  .setup-transfer-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .setup-transfer-row .setup-tool-actions {
    grid-template-columns: 1fr;
    min-width: 0;
    justify-content: stretch;
  }

  .setup-transfer-row .secondary-action,
  .setup-transfer-row .tag-settings-file {
    width: 100%;
    justify-content: center;
  }

  .sheet-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .project-context {
    display: none;
  }

  .logging-meta,
  .logging-meta .primary-action,
  .logging-meta .secondary-action {
    width: 100%;
  }

  .logging-search-strip {
    align-items: stretch;
  }

  .logging-toolbar {
    width: 100%;
  }

  .logging-search {
    width: min(210px, 100%);
  }
}

/* Tasks inspector redesign: compact command surface, not a stacked form. */
.finishing-detail-panel {
  padding: 0;
  z-index: 5000;
  isolation: isolate;
  height: calc(100dvh - var(--topbar-height) - var(--finishing-panel-top-offset));
  max-height: calc(100dvh - var(--topbar-height) - var(--finishing-panel-top-offset));
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface);
}

.finishing-detail-header {
  position: sticky;
  top: 0;
  z-index: 320;
  padding: 14px 16px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: var(--surface);
  backdrop-filter: none;
}

.finishing-detail-header .section-eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.finishing-detail-header h1,
.finishing-empty-detail h1 {
  max-width: 94%;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.finishing-create-detail-header {
  align-items: center;
  min-height: 44px;
  padding-block: 10px;
}

.finishing-detail-title-row {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.finishing-create-detail-header h1 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-panel-info-popover {
  position: relative;
  flex: 0 0 auto;
}

.finishing-panel-info-popover > summary {
  list-style: none;
}

.finishing-panel-info-popover > summary::-webkit-details-marker {
  display: none;
}

.finishing-panel-info-button {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--muted);
  box-shadow: none !important;
  cursor: help;
  outline: 0;
  transition: color 140ms ease;
}

.finishing-panel-info-button:hover,
.finishing-panel-info-button:focus-visible,
.finishing-panel-info-popover[open] > .finishing-panel-info-button {
  color: var(--ink);
  outline: 0;
}

.finishing-panel-info-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.finishing-panel-info-card {
  position: absolute;
  top: calc(100% + 10px);
  left: -28px;
  z-index: 450;
  width: min(380px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, #050b14);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  color: var(--ink);
  cursor: default;
}

.finishing-panel-info-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 34px;
  width: 10px;
  height: 10px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-top: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--surface) 94%, #050b14);
  transform: rotate(45deg);
}

.finishing-panel-info-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.finishing-panel-info-card-head span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.finishing-panel-info-card-head svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.finishing-panel-info-card-head strong {
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.finishing-panel-info-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.finishing-panel-info-section + .finishing-panel-info-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.finishing-panel-info-section > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 920;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.finishing-panel-info-section ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finishing-panel-info-section li {
  position: relative;
  padding-left: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.finishing-panel-info-section li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

@media (max-width: 760px) {
  .finishing-panel-info-card {
    position: fixed;
    top: calc(var(--topbar-height) + 64px);
    right: 14px;
    left: 14px;
    width: auto;
    max-height: min(72vh, 540px);
    overflow: auto;
  }

  .finishing-panel-info-card::before {
    display: none;
  }
}

.finishing-panel-close {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
}

.finishing-panel-close:hover,
.finishing-panel-close:focus-visible {
  border-color: var(--line);
  background: var(--control-muted);
  color: var(--ink-strong);
  outline: none;
}

.finishing-detail-panel > .finishing-panel-card,


.finishing-detail-panel.is-existing-task-editor > :not(.finishing-existing-editor) {
  display: none !important;
}

.finishing-page.is-overview-mode:not(.is-panel-closed) .finishing-layout {
  grid-template-columns: minmax(0, 1fr);
}

.finishing-page.is-overview-mode:not(.is-panel-closed) .finishing-detail-panel {
  position: fixed;
  top: calc(var(--topbar-height) + 14px);
  right: 14px;
  bottom: 14px;
  left: auto;
  width: min(620px, calc(100vw - 28px));
  height: auto;
  max-height: none;
  margin-top: 0;
  padding: 0;
  z-index: 7600;
  border-radius: 10px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
}

.finishing-existing-supplements-drawer {
  margin: 8px 16px 16px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  padding-top: 10px;
}

.finishing-existing-supplements-drawer > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
}

.finishing-existing-supplements-drawer > summary::-webkit-details-marker {
  display: none;
}

.finishing-existing-supplements-drawer[open] > summary {
  margin-bottom: 10px;
}

.finishing-panel-card {
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.finishing-discussion,
.finishing-history {
  padding: 12px 16px;
}


.finishing-section-heading {
  margin-bottom: 8px;
  align-items: center;
}

.finishing-section-heading h2 {
  color: var(--muted);
  font-size: 10px;
  font-weight: 920;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.finishing-section-heading p {
  display: none;
}

.finishing-inline-edit > summary,
.finishing-inline-expand > summary {
  min-height: 24px;
  padding: 0 8px;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--control) 68%, transparent);
  font-size: 10px;
}


.finishing-due-input {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: none;
}

.finishing-due-input:hover {
  border-color: color-mix(in srgb, var(--accent) 56%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.finishing-task-table td.is-inline-edit-cell {
  padding: 0;
}

.finishing-task-table td.is-inline-edit-cell > form,
.finishing-task-table td.is-inline-edit-cell .logging-date-control {
  display: contents;
}

.finishing-task-table td.is-inline-edit-cell > .finishing-table-stop-frame-form {
  display: block !important;
  position: absolute;
  inset: 0;
  height: 100%;
}

.finishing-task-table td.is-inline-edit-cell .finishing-table-inline-input,
.finishing-task-table td.is-inline-edit-cell .finishing-due-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: 100%;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

.finishing-task-table td.is-inline-edit-cell .finishing-table-inline-input:hover,
.finishing-task-table td.is-inline-edit-cell .finishing-table-inline-input:focus-visible,
.finishing-task-table td.is-inline-edit-cell .finishing-due-input:hover,
.finishing-task-table td.is-inline-edit-cell .finishing-due-input:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.finishing-task-table td.is-inline-edit-cell:focus-within {
  box-shadow: none;
}

.finishing-task-table td.finishing-description-cell,
.finishing-task-table td.finishing-stage-note-cell {
  height: 1px;
  overflow: hidden;
  vertical-align: top;
}

.finishing-task-table td.is-inline-edit-cell > .finishing-table-description-form {
  display: block !important;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.finishing-task-table td.finishing-description-cell .finishing-table-description-input {
  display: block;
  height: 100% !important;
  max-height: none;
  overflow: auto !important;
  scrollbar-width: thin;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.finishing-task-table td.finishing-stage-note-cell {
  position: relative;
  padding: 0;
  min-height: 0;
}

.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary,
.finishing-stage-note-cell > .finishing-stage-note-text {
  display: grid;
  position: absolute;
  inset: 0;
  align-content: start;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 10px;
  box-sizing: border-box;
  overflow: auto;
  scrollbar-width: thin;
}

.finishing-task-table td.finishing-task-summary-cell.is-inline-edit-cell {
  position: relative;
  height: 1px;
  overflow: hidden;
  vertical-align: top;
}

.finishing-task-table td.is-inline-edit-cell > .finishing-table-title-form {
  display: block !important;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input {
  display: block;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none;
  padding: 10px 34px 10px 10px !important;
  box-sizing: border-box;
  resize: none;
  overflow: auto;
  scrollbar-width: thin;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.finishing-task-table:not(.is-row-height-expanded) td.is-inline-edit-cell .finishing-table-inline-input,
.finishing-task-table:not(.is-row-height-expanded) td.is-inline-edit-cell .finishing-due-input {
  min-height: 18px;
  padding-top: 0;
  padding-bottom: 0;
}

.finishing-task-table:not(.is-row-height-expanded) td.finishing-description-cell .finishing-table-description-input {
  min-height: 18px !important;
  padding: 1px 8px !important;
}

.finishing-task-table:not(.is-row-height-expanded) .finishing-task-summary-cell.is-inline-edit-cell .finishing-table-title-input {
  min-height: 18px !important;
  padding: 1px 30px 1px 8px !important;
}

.finishing-task-table:not(.is-row-height-expanded) .finishing-stage-note-cell .finishing-table-quick.finishing-stage-note-popover > summary,
.finishing-task-table:not(.is-row-height-expanded) .finishing-stage-note-cell > .finishing-stage-note-text {
  padding: 1px 8px;
}

.finishing-task-title-cell.has-inline-form {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  margin-top: 0;
  pointer-events: none;
}

.finishing-task-title-cell.has-inline-form .finishing-task-open-panel {
  pointer-events: auto;
}

.finishing-task-table tbody td.finishing-task-summary-cell.is-title-single-line {
  vertical-align: middle !important;
}

.finishing-task-table tbody td.finishing-task-summary-cell.is-title-wrapped {
  vertical-align: top !important;
}

.finishing-task-summary-cell.is-inline-edit-cell.is-title-single-line .finishing-table-title-form {
  display: flex !important;
  align-items: center;
  height: 100%;
}

.finishing-task-summary-cell.is-inline-edit-cell.is-title-wrapped .finishing-table-title-form {
  display: block !important;
  height: 100%;
}

.finishing-task-summary-cell.is-inline-edit-cell.is-title-single-line .finishing-table-title-input {
  height: auto !important;
  max-height: 100%;
  white-space: nowrap !important;
  overflow: hidden;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.finishing-task-summary-cell.is-inline-edit-cell.is-title-wrapped .finishing-table-title-input {
  height: 100% !important;
  overflow: auto;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.finishing-task-summary-cell.is-title-single-line .finishing-row-height-content--task {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.finishing-task-summary-cell.is-title-single-line [data-finishing-task-title-preview] {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.finishing-task-summary-cell.is-title-wrapped .finishing-row-height-content--task {
  display: block;
}

.finishing-task-summary-cell.is-title-wrapped [data-finishing-task-title-preview] {
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.finishing-chip.is-package-status {
  min-height: 22px;
  font-size: 10px;
}


.finishing-roadmap {
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 52%, transparent);
  border-radius: 0;
  background: transparent;
}


.finishing-review-loop-card {
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--marker-purple) 13%, transparent), transparent 78%);
}

.finishing-review-action {
  padding: 0;
  border: 0;
  background: transparent;
}

.finishing-detail-panel {
  display: flex;
  flex-direction: column;
}

.finishing-detail-header {
  order: 0;
}


.finishing-discussion {
  order: 5;
}

.finishing-history {
  order: 6;
}

/* Project-level table presets: compact bookmark tabs attached to table top edge. */
.table-preset-tabs {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 20px;
  margin: 0 0 -1px 14px;
  pointer-events: none;
}

.table-preset-tabs.is-empty {
  min-height: 0;
}

.table-preset-tabs.is-dialog-open {
  z-index: 200000;
}

.table-preset-list {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
}

.table-preset-list::-webkit-scrollbar {
  display: none;
}

.table-preset-tab {
  --preset-color: #4f7cff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  max-width: 148px;
  padding: 3px 8px 2px;
  border: 0;
  border-radius: 8px 8px 1px 1px;
  background: color-mix(in srgb, var(--preset-color) 32%, transparent);
  color: color-mix(in srgb, var(--preset-color) 56%, #dbe4f0 44%);
  font: 300 12px/1.05 var(--font-ui, inherit);
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(4px);
  opacity: .62;
  transition: opacity .16s ease, transform .16s ease, background .16s ease, color .16s ease;
}

.table-preset-tab svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.table-preset-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-preset-tab:hover,
.table-preset-tab.is-active {
  opacity: 1;
  transform: translateY(1px);
  background: var(--preset-color);
  color: #f8fafc;
}

.table-preset-tab.is-active {
  font-weight: 500;
}

.table-preset-save-tab {
  display: none;
  background: transparent;
  color: color-mix(in srgb, var(--preset-color) 38%, #cbd5e1 62%);
}

.logging-grid-shell.is-source-column-layout-editing .table-preset-save-tab,
.finishing-table-shell.is-column-layout-editing .table-preset-save-tab {
  display: inline-flex;
  transform: translateY(1px);
}

.logging-grid-shell.is-source-column-layout-editing .table-preset-save-tab:hover,
.finishing-table-shell.is-column-layout-editing .table-preset-save-tab:hover {
  transform: translateY(0);
}

.table-preset-dialog[hidden] {
  display: none !important;
}

.table-preset-dialog {
  position: absolute;
  left: 0;
  top: 26px;
  z-index: 200001;
  pointer-events: auto;
}

.table-preset-dialog-card {
  width: min(440px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 22px;
  background: rgba(15, 23, 42, .98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.table-preset-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-preset-dialog-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.1;
}

.table-preset-field,
.table-preset-choice-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #94a3b8;
  font: 700 11px/1.1 var(--font-ui, inherit);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.table-preset-field input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #0b1220;
  color: #f8fafc;
  padding: 13px 14px;
  font: 700 16px/1.2 var(--font-ui, inherit);
  outline: none;
}

.table-preset-field input:focus {
  border-color: rgba(79, 124, 255, .72);
}

.table-preset-icon-grid,
.table-preset-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-preset-icon-grid button,
.table-preset-color-grid button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(15, 23, 42, .88);
  color: #cbd5e1;
  cursor: pointer;
}

.table-preset-icon-grid button.is-selected,
.table-preset-color-grid button.is-selected {
  border-color: #f8fafc;
  box-shadow: 0 0 0 2px rgba(79, 124, 255, .35);
}

.table-preset-icon-grid svg {
  width: 16px;
  height: 16px;
}

.table-preset-color-grid button {
  background: var(--swatch-color);
}

.table-preset-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 18px;
}

.table-preset-dialog-actions > button {
  display: inline-flex;
  align-items: center;
  flex: 0 1 184px;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 12px;
  background: rgba(15, 23, 42, .86);
  color: #dbe4f0;
  font: 800 13px/1.1 var(--font-ui, inherit);
  justify-content: center;
  padding-left: 14px;
  padding-right: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.table-preset-dialog-actions > button:hover,
.table-preset-dialog-actions > button:focus-visible {
  border-color: rgba(148, 163, 184, .42);
  background: rgba(30, 41, 59, .92);
  color: #f8fafc;
  outline: none;
}

.table-preset-dialog-actions > button:active {
  transform: translateY(1px);
}

.table-preset-dialog-actions > .primary-button {
  margin-left: auto;
  min-width: 0;
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: var(--accent);
  color: #ffffff;
}

.table-preset-dialog-actions > .primary-button:hover,
.table-preset-dialog-actions > .primary-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 86%, #ffffff 14%);
  background: color-mix(in srgb, var(--accent) 86%, #ffffff 14%);
  color: #ffffff;
}

.table-preset-dialog-actions [data-table-preset-delete] {
  border-color: color-mix(in srgb, var(--danger) 44%, rgba(148, 163, 184, .24));
  background: color-mix(in srgb, var(--danger) 9%, rgba(15, 23, 42, .88));
  color: color-mix(in srgb, var(--danger) 72%, #ffffff 28%);
}

.table-preset-dialog-actions [data-table-preset-delete]:hover,
.table-preset-dialog-actions [data-table-preset-delete]:focus-visible {
  border-color: color-mix(in srgb, var(--danger) 62%, rgba(148, 163, 184, .24));
  background: color-mix(in srgb, var(--danger) 15%, rgba(15, 23, 42, .88));
  color: color-mix(in srgb, var(--danger) 82%, #ffffff 18%);
}

.shared-tasks-page {
  display: grid;
  gap: 18px;
  padding: 42px 0 64px;
}

.shared-tasks-hero {
  display: grid;
  gap: 8px;
  max-width: 880px;
}

.shared-tasks-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.98;
}

.shared-tasks-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.shared-tasks-meta,
.shared-tasks-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.shared-tasks-meta span,
.shared-tasks-filters span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.shared-tasks-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.shared-tasks-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
}

.shared-tasks-table th,
.shared-tasks-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.shared-tasks-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 920;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
}

.shared-tasks-table td {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.shared-tasks-table td strong,
.shared-tasks-table td small {
  display: block;
}

.shared-tasks-table td small {
  margin-top: 3px;
  color: var(--muted);
}

.shared-tasks-table tbody tr:last-child td {
  border-bottom: 0;
}

.shared-tasks-empty {
  text-align: center !important;
  color: var(--muted) !important;
}

.shared-tasks-workspace {
  padding: 28px 0 58px;
}

.shared-tasks-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.shared-tasks-head h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.05;
  font-weight: 900;
}

.shared-tasks-tools {
  position: relative;
}

.shared-tasks-column-trigger {
  position: static;
  opacity: 1;
  transform: none;
}

.shared-tasks-column-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: var(--shadow-strong);
}

.shared-tasks-column-popover[hidden] {
  display: none !important;
}

.shared-tasks-column-list {
  display: grid;
  gap: 7px;
}

.shared-tasks-column-list label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.shared-tasks-column-list label:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.shared-tasks-full-table {
  min-width: 1660px;
}

.shared-tasks-full-table th {
  white-space: nowrap;
}

.shared-tasks-full-table th span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shared-tasks-full-table td {
  max-width: 320px;
}

.shared-tasks-full-table td[data-shared-column="title"] {
  min-width: 210px;
}

.shared-tasks-full-table td[data-shared-column="description"] {
  min-width: 260px;
}

.shared-tasks-full-table td[data-shared-column="working_package"],
.shared-tasks-full-table td[data-shared-column="return_target"] {
  min-width: 230px;
}

.shared-tasks-full-table td.shared-tasks-stop-frame-cell {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  height: 64px;
  padding: 0;
  vertical-align: middle;
}

.shared-tasks-description {
  white-space: normal;
}

.shared-tasks-full-table .finishing-choice-popover {
  width: max-content;
  position: relative;
}

.shared-tasks-full-table .finishing-choice-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  max-height: 320px;
}

.shared-tasks-full-table .finishing-table-quick[open] > .finishing-choice-menu:not(.is-portal-menu) {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 760px) {
  .shared-tasks-head {
    grid-template-columns: 1fr;
  }

  .shared-tasks-tools {
    justify-self: start;
  }

  .shared-tasks-column-popover {
    right: auto;
    left: 0;
  }
}

.account-notification-email-note {
  margin: 12px 0 0;
}

.account-push-section {
  display: grid;
  gap: 12px;
}

.account-push-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  background: color-mix(in srgb, var(--accent) 11%, var(--control));
  color: color-mix(in srgb, var(--accent) 62%, var(--ink) 38%);
  font-size: 11px;
  font-weight: 850;
}

.account-push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-push-actions .secondary-action,
.account-push-actions .primary-action {
  width: auto;
  min-width: 180px;
}

.account-push-note {
  margin: 0;
}

/* Light theme follow-up: keep semantic colors, tune neutral surfaces and text. */
:root:not([data-theme="dark"]) .topbar-more-panel {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 97%, var(--bg) 3%);
  box-shadow: 0 18px 42px rgba(38, 50, 69, 0.18);
}

:root:not([data-theme="dark"]) .topbar-more-item {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .topbar-more-item:hover,
:root:not([data-theme="dark"]) .topbar-more-item:focus-visible,
:root:not([data-theme="dark"]) .topbar-more-item.is-active {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface) 87%);
  color: color-mix(in srgb, var(--accent) 72%, var(--ink-strong) 28%);
}

:root:not([data-theme="dark"]) .global-notification-panel-head strong {
  color: var(--muted);
}

:root:not([data-theme="dark"]) .global-notification-panel {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 96%, var(--bg) 4%);
  box-shadow: 0 24px 56px rgba(38, 50, 69, 0.16);
}

:root:not([data-theme="dark"]) .global-notification-mark-all {
  color: color-mix(in srgb, var(--muted) 86%, var(--ink) 14%);
}

:root:not([data-theme="dark"]) .global-notification-item-action {
  color: color-mix(in srgb, var(--accent) 78%, var(--ink) 22%);
}

:root:not([data-theme="dark"]) .global-notification-mark-all:hover,
:root:not([data-theme="dark"]) .global-notification-mark-all:focus-visible,
:root:not([data-theme="dark"]) .global-notification-item-action:hover,
:root:not([data-theme="dark"]) .global-notification-item-action:focus-visible {
  color: var(--ink-strong);
}

:root:not([data-theme="dark"]) .global-notification-empty,
:root:not([data-theme="dark"]) .global-notification-item,
:root:not([data-theme="dark"]) .global-notification-toast {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, var(--notification-accent) 8%);
  box-shadow: 0 20px 48px rgba(38, 50, 69, 0.16);
}

:root:not([data-theme="dark"]) .global-notification-item.is-unread {
  background: color-mix(in srgb, var(--surface) 90%, var(--notification-accent) 10%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--notification-accent) 42%, transparent),
    0 20px 48px rgba(38, 50, 69, 0.2);
}

:root:not([data-theme="dark"]) .global-notification-item-close:hover,
:root:not([data-theme="dark"]) .global-notification-toast-close:hover,
:root:not([data-theme="dark"]) .global-notification-toast-close:focus-visible {
  color: var(--ink-strong);
}

:root:not([data-theme="dark"]) input[type="text"],
:root:not([data-theme="dark"]) input[type="email"],
:root:not([data-theme="dark"]) input[type="number"],
:root:not([data-theme="dark"]) input[type="password"],
:root:not([data-theme="dark"]) input[type="search"],
:root:not([data-theme="dark"]) select,
:root:not([data-theme="dark"]) textarea {
  color: #3a4658;
  caret-color: var(--accent);
}

:root:not([data-theme="dark"]) input::placeholder,
:root:not([data-theme="dark"]) textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, var(--surface) 18%);
}

:root:not([data-theme="dark"]) .logging-search input,
:root:not([data-theme="dark"]) .finishing-filter-search input {
  color: #536176;
}

:root:not([data-theme="dark"]) .logging-search input:focus,
:root:not([data-theme="dark"]) .finishing-filter-search input:focus {
  color: #3a4658;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell {
  background: #d7e1ec;
  color: #4773c7;
  box-shadow:
    -24px 0 0 var(--bg),
    0 9px 14px -16px rgba(38, 50, 69, 0.24);
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell::before,
:root:not([data-theme="dark"]) .edit-episode-summary-cell::after {
  background: var(--bg);
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell .episode-summary-meta {
  color: #334158;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.has-progress:not(.status-partial):not(.status-assembly):not(.status-first-cut):not(.status-revisions):not(.status-approved) {
  background: #d1dce9;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-partial,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-partial {
  background: #536174;
  color: #f8fafc;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-assembly,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-assembly {
  background: #5d4a82;
  color: #f4efff;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-first-cut,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-first-cut {
  background: #a95f24;
  color: #fff7ed;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-revisions,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-revisions {
  background: #2d7650;
  color: #f0fff4;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell.status-approved,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-approved {
  background: var(--edit-approved-green);
  color: #ffffff;
}

:root:not([data-theme="dark"]) .edit-episode-summary-cell:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .episode-summary-code,
:root:not([data-theme="dark"]) .edit-episode-summary-cell:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .episode-summary-meta {
  color: inherit;
}

:root:not([data-theme="dark"]) .edit-vertical-episode {
  filter: drop-shadow(0 10px 16px rgba(38, 50, 69, 0.08));
}

:root:not([data-theme="dark"]) .edit-vertical-episode-head {
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #d7e1ec;
  color: #334158;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 62%, transparent);
}

:root:not([data-theme="dark"]) .edit-vertical-episode-head .edit-vertical-episode-progress {
  color: color-mix(in srgb, #334158 68%, #7b8798 32%);
}

:root:not([data-theme="dark"]) .edit-vertical-episode-head:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) {
  box-shadow: none;
}

:root:not([data-theme="dark"]) .edit-vertical-episode-head:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .edit-vertical-episode-code {
  color: inherit;
}

:root:not([data-theme="dark"]) .edit-vertical-episode-head:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .edit-vertical-episode-progress {
  color: rgba(255, 255, 255, 0.74);
}

:root:not([data-theme="dark"]) .edit-scenes-row .edit-scene-cell,
:root:not([data-theme="dark"]) .edit-status-row .edit-check-cell {
  box-shadow: 0 9px 14px -16px rgba(38, 50, 69, 0.22);
}

:root:not([data-theme="dark"]) .edit-progress-grid .edit-scene-cell,
:root:not([data-theme="dark"]) .edit-progress-grid .edit-check-cell,
:root:not([data-theme="dark"]) .edit-vertical-scene-cell,
:root:not([data-theme="dark"]) .edit-vertical-check-cell {
  --edit-cell-separator-color: var(--bg);
}

:root:not([data-theme="dark"]) .edit-progress-grid .edit-scene-cell:not(.is-ready):not(.is-received):not(.is-manual):not(.is-done),
:root:not([data-theme="dark"]) .edit-vertical-scene-cell:not(.is-ready):not(.is-received):not(.is-manual):not(.is-done) {
  --edit-cell-bg: #bdccdc;
  color: #263348;
}

:root:not([data-theme="dark"]) .edit-progress-grid .edit-check-cell:not(.is-done):not(.is-in-progress):not(.is-assembled):not(.is-revision):not(.is-removed),
:root:not([data-theme="dark"]) .edit-vertical-check-cell:not(.is-done):not(.is-in-progress):not(.is-assembled):not(.is-revision):not(.is-removed) {
  --edit-cell-bg: #cbd8e6;
  color: #5b687b;
}

:root:not([data-theme="dark"]) .edit-check-cell.is-in-progress {
  --edit-cell-bg: color-mix(in srgb, #60a5fa 42%, #d9e3ee 58%);
}

:root:not([data-theme="dark"]) .edit-check-cell.is-in-progress .edit-check-button .in-progress-icon {
  color: #2f6bc8;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.58));
}

:root:not([data-theme="dark"]) .edit-check-cell.is-revision {
  --edit-cell-bg: color-mix(in srgb, #f5a524 50%, #d9e3ee 50%);
}

:root:not([data-theme="dark"]) .edit-check-cell.is-revision .edit-check-button .revision-icon {
  color: #9a5b08;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.62));
}

:root:not([data-theme="dark"]) .edit-scene-info-token.is-in-progress {
  --edit-scene-token-bg: color-mix(in srgb, #3b82f6 32%, var(--control-muted));
  --edit-scene-token-ink: #244b88;
}

:root:not([data-theme="dark"]) .edit-scene-info-token.is-revision {
  --edit-scene-token-bg: color-mix(in srgb, #f59e0b 38%, var(--control-muted));
  --edit-scene-token-ink: #71440b;
}

:root:not([data-theme="dark"]) .finishing-detail-panel {
  --ink: #3c485c;
  --ink-strong: #293548;
  --muted: #69768a;
  color: var(--ink);
  background: #edf3f8;
}

:root:not([data-theme="dark"]) .finishing-detail-header {
  background: color-mix(in srgb, #edf3f8 86%, var(--surface) 14%);
}

:root:not([data-theme="dark"]) .finishing-panel-card,
:root:not([data-theme="dark"]) .finishing-roadmap,
:root:not([data-theme="dark"]) .finishing-discussion,
:root:not([data-theme="dark"]) .finishing-history {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .finishing-section-heading h2,
:root:not([data-theme="dark"]) .finishing-form-grid label,
:root:not([data-theme="dark"]) .finishing-create-inline-row > span:first-child {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink) 12%);
}

:root:not([data-theme="dark"]) .finishing-table-text-chip,
:root:not([data-theme="dark"]) .finishing-person-chip,
:root:not([data-theme="dark"]) .finishing-person-chip-label,
:root:not([data-theme="dark"]) .finishing-person-select-current {
  color: #435066;
}

:root:not([data-theme="dark"]) .finishing-person-hover-card,
:root:not([data-theme="dark"]) .finishing-person-select-menu,
:root:not([data-theme="dark"]) .finishing-assignee-add-panel,
:root:not([data-theme="dark"]) .finishing-custom-type-panel {
  border-color: color-mix(in srgb, var(--line) 86%, var(--accent) 14%);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg) 6%);
  box-shadow: 0 22px 56px rgba(38, 50, 69, 0.18);
}

:root:not([data-theme="dark"]) .finishing-chip.is-stage.has-stage-style,
:root:not([data-theme="dark"]) .finishing-filter-value.is-stage-token {
  background: color-mix(in srgb, var(--stage-token-color, var(--task-type-color, var(--accent))) 88%, #263244 12%);
  color: #fbfdff;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.16);
}

:root:not([data-theme="dark"]) .finishing-chip.is-stage.stage-active,
:root:not([data-theme="dark"]) .finishing-chip.is-status.status-revisions,
:root:not([data-theme="dark"]) .finishing-chip.is-status.status-in_work,
:root:not([data-theme="dark"]) .finishing-chip.is-status.status-sent {
  color: #fbfdff;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.18);
}

:root:not([data-theme="dark"]) .account-gear-panel,
:root:not([data-theme="dark"]) .account-section,
:root:not([data-theme="dark"]) .setup-sheet {
  color: #3a4658;
}

.project-activity-shell {
  padding: 34px 0 54px;
  display: grid;
  gap: 18px;
}

.project-activity-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.project-activity-back {
  grid-column: 1 / -1;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.project-activity-back:hover,
.project-activity-back:focus-visible {
  color: var(--ink);
}

.project-activity-back svg {
  width: 16px;
  height: 16px;
}

.project-activity-title {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.project-activity-title .section-eyebrow {
  margin: 0;
}

.project-activity-title h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1;
  font-weight: 880;
}

.project-activity-title p:last-child {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.project-activity-summary {
  min-width: 132px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-activity-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-activity-summary strong {
  color: var(--ink-strong);
  font-size: 28px;
  line-height: 1;
  font-weight: 880;
  font-variant-numeric: tabular-nums;
}

.project-activity-filters {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 0.9fr) minmax(220px, 1.4fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-2) 12%);
}

.project-activity-filters label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-activity-filters select,
.project-activity-filters input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  text-transform: none;
  letter-spacing: 0;
}

.project-activity-filters select {
  padding: 0 32px 0 12px;
}

.project-activity-filters input {
  padding: 0 12px;
}

.project-activity-filter-button,
.project-activity-reset {
  min-height: 40px;
  white-space: nowrap;
}

.project-activity-list {
  min-width: 0;
}

.project-activity-timeline {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.project-activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

:root:not([data-theme="dark"]) .project-activity-item {
  box-shadow: 0 14px 32px rgba(38, 50, 69, 0.1);
}

.project-activity-item::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--accent);
}

.project-activity-item--source::before {
  background: #20a37f;
}

.project-activity-item--edit::before {
  background: #4f7cff;
}

.project-activity-item--tasks::before {
  background: #9b5cf6;
}

.project-activity-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.project-activity-module {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  color: var(--ink);
  font-weight: 840;
}

.project-activity-module svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.project-activity-merged {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--control));
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.project-activity-item-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.project-activity-item-body h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850;
}

.project-activity-changes {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.project-activity-changes div {
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--control) 72%, transparent);
}

.project-activity-changes dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-activity-changes dd {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 720;
}

.project-activity-changes dd span,
.project-activity-changes dd strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-activity-changes dd svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--accent);
}

.project-activity-changes dd strong {
  color: var(--ink);
  font-weight: 850;
}

.project-activity-extra dd {
  color: var(--ink);
}

.project-activity-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  text-align: center;
}

.project-activity-empty svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.project-activity-empty h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 850;
}

.project-activity-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .project-activity-shell {
    padding: 20px 0 36px;
    gap: 14px;
  }

  .project-activity-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-activity-title h1 {
    font-size: 30px;
  }

  .project-activity-summary {
    width: 100%;
    min-width: 0;
  }

  .project-activity-filters {
    grid-template-columns: 1fr;
  }

  .project-activity-filter-button,
  .project-activity-reset {
    width: 100%;
    justify-content: center;
  }

  .project-activity-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .project-activity-item-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .project-activity-changes {
    grid-template-columns: 1fr;
  }

  .project-activity-changes dd {
    align-items: flex-start;
  }

  .members-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .setup-members-card .members-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
  }

  .members-table-unified {
    min-width: 720px;
  }

  .members-table-unified th:nth-child(1),
  .members-table-unified td:nth-child(1) {
    width: 240px;
  }

  .member-user-cell {
    display: flex;
    align-items: flex-start;
  }

  .member-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex-basis: 38px;
    border-radius: 9px;
  }

  .member-avatar img {
    border-radius: 9px;
  }

  .member-user-meta strong {
    font-size: 12px;
    line-height: 1.15;
  }

  .member-user-meta small {
    max-width: 170px;
    overflow-wrap: anywhere;
  }

  .member-avatar-info-popover {
    display: none;
  }
}

/* Final light-theme Edit overrides. Keep this at the end so late theme polish cannot neutralize status fills. */
:root:not([data-theme="dark"]) th.edit-episode-summary-cell.status-partial,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-partial {
  background: #2c3545 !important;
  color: #d7dee9 !important;
}

:root:not([data-theme="dark"]) th.edit-episode-summary-cell.status-assembly,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-assembly {
  background: #372f65 !important;
  color: #d7c8ff !important;
}

:root:not([data-theme="dark"]) th.edit-episode-summary-cell.status-first-cut,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-first-cut {
  background: #533f2a !important;
  color: #ffd08a !important;
}

:root:not([data-theme="dark"]) th.edit-episode-summary-cell.status-revisions,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-revisions {
  background: #1c382e !important;
  color: #8fe6b9 !important;
}

:root:not([data-theme="dark"]) th.edit-episode-summary-cell.status-approved,
:root:not([data-theme="dark"]) .edit-vertical-episode-head.status-approved {
  background: var(--edit-approved-green) !important;
  color: #ffffff !important;
}

:root:not([data-theme="dark"]) th.edit-episode-summary-cell:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .episode-summary-code,
:root:not([data-theme="dark"]) th.edit-episode-summary-cell:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .episode-summary-meta,
:root:not([data-theme="dark"]) .edit-vertical-episode-head:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .edit-vertical-episode-code {
  color: inherit !important;
}

:root:not([data-theme="dark"]) .edit-vertical-episode-head:is(.status-partial, .status-assembly, .status-first-cut, .status-revisions, .status-approved) .edit-vertical-episode-progress {
  color: rgba(255, 255, 255, 0.74) !important;
}
