:root {
  --bg: #080809;
  --bg-alt: #121214;
  --surface: #121214;
  --surface-raised: #1a1a1e;
  --card-bg: rgba(18, 18, 20, 0.94);
  --border: #2a2a30;
  --text: #f4f0e8;
  --text-muted: #9a9590;
  --muted: #9a9590;
  --gold: #d4af37;
  --gold-hover: #e8c547;
  --gold-soft: rgba(212, 175, 55, 0.12);
  --gold-glow: rgba(212, 175, 55, 0.28);
  --crimson: #8b2635;
  --accent: #FF0404;
  --accent-hover: #ff2a2a;
  --accent-soft: rgba(255, 4, 4, 0.14);
  --accent-glow: rgba(255, 4, 4, 0.28);
  --accent-dim: rgba(255, 4, 4, 0.55);
  --gunmetal: #333337;
  --silver: #c8c8d0;
  --teal: var(--accent);
  --teal-glow: var(--accent-glow);
  --success: #3ecf8e;
  --error: #e85a5a;
  --radius: 12px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.3);
  --crimson-soft: rgba(139, 38, 53, 0.16);
  --font-display: "Inter", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
  --app-max: 1180px;
  --nav-width: 220px;
  --footer-h: 2.75rem;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--gunmetal) transparent;
}

/* Any scrollable panel (nav, main column, modals, review lists) gets the
   same dark/visor identity instead of the OS default scrollbar. */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gunmetal);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  height: 100%;
  /* The main column (.app-content) owns scrolling; the shell never moves. */
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -12%, rgba(255, 4, 4, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  align-items: stretch;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.35rem 0.85rem 1rem;
  border-right: 1px solid var(--border);
  background: rgba(8, 8, 9, 0.96);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem 1.1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.nav-brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-brand-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.nav-brand-back:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-soft);
}

