@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@600;700;800&display=swap');

    :root {
      color-scheme: dark;
      --bg0: #01070d;
      --bg1: #061320;
      --panel: linear-gradient(175deg, rgba(10,28,48,0.97) 0%, rgba(5,16,28,0.98) 100%);
      --panel2: rgba(32,211,179,0.06);
      --border: rgba(32,211,179,0.18);
      --border-hi: rgba(32,211,179,0.45);
      --text: #e8f4ff;
      --muted: #8da4b8;
      --accent: #20d3b3;
      --accent2: #39b8ff;
      --accent3: #adf7e4;
      --shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(32,211,179,0.10) inset;
      --r: 16px;
      /* section / input / stat tokens */
      --section-bg: rgba(255,255,255,0.03);
      --section-border: rgba(255,255,255,0.08);
      --input-bg: rgba(3,10,18,0.88);
      --input-border: rgba(255,255,255,0.12);
      --stat-bg: rgba(32,211,179,0.08);
      --stat-border: rgba(32,211,179,0.20);
      --badge-text: #071219;
    }

    .workspace-page.theme-light {
      color-scheme: light;
      --bg0: #eef5ff;
      --bg1: #d8e8f8;
      --panel: linear-gradient(175deg, rgba(232,244,255,0.98) 0%, rgba(218,236,255,0.98) 100%);
      --panel2: rgba(22,100,200,0.07);
      --border: rgba(40,100,190,0.26);
      --border-hi: rgba(22,160,145,0.50);
      --text: #07192e;
      --muted: #3d5978;
      --accent: #0aaf96;
      --accent2: #1a8ee0;
      --accent3: #0d7a6a;
      --shadow: 0 16px 40px rgba(10,30,80,0.18), 0 0 0 1px rgba(40,100,190,0.12) inset;
      --r: 16px;
      --section-bg: rgba(22,100,200,0.05);
      --section-border: rgba(40,100,190,0.18);
      --input-bg: rgba(255,255,255,0.92);
      --input-border: rgba(40,100,190,0.28);
      --stat-bg: rgba(10,160,140,0.09);
      --stat-border: rgba(10,160,140,0.28);
      --badge-text: #fff;
    }

    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      width: 100%;
      min-height: 100%;
      overflow: hidden;
      background:
        radial-gradient(ellipse 70% 40% at 15% 0%, rgba(32,211,179,0.14) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 88% 5%,  rgba(57,184,255,0.13) 0%, transparent 70%),
        linear-gradient(175deg, #061320 0%, #01070d 100%);
      color: var(--text);
      font-family: Manrope, "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    body.workspace-page.theme-light {
      background:
        radial-gradient(ellipse 70% 40% at 15% 0%, rgba(58, 176, 212, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 88% 5%, rgba(49, 126, 225, 0.15) 0%, transparent 70%),
        linear-gradient(175deg, #edf5ff 0%, #d8e6f7 100%);
    }

    /* ──────────────────── HEADER ──────────────────── */
    .workspace-page {
      min-height: 100vh;
      display: grid;
      grid-template-rows: 60px minmax(0, 1fr) 46px;
    }

    .site-header {
      position: relative;
      z-index: 200;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 16px;
      padding: 0 20px;
      height: 60px;
      border-bottom: 1px solid var(--border);
      border-left: 0;
      border-right: 0;
      border-top: 0;
      background: rgba(5, 12, 22, 0.96);
      box-shadow: 0 1px 0 rgba(32,211,179,0.10);
      backdrop-filter: blur(18px) saturate(150%);
    }

    .workspace-page.theme-light .site-header {
      border-bottom-color: var(--border);
      background: rgba(225, 240, 255, 0.96);
      box-shadow: 0 1px 0 rgba(40,100,190,0.14);
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      color: var(--text);
      text-decoration: none;
      min-width: 0;
    }

    .brand-mark {
      position: relative;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      flex: 0 0 auto;
      border: 1px solid rgba(108, 233, 213, 0.45);
      background:
        radial-gradient(circle at 50% 50%, rgba(34, 187, 255, 0.95) 0 16%, rgba(20, 79, 214, 0.7) 17% 33%, transparent 34%),
        radial-gradient(circle at 50% 50%, transparent 0 48%, rgba(43, 201, 180, 0.95) 49% 61%, transparent 62%),
        linear-gradient(135deg, rgba(56, 182, 255, 0.45), rgba(32, 211, 179, 0.2));
      box-shadow: 0 0 0 2px rgba(9, 26, 42, 0.9), 0 0 18px rgba(24, 182, 255, 0.22);
    }

    .brand-mark-core {
      position: absolute;
      inset: 5px;
      border-radius: 50%;
      border: 1px solid rgba(173, 247, 228, 0.32);
    }

    .brand-label {
      font-size: 15px;
      font-weight: 800;
      letter-spacing: -0.03em;
      font-family: "Space Grotesk", Manrope, sans-serif;
      white-space: nowrap;
    }

    .platform-banner {
      display: block;
      width: min(760px, 72%);
      margin: 0 auto 14px;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      background: transparent;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 24px;
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .nav-links a {
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      text-decoration: none;
      transition: color 120ms;
    }

    .nav-links a:hover { color: var(--text); }

    .header-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
    }

    .mini-cta {
      border: 1px solid rgba(37, 207, 180, 0.34);
      color: var(--accent);
      background: rgba(32,211,179,0.10);
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .workspace-summary {
      display: grid;
      justify-items: center;
      gap: 3px;
      min-width: 0;
      text-align: center;
    }

    .workspace-summary-label {
      font-size: 12px;
      font-weight: 700;
      color: #f3f8ff;
      letter-spacing: 0.02em;
    }

    .workspace-summary-label::before {
      content: "•";
      color: #53e7ff;
      margin-right: 6px;
    }

    .workspace-summary-note {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 11px;
      color: rgba(205, 220, 236, 0.66);
    }

    .workspace-page.theme-light .workspace-summary-note {
      color: rgba(25, 59, 100, 0.72);
    }

    .header-icon-btn,
    .header-user-btn {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(255,255,255,0.03);
      color: var(--muted);
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
    }

    .header-icon-btn:hover,
    .header-user-btn:hover {
      border-color: rgba(122,245,203,0.35);
      color: var(--text);
      background: rgba(122,245,203,0.10);
    }

    .header-user-btn {
      background: rgba(57,184,255,0.14);
      color: #d9f0ff;
    }

    /* ──────────────────── HERO ──────────────────── */
    .hero {
      max-width: 1200px;
      margin: 0 auto;
      padding: 72px 28px 48px;
      display: grid;
      gap: 20px;
    }

    .eyebrow {
      width: fit-content;
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent3);
      background: rgba(32,211,179,0.12);
      border: 1px solid rgba(173,247,228,0.30);
      border-radius: 999px;
      padding: 6px 12px;
      font-weight: 700;
    }

    .hero h1 {
      margin: 0;
      font-size: clamp(34px, 6vw, 68px);
      letter-spacing: -0.045em;
      line-height: 0.96;
      font-family: "Space Grotesk", Manrope, sans-serif;
      max-width: 800px;
    }

    .hero h1 em {
      font-style: normal;
      background: linear-gradient(110deg, var(--accent) 20%, var(--accent2));
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .hero-sub {
      color: var(--muted);
      font-size: 16px;
      max-width: 680px;
      line-height: 1.60;
      margin: 0;
    }

    .hero-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      padding-top: 4px;
    }

    .hero-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border-radius: 12px;
      border: 1px solid var(--border);
      padding: 13px 18px;
      font-size: 14px;
      font-weight: 700;
      text-decoration: none;
      color: var(--text);
      background: rgba(255,255,255,0.05);
      transition: border-color 140ms, background 140ms;
    }
    .hero-btn:hover {
      border-color: rgba(255,255,255,0.22);
      background: rgba(255,255,255,0.09);
    }

    .hero-btn.primary {
      color: #021b13;
      border: none;
      background: linear-gradient(135deg, var(--accent), var(--accent3));
    }
    .hero-btn.primary:hover { filter: brightness(1.08); }

    /* ──────────────────── SECTION WRAPPER ──────────────────── */
    .lp-section {
      max-width: 1200px;
      margin: 0 auto;
      padding: 64px 28px;
    }

    .section-label {
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent);
      font-weight: 700;
      margin: 0 0 10px;
    }

    .section-h {
      margin: 0 0 14px;
      font-size: clamp(22px, 3.5vw, 36px);
      letter-spacing: -0.035em;
      line-height: 1.05;
      font-family: "Space Grotesk", Manrope, sans-serif;
    }

    .section-sub {
      color: var(--muted);
      font-size: 15px;
      line-height: 1.55;
      max-width: 680px;
      margin: 0 0 28px;
    }

    /* ──────────────────── PROBLEM CARDS ──────────────────── */
    .card-grid {
      display: grid;
      gap: 12px;
    }
    .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .lp-card {
      border: 1px solid var(--border);
      border-radius: var(--r);
      background: rgba(8, 22, 35, 0.70);
      padding: 20px;
    }

    .lp-card .card-icon {
      font-size: 24px;
      margin-bottom: 10px;
      display: block;
    }

    .lp-card h3 {
      margin: 0 0 8px;
      font-size: 16px;
      letter-spacing: -0.02em;
      font-family: "Space Grotesk", Manrope, sans-serif;
    }

    .lp-card p {
      margin: 0;
      color: var(--muted);
      font-size: 13.5px;
      line-height: 1.50;
    }

    /* ──────────────────── FEATURE ROWS ──────────────────── */
    .feature-list {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .feat {
      border: 1px solid var(--border);
      border-radius: var(--r);
      background: rgba(8, 22, 35, 0.68);
      padding: 18px;
    }

    .feat-title {
      font-size: 14px;
      font-weight: 700;
      font-family: "Space Grotesk", Manrope, sans-serif;
      margin: 0 0 6px;
    }

    .feat p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    /* ──────────────────── DIFF TABLE ──────────────────── */
    .diff-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13.5px;
      margin-top: 28px;
    }
    .diff-table th, .diff-table td {
      padding: 12px 16px;
      text-align: left;
    }
    .diff-table thead tr {
      border-bottom: 1px solid var(--border);
    }
    .diff-table thead th {
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 700;
    }
    .diff-table thead th:last-child {
      color: var(--accent);
    }
    .diff-table tbody tr {
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .diff-table tbody td:first-child {
      color: var(--muted);
    }
    .diff-table tbody td:last-child {
      color: var(--accent3);
      font-weight: 700;
    }

    /* ──────────────────── USER TYPES ──────────────────── */
    .user-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0,1fr));
      gap: 12px;
    }

    .user-card {
      border: 1px solid var(--border);
      border-radius: var(--r);
      background: rgba(8, 22, 35, 0.68);
      padding: 18px;
    }

    .user-card .uc-icon { font-size: 26px; margin-bottom: 8px; display: block; }
    .user-card h3 { margin: 0 0 6px; font-size: 14px; font-family: "Space Grotesk", Manrope, sans-serif; }
    .user-card p  { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

    /* ──────────────────── DEMO SECTION ──────────────────── */
    .demo-section {
      max-width: 1240px;
      margin: 0 auto;
      padding: 0 20px 52px;
    }

    .demo-header {
      text-align: center;
      padding: 0 0 22px;
    }
    .demo-header .section-label { justify-content: center; display: block; }
    .demo-header .section-h { max-width: 600px; margin: 0 auto 10px; }
    .demo-header .section-sub { max-width: 500px; margin: 0 auto; text-align: center; }

    .demo-no-signup {
      text-align: center;
      margin: 10px 0 0;
      font-size: 12px;
      color: var(--muted);
      letter-spacing: 0.03em;
    }

    /* ──────────────────── PRICING ──────────────────── */
    .pricing-section {
      max-width: 1200px;
      margin: 0 auto;
      padding: 64px 28px;
    }

    .plan-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0,1fr));
      gap: 12px;
      margin-top: 32px;
    }

    .plan {
      border: 1px solid var(--border);
      border-radius: var(--r);
      background: rgba(8, 22, 35, 0.70);
      padding: 22px 18px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      position: relative;
    }

    .plan.popular {
      border-color: var(--border-hi);
      background: linear-gradient(165deg, rgba(32,211,179,0.14) 0%, rgba(8,22,35,0.80) 60%);
    }

    .popular-badge {
      position: absolute;
      top: -12px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 10.5px;
      font-weight: 800;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: #02201a;
      background: linear-gradient(135deg, var(--accent), var(--accent3));
      border-radius: 999px;
      padding: 4px 12px;
      white-space: nowrap;
    }

    .plan .tier {
      font-size: 11px;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 700;
    }

    .plan .price-main {
      font-size: 38px;
      letter-spacing: -0.045em;
      font-family: "Space Grotesk", Manrope, sans-serif;
      line-height: 1.05;
      margin: 4px 0;
    }

    .plan .price-period {
      font-size: 12px;
      color: var(--muted);
      font-family: Manrope, sans-serif;
    }

    .plan .plan-desc {
      max-width: 220px;
      margin: 8px 0 12px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.42;
      flex: 1;
    }

    .plan-features {
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 6px;
    }

    .plan-features li {
      font-size: 12.5px;
      color: var(--muted);
      padding-left: 18px;
      position: relative;
    }
    .plan-features li::before {
      content: "✓";
      position: absolute;
      left: 0;
      color: var(--accent);
      font-size: 11px;
      top: 1px;
    }

    .plan-cta {
      margin-top: 16px;
      display: block;
      border-radius: 10px;
      text-align: center;
      padding: 11px;
      font-size: 13px;
      font-weight: 700;
      text-decoration: none;
      border: 1px solid var(--border);
      color: var(--text);
      background: rgba(255,255,255,0.05);
      transition: background 140ms, border-color 140ms;
    }
    .plan-cta:hover {
      border-color: rgba(255,255,255,0.22);
      background: rgba(255,255,255,0.10);
    }
    .plan.popular .plan-cta {
      color: #021b13;
      border: none;
      background: linear-gradient(135deg, var(--accent), var(--accent3));
    }
    .plan.popular .plan-cta:hover { filter: brightness(1.08); }

    /* ──────────────────── FINAL CTA ──────────────────── */
    .final-cta {
      text-align: center;
      padding: 80px 24px 90px;
      max-width: 760px;
      margin: 0 auto;
    }

    .final-cta .section-h {
      font-size: clamp(22px, 3.5vw, 38px);
      margin-bottom: 20px;
    }

    /* ──────────────────── FOOTER ──────────────────── */
    .site-footer {
      border-top: 1px solid var(--border);
      padding: 0 28px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      background: rgba(5, 12, 22, 0.96);
    }

    .workspace-page.theme-light .site-footer {
      background: rgba(220, 236, 255, 0.96);
    }

    .site-footer p {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
    }

    .footer-links {
      display: flex;
      gap: 14px;
    }
    .footer-links a {
      color: var(--muted);
      font-size: 12px;
      text-decoration: none;
    }
    .footer-links a:hover { color: var(--text); }

    /* ──────────────────── APP WRAPPER ──────────────────── */
    .site-main {
      width: 100%;
      min-height: 0;
      margin: 0 auto;
      padding: 10px 14px 0;
      position: relative;
      overflow: hidden;
    }

    #app {
      position: relative;
      width: 100%;
      height: 100%;
      min-height: 0;
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid rgba(122, 154, 196, 0.16);
      box-shadow: 0 24px 70px rgba(0,0,0,0.38);
      background: linear-gradient(180deg, rgba(4, 10, 18, 0.86), rgba(2, 8, 16, 0.95));
    }

    .workspace-page.theme-light #app {
      border-color: rgba(72, 105, 152, 0.24);
      box-shadow: 0 16px 42px rgba(35, 68, 112, 0.20);
      background: linear-gradient(180deg, rgba(232, 242, 255, 0.92), rgba(221, 234, 249, 0.96));
    }

    .canvas-stage {
      position: absolute;
      top: 12px;
      right: 326px;
      bottom: 12px;
      left: 338px;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.10);
      background: linear-gradient(180deg, rgba(8, 17, 29, 0.98), rgba(4, 10, 18, 0.98));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 18px 40px rgba(0,0,0,0.24);
      overflow: hidden;
    }

    .workspace-page.theme-light .canvas-stage {
      border-color: rgba(86, 116, 162, 0.24);
      background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(233, 242, 252, 0.98));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65), 0 12px 26px rgba(42, 72, 120, 0.14);
    }

    .canvas-watermark {
      position: absolute;
      right: 14px;
      bottom: 12px;
      width: clamp(110px, 12vw, 180px);
      height: auto;
      opacity: 0.34;
      filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
      pointer-events: none;
      user-select: none;
      z-index: 6;
    }

    .canvas-action-btn {
      position: absolute;
      top: 12px;
      left: 14px;
      z-index: 7;
      border: 1px solid rgba(126, 236, 255, 0.28);
      background: rgba(6, 20, 34, 0.74);
      color: rgba(223, 248, 255, 0.95);
      font: 600 12px/1.1 "Segoe UI", Tahoma, sans-serif;
      letter-spacing: 0.01em;
      padding: 7px 10px;
      border-radius: 10px;
      cursor: pointer;
      backdrop-filter: blur(6px);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
      transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
    }

    .canvas-action-btn:hover {
      transform: translateY(-1px);
      border-color: rgba(126, 236, 255, 0.5);
      background: rgba(8, 28, 44, 0.84);
    }

    .canvas-action-btn:disabled {
      opacity: 0.62;
      cursor: wait;
      transform: none;
    }

    .canvas-action-btn-secondary {
      left: 234px;
    }

    .canvas-action-btn-tertiary {
      left: 122px;
    }

    .canvas-loading-overlay {
      position: absolute;
      inset: 0;
      z-index: 9;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 22px;
      background: rgba(3, 8, 16, 0.94);
      pointer-events: none;
      opacity: 0;
      transition: opacity 320ms ease;
    }

    .canvas-loading-overlay[aria-hidden="false"] {
      opacity: 1;
    }

    .canvas-loading-card {
      width: min(560px, calc(100% - 28px));
      border: 1px solid rgba(126, 236, 255, 0.26);
      border-radius: 14px;
      background: rgba(8, 18, 31, 0.80);
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
      backdrop-filter: blur(8px);
      padding: 14px 16px;
      display: grid;
      gap: 8px;
    }

    .canvas-loading-title {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(196, 233, 247, 0.86);
    }

    .canvas-loading-state {
      font-size: 14px;
      font-weight: 700;
      color: var(--accent3);
    }

    .canvas-loading-progress {
      width: 100%;
      height: 10px;
      border-radius: 999px;
      border: 1px solid rgba(122, 245, 203, 0.34);
      background: rgba(5, 14, 24, 0.92);
      overflow: hidden;
    }

    .canvas-loading-progress > span {
      display: block;
      width: 0%;
      height: 100%;
      background: linear-gradient(90deg, #20d3b3, #39b8ff);
      transition: width 120ms ease;
    }

    .canvas-loading-percent {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
    }

    .canvas-loading-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 14px;
      font-size: 12px;
      color: var(--muted);
    }

    .canvas-stage.is-import-loading > canvas,
    .canvas-stage.is-import-loading > .canvas-watermark,
    .canvas-stage.is-import-loading > .canvas-action-btn {
      transition: opacity 320ms ease;
    }

    canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
      cursor: grab;
    }

    canvas.dragging { cursor: grabbing; }

    #glCanvas {
      z-index: 3;
    }

    #gridCanvas {
      pointer-events: none;
      z-index: 1;
    }

    .panel {
      position: absolute;
      top: 10px;
      left: 14px;
      bottom: 10px;
      width: 320px;
      max-height: none;
      display: flex;
      flex-direction: column;
      transform: none;
      transition: width 0.25s ease, transform 0.25s ease;
      background: var(--panel);
      backdrop-filter: blur(20px) saturate(150%);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      border-radius: 18px;
      padding: 14px 12px 12px;
      z-index: 10;
    }

    .panel-body {
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      padding-right: 2px;
    }

    .panel-toggle {
      position: absolute;
      top: 12px;
      right: -14px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--bg1);
      border: 1px solid var(--border);
      color: var(--muted);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 11;
      transition: transform 0.25s ease;
    }
    .panel.collapsed .panel-toggle { transform: rotate(180deg); }
    .panel.collapsed .panel-body { display: none; }
    .panel.collapsed {
      width: 56px;
      padding: 10px 10px 10px 12px;
      border-radius: 14px;
      transform: translateX(-6px);
    }
    .panel.collapsed h1 { font-size: 14px; }
    .panel.collapsed .badge { display: none; }

    .titlebar {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 10px;
    }

    .panel h1 {
      margin: 0;
      font-size: 16px;
      line-height: 1.05;
      letter-spacing: -0.03em;
    }

    .subtitle {
      margin: 0 0 12px;
      font-size: 12px;
      line-height: 1.45;
      color: var(--muted);
    }

    .badge {
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      white-space: nowrap;
      color: #071219;
      background: linear-gradient(135deg, var(--accent), #d7fff2);
    }

    .controls {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 10px;
    }

    .platform-topbar {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 8px 0 10px;
    }

    .platform-togglebar {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin: 0 0 10px;
    }

    .platform-topbar .btn,
    .platform-topbar label.btn {
      flex: 1 1 calc(50% - 3px);
      padding: 8px 8px;
      font-size: 11px;
      border-radius: 10px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }

    .platform-togglebar .btn {
      padding: 7px 8px;
      font-size: 11px;
      border-radius: 10px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }

    .toggle-btn.is-on {
      border-color: var(--border-hi);
      background: var(--stat-bg);
      color: var(--accent3);
    }

    .workspace-page.theme-light .toggle-btn.is-on {
      color: var(--accent3);
    }

    .btn,
    label.btn {
      appearance: none;
      border: 1px solid var(--border);
      background: var(--section-bg);
      color: var(--text);
      padding: 9px 10px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 650;
      text-align: center;
      cursor: pointer;
      user-select: none;
      transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }

    .btn:hover,
    label.btn:hover {
      transform: translateY(-1px);
      border-color: var(--border-hi);
      background: var(--stat-bg);
    }

    .btn.primary,
    label.btn.primary {
      color: var(--badge-text);
      border: none;
      background: linear-gradient(135deg, var(--accent), #dbfff5);
    }

    .workspace-page.theme-light .btn.primary,
    .workspace-page.theme-light label.btn.primary {
      background: linear-gradient(135deg, var(--accent), #005f4e);
      color: #fff;
    }

    input[type="file"] { display: none; }

    .url-input {
      grid-column: 1 / -1;
      min-height: 72px;
      resize: vertical;
      border: 1px solid var(--input-border);
      border-radius: 12px;
      background: var(--input-bg);
      color: var(--text);
      padding: 10px 12px;
      font-size: 12px;
      line-height: 1.4;
      font-family: inherit;
    }

    .url-input::placeholder {
      color: var(--muted);
    }

    .url-set-row {
      grid-column: 1 / -1;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .url-set-row .btn {
      flex: 1 1 auto;
      min-width: 86px;
    }

    .set-layout-row {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: auto 1fr auto auto;
      gap: 8px;
      align-items: center;
      margin-top: 2px;
    }

    .import-mode-row {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 8px;
      align-items: center;
      margin-top: 2px;
    }

    .set-layout-label {
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .set-block-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 2;
    }

    .set-block-box {
      position: absolute;
      border: 1px solid hsl(var(--set-hue, 165) 55% 52% / 0.5);
      border-radius: 8px;
      box-shadow: inset 0 0 0 1px rgba(8, 24, 28, 0.35);
      background: hsl(var(--set-hue, 165) 60% 20% / 0.04);
    }

    .set-block-box > span {
      position: absolute;
      top: -22px;
      left: 0;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(7, 22, 30, 0.88);
      border: 1px solid hsl(var(--set-hue, 165) 55% 45% / 0.4);
      color: hsl(var(--set-hue, 165) 80% 78%);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      white-space: nowrap;
    }

    .selection-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 4;
    }

    .thumb-dimension-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 5;
    }

    .thumb-dimension-label {
      position: absolute;
      max-width: calc(100% - 6px);
      padding: 1px 4px;
      border-radius: 5px;
      background: rgba(6, 18, 31, 0.84);
      border: 1px solid rgba(126, 236, 255, 0.22);
      color: rgba(232, 244, 255, 0.92);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.01em;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    }

    .selection-box {
      position: absolute;
      border: 2px solid rgba(255, 222, 120, 0.95);
      border-radius: 7px;
      box-shadow: 0 0 0 1px rgba(30, 20, 5, 0.55), 0 0 18px rgba(255, 204, 102, 0.28);
      background: rgba(255, 215, 120, 0.06);
    }

    .selection-box.primary {
      border-color: rgba(255, 245, 178, 0.98);
      box-shadow: 0 0 0 1px rgba(45, 34, 12, 0.62), 0 0 24px rgba(255, 228, 140, 0.4);
    }

    .selection-count-badge {
      position: absolute;
      left: 0;
      top: 0;
      transform: translate(-50%, -130%);
      pointer-events: none;
      z-index: 6;
      padding: 5px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255, 233, 166, 0.65);
      background: rgba(15, 18, 20, 0.9);
      color: #ffe6a3;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.02em;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
      display: none;
    }

    .rubber-band-rect {
      position: absolute;
      display: none;
      pointer-events: none;
      z-index: 6;
      border: 1.5px dashed rgba(122, 245, 203, 0.85);
      background: rgba(32, 211, 179, 0.07);
      border-radius: 3px;
    }

    .api-import-wrap {
      grid-column: 1 / -1;
      border: 1px solid var(--section-border);
      border-radius: 12px;
      padding: 10px;
      background: var(--section-bg);
    }

    .compact-section {
      grid-column: 1 / -1;
      border: 1px solid var(--section-border);
      border-radius: 12px;
      background: var(--section-bg);
      overflow: hidden;
    }

    .compact-section > summary {
      cursor: pointer;
      list-style: none;
      padding: 9px 10px;
      font-size: 12px;
      font-weight: 700;
      color: var(--accent);
      background: var(--stat-bg);
      border-bottom: 1px solid var(--section-border);
    }

    .compact-section > summary::-webkit-details-marker {
      display: none;
    }

    .compact-section[open] > summary {
      color: var(--text);
    }

    .dataset-tools-wrap {
      grid-column: 1 / -1;
      border: 0;
      border-radius: 0;
      padding: 8px;
      background: transparent;
    }

    .tools-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 7px;
      align-items: center;
    }

    .tool-check {
      font-size: 12px;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 2px 0;
    }

    .api-import-title {
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 8px;
      font-weight: 700;
    }

    .api-import-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .api-input {
      width: 100%;
      border: 1px solid var(--input-border);
      border-radius: 10px;
      background: var(--input-bg);
      color: var(--text);
      padding: 9px 10px;
      font-size: 12px;
      font-family: inherit;
    }

    .api-input::placeholder {
      color: var(--muted);
    }

    #loadSerpBtn {
      grid-column: 1 / -1;
    }

    .url-import-status {
      grid-column: 1 / -1;
      min-height: 16px;
      font-size: 11px;
      color: var(--muted);
      line-height: 1.3;
    }

    .import-progress-panel {
      grid-column: 1 / -1;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(7, 20, 34, 0.62);
      padding: 10px;
      display: none;
      gap: 8px;
    }

    .import-progress-panel[aria-hidden="false"] {
      display: grid;
    }

    .import-progress-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .import-progress-title {
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 700;
    }

    .import-progress-state {
      font-size: 11px;
      font-weight: 700;
      color: var(--accent3);
    }

    .import-progress-bar {
      width: 100%;
      height: 8px;
      border-radius: 999px;
      border: 1px solid rgba(122, 245, 203, 0.28);
      background: rgba(6, 16, 27, 0.9);
      overflow: hidden;
    }

    .import-progress-bar > span {
      display: block;
      width: 0%;
      height: 100%;
      background: linear-gradient(90deg, #20d3b3, #39b8ff);
      transition: width 120ms ease;
    }

    .import-progress-percent {
      margin-top: -3px;
      font-size: 11px;
      color: var(--text);
      font-weight: 700;
    }

    .import-progress-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
    }

    .import-progress-grid div {
      border: 1px solid var(--section-border);
      border-radius: 9px;
      padding: 6px 7px;
      background: var(--stat-bg);
      display: grid;
      gap: 3px;
    }

    .import-progress-grid span {
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .import-progress-grid strong {
      font-size: 12px;
      color: var(--text);
      font-weight: 700;
      letter-spacing: 0.01em;
    }

    .import-progress-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 11px;
      color: var(--muted);
    }

    .import-progress-actions {
      display: flex;
      gap: 7px;
    }

    .import-progress-summary {
      display: none;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 4px 10px;
      padding: 7px 8px;
      border-radius: 8px;
      border: 1px solid var(--section-border);
      background: var(--section-bg);
      font-size: 11px;
      color: var(--muted);
    }

    .import-progress-summary[aria-hidden="false"] {
      display: grid;
    }

    .import-progress-actions .btn {
      flex: 1 1 0;
      padding: 7px 8px;
      font-size: 11px;
    }

    .import-progress-actions .btn[disabled] {
      opacity: 0.55;
      cursor: not-allowed;
      transform: none;
    }

    .url-import-hint {
      grid-column: 1 / -1;
      font-size: 11px;
      color: var(--muted);
      line-height: 1.3;
      margin-top: -2px;
    }

    .url-import-hint code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 11px;
      background: var(--section-bg);
      border: 1px solid var(--section-border);
      padding: 1px 5px;
      border-radius: 6px;
      color: var(--accent3);
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }

    .stat {
      padding: 10px 12px;
      border-radius: 14px;
      background: var(--stat-bg);
      border: 1px solid var(--stat-border);
    }

    .stat .label {
      display: block;
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 4px;
    }

    .stat .value {
      display: block;
      font-size: 15px;
      font-weight: 760;
      letter-spacing: -0.03em;
      color: var(--text);
    }

    .help {
      display: grid;
      gap: 6px;
      font-size: 12px;
      line-height: 1.4;
      color: var(--muted);
    }

    .session-restore-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 10px;
      margin-bottom: 8px;
      border-radius: 12px;
      border: 1px solid rgba(57, 184, 255, 0.38);
      background: linear-gradient(135deg, rgba(10, 30, 55, 0.88), rgba(6, 20, 40, 0.72));
      font-size: 11px;
      color: var(--text);
      flex-wrap: wrap;
    }

    .session-restore-banner strong {
      color: var(--accent2);
    }

    .session-restore-actions {
      display: flex;
      gap: 6px;
      flex-shrink: 0;
    }

    .btn-accent {
      background: var(--accent2);
      color: #020e1c;
      border-color: transparent;
      font-weight: 700;
    }

    .btn-accent:hover {
      background: #7fd3ff;
    }

    .set-blocks-container {
      grid-column: 1 / -1;
      border: 1px solid var(--section-border);
      border-radius: 16px;
      background: var(--section-bg);
      padding: 8px;
      margin-bottom: 10px;
    }

    .set-blocks-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }

    .set-block {
      border: 1px solid hsl(var(--set-hue, 165) 60% 55% / 0.38);
      border-radius: 14px;
      background: linear-gradient(165deg,
        hsl(var(--set-hue, 165) 55% 18% / 0.42),
        hsl(var(--set-hue, 165) 45% 12% / 0.52));
      padding: 8px;
      display: flex;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      transition: background 120ms, border-color 120ms, transform 120ms;
    }

    .workspace-page.theme-light .set-block {
      background: linear-gradient(165deg,
        hsl(var(--set-hue, 165) 60% 94% / 0.80),
        hsl(var(--set-hue, 165) 50% 90% / 0.70));
      border-color: hsl(var(--set-hue, 165) 55% 50% / 0.40);
    }

    .set-block:hover {
      background: linear-gradient(165deg,
        hsl(var(--set-hue, 165) 55% 22% / 0.52),
        hsl(var(--set-hue, 165) 45% 14% / 0.60));
      border-color: hsl(var(--set-hue, 165) 70% 72% / 0.62);
      transform: translateY(-1px);
    }

    .workspace-page.theme-light .set-block:hover {
      background: linear-gradient(165deg,
        hsl(var(--set-hue, 165) 60% 88% / 0.90),
        hsl(var(--set-hue, 165) 50% 84% / 0.80));
      border-color: hsl(var(--set-hue, 165) 60% 42% / 0.60);
    }

    .set-block-header {
      font-size: 10px;
      font-weight: 700;
      color: hsl(var(--set-hue, 165) 80% 80%);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.2;
    }

    .workspace-page.theme-light .set-block-header {
      color: hsl(var(--set-hue, 165) 65% 30%);
    }

    .set-block-count {
      font-size: 9px;
      color: var(--muted);
      line-height: 1.2;
    }

    .set-block-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 4px;
    }

    .set-block-actions .btn {
      padding: 4px 6px;
      font-size: 9.5px;
      border-radius: 8px;
      line-height: 1.15;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .inspector {
      position: absolute;
      top: 10px;
      right: 14px;
      bottom: 10px;
      width: 298px;
      min-height: 0;
      transform: none;
      background: var(--panel);
      backdrop-filter: blur(16px) saturate(130%);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      border-radius: 18px;
      padding: 14px;
      z-index: 10;
      transition: width 0.25s ease, transform 0.2s ease;
    }

    .inspector-body {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      align-items: start;
      min-width: 0;
      min-height: 100%;
      max-height: 100%;
      overflow-y: auto;
      padding-right: 2px;
    }

    .inspector-body > div {
      min-width: 0;
    }

    .inspector-toggle {
      position: absolute;
      top: 12px;
      left: -14px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--bg1);
      border: 1px solid var(--border);
      color: var(--muted);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 11;
      transition: transform 0.25s ease;
    }

    .inspector.collapsed .inspector-toggle { transform: rotate(180deg); }
    .inspector.collapsed .inspector-body { display: none; }
    .inspector.collapsed {
      width: 48px;
      min-height: 0;
      padding: 10px 10px 10px 12px;
      border-radius: 14px;
      transform: translateX(6px);
    }

    .inspector-card {
      border: 1px solid var(--section-border);
      background: var(--stat-bg);
      border-radius: 14px;
      padding: 12px;
      display: grid;
      gap: 10px;
      min-width: 0;
    }

    .inspector-card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .inspector-section-title {
      margin: 2px 0 0;
      font-size: 14px;
      line-height: 1.1;
      letter-spacing: -0.03em;
    }

    .btn-compact {
      padding: 5px 8px;
      font-size: 10px;
      min-width: 0;
    }

    .quick-tools-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .quick-serp-block {
      display: grid;
      gap: 8px;
    }

    .quick-serp-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .quick-serp-grid .btn,
    .quick-serp-grid input:first-child,
    .quick-serp-grid input:nth-child(2) {
      grid-column: 1 / -1;
    }

    .benchmark-history {
      display: grid;
      gap: 8px;
    }

    .benchmark-latest {
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(32, 211, 179, 0.30);
      background: rgba(32, 211, 179, 0.10);
      color: var(--accent3);
      font-size: 11px;
      line-height: 1.35;
      font-weight: 600;
    }

    .benchmark-empty {
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px dashed var(--border);
      color: var(--muted);
      font-size: 11px;
      text-align: center;
    }

    .benchmark-item {
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.03);
      border-radius: 12px;
      padding: 10px;
      display: grid;
      gap: 6px;
    }

    .benchmark-item-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 11px;
    }

    .benchmark-item-title {
      font-weight: 700;
      color: var(--text);
    }

    .benchmark-item-meta,
    .benchmark-item-times {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 4px 10px;
      font-size: 10px;
      color: var(--muted);
    }

    .benchmark-status {
      padding: 3px 7px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border: 1px solid rgba(255,255,255,0.10);
    }

    .benchmark-status.is-complete {
      color: var(--accent3);
      border-color: rgba(32, 211, 179, 0.35);
      background: rgba(32, 211, 179, 0.10);
    }

    .benchmark-status.is-cancelled {
      color: #ffd4a8;
      border-color: rgba(255, 178, 94, 0.35);
      background: rgba(255, 178, 94, 0.10);
    }

    .inspector-detail-grid {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .preview {
      width: 100%;
      height: 160px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: linear-gradient(135deg, rgba(122,245,203,0.18), rgba(123,184,255,0.12));
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .preview .preview-pdf-frame {
      width: 100%;
      height: 100%;
      border: 0;
      background: #020617;
      display: block;
    }

    @media (max-width: 1220px) {
      .canvas-stage {
        right: 292px;
      }

      .inspector {
        width: 264px;
      }


    }

    .preview span {
      font-size: 11px;
      color: var(--muted);
      text-align: center;
      padding: 10px;
      line-height: 1.3;
    }

    .inspector .label {
      font-size: 11px;
      color: var(--muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 4px;
    }

    .inspector h2 {
      margin: 0 0 6px;
      font-size: 15px;
      line-height: 1.2;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .inspector p {
      margin: 0;
      font-size: 12px;
      line-height: 1.4;
      color: var(--muted);
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .ins-lines {
      display: grid;
      gap: 5px;
    }

    .ins-line {
      line-height: 1.35;
      font-size: 12px;
      color: var(--muted);
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .ins-key {
      color: #88c7ff;
      font-weight: 700;
    }

    .ins-value {
      color: #d8ebff;
    }

    .ins-file {
      color: #ffffff;
      font-weight: 700;
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .ins-accent {
      color: #79f2d8;
      font-weight: 700;
    }

    .ins-good {
      color: #7be7ae;
      font-weight: 700;
    }

    .ins-warn {
      color: #ffd56b;
      font-weight: 700;
    }

    .ins-bad {
      color: #ff8f97;
      font-weight: 700;
    }

    .ins-dim {
      color: var(--muted);
    }

    .ins-favorite {
      color: #ff9cc4;
      font-weight: 700;
    }

    .ins-keep {
      color: #89f0bc;
      font-weight: 700;
    }

    .ins-reject {
      color: #ffbb75;
      font-weight: 700;
    }

    .ins-delete {
      color: #ff8f97;
      font-weight: 700;
    }

    .warning {
      position: absolute;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
      z-index: 50;
      background: rgba(3, 6, 10, 0.86);
      backdrop-filter: blur(10px);
    }

    .warning-card {
      max-width: 560px;
      padding: 22px;
      border-radius: 18px;
      background: rgba(13, 18, 28, 0.94);
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: var(--shadow);
    }

    .warning-card h3 {
      margin: 0 0 10px;
      font-size: 20px;
    }

    .warning-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-size: 14px;
    }

    .context-menu {
      position: absolute;
      min-width: 180px;
      background: rgba(10, 16, 24, 0.96);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: var(--shadow);
      padding: 6px;
      z-index: 70;
      display: none;
    }

    .workspace-page.theme-light .context-menu {
      background: rgba(244, 250, 255, 0.98);
      box-shadow: 0 10px 28px rgba(32, 66, 110, 0.18);
    }

    .context-menu button {
      width: 100%;
      border: 0;
      background: transparent;
      color: var(--text);
      text-align: left;
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      line-height: 1.2;
    }

    .context-menu button:hover {
      background: rgba(122, 245, 203, 0.13);
    }

    .preview-modal {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 220ms ease;
    }

    .pm-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(3, 8, 14, 0.90);
      backdrop-filter: blur(8px);
      opacity: 0;
      transition: opacity 260ms ease;
    }

    .pm-shell {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      max-width: min(98vw, 1500px);
      height: 95vh;
      max-height: 95vh;
      width: 100%;
      border: 1px solid rgba(255,255,255,0.13);
      border-radius: 14px;
      overflow: hidden;
      background: rgba(6, 16, 28, 0.97);
      box-shadow: 0 32px 80px rgba(0,0,0,0.7);
      transform: translateY(16px) scale(0.985);
      opacity: 0;
      transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
    }

    .pm-shell::after {
      content: "";
      position: absolute;
      inset: -1px;
      border-radius: 14px;
      pointer-events: none;
      background: linear-gradient(120deg, rgba(67,182,255,0.0) 0%, rgba(67,182,255,0.25) 30%, rgba(122,245,203,0.34) 50%, rgba(67,182,255,0.25) 70%, rgba(67,182,255,0.0) 100%);
      mix-blend-mode: screen;
      opacity: 0;
      transform: translateX(-30%);
    }

    .pm-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      padding: 8px 10px;
      border-bottom: 1px solid rgba(255,255,255,0.09);
      background: rgba(255,255,255,0.03);
      gap: 8px;
      flex-shrink: 0;
      transform: translateY(-8px);
      opacity: 0;
      transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
    }

    .pm-title {
      font-size: 12px;
      color: var(--muted);
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      flex: 1 1 160px;
      min-width: 100px;
    }

    .pm-tools {
      display: flex;
      align-items: center;
      gap: 4px;
      flex: 1 1 auto;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    .pm-tools .pm-btn {
      animation: pmToolStaggerIn 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
      animation-delay: calc(var(--tool-order, 0) * 24ms);
    }

    .pm-btn {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 7px;
      color: var(--text);
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      padding: 5px 10px;
      transition: background 120ms, border-color 120ms, transform 120ms, box-shadow 120ms;
      white-space: nowrap;
    }
    .pm-btn:hover {
      background: rgba(255,255,255,0.13);
      border-color: rgba(255,255,255,0.22);
      transform: translateY(-2px) scale(1.02);
      box-shadow: 0 6px 14px rgba(0,0,0,0.22);
    }
    .pm-btn:active {
      transform: translateY(0);
      box-shadow: none;
    }
    .pm-btn-fit, .pm-btn:is(#pmZoomOutBtn, #pmZoom1Btn, #pmZoomInBtn) { min-width: 32px; text-align: center; }
    .pm-btn-close { color: #ff7070; border-color: rgba(255,100,100,0.2); }
    .pm-btn-close:hover { background: rgba(255,80,80,0.14); border-color: rgba(255,100,100,0.5); }
    .pm-btn:disabled { opacity: 0.5; cursor: default; }

    .pm-save-set-picker {
      display: none;
      align-items: center;
      gap: 4px;
      padding: 2px 4px;
      border: 1px solid rgba(122, 245, 203, 0.34);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(122,245,203,0.11), rgba(255,255,255,0.04));
    }

    .pm-save-set-picker[aria-hidden="false"] {
      display: inline-flex;
      animation: pmToolStaggerIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .pm-btn-save-set {
      min-width: 44px;
      text-align: center;
      border-color: rgba(122, 245, 203, 0.48);
      background: rgba(122,245,203,0.1);
      color: #dafef4;
      padding: 4px 8px;
    }

    .pm-btn-save-set:hover {
      background: rgba(122,245,203,0.18);
      border-color: rgba(122,245,203,0.72);
    }

    .pm-scale-label {
      min-width: 52px;
      font-size: 11px;
      color: var(--muted);
      text-align: center;
      font-weight: 700;
    }

    .pm-scale-slider {
      width: 110px;
      accent-color: #43b6ff;
    }

    .pm-btn-crop-active {
      border-color: rgba(67,182,255,0.58);
      background: rgba(67,182,255,0.17);
    }

    .pm-btn-effect {
      border-color: rgba(122, 245, 203, 0.34);
      background: linear-gradient(180deg, rgba(122,245,203,0.16), rgba(255,255,255,0.05));
      color: #dafef4;
    }

    .pm-btn-effect:hover {
      border-color: rgba(122, 245, 203, 0.55);
      background: linear-gradient(180deg, rgba(122,245,203,0.24), rgba(255,255,255,0.08));
    }

    .pm-btn-anim {
      border-color: rgba(255, 196, 88, 0.38);
      background: linear-gradient(180deg, rgba(255,196,88,0.2), rgba(255,255,255,0.06));
      color: #ffeac2;
    }

    .pm-btn-anim:hover {
      border-color: rgba(255, 196, 88, 0.66);
      background: linear-gradient(180deg, rgba(255,196,88,0.3), rgba(255,255,255,0.1));
    }

    .pm-btn.is-working {
      position: relative;
      border-color: rgba(122, 245, 203, 0.7);
      background: linear-gradient(180deg, rgba(122,245,203,0.28), rgba(255,255,255,0.10));
      color: #ffffff;
      animation: pmToolPulse 980ms ease-in-out infinite;
      padding-right: 24px;
    }

    .pm-btn.is-working::after {
      content: "";
      position: absolute;
      right: 8px;
      top: 50%;
      width: 10px;
      height: 10px;
      margin-top: -5px;
      border: 2px solid rgba(255,255,255,0.28);
      border-top-color: rgba(255,255,255,0.95);
      border-radius: 50%;
      animation: pmToolSpin 620ms linear infinite;
    }

    .pm-divider {
      width: 1px;
      height: 20px;
      background: rgba(255,255,255,0.12);
      margin: 0 2px;
    }

    .pm-viewport {
      flex: 1;
      overflow: hidden;
      position: relative;
      cursor: grab;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background:
        repeating-conic-gradient(rgba(255,255,255,0.03) 0% 25%, transparent 0% 50%)
        0 0 / 20px 20px;
      animation: pmBgDrift 22s linear infinite;
    }

    .pm-viewport.grabbing { cursor: grabbing; }

    .pm-viewport img {
      position: absolute;
      transform-origin: 0 0;
      max-width: none;
      max-height: none;
      border-radius: 4px;
      image-rendering: -webkit-optimize-contrast;
      image-rendering: crisp-edges;
      user-select: none;
      pointer-events: none;
    }

    .pm-viewport .pm-pdf-frame {
      width: 100%;
      height: 100%;
      border: 0;
      background: #020617;
      display: block;
    }

    .pm-viewport img.pm-live-anim-pulse {
      animation: pmImagePulseLive 1300ms ease-in-out infinite;
    }

    .pm-viewport img.pm-live-anim-drift {
      animation: pmImageDriftLive 1800ms ease-in-out infinite;
    }

    .pm-viewport img.pm-live-anim-orbit {
      animation: pmImageOrbitLive 2100ms linear infinite;
    }

    .pm-crop-box {
      position: absolute;
      z-index: 2;
      border: 1px solid rgba(67,182,255,0.95);
      box-shadow: inset 0 0 0 9999px rgba(0,0,0,0.38);
      pointer-events: none;
      display: none;
    }

    .pm-float-close {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 3;
      background: rgba(3, 8, 14, 0.82);
      border: 1px solid rgba(255,255,255,0.22);
      color: var(--text);
      border-radius: 999px;
      padding: 6px 10px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
    }

    .pm-float-close:hover {
      background: rgba(255,255,255,0.18);
      border-color: rgba(255,255,255,0.32);
    }

    .pm-info {
      font-size: 11px;
      color: var(--muted);
      padding: 5px 12px;
      border-top: 1px solid rgba(255,255,255,0.07);
      text-align: center;
      flex-shrink: 0;
    }

    .preview-modal[aria-hidden="false"] {
      opacity: 1;
      pointer-events: auto;
    }

    .preview-modal[aria-hidden="false"] .pm-backdrop {
      opacity: 1;
    }

    .preview-modal[aria-hidden="false"] .pm-shell {
      transform: translateY(0) scale(1);
      opacity: 1;
    }

    .preview-modal[aria-hidden="false"] .pm-toolbar {
      transform: translateY(0);
      opacity: 1;
      transition-delay: 45ms;
    }

    .preview-modal.pm-enter[aria-hidden="false"] .pm-shell {
      animation: pmShellEnter 460ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .preview-modal.pm-enter[aria-hidden="false"] .pm-toolbar {
      animation: pmToolbarEnter 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .preview-modal.pm-enter[aria-hidden="false"] .pm-shell::after {
      animation: pmShellGlowSweep 820ms ease-out;
    }

    @keyframes pmBgDrift {
      0% { background-position: 0 0; }
      100% { background-position: 120px 120px; }
    }

    @keyframes pmShellEnter {
      0% {
        transform: translateY(22px) scale(0.97);
        opacity: 0;
      }
      60% {
        transform: translateY(-2px) scale(1.003);
        opacity: 1;
      }
      100% {
        transform: translateY(0) scale(1);
        opacity: 1;
      }
    }

    @keyframes pmToolbarEnter {
      0% {
        transform: translateY(-14px);
        opacity: 0;
      }
      100% {
        transform: translateY(0);
        opacity: 1;
      }
    }

    @keyframes pmShellGlowSweep {
      0% {
        opacity: 0;
        transform: translateX(-35%);
      }
      20% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: translateX(35%);
      }
    }

    @keyframes pmToolStaggerIn {
      0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes pmToolPulse {
      0% {
        box-shadow: 0 0 0 0 rgba(122,245,203,0.0);
      }
      50% {
        box-shadow: 0 0 0 6px rgba(122,245,203,0.16);
      }
      100% {
        box-shadow: 0 0 0 0 rgba(122,245,203,0.0);
      }
    }

    @keyframes pmToolSpin {
      to { transform: rotate(360deg); }
    }

    @keyframes pmImagePulseLive {
      0%, 100% { filter: saturate(1) brightness(1); }
      50% { filter: saturate(1.25) brightness(1.08); }
    }

    @keyframes pmImageDriftLive {
      0% { filter: hue-rotate(0deg) contrast(1); }
      50% { filter: hue-rotate(18deg) contrast(1.08); }
      100% { filter: hue-rotate(0deg) contrast(1); }
    }

    @keyframes pmImageOrbitLive {
      0% { filter: drop-shadow(0 0 0 rgba(255,196,88,0.0)); }
      25% { filter: drop-shadow(3px 0 5px rgba(255,196,88,0.3)); }
      50% { filter: drop-shadow(0 3px 6px rgba(255,196,88,0.28)); }
      75% { filter: drop-shadow(-3px 0 5px rgba(255,196,88,0.3)); }
      100% { filter: drop-shadow(0 0 0 rgba(255,196,88,0.0)); }
    }

    .operation-modal {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      background: transparent;
      z-index: 10000;
    }

    .om-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      cursor: pointer;
    }

    .om-shell {
      position: relative;
      background: var(--bg1);
      border: 1px solid var(--border-hi);
      border-radius: 12px;
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
      display: flex;
      flex-direction: column;
      width: 90%;
      max-width: 480px;
      max-height: 80vh;
      overflow: hidden;
    }

    .om-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
    }

    .om-title {
      margin: 0;
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }

    .om-close-btn {
      background: none;
      border: none;
      font-size: 18px;
      color: var(--muted);
      cursor: pointer;
      padding: 4px;
      margin: -4px;
      transition: color 150ms;
    }

    .om-close-btn:hover {
      color: var(--text);
    }

    .om-body {
      padding: 20px 20px;
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .om-control {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .om-control label {
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
    }

    .om-select {
      padding: 8px 12px;
      font-size: 13px;
      background: var(--bg0);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text);
      font-family: inherit;
    }

    .om-select:focus {
      outline: none;
      border-color: var(--accent3);
      box-shadow: 0 0 0 2px rgba(32, 211, 179, 0.2);
    }

    .om-info {
      font-size: 12px;
      color: var(--muted);
      padding: 10px;
      background: rgba(0, 0, 0, 0.1);
      border-radius: 6px;
      line-height: 1.4;
    }

    .om-check-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 6px;
      max-height: 220px;
      overflow-y: auto;
      padding: 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg0);
    }

    .om-check-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--text);
      padding: 4px 2px;
      cursor: pointer;
    }

    .om-check-item input[type="checkbox"] {
      accent-color: var(--accent3);
      cursor: pointer;
    }

    .om-progress {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 8px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: rgba(0, 0, 0, 0.15);
    }

    .om-progress-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11px;
      color: var(--muted);
      gap: 8px;
    }

    .om-progress-track {
      position: relative;
      width: 100%;
      height: 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .om-progress-fill {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, #0ec9aa 0%, #65e6cf 55%, #b4f8e9 100%);
      box-shadow: 0 0 12px rgba(35, 232, 193, 0.35);
      transition: width 140ms ease-out;
    }

    .om-footer {
      padding: 12px 20px 16px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      flex-shrink: 0;
    }

    .om-btn {
      padding: 8px 16px;
      font-size: 12px;
      font-weight: 600;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: background 150ms, color 150ms;
    }

    .om-btn-cancel {
      background: var(--bg1);
      color: var(--muted);
      border: 1px solid var(--border);
    }

    .om-btn-cancel:hover {
      background: var(--bg0);
      color: var(--text);
    }

    .om-btn-execute {
      background: var(--accent3);
      color: var(--bg0);
    }

    .om-btn-execute:hover {
      filter: brightness(1.12);
    }

    .om-btn-execute:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .operation-modal[aria-hidden="false"] { display: flex; }

    /* ── Import Preview Modal ── */
    .import-preview-modal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 2100;
      align-items: center;
      justify-content: center;
    }
    .import-preview-modal[aria-hidden="false"] { display: flex; }
    .ipm-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
    }
    .ipm-shell {
      position: relative;
      background: var(--bg1);
      border: 1px solid var(--border);
      border-radius: 10px;
      width: 580px;
      max-width: 96vw;
      max-height: 82vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
    .ipm-header {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 14px 16px 12px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .ipm-title-group { flex: 1; min-width: 0; }
    .ipm-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin: 0;
    }
    .ipm-source {
      font-size: 11px;
      color: var(--muted);
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      margin-top: 2px;
    }
    .ipm-close-btn {
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-size: 16px;
      padding: 0;
      flex-shrink: 0;
      line-height: 1;
    }
    .ipm-close-btn:hover { color: var(--text); }
    .ipm-body {
      flex: 1;
      overflow-y: auto;
      padding: 14px 16px 10px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-height: 0;
    }
    .ipm-summary-row {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }
    .ipm-stat {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }
    .ipm-stat-val {
      font-size: 24px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.05;
    }
    .ipm-stat-key {
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-top: 1px;
    }
    .ipm-stat--warn .ipm-stat-val { color: #f5a623; }
    .ipm-formats-row {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }
    .ipm-filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      width: 100%;
      margin-bottom: 6px;
    }
    .ipm-filter-btn {
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.03);
      color: var(--muted);
      font-size: 10px;
      line-height: 1;
      border-radius: 999px;
      padding: 5px 9px;
      cursor: pointer;
    }
    .ipm-filter-btn.is-on {
      background: rgba(67,182,255,0.16);
      border-color: rgba(67,182,255,0.35);
      color: var(--text);
    }
    .ipm-format-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      width: 100%;
    }
    .ipm-fmt-badge {
      font-size: 11px;
      background: rgba(255,255,255,0.05);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 3px 8px;
      color: var(--muted);
    }
    .ipm-fmt-badge strong { color: var(--text); font-weight: 600; }
    .ipm-skipped-row {
      font-size: 11px;
      color: var(--muted);
      background: rgba(245, 166, 35, 0.07);
      border: 1px solid rgba(245, 166, 35, 0.22);
      border-radius: 5px;
      padding: 6px 10px;
      line-height: 1.5;
    }
    .ipm-skip-label { color: #f5a623; font-weight: 600; }
    .ipm-capacity-row {
      font-size: 11px;
      color: #f5a623;
      background: rgba(245, 166, 35, 0.07);
      border: 1px solid rgba(245, 166, 35, 0.22);
      border-radius: 5px;
      padding: 6px 10px;
    }
    .ipm-list-wrap {
      display: flex;
      flex-direction: column;
      min-height: 0;
      flex: 1;
    }
    .ipm-list-header {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
      margin-bottom: 5px;
    }
    .ipm-list {
      list-style: none;
      margin: 0;
      padding: 0;
      overflow-y: auto;
      max-height: 240px;
      border: 1px solid var(--border);
      border-radius: 6px;
    }
    .ipm-list-item {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 5px 10px;
      font-size: 11px;
      border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    .ipm-list-thumb-wrap {
      width: 28px;
      height: 28px;
      border-radius: 5px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(15,23,42,0.55);
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .ipm-list-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .ipm-list-thumb-wrap--kind {
      font-size: 8px;
      letter-spacing: 0.04em;
      font-weight: 700;
      color: var(--muted);
    }
    .ipm-list-item:last-child { border-bottom: none; }
    .ipm-list-item:nth-child(even) { background: rgba(255,255,255,0.02); }
    .ipm-list-name {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--text);
    }
    .ipm-list-path {
      font-size: 10px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 160px;
      flex-shrink: 0;
    }
    .ipm-list-size {
      color: var(--muted);
      font-size: 10px;
      flex-shrink: 0;
      text-align: right;
      min-width: 44px;
    }
    .ipm-list-overflow {
      font-size: 11px;
      color: var(--muted);
      text-align: center;
      padding: 6px 0 2px;
    }
    .ipm-footer {
      display: flex;
      gap: 8px;
      padding: 12px 16px;
      border-top: 1px solid var(--border);
      justify-content: flex-end;
      flex-shrink: 0;
    }
    .ipm-btn {
      font-size: 12px;
      font-weight: 600;
      padding: 7px 18px;
      border-radius: 6px;
      cursor: pointer;
      border: none;
      transition: background 0.12s;
    }
    .ipm-btn-cancel {
      background: rgba(255,255,255,0.07);
      color: var(--muted);
    }
    .ipm-btn-cancel:hover { background: rgba(255,255,255,0.12); color: var(--text); }
    .ipm-btn-import {
      background: #27ae60;
      color: #fff;
    }
    .ipm-btn-import:hover { background: #2ecc71; }
    .ipm-btn-import.ipm-btn--warn { background: #e67e22; }
    .ipm-btn-import.ipm-btn--warn:hover { background: #f39c12; }

    /* ── Canvas Empty State ── */
    .canvas-empty-state {
      position: absolute;
      inset: 0;
      z-index: 20;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: var(--bg0);
      gap: 10px;
      pointer-events: auto;
      transition: opacity 0.25s ease;
    }
    .canvas-empty-state.ces-hidden {
      opacity: 0;
      pointer-events: none;
    }
    .canvas-empty-state.ces-gone { display: none; }
    .ces-icon { color: var(--accent); opacity: 0.7; margin-bottom: 6px; }
    .ces-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      margin: 0;
      text-align: center;
    }
    .ces-desc {
      font-size: 13px;
      color: var(--muted);
      margin: 0;
      text-align: center;
      max-width: 340px;
      line-height: 1.5;
    }
    .ces-actions {
      display: flex;
      gap: 10px;
      margin-top: 10px;
    }
    .ces-btn-primary {
      background: var(--accent);
      color: #000;
      font-size: 13px;
      font-weight: 700;
      padding: 10px 24px;
      border: none;
      border-radius: 7px;
      cursor: pointer;
      transition: opacity 0.15s;
    }
    .ces-btn-primary:hover { opacity: 0.85; }
    .ces-btn-secondary {
      background: rgba(255,255,255,0.07);
      color: var(--text);
      font-size: 13px;
      font-weight: 600;
      padding: 10px 20px;
      border: 1px solid var(--border);
      border-radius: 7px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .ces-btn-secondary:hover { background: rgba(255,255,255,0.12); }
    .ces-hint {
      font-size: 11px;
      color: var(--muted);
      margin: 0;
      opacity: 0.6;
    }
    .canvas-empty-state.ces-drag-over {
      outline: 2px dashed var(--accent);
      outline-offset: -12px;
    }
    .canvas-empty-state.ces-drag-over .ces-title { color: var(--accent); }

    /* ── Workflow Steps ── */
    .workflow-steps {
      display: flex;
      align-items: center;
      padding: 14px 0 8px;
    }
    .wf-step {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      flex: 1;
    }
    .wf-num {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      background: rgba(255,255,255,0.06);
      color: var(--muted);
      transition: background 0.2s, color 0.2s;
    }
    .wf-label {
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      transition: color 0.2s;
    }
    .wf-connector {
      flex: 1;
      height: 1px;
      background: var(--border);
      margin-bottom: 18px;
      transition: background 0.2s;
    }
    .wf-step--active .wf-num { background: var(--accent); color: #011a14; }
    .wf-step--active .wf-label { color: var(--accent); font-weight: 700; }
    .wf-step--done .wf-num { background: rgba(39,174,96,0.18); color: #27ae60; }
    .wf-step--done .wf-label { color: #27ae60; }
    .wf-step--pending .wf-num { opacity: 0.4; }
    .wf-step--pending .wf-label { opacity: 0.4; }
    .workflow-hint {
      font-size: 11px;
      color: var(--muted);
      margin: 0 0 10px;
      line-height: 1.4;
      transition: opacity 0.2s;
    }

    @media (max-width: 760px) {
      .workspace-page {
        grid-template-rows: auto minmax(0, 1fr) 46px;
      }
      .site-header {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 8px;
        height: auto;
        padding: 12px 14px;
      }
      .workspace-summary {
        justify-items: start;
        text-align: left;
      }
      .workspace-summary-note {
        white-space: normal;
      }
      .header-right {
        width: 100%;
        justify-content: flex-start;
      }
      .nav-links { display: none; }
      .hero { padding: 40px 16px 28px; }
      .lp-section { padding: 40px 16px; }
      .card-grid-3,
      .feature-list,
      .user-grid,
      .plan-grid { grid-template-columns: 1fr; }
      .card-grid-2 { grid-template-columns: 1fr; }
      .pricing-section { padding: 40px 16px; }
      .demo-section { padding: 0 8px 40px; }
      .final-cta { padding: 50px 16px 60px; }
      .site-main {
        padding: 8px;
      }
      .canvas-stage {
        top: 8px;
        right: 8px;
        bottom: 8px;
        left: 8px;
      }
      .panel {
        left: 10px;
        top: 10px;
        bottom: auto;
        width: calc(100vw - 20px);
        max-height: calc(100% - 20px);
        transform: none;
      }
      .panel.collapsed {
        width: 56px;
      }
      .inspector {
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 10px;
        width: auto;
        min-height: 0;
        transform: none;
      }
      .platform-topbar { display: flex; flex-wrap: wrap; }
      .platform-togglebar { grid-template-columns: 1fr 1fr 1fr; }
      .pm-shell { height: 100vh; max-height: 100vh; border-radius: 0; }
      .pm-toolbar { padding: 6px 8px; }
      .pm-btn { font-size: 11px; padding: 4px 8px; }
      .pm-divider { display: none; }
      .pm-scale-slider { width: 92px; }
    }

    /* ──────────────────── SIMPLE / ADVANCED MODE ──────────────────── */
    body.simple-mode [data-adv="true"] { display: none !important; }

    .simple-scan-row {
      margin: 8px 0 0;
    }
    .simple-scan-row .btn {
      width: 100%;
    }
    .simple-export-row {
      display: flex;
      gap: 8px;
      margin: 6px 0 0;
    }
    .simple-export-row .btn {
      flex: 1;
    }
    .btn-export-kept {
      background: rgba(32, 211, 179, 0.12) !important;
      border-color: rgba(32, 211, 179, 0.35) !important;
      color: var(--accent) !important;
    }
    .btn-export-kept:hover {
      background: rgba(32, 211, 179, 0.22) !important;
    }
    .btn.primary-alt {
      background: rgba(57, 184, 255, 0.12);
      border-color: rgba(57, 184, 255, 0.35);
      color: var(--accent2);
    }
    .btn.primary-alt:hover {
      background: rgba(57, 184, 255, 0.22);
    }

    /* Mode toggle button in header */
    .header-mode-btn {
      font-size: 11px !important;
      padding: 4px 10px !important;
      border-radius: 6px !important;
      border: 1px solid var(--border) !important;
      background: var(--section-bg) !important;
      color: var(--muted) !important;
      letter-spacing: 0.03em;
    }
    .header-mode-btn:hover {
      color: var(--text) !important;
      border-color: var(--border-hi) !important;
    }
    body.advanced-mode .header-mode-btn {
      color: var(--accent) !important;
      border-color: rgba(32, 211, 179, 0.4) !important;
    }

    /* ──────────────────── REVIEW BAR ──────────────────── */
    .review-bar {
      margin-top: 10px;
      padding: 10px;
      background: var(--section-bg);
      border: 1px solid var(--section-border);
      border-radius: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .review-bar-head {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .review-bar-label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
      white-space: nowrap;
    }
    .review-filter-row {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }
    .review-filter-btn {
      font-size: 11px !important;
      padding: 3px 8px !important;
    }
    .review-filter-btn.is-on {
      background: rgba(32,211,179,0.15) !important;
      border-color: rgba(32,211,179,0.4) !important;
      color: var(--accent) !important;
    }
    .review-nav-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .review-counter {
      flex: 1;
      text-align: center;
      font-size: 12px;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
    }
    .review-status-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      gap: 6px;
    }
    .review-status-btn {
      font-size: 12px !important;
      padding: 6px 4px !important;
      font-weight: 600 !important;
      text-align: center;
    }
    .review-keep  { border-color: rgba(52,211,153,0.4) !important; color: #34d399 !important; }
    .review-keep:hover  { background: rgba(52,211,153,0.12) !important; }
    .review-fav   { border-color: rgba(251,191,36,0.4) !important;  color: #fbbf24 !important; }
    .review-fav:hover   { background: rgba(251,191,36,0.1) !important; }
    .review-reject { border-color: rgba(248,113,113,0.4) !important; color: #f87171 !important; }
    .review-reject:hover { background: rgba(248,113,113,0.1) !important; }
    .review-delete { border-color: rgba(156,163,175,0.3) !important; color: var(--muted) !important; }
    .review-delete:hover { background: rgba(156,163,175,0.08) !important; }

    .cleanup-row {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      padding-top: 8px;
      border-top: 1px solid var(--section-border);
      margin-top: 2px;
    }
    .cleanup-label {
      font-size: 11px;
      color: var(--muted);
      white-space: nowrap;
    }
    .btn-cleanup {
      font-size: 11px !important;
      padding: 4px 8px !important;
      border-color: rgba(248,113,113,0.25) !important;
      color: #f87171 !important;
      opacity: 0.8;
    }
    .btn-cleanup:hover {
      background: rgba(248,113,113,0.1) !important;
      border-color: rgba(248,113,113,0.5) !important;
      opacity: 1;
    }

    /* ── Simple search row ── */
    .simple-search-row { margin: 6px 0 0; }
    .simple-search-row .api-input { width: 100%; box-sizing: border-box; }

    /* ── Clickable stat tiles ── */
    .stat--clickable { cursor: pointer; transition: background 0.15s; }
    .stat--clickable:hover { background: rgba(32,211,179,0.08); border-radius: 8px; }

    /* ── Import panel state-driven visibility ── */
    #importProgressPanel[data-state="complete"] .import-progress-bar,
    #importProgressPanel[data-state="complete"] .import-progress-percent,
    #importProgressPanel[data-state="complete"] .import-progress-grid,
    #importProgressPanel[data-state="complete"] .import-progress-meta,
    #importProgressPanel[data-state="complete"] .import-progress-summary,
    #importProgressPanel[data-state="complete"] #importPauseBtn,
    #importProgressPanel[data-state="complete"] #importCancelBtn,
    #importProgressPanel[data-state="cancelled"] .import-progress-bar,
    #importProgressPanel[data-state="cancelled"] .import-progress-percent,
    #importProgressPanel[data-state="cancelled"] .import-progress-grid,
    #importProgressPanel[data-state="cancelled"] .import-progress-meta,
    #importProgressPanel[data-state="cancelled"] .import-progress-summary,
    #importProgressPanel[data-state="cancelled"] #importPauseBtn,
    #importProgressPanel[data-state="cancelled"] #importCancelBtn { display: none !important; }

    #importProgressPanel:not([data-state="complete"]):not([data-state="cancelled"]) .import-complete-summary { display: none; }

    .import-complete-summary {
      font-size: 12px;
      color: var(--accent);
      padding: 4px 0 2px;
    }

    /* ── Inspector copy button ── */
    .ins-copy-btn {
      background: none;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 4px;
      color: var(--muted);
      cursor: pointer;
      font-size: 11px;
      padding: 1px 5px;
      margin-right: 4px;
      vertical-align: middle;
      line-height: 1.2;
    }
    .ins-copy-btn:hover { color: var(--accent); border-color: var(--accent); }

    /* ── Inspector quick-review buttons ── */
    .inspect-quick-review {
      display: flex;
      gap: 6px;
      margin-top: 10px;
    }
    .inspect-quick-review .btn { flex: 1; font-size: 11px !important; padding: 5px 4px !important; }

    /* ── Inspector stacked layout cleanup ── */
    #inspectTitle {
      margin: 0 0 6px;
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      letter-spacing: 0.04em;
      text-transform: uppercase;
      line-height: 1.3;
    }
    #inspectBody {
      margin: 0;
      font-size: 12px;
    }
    .inspector-detail-grid > div {
      min-width: 0;
    }
