  /* ========================================
   * AI-PDF 比較解析システム
   * Google-inspired Business Light Theme
   * Typography: Outfit + DM Sans + Noto Sans JP
   * ======================================== */

  @import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

  /* --- Reset --- */
  *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  :root {
    /* Core palette — inspired by Google but with editorial sharpness */
    --white: #ffffff;
    --surface: #f8f9fa;
    --surface-dim: #f1f3f4;
    --surface-container: #e8eaed;
    --border: #dadce0;
    --border-soft: #e8eaed;

    /* Text hierarchy */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --text-disabled: #bdc1c6;

    /* Brand */
    --blue-600: #1a73e8;
    --blue-500: #4285f4;
    --blue-100: #e8f0fe;
    --blue-50: #f0f5ff;
    --green-600: #1e8e3e;
    --green-100: #e6f4ea;
    --green-50: #f0faf3;
    --yellow-600: #f9ab00;
    --yellow-100: #fef7e0;
    --red-600: #d93025;
    --red-100: #fce8e6;
    --red-50: #fef0ee;

    /* Elevation system */
    --shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-2: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --shadow-3: 0 4px 8px 0 rgba(60, 64, 67, 0.2), 0 6px 20px 4px rgba(60, 64, 67, 0.12);
    --shadow-hover: 0 1px 3px 1px rgba(60, 64, 67, 0.2), 0 2px 8px 4px rgba(60, 64, 67, 0.1);

    /* Spacing */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 100px;

    /* Motion */
    --ease-standard: cubic-bezier(0.2, 0, 0, 1);
    --ease-decel: cubic-bezier(0, 0, 0, 1);
    --ease-accel: cubic-bezier(0.3, 0, 1, 1);
    --duration-short: 150ms;
    --duration-medium: 300ms;
    --duration-long: 500ms;
  }

  html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
  }

  /* --- Subtle background pattern --- */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
      radial-gradient(circle at 15% 10%, rgba(66, 133, 244, 0.04) 0%, transparent 50%),
      radial-gradient(circle at 85% 80%, rgba(30, 142, 62, 0.03) 0%, transparent 50%),
      radial-gradient(circle at 50% 50%, rgba(249, 171, 0, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
  }

  /* --- App Shell --- */
  .app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px 48px;
  }

  /* --- Top Bar --- */
  .app-header {
    width: 100%;
    max-width: 960px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0;
    animation: fadeIn var(--duration-long) var(--ease-standard);
  }

  .app-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--blue-500) 0%, #34a853 50%, #fbbc04 75%, #ea4335 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }

  .app-logo::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--white);
    border-radius: calc(var(--radius-sm) - 2px);
  }

  .app-logo-inner {
    position: relative;
    z-index: 1;
    font-size: 18px;
    line-height: 1;
  }

  .app-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
  }

  .app-title span {
    color: var(--text-tertiary);
    font-weight: 400;
    margin-left: 2px;
  }

  /* --- Main Card --- */
  .main-card {
    width: 100%;
    max-width: 640px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    padding: 0;
    overflow: hidden;
    animation: cardEnter var(--duration-long) var(--ease-decel) 0.15s both;
  }

  @keyframes cardEnter {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* --- Card Header with step indicator --- */
  .card-header {
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--white);
  }

  /* --- Step Indicator (horizontal stepper — Google style) --- */
  .step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .step-item {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-disabled);
    transition: all var(--duration-medium) var(--ease-standard);
    flex-shrink: 0;
    background: var(--white);
  }

  .step-dot.active {
    border-color: var(--blue-600);
    background: var(--blue-600);
    color: var(--white);
    box-shadow: 0 0 0 4px var(--blue-100);
  }

  .step-dot.completed {
    border-color: var(--green-600);
    background: var(--green-600);
    color: var(--white);
  }

  .step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    white-space: nowrap;
    transition: color var(--duration-medium) var(--ease-standard);
  }

  .step-item.active .step-label { color: var(--blue-600); font-weight: 600; }
  .step-item.completed .step-label { color: var(--green-600); }

  .step-line {
    width: 48px;
    height: 2px;
    background: var(--border);
    margin: 0 4px;
    flex-shrink: 0;
    transition: background var(--duration-medium) var(--ease-standard);
    border-radius: 1px;
  }

  .step-line.completed {
    background: var(--green-600);
  }

  /* --- Card Body --- */
  .card-body {
    padding: 32px;
  }

  /* --- Screens --- */
  .screen {
    display: none;
    animation: screenEnter var(--duration-medium) var(--ease-decel);
  }

  .screen.active {
    display: block;
  }

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

  /* --- Select Screen --- */
  .select-area {
    text-align: center;
  }

  .select-illustration {
    width: 160px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Stacked document illustration */
  .doc-stack {
    position: relative;
    width: 72px;
    height: 88px;
  }

  .doc-page {
    position: absolute;
    width: 64px;
    height: 80px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: transform var(--duration-medium) var(--ease-standard);
  }

  .doc-page::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10px;
    right: 10px;
    height: 3px;
    background: var(--surface-container);
    border-radius: 2px;
  }

  .doc-page::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 10px;
    right: 18px;
    height: 3px;
    background: var(--surface-container);
    border-radius: 2px;
  }

  .doc-page:nth-child(1) {
    transform: rotate(-6deg) translate(-4px, 2px);
    box-shadow: var(--shadow-1);
  }

  .doc-page:nth-child(2) {
    transform: rotate(3deg) translate(4px, -2px);
    box-shadow: var(--shadow-1);
    border-color: var(--blue-500);
  }

  .doc-page:nth-child(2)::before {
    background: var(--blue-100);
  }

  .doc-stack .compare-badge {
    position: absolute;
    bottom: -6px;
    right: -12px;
    width: 28px;
    height: 28px;
    background: var(--blue-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-1);
    z-index: 2;
    border: 2px solid var(--white);
  }

  .select-area:hover .doc-page:nth-child(1) {
    transform: rotate(-8deg) translate(-8px, 2px);
  }

  .select-area:hover .doc-page:nth-child(2) {
    transform: rotate(5deg) translate(8px, -2px);
  }

  .select-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
  }

  .select-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
  }

  .select-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .select-or {
    font-size: 13px;
    color: var(--text-tertiary);
    position: relative;
  }

  /* --- Buttons --- */
  .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--blue-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-short) var(--ease-standard);
    letter-spacing: 0.1px;
    height: 40px;
    position: relative;
    overflow: hidden;
  }

  .btn-primary:hover {
    background: #1668d0;
    box-shadow: var(--shadow-hover);
  }

  .btn-primary:active {
    background: #1558b0;
  }

  .btn-primary:disabled {
    background: var(--surface-container);
    color: var(--text-disabled);
    cursor: default;
    box-shadow: none;
  }

  .btn-primary .btn-icon {
    font-size: 18px;
    line-height: 1;
  }

  /* Large variant for CTA */
  .btn-primary.btn-lg {
    height: 48px;
    padding: 12px 32px;
    font-size: 15px;
    gap: 10px;
  }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--blue-600);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-short) var(--ease-standard);
    height: 40px;
  }

  .btn-secondary:hover {
    background: var(--blue-50);
    border-color: var(--blue-100);
  }

  .btn-secondary .btn-icon {
    font-size: 18px;
    line-height: 1;
  }

  .btn-success {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: var(--green-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-short) var(--ease-standard);
    text-decoration: none;
    height: 48px;
  }

  .btn-success:hover {
    background: #1a7d36;
    box-shadow: var(--shadow-hover);
  }

  .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--blue-600);
    font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--duration-short) var(--ease-standard);
  }

  .btn-text:hover {
    background: var(--blue-50);
  }

  /* --- Selected Files --- */
  .selected-files {
    margin-top: 24px;
    text-align: left;
    border-top: 1px solid var(--border-soft);
    padding-top: 20px;
  }

  .selected-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .selected-files-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .selected-files-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-600);
    background: var(--blue-100);
    padding: 2px 10px;
    border-radius: var(--radius-full);
  }

  .file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--duration-short) var(--ease-standard);
    animation: fileSlideIn var(--duration-medium) var(--ease-decel);
  }

  @keyframes fileSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .file-item:hover {
    background: var(--surface);
  }

  .file-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: #f0e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
  }

  .file-icon::before {
    content: 'PDF';
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: #c5221f;
    letter-spacing: 0.3px;
  }

  .file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
  }

  .file-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-short) var(--ease-standard);
    flex-shrink: 0;
  }

  .file-remove:hover {
    background: var(--red-100);
    color: var(--red-600);
  }

  /* --- Action Buttons Row --- */
  .action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    flex-wrap: wrap;
  }

  .action-buttons .spacer {
    flex: 1;
  }

  /* --- Loading Screen --- */
  .loading-area {
    text-align: center;
    padding: 16px 0;
  }

  .loading-visual {
    margin-bottom: 28px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
  }

  /* Google-style 4-dot spinner */
  .spinner {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .spinner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: spinnerBounce 1.4s ease-in-out infinite;
  }

  .spinner-dot:nth-child(1) { background: var(--blue-500); animation-delay: 0s; }
  .spinner-dot:nth-child(2) { background: #ea4335; animation-delay: 0.2s; }
  .spinner-dot:nth-child(3) { background: #fbbc04; animation-delay: 0.4s; }
  .spinner-dot:nth-child(4) { background: #34a853; animation-delay: 0.6s; }

  @keyframes spinnerBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
  }

  .loading-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
  }

  .loading-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    transition: all var(--duration-medium) var(--ease-standard);
  }

  /* --- Progress Bar --- */
  .progress-container {
    width: 100%;
    max-width: 320px;
    margin: 16px auto 0;
    height: 4px;
    background: var(--surface-container);
    border-radius: 2px;
    overflow: hidden;
  }

  .progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-600));
    border-radius: 2px;
    transition: width var(--duration-long) var(--ease-standard);
    position: relative;
  }

  .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
  }

  @keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }

  .loading-tip {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 24px;
    padding: 12px 16px;
    background: var(--blue-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--blue-500);
    text-align: left;
    line-height: 1.6;
  }

  /* --- Result Screen --- */
  .result-area {
    text-align: center;
    padding: 16px 0;
  }

  .result-visual {
    margin-bottom: 24px;
  }

  .result-checkmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--green-100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: checkPop var(--duration-long) var(--ease-decel);
  }

  @keyframes checkPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
  }

  .result-checkmark svg {
    width: 36px;
    height: 36px;
  }

  .result-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
  }

  .result-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
  }

  .result-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
  }

  .legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid var(--border);
  }

  .legend-swatch.common { background: #e8e8e8; }
  .legend-swatch.diff { background: #fff3cd; border-color: #f9ab00; }
  .legend-swatch.null { background: #fce8e6; border-color: var(--red-600); }

  .result-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* --- Error Screen --- */
  .error-area {
    text-align: center;
    padding: 16px 0;
  }

  .error-visual {
    margin-bottom: 24px;
  }

  .error-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--red-100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .error-circle svg {
    width: 36px;
    height: 36px;
  }

  .error-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
  }

  .error-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    padding: 14px 16px;
    background: var(--red-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--red-600);
    text-align: left;
    white-space: pre-wrap;
    line-height: 1.7;
  }

  /* --- Footer --- */
  .app-footer {
    margin-top: auto;
    padding-top: 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
  }

  .app-footer a {
    color: var(--blue-600);
    text-decoration: none;
  }

  /* --- Shared Animations --- */
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* --- Responsive --- */
  @media (max-width: 640px) {
    .app-container {
      padding: 0 16px 32px;
    }

    .app-header {
      padding: 16px 0;
    }

    .card-header {
      padding: 16px 20px 14px;
    }

    .card-body {
      padding: 24px 20px;
    }

    .step-label {
      display: none;
    }

    .step-line {
      width: 32px;
    }

    .select-title {
      font-size: 20px;
    }

    .btn-primary.btn-lg {
      width: 100%;
      justify-content: center;
    }

    .action-buttons {
      flex-direction: column-reverse;
    }

    .action-buttons .spacer {
      display: none;
    }

    .action-buttons .btn-primary,
    .action-buttons .btn-secondary {
      width: 100%;
      justify-content: center;
    }

    .result-legend {
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
  }

    /* ============== Rewrite Option Block (Screen 1) ============== */
    .rewrite-option-block {
      margin: 16px 0;
      padding: 14px 16px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
    }

    .rewrite-option-toggle {
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      color: #d8d8e0;
      font-size: 14px;
      user-select: none;
    }

    .rewrite-option-toggle input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: #6c7cff;
      cursor: pointer;
    }

    .rewrite-base-selector {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px dashed rgba(255, 255, 255, 0.1);
    }

    .rewrite-base-label {
      display: block;
      font-size: 13px;
      color: #b8b8c8;
      margin-bottom: 6px;
    }

    .rewrite-base-select {
      width: 100%;
      padding: 8px 10px;
      background: rgba(0, 0, 0, 0.25);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 6px;
      font-size: 14px;
    }

    .rewrite-base-hint {
      margin: 6px 0 0;
      font-size: 11px;
      color: #888899;
    }

    /* ============== Diff Selection Screen (Screen 5) ============== */
    .diff-area {
      width: 100%;
      max-width: 100%;
      padding: 8px 4px 24px;
    }

    .diff-title {
      font-size: 22px;
      color: #fff;
      margin: 0 0 8px;
    }

    .diff-desc {
      color: #b8b8c8;
      font-size: 13px;
      margin: 0 0 18px;
      line-height: 1.6;
    }

    .diff-bulk-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 14px;
    }

    .diff-bulk-btn {
      padding: 6px 12px;
      background: rgba(108, 124, 255, 0.12);
      border: 1px solid rgba(108, 124, 255, 0.3);
      color: #b9c2ff;
      font-size: 12px;
      border-radius: 16px;
      cursor: pointer;
    }

    .diff-bulk-btn:hover {
      background: rgba(108, 124, 255, 0.22);
    }

    .diff-table-wrap {
      max-height: 50vh;
      overflow: auto;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      margin-bottom: 18px;
    }

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

    .diff-table thead th {
      position: sticky;
      top: 0;
      background: #1a1a2e;
      color: #fff;
      padding: 10px 12px;
      text-align: left;
      font-weight: 600;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .diff-table tbody td {
      padding: 10px 12px;
      color: #d8d8e0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      vertical-align: top;
    }

    .diff-table tbody tr:nth-child(even) {
      background: rgba(255, 255, 255, 0.02);
    }

    .diff-radio-cell {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      cursor: pointer;
    }

    .diff-radio-cell input[type="radio"] {
      margin-top: 3px;
      accent-color: #6c7cff;
      cursor: pointer;
    }

    .diff-value-text {
      word-break: break-word;
    }

    .diff-item-name {
      font-weight: 600;
      color: #fff;
    }

    .diff-empty-value {
      color: #777;
      font-style: italic;
    }

/* ========================================
   Auth area (added for static migration)
   ======================================== */
.app-header-spacer {
  flex: 1;
}
.auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-user {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}

/* ========================================
   In-browser comparison table (post-migration)
   ======================================== */
.result-area-wide {
  max-width: 1200px;
  width: 100%;
}
.result-title-inline {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px;
  color: #1a1a2e;
}
.result-auth-hint {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  text-align: center;
}

.comparison-table-wrap {
  width: 100%;
  max-height: 60vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin: 16px 0 8px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}
.comparison-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1a1a2e;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.comparison-table thead th:last-child {
  border-right: none;
}
.comparison-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #eee;
  vertical-align: top;
  word-break: break-word;
}
.comparison-table tbody td:last-child {
  border-right: none;
}
.comparison-table tbody tr.row-common td {
  background: #e8e8e8;
}
.comparison-table tbody tr.row-diff td {
  background: #fff3cd;
}
.comparison-table tbody tr td.cell-item-name {
  background: #f0f0f5;
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
  max-width: 260px;
}
.comparison-table tbody tr td.cell-status {
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
  width: 90px;
}
.comparison-table tbody tr.row-common td.cell-status {
  color: #28a745;
}
.comparison-table tbody tr.row-diff td.cell-status {
  color: #dc3545;
}
.comparison-table tbody td.cell-null {
  background: #f8d7da;
  color: #999;
  font-style: italic;
}

/* Diff screen: inline base file selector */
.rewrite-base-selector-inline {
  background: #f0f4ff;
  border: 1px solid #d0d8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.rewrite-base-selector-inline .rewrite-base-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-right: 8px;
}
.rewrite-base-selector-inline .rewrite-base-select {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #c0c8e0;
  background: #fff;
  min-width: 240px;
}
.rewrite-base-selector-inline .rewrite-base-hint {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  margin: 6px 0 0;
}