.nav-brand strong {
  font-size: 1.12rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

.nav-brand span {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-brand .app-version {
  text-transform: none;
  letter-spacing: 0.06em;
}

.nav-link {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(255, 4, 4, 0.35);
}

.nav-link-help {
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-link-patreon {
  color: #ff6b6f;
  border-color: rgba(255, 66, 77, 0.35);
}

.nav-link-patreon:hover {
  color: #ff424d;
  border-color: rgba(255, 66, 77, 0.6);
  background: rgba(255, 66, 77, 0.12);
}

.nav-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.nav-bottom .lang-switcher {
  margin-top: 0.15rem;
}

.nav-link-help:hover {
  color: var(--accent);
  border-color: rgba(255, 4, 4, 0.25);
}

.nav-link-accent {
  margin-top: 0;
  color: #fff;
  background: linear-gradient(165deg, var(--accent-hover), var(--accent));
  border-color: rgba(255, 4, 4, 0.5);
  font-weight: 700;
}

.nav-link.is-premium {
  color: var(--accent);
  border-color: rgba(255, 4, 4, 0.3);
}

.nav-link-accent:hover,
.nav-link-accent.is-active {
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.app-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  /* Sole scroll container; bar only shows when content overflows. */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.75rem 1.25rem calc(var(--footer-h) + 1rem);
}

.app-content > * {
  max-width: var(--app-max);
  margin-left: auto;
  margin-right: auto;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dash-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-overview-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.dash-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) repeat(2, minmax(220px, 1.6fr));
  gap: 0.75rem;
}

@media (max-width: 1080px) {
  .dash-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .dash-stats-bar {
    grid-template-columns: 1fr;
  }
}

.dash-stat-card {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.dash-stat-card.is-highlight {
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.dash-stat-card.is-highlight:hover {
  border-color: rgba(255, 4, 4, 0.4);
}

.dash-stat-label {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.dash-stat-value .accent {
  color: var(--accent);
}

.dash-stat-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-stat-trend {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
}

.dash-stat-trend.is-up {
  color: var(--success);
}

.dash-stat-trend.is-down {
  color: var(--error);
}

.dash-stat-trend.is-flat {
  color: var(--text-muted);
}

/* Kills-by-player list card */
.dash-stat-card.is-list {
  gap: 0.55rem;
}

.dash-player-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-player-row {
  display: grid;
  grid-template-columns: minmax(0, 5.5rem) 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.dash-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.dash-player-bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.dash-player-bar-fill {
  /* It's a <span> (inline by default) — inline elements ignore `width`
     entirely, which is why the bars used to render at whatever their
     (empty) content size was instead of the kill-count proportion. */
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
}

.dash-player-count {
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* Kills-by-project donut card */
.dash-stat-card.is-donut {
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.dash-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.dash-donut-legend-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-donut-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dash-donut-legend-row span:first-of-type ~ span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-donut-legend-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-donut-legend-value {
  font-weight: 700;
  color: var(--text);
}

.dash-mid-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
}

@media (max-width: 860px) {
  .dash-mid-row {
    grid-template-columns: 1fr;
  }
}

.dash-new-card,
.dash-latest-card {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dash-new-card h3,
.dash-latest-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.dash-new-dropzone {
  width: 100%;
  appearance: none;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-new-dropzone:hover {
  border-color: rgba(255, 4, 4, 0.45);
  background: var(--accent-soft);
}

.dash-new-dropzone svg {
  color: var(--accent);
}

.dash-new-dropzone p {
  margin: 0;
  color: var(--text);
}

.dash-new-dropzone p span {
  color: var(--text-muted);
}

.dash-new-formats {
  font-size: 0.78rem;
  color: var(--text-muted) !important;
}

.dash-latest-card {
  display: flex;
  flex-direction: column;
}

.dash-latest-body {
  display: flex;
  gap: 0.85rem;
}

.dash-latest-thumb {
  width: 110px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.dash-latest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-latest-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.dash-latest-info h4 {
  margin: 0;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-latest-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.dash-latest-info .dash-latest-btn {
  align-self: flex-start;
  margin-top: 0.15rem;
}


.dash-progress-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(255, 4, 4, 0.28);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.dash-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.dash-progress-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.dash-progress-card .progress-bar {
  margin: 0.85rem 0 1rem;
}

.dash-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.danger-text {
  color: #ff8a80;
}

.dash-upload-queue {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1rem;
}

.dash-upload-queue-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-upload-queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dash-upload-queue-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: var(--surface-raised);
}

.dash-upload-queue-cancel {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dash-upload-queue-cancel:hover {
  color: var(--error);
  border-color: var(--error);
}

.dash-upload-queue-item .status-badge {
  flex-shrink: 0;
}

.dash-upload-queue-item-info {
  min-width: 0;
}

.dash-upload-queue-item-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-upload-queue-item-message {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-upload-queue-item-progress {
  width: 96px;
  flex-shrink: 0;
}

.dash-upload-queue-item-progress .progress-bar {
  margin: 0;
  height: 6px;
}

.dash-recents .section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dash-recents .section-top h3 {
  margin: 0;
  font-family: var(--font-display);
}

.dash-recents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.dash-recent-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  position: relative;
}

.dash-recent-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
}

.dash-recent-thumb img,
.dash-recent-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-recent-thumb .status-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  /* Overlaid on a thumbnail (not sitting on the card's own dark surface
     like elsewhere), so the soft tinted pill reads as barely-there against
     bright footage — solid backing keeps it legible on any thumbnail. */
  background: var(--bg) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.dash-recent-duration {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg);
  color: var(--text);
  font-size: 0.72rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.dash-recent-duration svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.dash-recent-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem 1rem;
}

.dash-recent-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
}

.dash-recent-title-row h4 {
  margin: 0;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dash-recent-menu-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.dash-recent-menu-btn svg {
  width: 16px;
  height: 16px;
}

.dash-recent-menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.dash-recent-menu {
  position: absolute;
  top: 1.6rem;
  right: 0;
  z-index: 5;
  min-width: 150px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-recent-menu button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.dash-recent-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dash-recent-menu button.danger-text:hover {
  background: var(--crimson-soft);
}

.dash-recent-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.15rem 0.7rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  /* Content wraps to 1 or 2 lines depending on how long the values are
     (duration, clip count…) — reserve room for 2 so the stats/button below
     don't end up at different heights across cards in the same row. */
  min-height: 2.35rem;
}

.dash-recent-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dash-recent-meta-row svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.8;
}

.dash-recent-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.dash-recent-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 0.5rem;
  border-left: 1px solid var(--border);
}

.dash-recent-stat:first-child {
  border-left: none;
}

.dash-recent-stat svg {
  width: 18px;
  height: 18px;
}

.dash-recent-stat strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.dash-recent-stat span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.dash-recent-open-btn {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 4, 4, 0.5);
  background: transparent;
  color: var(--accent);
  padding: 0.6rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-recent-open-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent-hover);
}

.dash-recent-open-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .app-content {
    height: auto;
    overflow: visible;
  }

  .app-nav {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 20;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    overflow: visible;
  }

  .nav-bottom {
    display: contents;
  }

  .nav-link-patreon {
    order: 9;
  }

  .nav-link-help {
    order: 10;
  }

  .nav-link-accent {
    order: 11;
    margin-top: 0;
    margin-left: auto;
  }

  .nav-bottom .lang-switcher {
    order: 12;
    margin-left: 0.35rem;
  }

  .nav-brand {
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    border-bottom: none;
    margin: 0;
    padding: 0.25rem 0.5rem;
  }

  .app-footer {
    left: 0;
  }

  .lang-switcher-btn {
    width: auto;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  text-align: left;
  margin-bottom: 1rem;
}

.app-welcome {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.app-welcome:hover {
  color: var(--accent);
}

.app-welcome[hidden] {
  display: none !important;
}

.nav-link-icon {
  vertical-align: -3px;
  margin-right: 0.4rem;
}

.settings-fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.85rem 0.7rem;
  margin: 0 0 0.6rem;
}

.settings-fieldset legend {
  padding: 0 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.settings-fieldset .helper-text {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.settings-diag-row {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}

.settings-diag-row.is-gpu {
  color: #6fdc8c;
  background: rgba(111, 220, 140, 0.12);
}

.settings-diag-row.is-cpu {
  color: #f0d98c;
  background: rgba(240, 217, 140, 0.12);
}

.settings-fieldset label {
  margin: 0;
  gap: 0.2rem;
}

#settings-modal .modal-body {
  margin: 0.6rem 0;
}

#settings-modal .field-row {
  display: flex;
  gap: 0.65rem;
}

#settings-modal .field-row label {
  flex: 1;
  min-width: 0;
}

.settings-danger-zone {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(139, 38, 53, 0.12);
}

.settings-danger-zone legend {
  color: #ffb4b4;
}

.settings-danger-zone .danger-btn {
  width: auto;
  margin-top: 0.15rem;
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin: 0;
  letter-spacing: 0.02em;
  color: var(--text);
  font-weight: 700;
}

.app-header .tagline {
  display: none;
}

.brand-bdo,
.brand-killfeed {
  color: var(--accent);
}

.brand-autoclip,
.brand-detector {
  color: var(--muted);
  font-weight: 600;
}

.tagline {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto;
  font-size: 0.98rem;
}

.hub-card {
  max-width: 720px;
  margin: 0 auto;
}

.hub-card .hub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.35rem;
}

@media (max-width: 640px) {
  .hub-card .hub-actions {
    grid-template-columns: 1fr;
  }
}

.hub-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  width: 100%;
  padding: 1.25rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(40, 28, 28, 0.95), rgba(22, 16, 16, 0.98));
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.hub-btn .hub-icon {
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hub-btn-teal {
  border-color: rgba(46, 196, 182, 0.45);
  box-shadow: 0 0 0 1px rgba(46, 196, 182, 0.12), 0 8px 28px var(--teal-glow);
}

.hub-btn-teal:hover {
  border-color: var(--teal);
  box-shadow: 0 0 24px var(--teal-glow);
  transform: translateY(-2px);
}

.hub-btn-teal .hub-icon {
  color: var(--teal);
}

.hub-btn-gold {
  border-color: rgba(255, 4, 4, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 4, 4, 0.12), 0 8px 28px var(--accent-glow);
}

.hub-btn-gold:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.hub-btn-gold .hub-icon {
  color: var(--accent);
}

.hub-btn strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.hub-btn span:not(.hub-icon) {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-top h2 {
  margin: 0;
}

.meta-form {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.meta-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.meta-form input[type="text"],
.meta-form input[type="date"],
.library-toolbar select {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
}

.checkbox-label.is-disabled {
  opacity: 0.55;
}

.session-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.85rem 0.9rem;
  flex-wrap: wrap;
}

.project-card-actions .secondary-btn,
.project-card-actions .ghost-btn {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  padding: 0.45rem 0.6rem;
}

.project-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: #1a1212;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
}

.project-row h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.project-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin: 1rem 0;
}

.library-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.select-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.icon-btn.is-on {
  color: var(--accent);
  border-color: rgba(255, 4, 4, 0.55);
}

.app-header h1 {
  /* superseded by brand styles above */
}

.tagline {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto;
  font-size: 0.98rem;
}

/* Stepper + session bar removed from product UI */
.stepper,
.session-bar {
  display: none !important;
}

.stepper li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  opacity: 0.45;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.stepper li.active,
.stepper li.done {
  opacity: 1;
}

.stepper li.active {
  transform: translateY(-1px);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.stepper li.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.stepper li.done .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stepper li.active .step-label {
  color: var(--text);
  font-weight: 600;
}

.session-bar {
  display: none !important;
}

.session-info {
  flex: 1;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.card.clips-page {
  padding: 1.25rem 1.4rem 1.4rem;
  max-width: none;
}

.card h2 {
  font-family: var(--font-display);
  margin-top: 0;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.helper-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0.25rem 0 1rem;
}

.warning-text {
  color: var(--gold);
}

.status-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.field-error {
  color: var(--error);
  font-size: 0.82rem;
  margin: 0.35rem 0 0;
}

.field-error.is-flash {
  animation: field-error-flash 1.1s ease;
}

@keyframes field-error-flash {
  0%, 100% { background: transparent; }
  15% { background: rgba(255, 90, 90, 0.22); }
}

.field-warning {
  color: var(--gold);
  font-size: 0.82rem;
  margin: 0.35rem 0 0;
}

.dash-link-ingest {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.dash-link-ingest-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.dash-link-ingest-row {
  display: flex;
  gap: 0.5rem;
}

.dash-link-ingest-row input[type="url"] {
  flex: 1;
  min-width: 0;
}

.link-trim-preview-info {
  min-height: 2.2rem;
}

.link-trim-loading-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.link-trim-loading-row[hidden] {
  display: none !important;
}

.link-trim-loading-row .spinner {
  width: 20px;
  height: 20px;
}

.link-trim-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.link-trim-video-title {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-trim-watch-btn {
  flex-shrink: 0;
  width: auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

.link-trim-player-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(50vh, 480px);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  margin-bottom: 0.6rem;
}

.link-trim-player-embed[hidden] {
  display: none !important;
}

.link-trim-player-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

.link-trim-no-preview {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}

.link-trim-live-hint {
  color: var(--gold);
  font-size: 0.82rem;
  margin: 0.35rem 0 0;
}

.working-card {
  text-align: center;
  padding: 2.5rem 1.75rem;
}

.working-card .progress-bar {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Forms */
label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: var(--font-body);
  margin-bottom: 0;
}

input[type="number"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Buttons */
button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-btn {
  background: var(--surface-raised);
  border: 1px solid rgba(255, 4, 4, 0.35);
  color: var(--text);
  margin-bottom: 0;
}

.secondary-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent-dim);
  color: var(--accent-hover);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.85rem;
}

.ghost-btn:hover:not(:disabled) {
  color: var(--accent-hover);
  border-color: rgba(255, 4, 4, 0.4);
  background: var(--accent-soft);
}

.danger-btn {
  background: rgba(139, 38, 53, 0.22);
  border: 1px solid rgba(255, 107, 107, 0.55);
  color: #ffb4b4;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.danger-btn:hover:not(:disabled) {
  background: rgba(255, 107, 107, 0.18);
  color: #ffd0d0;
}

.done-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.editor-header .helper-text {
  margin-bottom: 0;
}

.editor-header .secondary-btn {
  flex-shrink: 0;
}

.open-local-btn {
  width: 100%;
  margin: 0 0 0.35rem;
}

.open-local-hint {
  margin: 0 0 1rem;
  text-align: center;
}

.selected-file {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
}

.progress-bar .fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent));
  transition: width 0.25s ease;
}

.progress-pct {
  margin: -0.5rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted, #9a9590);
  text-align: right;
}

#upload-progress[hidden] ~ #upload-progress-pct {
  display: none;
}

/* Highlight editor cards */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.highlight-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: linear-gradient(180deg, rgba(32, 23, 23, 0.95), var(--bg-alt));
  animation: card-in 0.35s ease both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.highlight-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.highlight-card h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.kill-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 4, 4, 0.12);
  border: 1px solid rgba(255, 4, 4, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.video-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  min-height: 200px;
}

