﻿:root {
      --bg: #060e20;
      --panel: rgba(15, 25, 48, 0.74);
      --panel-soft: rgba(20, 31, 56, 0.74);
      --border: rgba(255, 255, 255, 0.08);
      --text: #dee5ff;
      --muted: #a3aac4;
      --line-main: #53ddfc;
      --line-alt: #f382ff;
      --thinking: #ff6e84;
      --intentional: #53ddfc;
      --structural: #ac8aff;
      --neutral: #b8c7e6;
      --valence: #53ddfc;
      --arousal: #f382ff;
      --dominance: #8ff5b2;
      --formant: #ffb057;
      --formant-match: #66d6ff;
      --formant-valence: #ff8b6e;
      --formant-quality: #ffe28a;
      --inverse: #ff6e84;
      --happy: #b091ff;
      --sad: #7aa7ff;
      --angry: #ff77b7;
      --fearful: #f19cff;
      --disgusted: #91d36b;
      --surprised: #7cf0e7;
      --grid: rgba(255, 255, 255, 0.08);
      --shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
      --shadow-glow: 0 0 0 1px rgba(255,255,255,0.03), 0 24px 60px rgba(243, 130, 255, 0.09);
      --radius: 18px;
      --sidebar-w: 232px;
      --topbar-h: 76px;
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      color: var(--text);
      font-family: "Manrope", "Segoe UI", sans-serif;
      background:
        radial-gradient(circle at 0% 0%, rgba(83, 221, 252, 0.12), transparent 24%),
        radial-gradient(circle at 100% 0%, rgba(243, 130, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #060e20 0%, #091328 100%);
      min-height: 100vh;
      background-attachment: fixed;
      overflow-x: hidden;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
      background-size: 22px 22px;
      opacity: 0.38;
      pointer-events: none;
      z-index: 0;
    }

    .topbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--topbar-h);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px 0 calc(var(--sidebar-w) + 28px);
      background: linear-gradient(180deg, rgba(6,14,32,0.88), rgba(6,14,32,0.56));
      backdrop-filter: blur(24px);
      border-bottom: 1px solid rgba(255,255,255,0.05);
      box-shadow: 0 20px 40px rgba(243,130,255,0.08);
      z-index: 20;
    }

    .brand {
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.05em;
      background: linear-gradient(90deg, #f382ff 0%, #53ddfc 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--muted);
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: var(--line-main);
      box-shadow: 0 0 14px rgba(83,221,252,0.62);
    }

    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: var(--sidebar-w);
      padding: 96px 18px 18px;
      background: rgba(6, 14, 32, 0.9);
      border-right: 1px solid rgba(255,255,255,0.05);
      z-index: 15;
      display: flex;
      flex-direction: column;
    }

    .sidebar-kicker {
      padding: 0 12px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      margin-bottom: 14px;
    }

    .sidebar-kicker strong,
    .sidebar-footer button {
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      font-size: 11px;
    }

    .sidebar-kicker strong {
      display: block;
      color: #f382ff;
      margin-bottom: 6px;
    }

    .sidebar-kicker span {
      color: #6f7790;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
    }

    .sidebar-nav {
      display: grid;
      gap: 6px;
      padding: 0 6px;
    }

    .sidebar-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      color: #8390ad;
      text-decoration: none;
      border-radius: 10px;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      background: rgba(255,255,255,0.02);
      border: 1px solid transparent;
    }

    .sidebar-link.active {
      color: #53ddfc;
      background: rgba(255,255,255,0.05);
      box-shadow: inset 3px 0 0 #53ddfc;
      border-color: rgba(255,255,255,0.04);
    }

    .role-hidden {
      display: none !important;
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 18px 8px 4px;
      border-top: 1px solid rgba(255,255,255,0.05);
      display: grid;
      gap: 10px;
    }

    .sidebar-footer button {
      width: 100%;
      background: linear-gradient(90deg, #f382ff 0%, #ec63ff 100%);
      color: #2a0032;
      border: none;
      padding: 12px 14px;
      border-radius: 8px;
      font-weight: 800;
      box-shadow: 0 0 16px rgba(243,130,255,0.22);
    }

    .app-main {
      position: relative;
      z-index: 1;
      padding-left: var(--sidebar-w);
      padding-top: var(--topbar-h);
      padding-bottom: 64px;
    }

    .wrap {
      max-width: 1680px;
      margin: 0 auto;
      padding: 30px 24px 24px;
    }

    .hero {
      margin-bottom: 24px;
      display: flex;
      justify-content: space-between;
      gap: 18px;
      align-items: flex-start;
    }

    h1 {
      margin: 0 0 10px;
      font-size: clamp(34px, 4vw, 54px);
      line-height: 0.95;
      letter-spacing: -0.05em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      font-weight: 800;
    }

    .subtitle {
      max-width: 840px;
      color: var(--muted);
      line-height: 1.5;
      font-size: 14px;
    }

    .layout {
      display: grid;
      grid-template-columns: 360px 1fr;
      gap: 20px;
      align-items: start;
    }

    .layout.controls-collapsed {
      grid-template-columns: 72px 1fr;
    }

    .panel {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-glow), var(--shadow);
      backdrop-filter: blur(24px);
    }

    .controls {
      padding: 18px;
      position: sticky;
      top: calc(var(--topbar-h) + 16px);
    }

    .controls-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .controls-topbar strong {
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: #f1f5ff;
    }

    .icon-button {
      min-width: 40px;
      width: 40px;
      height: 40px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      line-height: 1;
    }

    .controls-sections {
      display: grid;
      gap: 0;
    }

    .layout.controls-collapsed .controls {
      padding: 14px 12px;
    }

    .layout.controls-collapsed .controls-topbar {
      margin-bottom: 0;
      justify-content: center;
    }

    .layout.controls-collapsed .controls-topbar strong,
    .layout.controls-collapsed .controls-sections {
      display: none;
    }

    .section-title {
      margin: 18px 0 10px;
      color: #7f88a7;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
    }

    .dropzone {
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 14px;
      padding: 16px;
      background: rgba(20, 31, 56, 0.46);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    }

    .dropzone input[type="file"] {
      width: 100%;
      margin-top: 12px;
    }

    .small, .hint {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    .row {
      display: grid;
      gap: 8px;
      margin-bottom: 12px;
    }

    .checkbox {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      margin-bottom: 10px;
    }

    label {
      font-size: 13px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    input[type="range"] {
      width: 100%;
      accent-color: #7dd3fc;
    }

    textarea {
      width: 100%;
      min-height: 140px;
      resize: vertical;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(7, 16, 31, 0.72);
      color: var(--text);
      font-family: Consolas, monospace;
      font-size: 12px;
    }

    select {
      width: 100%;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(18, 30, 48, 0.96);
      color: #f7fbff;
      padding: 10px 12px;
      border-radius: 8px;
      font: inherit;
    }

    select option,
    select optgroup {
      background: #142235;
      color: #f7fbff;
    }

    button {
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
      color: var(--text);
      padding: 10px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 700;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 11px;
    }

    button.active {
      border-color: rgba(83, 221, 252, 0.4);
      background: linear-gradient(180deg, rgba(83, 221, 252, 0.22), rgba(255,255,255,0.05));
      color: #ecfaff;
    }

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

    .buttonbar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .main {
      padding: 16px;
    }

    .main-topband {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 340px;
      gap: 16px;
      align-items: start;
      margin-bottom: 16px;
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 0;
    }

    .cards.cards-wide {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card {
      background: var(--panel-soft);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 16px;
      padding: 16px;
      position: relative;
      overflow: hidden;
    }

    .card::before {
      content: "";
      position: absolute;
      inset: auto -10% 60% auto;
      width: 120px;
      height: 120px;
      background: radial-gradient(circle, rgba(243,130,255,0.11), transparent 68%);
      pointer-events: none;
    }

    .card .k {
      color: #8ea2c8;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      margin-bottom: 10px;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
    }

    .card .v {
      font-size: 30px;
      line-height: 1;
      font-weight: 800;
      letter-spacing: -0.04em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    }

    .card .sub {
      color: var(--muted);
      margin-top: 6px;
      font-size: 12px;
    }

    .card.score-card {
      border-color: rgba(83, 221, 252, 0.22);
      background: linear-gradient(180deg, rgba(83, 221, 252, 0.11), rgba(20, 31, 56, 0.74));
    }

    .card.card-wide {
      grid-column: span 2;
    }

    .component-bar {
      min-width: 140px;
      display: inline-grid;
      gap: 5px;
    }

    .component-bar-track {
      height: 7px;
      border-radius: 7px;
      background: rgba(255, 255, 255, 0.08);
      overflow: hidden;
    }

    .component-bar-fill {
      display: block;
      height: 100%;
      width: var(--score-width, 0%);
      border-radius: 7px;
      background: linear-gradient(90deg, #53ddfc, #8ff5b2);
    }

    .weight-input {
      width: 78px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(18, 30, 48, 0.96);
      color: #f7fbff;
      padding: 8px 10px;
      border-radius: 8px;
      font: inherit;
    }

    .weight-input-wrap {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .weight-input-suffix {
      color: var(--muted);
      font-size: 12px;
    }

    .chart-shell, .table-shell {
      background: rgba(15, 25, 48, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 16px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
    }

    .chart-stack {
      display: grid;
      gap: 16px;
      margin-bottom: 16px;
    }

    .storyline-shell {
      position: relative;
      overflow: hidden;
    }

    .storyline-canvas-wrap {
      position: relative;
    }

    .storyline-copy {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
    }

    .storyline-chip {
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 10px;
      border: 1px solid rgba(83, 221, 252, 0.18);
      background: rgba(83, 221, 252, 0.08);
      color: #9fefff;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      text-transform: uppercase;
      letter-spacing: 0.14em;
    }

    .moment-chips {
      position: absolute;
      inset: 8px 16px 28px 16px;
      pointer-events: none;
    }

    .moment-chip-float {
      position: absolute;
      transform: translateX(-50%);
      pointer-events: auto;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(7, 16, 26, 0.82);
      color: var(--text);
      border-radius: 999px;
      padding: 7px 11px;
      font-size: 11px;
      letter-spacing: 0.02em;
      box-shadow: 0 14px 32px rgba(0,0,0,0.22);
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
      backdrop-filter: blur(10px);
    }

    .moment-chip-float:hover {
      transform: translateX(-50%) translateY(-2px);
      background: rgba(16, 28, 45, 0.94);
      border-color: rgba(255,255,255,0.18);
    }

    .chart-title {
      margin: 0 0 6px;
      font-size: 18px;
      letter-spacing: -0.02em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      font-weight: 800;
    }

    .chart-copy {
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 10px;
      line-height: 1.45;
    }

    .chart-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 8px;
    }

    .chart-heading {
      min-width: 0;
      flex: 1 1 auto;
    }

    .chart-header .chart-copy {
      margin-bottom: 0;
    }

    .chart-header .resolution-switch {
      flex: 0 0 auto;
      margin-top: 2px;
      justify-content: flex-end;
    }

    .shell-hidden {
      display: none;
    }

    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 12px;
    }

    .legend-group {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px 12px;
    }

    .legend-group-label {
      flex: 0 0 132px;
      color: #8f98b6;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
    }

    .legend-group-buttons {
      flex: 1 1 320px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .legend span {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .legend-toggle {
      appearance: none;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      color: #c8d2ec;
      border-radius: 999px;
      padding: 8px 12px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      cursor: pointer;
      transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
    }

    .legend-toggle:hover {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.16);
    }

    .legend-toggle.active {
      background: rgba(255,255,255,0.09);
      color: #eef5ff;
    }

    .legend-toggle.inactive {
      opacity: 0.5;
    }

    @media (max-width: 980px) {
      .legend-group-label {
        flex-basis: 100%;
      }
    }

    .swatch {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      display: inline-block;
    }

    canvas {
      width: 100%;
      height: 500px;
      display: block;
      cursor: pointer;
    }

    canvas.chart-animate {
      animation: chartIn 560ms cubic-bezier(0.2, 0.7, 0.1, 1);
      transform-origin: 50% 50%;
    }

    @keyframes chartIn {
      from {
        opacity: 0;
        transform: translateY(8px) scale(0.992);
        filter: blur(6px);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
      }
    }

    .context-canvas {
      height: 220px;
    }

    .profile-canvas {
      height: 360px;
    }

    .overview-canvas {
      height: 120px;
    }

    video, audio {
      width: 100%;
      margin-top: 12px;
      border-radius: 8px;
      background: rgba(0, 0, 0, 0.3);
    }

    video {
      max-height: 260px;
    }

    .media-monitor-shell {
      background: rgba(15, 25, 48, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 18px;
      padding: 12px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
      min-width: 0;
    }

    .media-monitor-topline {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      margin-bottom: 10px;
    }

    .media-monitor-topline span:last-child {
      text-align: right;
      color: #dbe7ff;
      text-transform: none;
      letter-spacing: 0;
      font-family: "Manrope", "Segoe UI", sans-serif;
      font-size: 12px;
    }

    .media-monitor-shell video {
      margin-top: 0;
      width: 100%;
      min-height: 190px;
      max-height: 240px;
      object-fit: contain;
      background: rgba(3, 8, 18, 0.92);
      border: 1px solid rgba(255,255,255,0.06);
    }

    .asset-list {
      display: grid;
      gap: 8px;
      max-height: 230px;
      overflow: auto;
      margin-top: 12px;
      padding-right: 4px;
    }

    .asset-item {
      width: 100%;
      text-align: left;
      display: grid;
      gap: 6px;
      background: rgba(20, 34, 53, 0.92);
      color: #f5f9ff;
      border-radius: 12px;
    }

    .asset-item.active {
      border-color: rgba(120, 215, 255, 0.52);
      background: rgba(120, 215, 255, 0.12);
    }

    .asset-title {
      font-weight: 800;
      line-height: 1.25;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    }

    .asset-meta {
      color: #d6e4f7;
      font-size: 12px;
      line-height: 1.35;
    }

    .roi-list {
      display: grid;
      gap: 12px;
    }

    .roi-item {
      padding: 14px;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      cursor: pointer;
      transition: transform 180ms ease, border-color 180ms ease;
    }

    .roi-item:hover {
      transform: translateY(-2px);
      border-color: rgba(255,255,255,0.16);
    }

    .moment-shell {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 22px;
      padding: 14px;
      margin-bottom: 16px;
    }

    .moment-topline {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 12px;
    }

    .moment-title {
      margin: 0 0 10px;
      font-size: 18px;
      letter-spacing: -0.02em;
    }

    .moment-title:empty {
      display: none;
    }

    .moment-copy {
      margin: 0;
      color: var(--text);
      line-height: 1.65;
      font-size: 15px;
      min-height: 52px;
      transition: color 140ms ease, opacity 140ms ease;
      padding-left: 0;
    }

    .moment-copy.moment-copy-animate {
      animation: momentQuoteIn 500ms cubic-bezier(0.2, 0.72, 0.18, 1);
    }

    .moment-copy-word {
      display: inline-block;
      opacity: 0.5;
      transform: translateY(3px);
      animation: momentWordIn 480ms cubic-bezier(0.2, 0.72, 0.18, 1) forwards;
      animation-delay: var(--word-delay, 0ms);
      will-change: transform, opacity;
    }

    @keyframes momentQuoteIn {
      0% {
        opacity: 0.45;
        transform: translateX(10px) translateY(3px);
      }
      100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
      }
    }

    @keyframes momentWordIn {
      0% {
        opacity: 0.5;
        transform: translateY(3px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .moment-metrics {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 12px;
    }

    .moment-chip {
      border-radius: 999px;
      padding: 8px 10px;
      font-size: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: var(--muted);
    }

    .media-status {
      margin-top: 10px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .emotion-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      font-size: 12px;
      color: var(--text);
    }

    .emotion-icon {
      width: 22px;
      height: 22px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      color: #08111c;
    }

    .hovercard {
      position: fixed;
      z-index: 30;
      width: min(430px, calc(100vw - 24px));
      padding: 16px 18px;
      border-radius: 18px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: linear-gradient(180deg, rgba(11, 20, 33, 0.97), rgba(7, 16, 26, 0.95));
      box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
      backdrop-filter: blur(18px);
      pointer-events: none;
      opacity: 0;
      transform: translate3d(0, 10px, 0) scale(0.985);
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .hovercard.visible {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }

    .hovercard-topline {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 12px;
    }

    .hovercard-title {
      margin: 0 0 8px;
      font-size: 16px;
      letter-spacing: -0.02em;
      font-family: Georgia, "Times New Roman", serif;
    }

    .hovercard-title:empty {
      display: none;
    }

    .hovercard-copy {
      margin: 0;
      line-height: 1.55;
      font-size: 14px;
      color: var(--text);
    }

    .hovercard-copy-word {
      display: inline-block;
      opacity: 0.5;
      transform: translateY(2px);
      animation: hoverWordIn 360ms cubic-bezier(0.2, 0.72, 0.18, 1) forwards;
      animation-delay: var(--word-delay, 0ms);
      will-change: transform, opacity;
    }

    @keyframes hoverWordIn {
      0% {
        opacity: 0.5;
        transform: translateY(2px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .hovercard-metrics {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .roi-item h3 {
      margin: 0 0 8px;
      font-size: 15px;
      letter-spacing: -0.02em;
    }

    .roi-item p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .summary-block {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 16px;
      margin-bottom: 16px;
    }

    .summary-block.summary-block-wide {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .copy-block {
      background: rgba(15, 25, 48, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 18px;
      padding: 16px;
    }

    .copy-block h2 {
      margin: 0 0 10px;
      font-size: 20px;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      font-weight: 800;
    }

    .transcript-shell {
      padding: 12px 12px 10px;
    }

    .transcript-topline {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 12px;
    }

    .transcript-rail {
      display: grid;
      gap: 10px;
      max-height: 240px;
      overflow: auto;
      padding-right: 4px;
    }

    .transcript-sentence {
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      color: var(--text);
      border-radius: 18px;
      padding: 12px 14px;
      text-align: left;
      width: 100%;
      cursor: pointer;
      transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
      font-weight: 500;
      text-transform: none;
      letter-spacing: 0;
    }

    .transcript-sentence:hover {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.18);
      background: rgba(255,255,255,0.05);
    }

    .transcript-sentence.active {
      border-color: rgba(120, 215, 255, 0.48);
      background: linear-gradient(180deg, rgba(120, 215, 255, 0.12), rgba(255,255,255,0.05));
      box-shadow: 0 14px 26px rgba(120, 215, 255, 0.12);
    }

    .transcript-sentence.pinned {
      border-color: rgba(255, 222, 138, 0.42);
      background: linear-gradient(180deg, rgba(255, 222, 138, 0.12), rgba(255,255,255,0.05));
    }

    .transcript-meta {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .transcript-body {
      font-size: 14px;
      line-height: 1.55;
      font-weight: 400;
    }

    .copy-block p {
      margin: 0 0 10px;
      color: var(--muted);
      line-height: 1.55;
      font-size: 14px;
    }

    .pill-grid {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .intelligence-blueprint-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .blueprint-card {
      background: rgba(20, 31, 56, 0.54);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 16px;
      padding: 16px;
      display: grid;
      gap: 10px;
    }

    .blueprint-card.hero {
      grid-column: 1 / -1;
      background: linear-gradient(180deg, rgba(83, 221, 252, 0.10), rgba(20, 31, 56, 0.62));
      border-color: rgba(83, 221, 252, 0.18);
    }

    .blueprint-topline {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .blueprint-kicker {
      color: #9ab3dd;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
    }

    .blueprint-title {
      margin: 4px 0 0;
      font-size: 20px;
      line-height: 1.05;
      letter-spacing: -0.03em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      font-weight: 800;
    }

    .blueprint-score {
      text-align: right;
      min-width: 150px;
    }

    .blueprint-score strong {
      display: block;
      font-size: 28px;
      line-height: 1;
      letter-spacing: -0.04em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    }

    .blueprint-score span {
      display: block;
      margin-top: 6px;
      color: var(--muted);
      font-size: 11px;
    }

    .blueprint-card p,
    .blueprint-list {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }

    .blueprint-list {
      display: grid;
      gap: 8px;
    }

    .blueprint-rule {
      display: inline-flex;
      width: fit-content;
      border-radius: 999px;
      padding: 7px 10px;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: #deebff;
    }

    .blueprint-stats {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .blueprint-stat {
      border-radius: 999px;
      padding: 7px 10px;
      font-size: 10px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      color: #d8e6ff;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .pill {
      border-radius: 999px;
      padding: 8px 10px;
      font-size: 11px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
    }

    .harness-topline,
    .harness-panel-topline {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .harness-toolbar {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: end;
    }

    .harness-toolbar label,
    .harness-form-grid label {
      display: grid;
      gap: 6px;
      justify-content: stretch;
      align-items: start;
    }

    .harness-toolbar span,
    .harness-panel-topline span {
      color: var(--muted);
      font-size: 12px;
    }

    .harness-toolbar input[type="number"],
    .harness-form-grid input[type="text"] {
      width: 100%;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(18, 30, 48, 0.96);
      color: #f7fbff;
      padding: 10px 12px;
      border-radius: 8px;
      font: inherit;
    }

    .harness-cards {
      margin-top: 16px;
      margin-bottom: 16px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .harness-grid {
      display: grid;
      grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
      gap: 16px;
      margin-top: 16px;
    }

    .harness-panel {
      background: rgba(20, 31, 56, 0.54);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 16px;
      padding: 16px;
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .harness-panel h3 {
      margin: 0;
      font-size: 18px;
      letter-spacing: -0.02em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    }

    .harness-signal-list,
    .harness-custom-list,
    .harness-feature-values {
      display: grid;
      gap: 10px;
      max-height: 620px;
      overflow: auto;
      padding-right: 4px;
    }

    .harness-signal-item,
    .harness-custom-item,
    .harness-presentation-item {
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      border-radius: 14px;
      padding: 12px;
      cursor: pointer;
      transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
    }

    .harness-signal-item:hover,
    .harness-custom-item:hover,
    .harness-presentation-item:hover {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.16);
      background: rgba(255,255,255,0.05);
    }

    .harness-signal-item.active,
    .harness-custom-item.active,
    .harness-presentation-item.active {
      border-color: rgba(120, 215, 255, 0.48);
      background: linear-gradient(180deg, rgba(120, 215, 255, 0.12), rgba(255,255,255,0.05));
    }

    .harness-signal-head,
    .harness-presentation-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      margin-bottom: 6px;
    }

    .harness-signal-name,
    .harness-presentation-title {
      font-weight: 800;
      line-height: 1.3;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      overflow-wrap: anywhere;
    }

    .harness-signal-meta,
    .harness-presentation-meta,
    .harness-feature-copy {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .harness-metric-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .harness-badge {
      border-radius: 999px;
      padding: 7px 10px;
      font-size: 10px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      color: #dbe7ff;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .harness-feature-detail {
      display: grid;
      gap: 14px;
    }

    .harness-form-grid {
      display: grid;
      gap: 12px;
    }

    .harness-label-studio {
      display: grid;
      gap: 14px;
    }

    .label-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .label-chip {
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      padding: 12px;
      display: grid;
      gap: 8px;
    }

    .label-chip strong {
      font-size: 13px;
    }

    .label-chip input[type="range"] {
      width: 100%;
    }

    .harness-empty {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
      border: 1px dashed rgba(255,255,255,0.10);
      border-radius: 14px;
      padding: 16px;
    }

    .annotation-studio {
      display: grid;
      gap: 16px;
    }

    .annotation-topline {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .annotation-topline-copy {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
      max-width: 760px;
    }

    .annotation-status-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .annotation-layout {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr) 320px;
      gap: 16px;
      align-items: start;
    }

    .annotation-column {
      display: grid;
      gap: 16px;
      min-width: 0;
    }

    .annotation-panel {
      background: rgba(20, 31, 56, 0.54);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 16px;
      padding: 16px;
      display: grid;
      gap: 12px;
      min-width: 0;
    }

    .annotation-panel h3 {
      margin: 0;
      font-size: 17px;
      letter-spacing: -0.02em;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    }

    .annotation-video-stage {
      position: relative;
      overflow: hidden;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.08);
      background: radial-gradient(circle at 20% 20%, rgba(83,221,252,0.12), transparent 35%), rgba(3, 8, 18, 0.96);
      min-height: 560px;
      display: grid;
      align-items: stretch;
    }

    .annotation-video-stage video {
      width: 100%;
      height: 100%;
      max-height: none;
      min-height: 560px;
      object-fit: contain;
      background: rgba(3, 8, 18, 0.96);
      margin-top: 0;
    }

    .annotation-video-overlay {
      position: absolute;
      inset: auto 14px 14px 14px;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(7, 16, 26, 0.78);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(12px);
      color: #edf4ff;
      font-size: 12px;
    }

    .annotation-timeline {
      display: grid;
      gap: 8px;
    }

    .annotation-timeline-bar {
      position: relative;
      height: 64px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.08);
      background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
      overflow: hidden;
      cursor: pointer;
    }

    .annotation-playhead {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #53ddfc;
      box-shadow: 0 0 16px rgba(83,221,252,0.46);
      pointer-events: none;
    }

    .annotation-marker {
      position: absolute;
      top: 10px;
      bottom: 10px;
      min-width: 3px;
      border-radius: 999px;
      background: rgba(255, 159, 64, 0.9);
      box-shadow: 0 0 0 1px rgba(255,255,255,0.10);
    }

    .annotation-marker.generated {
      background: rgba(176, 145, 255, 0.88);
    }

    .annotation-marker.general {
      background: rgba(143, 245, 178, 0.86);
    }

    .annotation-list,
    .annotation-generated-list,
    .annotation-video-list {
      display: grid;
      gap: 10px;
      max-height: 280px;
      overflow: auto;
      padding-right: 4px;
    }

    .annotation-item,
    .annotation-generated-item,
    .annotation-video-item {
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.03);
      border-radius: 14px;
      padding: 12px;
      display: grid;
      gap: 8px;
      cursor: pointer;
      transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
    }

    .annotation-item:hover,
    .annotation-generated-item:hover,
    .annotation-video-item:hover {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.16);
      background: rgba(255,255,255,0.05);
    }

    .annotation-video-item.active {
      border-color: rgba(120, 215, 255, 0.48);
      background: linear-gradient(180deg, rgba(120, 215, 255, 0.12), rgba(255,255,255,0.05));
    }

    .annotation-row {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }

    .annotation-title {
      font-weight: 800;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      line-height: 1.3;
      overflow-wrap: anywhere;
    }

    .annotation-meta,
    .annotation-note-copy {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    .annotation-form {
      display: grid;
      gap: 12px;
    }

    .annotation-form textarea,
    .annotation-form input[type="text"] {
      width: 100%;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(18, 30, 48, 0.96);
      color: #f7fbff;
      padding: 10px 12px;
      border-radius: 8px;
      font: inherit;
    }

    .annotation-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .annotation-empty {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
      border: 1px dashed rgba(255,255,255,0.10);
      border-radius: 14px;
      padding: 16px;
    }

    .table-wrap {
      overflow: auto;
      max-height: 560px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    th, td {
      padding: 10px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      vertical-align: top;
      text-align: left;
    }

    th {
      color: var(--muted);
      background: rgba(255, 255, 255, 0.03);
      position: sticky;
      top: 0;
    }

    .empty {
      padding: 30px;
      text-align: center;
      color: var(--muted);
    }

    .pause-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: capitalize;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
    }

    .footerbar {
      position: fixed;
      left: var(--sidebar-w);
      right: 0;
      bottom: 0;
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
      background: rgba(6, 14, 32, 0.84);
      backdrop-filter: blur(14px);
      border-top: 1px solid rgba(255,255,255,0.05);
      z-index: 18;
      color: #7f88a6;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.16em;
    }

    .session-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      color: var(--text);
      font-size: 10px;
    }

    .session-chip span:last-child {
      color: #53ddfc;
    }

    .session-action {
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.04);
      color: var(--text);
      border-radius: 999px;
      padding: 9px 12px;
      font: inherit;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-size: 10px;
      cursor: pointer;
    }

    .auth-shell {
      position: fixed;
      inset: 0;
      z-index: 40;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(4, 10, 24, 0.72);
      backdrop-filter: blur(16px);
    }

    .auth-shell[hidden] {
      display: none !important;
    }

    .auth-card {
      width: min(460px, 100%);
      padding: 28px;
      border-radius: 24px;
      border: 1px solid rgba(255,255,255,0.08);
      background: linear-gradient(180deg, rgba(16, 26, 49, 0.96), rgba(9, 18, 34, 0.96));
      box-shadow: var(--shadow-glow), var(--shadow);
      display: grid;
      gap: 16px;
    }

    .auth-kicker {
      color: #53ddfc;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.16em;
    }

    .auth-card h2 {
      margin: 0;
      font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      font-size: 28px;
      letter-spacing: -0.04em;
    }

    .auth-copy,
    .auth-status {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.6;
    }

    .auth-form {
      display: grid;
      gap: 12px;
    }

    .auth-form label {
      display: grid;
      gap: 6px;
    }

    .auth-form span {
      color: #d7e2ff;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
    }

    .auth-form input {
      width: 100%;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(18, 30, 48, 0.96);
      color: #f7fbff;
      padding: 12px 14px;
      border-radius: 12px;
      font: inherit;
    }

    .auth-form button {
      border: none;
      border-radius: 12px;
      padding: 14px 16px;
      font: inherit;
      font-weight: 800;
      color: #091328;
      background: linear-gradient(90deg, #53ddfc 0%, #8ff5b2 100%);
      cursor: pointer;
    }

    body.auth-locked .sidebar,
    body.auth-locked .app-main,
    body.auth-locked .footerbar {
      filter: blur(4px);
      pointer-events: none;
      user-select: none;
    }

    .pause-tag.thinking { background: rgba(255, 107, 107, 0.16); color: #ffb4b4; }
    .pause-tag.intentional { background: rgba(40, 199, 129, 0.16); color: #9ef0c6; }
    .pause-tag.structural { background: rgba(110, 166, 255, 0.16); color: #bad6ff; }
    .pause-tag.neutral { background: rgba(184, 199, 230, 0.14); color: #dbe7ff; }

    @media (max-width: 1200px) {
      .topbar {
        padding-left: 24px;
      }
      .sidebar {
        position: static;
        width: auto;
        height: auto;
        padding: 12px 18px 0;
        border-right: none;
      }
      .app-main {
        padding-left: 0;
      }
      .footerbar {
        left: 0;
      }
      .layout,
      .layout.controls-collapsed { grid-template-columns: 1fr; }
      .controls { position: static; }
      .summary-block { grid-template-columns: 1fr; }
      .intelligence-blueprint-grid { grid-template-columns: 1fr; }
      .main-topband { grid-template-columns: 1fr; }
      .harness-grid { grid-template-columns: 1fr; }
      .annotation-layout { grid-template-columns: 1fr; }
    }

    @media (max-width: 760px) {
      .hero { flex-direction: column; }
      .cards { grid-template-columns: 1fr 1fr; }
      .cards.cards-wide { grid-template-columns: 1fr; }
      .card.card-wide { grid-column: span 1; }
      canvas { height: 380px; }
      .harness-cards { grid-template-columns: 1fr 1fr; }
      .label-grid { grid-template-columns: 1fr; }
      .annotation-form-grid { grid-template-columns: 1fr; }
      .annotation-video-stage,
      .annotation-video-stage video { min-height: 360px; }
    }

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