.preview-thumb {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #000;
}

.preview-thumb[hidden],
.preview-video[hidden],
.play-btn[hidden] {
  display: none !important;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.85);
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  z-index: 1;
}

.play-btn:hover:not(:disabled) {
  background: rgba(227, 54, 74, 0.88);
  border-color: #fff;
}

.preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-muted);
  font-size: 0.88rem;
  z-index: 2;
}

.preview-loading[hidden] {
  display: none !important;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.preview-video {
  width: 100%;
  max-height: 320px;
  display: block;
  background: #000;
}

/* Trim scrubber */
.trim-editor {
  margin-top: 0.9rem;
}

.trim-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  font-variant-numeric: tabular-nums;
}

.trim-caption {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.trim-start-label,
.trim-end-label {
  color: var(--accent);
  font-weight: 600;
}

.trim-track {
  position: relative;
  height: 36px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 12px
    ),
    linear-gradient(180deg, #2a1c1c, #181010);
  border: 1px solid var(--border);
  touch-action: none;
  user-select: none;
}

.trim-selection {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: linear-gradient(90deg, rgba(227, 54, 74, 0.35), rgba(255, 4, 4, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  pointer-events: none;
  transition: left 0.05s linear, width 0.05s linear;
}

.trim-handle {
  position: absolute;
  top: 2px;
  width: 14px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--accent), #b30303);
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  z-index: 2;
}

.trim-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
  background: rgba(28, 20, 20, 0.7);
  border-radius: 1px;
}

.trim-handle:hover,
.trim-handle:focus-visible {
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 2px 8px rgba(0, 0, 0, 0.45);
  outline: none;
}

.trim-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin: 0;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 3;
}

.trim-playhead[hidden] {
  display: none !important;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-line,
.skeleton-thumb {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-title {
  height: 1.1rem;
  width: 55%;
  margin-bottom: 0.75rem;
}

.skeleton-thumb {
  height: 180px;
  margin-bottom: 0.75rem;
}

.skeleton-fields {
  height: 2.4rem;
  width: 100%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.field-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.field-row label {
  margin-bottom: 0;
  min-width: 120px;
}

.field-row input {
  width: 120px;
  margin-top: 0.3rem;
}

.canvas-wrap {
  overflow-x: auto;
}

/* Done / downloads */
.download-link {
  display: inline-block;
  background: var(--success);
  color: #10241a;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 0.25rem;
}

.download-link:hover {
  filter: brightness(1.08);
}

.clips-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.clip-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--bg-alt);
}

.clip-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.clip-meta strong {
  color: var(--text);
  font-family: var(--font-display);
}

.clip-video {
  width: 100%;
  max-height: 280px;
  border-radius: 8px;
  background: #000;
  display: block;
}

.clip-download {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.clip-download:hover {
  text-decoration: underline;
}

/* Gallery grid (Real-style) */
.gallery-card {
  padding-top: 1.25rem;
}

.project-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.project-bar h2 {
  margin: 0 0 0.35rem;
}

.project-bar .helper-text {
  margin: 0;
}

.project-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.clip-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(32, 23, 23, 0.98), var(--bg-alt));
  overflow: hidden;
  animation: card-in 0.35s ease both;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.clip-card.is-favorite {
  border-color: rgba(255, 4, 4, 0.7);
}

.card-delete-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 4;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
}

.card-delete-btn:hover {
  background: rgba(227, 54, 74, 0.9);
}

.clip-card.recommended {
  border-color: rgba(74, 212, 138, 0.65);
  box-shadow: 0 0 0 1px rgba(74, 212, 138, 0.25);
}

.clip-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.clip-thumb,
.clip-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clip-thumb.is-broken {
  visibility: hidden;
}

.clip-badge {
  position: absolute;
  top: 0.55rem;
  left: 2.75rem;
  z-index: 1;
  background: var(--success);
  color: #0b1a12;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.clip-range {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  left: auto;
  z-index: 2;
  background: var(--bg);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.clip-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.35rem;
}

.clip-score {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.15rem 0.5rem 0.15rem 0.55rem;
  border-radius: 8px;
  background: rgba(51, 51, 55, 0.55);
  border: 1px solid var(--gunmetal);
  box-shadow: inset 2px 0 0 var(--accent);
  color: var(--silver);
}

.clip-score strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--accent);
}

.clip-score span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.clip-actions {
  display: flex;
  gap: 0.35rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.icon-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--accent);
}

.clip-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0.15rem 0.85rem 0.2rem;
}

.clip-desc {
  margin: 0 0.7rem 0.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-date {
  margin: 0 0.7rem 0.6rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-date-link {
  cursor: pointer;
}

.clip-date-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.clip-card .clip-download {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 4, 4, 0.4);
  border-radius: 8px;
  font-size: 0.82rem;
}

/* Modal editor */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 4, 0.72);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
}

.editor-panel {
  width: min(920px, 100%);
  max-height: min(94vh, 1040px);
  padding: 0;
  overflow: hidden;
}

.editor-panel .modal-header,
.editor-panel .modal-footer {
  flex-shrink: 0;
  padding: 0.9rem 1.15rem;
  background: var(--card-bg);
}

.editor-panel .modal-header {
  border-bottom: 1px solid var(--border);
}

.editor-panel .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 1rem 1.15rem;
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
  flex-wrap: wrap;
}

.editor-footer-primary {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.editor-footer .primary-cta,
.editor-footer .secondary-btn,
.editor-footer .danger-btn {
  width: auto;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.editor-stage {
  min-height: 320px;
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 640px);
  background: #000;
}

.editor-stage .preview-thumb,
.editor-stage .preview-video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.editor-transport {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  padding: 0.35rem 0.15rem;
}

.transport-btn {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.transport-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.transport-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.transport-btn-fullscreen {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-time {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.editor-panel .trim-editor {
  margin-top: 0.75rem;
}

.editor-panel .trim-track {
  height: 42px;
}

/* Two-column editor: video/trim on the left, project info + adjust fields
   + actions in a fixed-width sidebar on the right (replaces the old
   single-column modal with fields stacked under the trim bar). */
.editor-panel-wide {
  width: min(1100px, 96vw);
  max-height: min(94vh, 780px);
}

.editor-close-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 5;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  background: var(--bg);
}

.editor-layout {
  display: flex;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.editor-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem 1.15rem;
  overflow-y: auto;
}

.editor-sidebar {
  flex: 0 0 300px;
  width: 300px;
  border-left: 1px solid var(--border);
  background: var(--card-bg);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.editor-sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.editor-sidebar-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.editor-fav-btn {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.editor-fav-btn.is-on {
  color: var(--accent);
  border-color: rgba(255, 4, 4, 0.65);
}

.editor-info-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.editor-info-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.editor-info-list dt {
  color: var(--text-muted);
}

.editor-info-list dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.editor-rank-badge {
  align-self: flex-start;
}

.editor-stat-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.editor-stat-box {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-left: 1px solid var(--border);
}

.editor-stat-box:first-child {
  border-left: none;
}

.editor-stat-label {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.editor-stat-value {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.editor-stat-value.is-accent {
  color: var(--accent);
}

.editor-adjust {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.editor-adjust-title {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.editor-stepper-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.editor-stepper {
  display: flex;
  align-items: stretch;
}

.editor-stepper input {
  flex: 1;
  min-width: 0;
  text-align: center;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.editor-stepper-btn {
  flex-shrink: 0;
  width: 2rem;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}

.editor-stepper-btn:first-child {
  border-radius: 8px 0 0 8px;
}

.editor-stepper-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.editor-stepper-btn:hover {
  background: var(--accent-soft);
}

.editor-sidebar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.4rem;
}

.editor-sidebar-actions .primary-cta,
.editor-sidebar-actions .secondary-btn,
.editor-sidebar-actions .danger-btn {
  width: 100%;
}

@media (max-width: 760px) {
  .editor-layout {
    flex-direction: column;
    overflow-y: auto;
  }

  .editor-sidebar {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
}

.modal-body {
  margin: 1rem 0;
}

.modal-preview {
  min-height: 220px;
}

.modal-footer {
  margin-top: 0.5rem;
}

@media (max-width: 560px) {
  .editor-stage {
    max-height: min(48vh, 360px);
    min-height: 200px;
  }

  .editor-footer {
    flex-wrap: wrap;
  }

  .editor-footer-primary {
    margin-left: 0;
    width: 100%;
  }

  .editor-footer-primary .secondary-btn,
  .editor-footer-primary .primary-cta {
    flex: 1;
  }

  .editor-footer .danger-btn {
    width: 100%;
    order: 2;
  }
  .step-label {
    display: none;
  }

  .editor-header,
  .project-bar {
    flex-direction: column;
  }

  .highlight-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  body {
    padding: 1.5rem 1rem 3rem;
  }

  .clip-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Projects list (rows) —— */
.projects-card h2 {
  font-family: var(--font-display);
  color: var(--accent-hover);
  margin: 0;
}

.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.projects-head .helper-text {
  margin: 0.35rem 0 0;
}

.clips-head-compact {
  align-items: center;
  margin-bottom: 0.6rem;
}

.clips-head-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.clips-head-line h2 {
  margin: 0;
  font-size: 1.15rem;
}

.clips-head-line .helper-text {
  margin: 0;
  font-size: 0.82rem;
}

.projects-head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.projects-head-actions .primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: auto;
}

.projects-stats-bar {
  margin: 0.85rem 0 0;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 780px) {
  .projects-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.clips-stats-bar {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1080px) {
  .clips-stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 780px) {
  .clips-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.clips-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.6rem 0 0;
}

.clips-actions-row #clips-select-mode-btn {
  width: auto;
  padding: 0.55rem 1.1rem;
  flex-shrink: 0;
}

.clips-actions-row .projects-bulk {
  margin: 0;
  flex: 1 1 auto;
}

.projects-stat-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
}

.projects-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.projects-stat-icon svg {
  width: 14px;
  height: 14px;
}

.projects-stat-card .dash-stat-label {
  font-size: 0.62rem;
}

.projects-stat-card .dash-stat-value {
  font-size: 1.15rem;
  line-height: 1.05;
}

.projects-stat-card .dash-stat-sub {
  font-size: 0.68rem;
}

.clips-stats-bar {
  margin-top: 0.6rem;
}

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin: 1.25rem 0 0.75rem;
}

.projects-toolbar label,
.clips-project-filter {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.projects-search {
  flex: 1;
  min-width: 180px;
}

.projects-search input,
.projects-toolbar select,
.clips-project-filter select {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  width: 100%;
}

.projects-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.projects-bulk[hidden] {
  display: none;
}

.projects-rows {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.project-row-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}

.project-row-lead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.project-row-meta {
  flex: 1 1 240px;
  min-width: 200px;
}

.project-row-player {
  flex: 0 0 auto;
  min-width: 110px;
}

.project-row-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: auto;
}

.project-row-thumb {
  width: 88px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  flex-shrink: 0;
}

.project-row-thumb img,
.project-row-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-row-meta {
  min-width: 0;
}

.project-row-meta .title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-row-meta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row-meta .meta-line {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
}

.project-row-meta .meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.project-row-meta .meta-line svg {
  width: 13px;
  height: 13px;
  opacity: 0.8;
  flex-shrink: 0;
}

.project-row-meta .stat-line {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
}

.project-row-meta .stat-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.project-row-meta .stat-line svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.project-row-player .player-label {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-row-player .player-name {
  margin: 0.15rem 0 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge.is-done {
  background: rgba(74, 212, 138, 0.18);
  color: var(--success);
}

.status-badge.is-review {
  background: rgba(232, 90, 42, 0.18);
  color: var(--accent-hover);
}

.status-badge.is-roi {
  background: rgba(255, 4, 4, 0.18);
  color: var(--accent);
}

.status-badge.is-proc {
  background: rgba(46, 196, 182, 0.15);
  color: var(--teal);
}

.status-badge.is-err {
  background: rgba(255, 107, 107, 0.18);
  color: var(--error);
}

.project-row-actions .open-project-btn {
  white-space: nowrap;
}

.project-row-menu-wrap {
  position: relative;
}

.projects-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.projects-pagination-summary {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.projects-pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.projects-page-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.projects-page-btn:hover:not(:disabled) {
  border-color: rgba(255, 4, 4, 0.4);
  color: var(--text);
}

.projects-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.projects-page-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1408;
}

.projects-page-ellipsis {
  color: var(--text-muted);
  padding: 0 0.15rem;
}

/* —— Clips shell (sidebar + grid) —— */
.clips-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.15rem;
  align-items: start;
}

.clips-shell[hidden],
#dashboard-section[hidden],
#hub-section[hidden],
#projects-section[hidden],
#upload-section[hidden],
#working-section[hidden],
#review-section[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .clips-shell {
    grid-template-columns: 1fr;
  }
}

.clips-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 0.75rem;
}

.sidebar-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.sidebar-panel h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sidebar-session-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.sidebar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stat-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(255, 4, 4, 0.25);
}

.sidebar-btn {
  width: 100%;
  margin-top: 0.45rem;
}

.primary-cta {
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.primary-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-cta:not(:disabled):hover {
  filter: brightness(1.08);
}

.danger-cta {
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #a8394a, var(--crimson));
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(139, 38, 53, 0.35);
}

.danger-cta:not(:disabled):hover {
  filter: brightness(1.1);
}

.confirm-panel {
  max-width: 420px;
}

.confirm-panel .modal-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.batch-meta-panel {
  max-width: 640px;
  width: 92vw;
}

.batch-meta-panel #batch-meta-count {
  margin: 0.15rem 0 0;
}

.batch-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-top: 0.75rem;
}

.batch-meta-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--surface);
}

.batch-meta-row-filename {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-meta-row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
}

.batch-meta-row-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.batch-meta-row-fields input {
  width: 100%;
}

@media (max-width: 640px) {
  .batch-meta-row-fields {
    grid-template-columns: 1fr;
  }
}

.clips-main {
  min-width: 0;
}

.clips-main-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.section-top-actions,
.clips-main-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.clips-sort-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ms-filter {
  position: relative;
}

.ms-filter-toggle {
  min-width: 9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  text-align: left;
  cursor: pointer;
}

.ms-filter-toggle::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex-shrink: 0;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  margin-top: -0.15rem;
}

.ms-filter-toggle-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-filter-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 20;
  min-width: 100%;
  max-width: 260px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
}

.ms-filter-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
}

.ms-filter-option:hover {
  background: var(--accent-soft);
}

.ms-filter-option-flag {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1.5px solid var(--control-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--control-bg);
}

.ms-filter-option.is-checked .ms-filter-option-flag {
  background: var(--accent);
  border-color: var(--accent);
}

.ms-filter-option.is-checked .ms-filter-option-flag::after {
  content: "";
  width: 4px;
  height: 8px;
  border-right: 2px solid #0a0a0b;
  border-bottom: 2px solid #0a0a0b;
  transform: rotate(45deg) translate(-1px, -1px);
}

.ms-filter-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-filter-divider {
  height: 1px;
  background: var(--border);
  margin: 0.3rem 0.2rem;
}

.clips-sort-label select {
  min-width: 9rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  font: inherit;
}

.app-header[hidden] {
  display: none !important;
}

.clips-project-picker {
  margin: 0.4rem 0 0.4rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.clips-project-picker-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.project-chip.is-on {
  color: var(--text);
  border-color: rgba(232, 90, 42, 0.55);
  background: var(--accent-soft);
}

.project-chip.is-off {
  opacity: 0.45;
}

.project-chip.is-muted {
  opacity: 0.85;
}

.clips-main-head h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--accent-hover);
}

.clips-bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.clips-dl-progress {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(232, 90, 42, 0.35);
  border-radius: 10px;
  background: rgba(28, 18, 14, 0.9);
}

.clips-dl-progress .progress-bar {
  margin-top: 0.55rem;
}

.clips-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.clip-card {
  position: relative;
  cursor: pointer;
}

.clip-card.select-mode {
  cursor: pointer;
}

.clip-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(232, 90, 42, 0.45), var(--shadow);
}

.clip-card.is-generating {
  pointer-events: none;
}

.clip-gen-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem;
  background: rgba(8, 6, 6, 0.78);
  border-radius: inherit;
}

.clip-gen-overlay .progress-bar {
  width: min(80%, 180px);
}

.clip-gen-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.select-label.is-hidden,
.clip-actions.is-hidden,
.icon-btn.is-hidden {
  display: none !important;
}

#clips-select-mode-btn.is-active {
  border-color: rgba(232, 90, 42, 0.55);
  background: var(--accent-soft);
  color: var(--text);
}

.clip-fav-corner {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--bg);
  color: #ddd;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.clip-fav-corner.is-on {
  color: var(--accent);
  border-color: rgba(255, 4, 4, 0.65);
}

.clip-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--border);
}

.clip-card .icon-btn {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.clip-card-toolbar .clip-score {
  flex: 1;
  min-width: 0;
  align-items: flex-start;
}

.clip-card-toolbar .clip-score strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.clip-card-toolbar .clip-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
  align-items: center;
}

.clip-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem 0.1rem;
}

.clip-title-row .clip-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-desc {
  padding: 0 0.7rem 0.1rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar-thick {
  height: 10px;
}

.progress-bar-thick .fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.meta-details {
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.meta-details summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

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

.meta-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.meta-details .meta-form {
  padding: 1rem;
  margin: 0;
}

.clips-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  align-items: flex-end;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.clips-filters-bar select.field-select {
  min-height: 34px;
  padding: 0.35rem 1.8rem 0.35rem 0.6rem;
}

.clips-filters-bar > label > span:first-child {
  font-size: 0.72rem;
}

.clips-filters-bar .clips-sort-label {
  min-width: 9.5rem;
  flex: 1 1 9.5rem;
}

.war-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--gunmetal);
  border-left: 3px solid var(--accent);
  border-radius: 999px;
  background: rgba(51, 51, 55, 0.55);
  color: var(--silver);
  font-size: 0.85rem;
  width: fit-content;
}

.war-chip-action {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.clips-war-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.5rem;
}

.clips-war-row:has(#war-chip[hidden]):has(#war-pin-btn[hidden]) {
  display: none;
  margin: 0;
}

.war-pin-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.war-pin-btn[aria-pressed="true"] {
  border-color: var(--gunmetal);
  border-left: 3px solid var(--accent);
  background: rgba(51, 51, 55, 0.55);
  color: var(--silver);
}

.clips-filters-panel {
  position: relative;
}

.clips-filters-panel summary {
  list-style: none;
  cursor: pointer;
}

.clips-filters-panel summary::-webkit-details-marker {
  display: none;
}

.clips-filters-body {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  min-width: 200px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.clips-project-picker.is-compact {
  display: none;
}

.empty-state-rich {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed rgba(255, 4, 4, 0.25);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state-rich h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

.empty-state-rich p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--accent);
  opacity: 0.7;
}

.sidebar-stats .stat-chip.is-gold {
  background: var(--accent-soft);
  border-color: rgba(255, 4, 4, 0.4);
  color: var(--accent-hover);
  font-weight: 700;
}

.editor-duration-hint {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}

body.onboarding-active {
  overflow: hidden;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.onboarding-overlay[hidden] {
  display: none !important;
}

.onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.72);
}

.onboarding-spotlight {
  position: fixed;
  z-index: 10000;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(4, 4, 6, 0.72);
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.onboarding-spotlight[hidden] {
  display: none !important;
}

.onboarding-card {
  position: fixed;
  z-index: 10001;
  width: min(360px, calc(100vw - 2rem));
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(255, 4, 4, 0.35);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow), 0 0 40px var(--accent-glow);
}

.onboarding-card.is-centered {
  max-width: 420px;
}

.onboarding-step-num {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.onboarding-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}

.onboarding-body {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.onboarding-illustration {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.onboarding-mock-job {
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.clip-card:hover {
  border-color: rgba(255, 4, 4, 0.45);
}

.empty-cta-btn {
  width: auto;
  max-width: 280px;
  margin: 0 auto;
  display: inline-block;
}

/* BDO AutoClip v0.2.0 */
:root {
  --control-bg: #1e1e24;
  --control-border: #4a4a55;
  --control-focus-ring: rgba(255, 4, 4, 0.35);
  --toggle-on: var(--accent);
  --toggle-knob: #f4f0e8;
  --gold-dim: rgba(212, 175, 55, 0.55);
}

/* Footer clearance lives in .app-content padding (body no longer scrolls). */

.app-version {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: none;
  border: none;
}

h1 .app-version {
  font-size: 0.72rem;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  width: 100%;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.field-select,
.projects-toolbar select,
.clips-filters-body select,
.clips-filters-bar select,
.meta-form select {
  appearance: none;
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 2rem 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.field-select:hover,
.field-select:focus {
  border-color: var(--accent-dim);
  outline: none;
  box-shadow: 0 0 0 3px var(--control-focus-ring);
}

.field-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.field-toggle {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: #1e1e24;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.field-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--toggle-knob);
  transition: transform 0.2s ease;
}

.field-toggle:checked {
  background: rgba(255, 4, 4, 0.35);
  border-color: var(--toggle-on);
  box-shadow: 0 0 12px var(--accent-glow);
}

.field-toggle:checked::after {
  transform: translateX(18px);
  background: var(--accent);
}

.field-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--accent-dim);
  background: transparent;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.field-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.field-checkbox:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1a1208;
  font-size: 0.72rem;
  font-weight: 700;
}

.sequence-rank {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.4rem;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  line-height: 1.1;
  box-shadow: inset 2px 0 0 var(--accent);
}

.sequence-rank strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.sequence-rank span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sequence-rank.is-b,
.sequence-rank-inline.is-b {
  background: rgba(51, 51, 55, 0.55);
  border: 1px solid var(--gunmetal);
  color: var(--silver);
}

.sequence-rank.is-a,
.sequence-rank-inline.is-a {
  background: rgba(200, 200, 208, 0.14);
  border: 1px solid rgba(200, 200, 208, 0.45);
  color: var(--silver);
}

.sequence-rank.is-s,
.sequence-rank-inline.is-s {
  background: linear-gradient(135deg, rgba(255, 4, 4, 0.28), rgba(255, 4, 4, 0.10));
  border: 1px solid rgba(255, 4, 4, 0.65);
  color: #FF0404;
  box-shadow: inset 2px 0 0 var(--accent), 0 0 16px rgba(255, 4, 4, 0.15);
}

.sequence-rank-inline {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sequence-rank-legend {
  margin: 0 0 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 20, 0.6);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-footer {
  position: fixed;
  left: var(--nav-width);
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-height: var(--footer-h);
  padding: 0.55rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 9, 0.94);
  backdrop-filter: blur(8px);
}

.footer-credits {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}

.footer-discord-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-discord-link:hover {
  color: #5865f2;
}

.footer-discord-icon {
  flex: none;
}

.lang-picker-modal {
  z-index: 10003;
}

body.lang-picker-active .app-footer,
body.lang-picker-active .nav-bottom {
  z-index: 10004;
}

body.onboarding-active .app-footer {
  z-index: 40;
}

body.onboarding-active .nav-bottom {
  position: relative;
  z-index: 10002;
}

.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 4, 4, 0.35);
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.lang-switcher-btn:hover {
  border-color: var(--accent-dim);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.lang-switcher-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 1;
  min-width: 160px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.lang-option:hover,
.lang-option.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.lang-picker-modal .modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.lang-picker-panel {
  text-align: center;
  max-width: 420px;
}

.lang-pick-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.lang-pick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.lang-pick-btn:hover {
  border-color: var(--accent-dim);
  background: var(--accent-soft);
}

.clip-card-toolbar .sequence-rank {
  margin-right: auto;
}

.kill-count-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(227, 54, 74, 0.14);
  color: #ff8a95;
  border: 1px solid rgba(227, 54, 74, 0.35);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .footer-credits {
    font-size: 0.68rem;
  }
}

.nav-link-update {
  color: #f0d98c;
  border: 1px solid rgba(240, 217, 140, 0.4);
  background: rgba(240, 217, 140, 0.08);
}

.nav-link-update:hover:not(:disabled) {
  background: rgba(240, 217, 140, 0.18);
}

.nav-link-update:disabled {
  opacity: 0.7;
  cursor: default;
}


/* Full-window drop cover: visual only (pointer-events none so OLE hits the
   native window). Shown from JS while an OS file drag is over the app. */
#drop-cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 9, 0.72);
  pointer-events: none;
}
#drop-cover[hidden] {
  display: none !important;
}
.drop-cover-copy {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-align: center;
  padding: 1rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(18, 18, 20, 0.55);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  max-width: 480px;
  margin: 0 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(14, 14, 17, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.cookie-banner p {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

#incognito-block {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
#incognito-block[hidden] {
  display: none !important;
}
.incognito-block-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.94);
}
.incognito-block-panel {
  position: relative;
  max-width: 480px;
  margin: 1.5rem;
  padding: 2rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.incognito-block-panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
}
.incognito-block-panel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

/* v0.2.0 parity: the war/street cover chip is the same newer feature as the
   Rua/Guerra clips toggle above -- hidden, not removed, for the same reason. */
.cover-mode-chip {
  display: none !important;
}

/* v0.2.0 parity: the war/rank toggle is a newer feature the v0.2.0 build
   never had. Hidden rather than removed from the DOM so the underlying
   filter state/JS stays intact -- state.clipsModeFilter defaults to null
   (unfiltered), so hiding the control doesn't change what clips show. */
#clips-chrome-bar {
  display: none !important;
}

.link-trim-preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 9, 0.45);
  z-index: 2;
}
.link-trim-preview-loading[hidden] {
  display: none !important;
}

/* Toasts — global, so a finished/failed analysis is visible from any
   section, not just the Dashboard's upload-queue widget or the working
   view (both hidden once the user navigates elsewhere). */
.toast-container {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(360px, calc(100vw - 2.5rem));
}

.toast {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast.toast-success {
  border-left-color: var(--success);
}

.toast.toast-error {
  border-left-color: var(--error);
}
