  :root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --bg: #e2e8f0;
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --border: #cbd5e1;
    --text: #0f172a;
    --text-muted: #475569;
    --success: #15803d;
    --success-bg: #dcfce7;
    --warning: #b45309;
    --warning-bg: #fef3c7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.05);
  }

  * {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
  }

  /* ヘッダー（ダークネイビー・高コントラスト） */
  .app-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid #334155;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.25);
  }

  .app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .app-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
  }

  .app-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.02em;
  }

  .app-subtitle {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
  }

  .app-header .badge-muted {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
  }

  .app-header .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #f1f5f9;
  }

  .app-header .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
  }

  .user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: #f1f5f9;
  }

  .user-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
  }

  /* 監査ログ通知バー */
  .audit-notice {
    background: #dbeafe;
    border-bottom: 1px solid #93c5fd;
    color: #1e3a8a;
    padding: 9px 24px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* メインコンテナ */
  .container {
    max-width: 1120px;
    margin: 22px auto 48px;
    padding: 0 20px;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
  }

  .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
  }

  .card-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* アラート */
  .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13.5px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .alert-danger {
    background: var(--danger-bg);
    border-color: #f6aea9;
    color: var(--danger);
  }

  .alert-warning {
    background: var(--warning-bg);
    border-color: #fde293;
    color: var(--warning);
  }

  .alert-success {
    background: var(--success-bg);
    border-color: #a8dab5;
    color: var(--success);
  }

  .alert-info {
    background: var(--primary-soft);
    border-color: #c6dafc;
    color: #174ea6;
  }

  .hidden {
    display: none !important;
  }

  /* URL入力フォーム */
  .url-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .input-text {
    flex: 1;
    min-width: 260px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  .input-text:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
  }

  .help-text {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-muted);
  }

  /* ボタン */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
    white-space: nowrap;
  }

  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .btn-primary {
    background: var(--primary);
    color: #fff;
  }

  .btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
  }

  .btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
  }

  .btn-secondary:hover:not(:disabled) {
    background: #f1f3f4;
  }

  .btn-danger-outline {
    background: #fff;
    color: var(--danger);
    border-color: #f6aea9;
  }

  .btn-danger-outline:hover:not(:disabled) {
    background: var(--danger-bg);
  }

  .btn-sm {
    padding: 5px 12px;
    font-size: 12.5px;
    border-radius: 6px;
  }

  /* 対象情報バー */
  .target-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: #f8fafd;
    border: 1px solid #d2e3fc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 14px;
  }

  .target-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .target-name {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
  }

  .badge-drive {
    background: var(--primary-soft);
    color: #174ea6;
  }

  .badge-role {
    background: var(--success-bg);
    color: var(--success);
  }

  .badge-muted {
    background: #f1f3f4;
    color: var(--text-muted);
  }

  .target-sub {
    font-size: 12px;
    color: var(--text-muted);
  }

  /* アップロード領域 */
  .drop-zone {
    border: 2px dashed #b6c8e6;
    border-radius: 10px;
    background: #fafcff;
    padding: 28px 20px;
    text-align: center;
    transition: border-color 0.15s, background-color 0.15s;
    cursor: pointer;
  }

  .drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-soft);
  }

  .drop-zone-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
  }

  .drop-zone-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0 0 14px;
  }

  .transfer-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .transfer-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
  }

  .transfer-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
  }

  .transfer-name {
    font-weight: 600;
    word-break: break-all;
  }

  .transfer-status {
    font-size: 12px;
    color: var(--text-muted);
  }

  .progress-track {
    width: 100%;
    height: 8px;
    background: #e8eaed;
    border-radius: 999px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.2s ease;
  }

  .progress-fill.done {
    background: var(--success);
  }

  .progress-fill.error {
    background: var(--danger);
  }

  /* 削除同意ボックス */
  .consent-box {
    background: var(--warning-bg);
    border: 1px solid #f7d27a;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #5d3700;
    font-size: 13.5px;
  }

  .consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
  }

  .consent-note {
    margin: 6px 0 0 28px;
    font-size: 12px;
    color: #7c4a03;
  }

  /* ファイルテーブル */
  .table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

  .search-input {
    max-width: 320px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

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

  thead {
    background: #f8f9fa;
  }

  th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eceff1;
  }

  th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12.5px;
    white-space: nowrap;
  }

  tbody tr:last-child td {
    border-bottom: none;
  }

  tbody tr:hover {
    background: #fafbfc;
  }

  .file-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
  }

  .folder-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-size: 13.5px;
  }

  .folder-link:hover {
    text-decoration: underline;
  }

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

  /* ダウンロード進捗パネル */
  .download-panel {
    border: 1px solid #c6dafc;
    background: #f8fbff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  /* スピナー */
  .spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
  }

  .spinner-dark {
    border-color: rgba(26, 115, 232, 0.25);
    border-top-color: var(--primary);
  }

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

  /* トースト */
  .toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
  }

  .toast {
    background: #202124;
    color: #fff;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .toast.toast-success {
    background: var(--success);
  }

  .toast.toast-error {
    background: var(--danger);
  }

  /* アップロードキューヘッダー */
  .upload-queue-header {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* テーブル操作ボタングループ */
  .action-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  /* 閲覧専用プレビューモーダル */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(32, 33, 36, 0.65);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
  }

  .modal-dialog {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    width: 100%;
    max-width: 1040px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .modal-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8f9fa;
  }

  .modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .modal-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .modal-body {
    flex: 1;
    position: relative;
    background: #202124;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f8f9fa;
    color: var(--text-muted);
    font-size: 13.5px;
    z-index: 2;
  }

  .preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
  }

  .modal-footer {
    padding: 9px 18px;
    border-top: 1px solid var(--border);
    background: #f8f9fa;
  }

  /* 利用者向け 使い方・仕組みガイド */
  .guide-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }

  .guide-hero {
    background: linear-gradient(135deg, #f8fbff 0%, #eef4fc 100%);
    border-color: #c6dafc;
  }

  .guide-hero-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #174ea6;
  }

  .guide-hero-desc {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--text);
  }

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

  .guide-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .guide-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fafbfc;
  }

  .guide-step-num {
    background: var(--primary);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .guide-step-body h3 {
    margin: 0 0 6px;
    font-size: 14.5px;
    font-weight: 700;
  }

  .guide-step-body p {
    margin: 0 0 8px;
    font-size: 13.5px;
  }

  .guide-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
  }

  .guide-list li {
    margin-bottom: 4px;
  }

  .guide-arch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 14px;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 8px;
  }

  .guide-arch-box {
    flex: 1;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
  }

  .guide-arch-box-primary {
    border-color: #8ab4f8;
    background: #f4f8ff;
  }

  .guide-arch-icon {
    font-size: 24px;
    margin-bottom: 4px;
  }

  .guide-arch-title {
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 4px;
  }

  .guide-arch-sub {
    font-size: 12px;
    color: var(--text-muted);
  }

  .guide-arch-arrow {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
  }

  .guide-security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
  }

  .guide-security-item {
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fff;
  }

  .guide-security-item h4 {
    margin: 0 0 6px;
    font-size: 13.5px;
    font-weight: 700;
  }

  .guide-security-item p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
  }

  .guide-faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .guide-faq-item {
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 12px 16px;
    background: #fafbfc;
  }

  .guide-faq-q {
    font-weight: 700;
    font-size: 13.5px;
    color: #174ea6;
    margin-bottom: 6px;
  }

  .guide-faq-a {
    font-size: 13px;
    color: var(--text);
  }

/* CSP strict style-src 'self' 用ユーティリティクラス（インラインstyle排除） */
.flex-row-gap-8 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.flex-row-gap-10 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.flex-1 {
  flex: 1;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.no-underline {
  text-decoration: none;
}
.m-0 {
  margin: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.mt-8 {
  margin-top: 8px;
}
.mt-14 {
  margin-top: 14px;
}
.m-20 {
  margin: 20px;
}
.text-center {
  text-align: center;
}
.col-checkbox {
  width: 38px;
  text-align: center;
}
.col-actions {
  width: 220px;
}
.login-card-box {
  text-align: center;
  padding: 40px 24px;
}
.login-card-title {
  margin: 0 0 10px;
}
.login-card-hint {
  font-size: 13.5px;
  margin-bottom: 20px;
}
.login-btn-lg {
  text-decoration: none;
  padding: 11px 24px;
}

/* Google Drive風 階層パンくずバー */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13.5px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.breadcrumb-item:hover {
  background: var(--primary-soft);
  text-decoration: underline;
}

.breadcrumb-current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 13.5px;
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 14px;
  user-select: none;
}

.breadcrumb-masked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f3f4;
  color: var(--text-muted);
  font-size: 12.5px;
  font-style: italic;
}

.breadcrumb-readonly {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
}

/* 共有ドライブ・フォルダ探索パネル */
.explorer-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.explorer-search-row .input-text {
  flex: 1;
  min-width: 220px;
}

.search-results-box {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d2e3fc;
  background: #f8fbff;
  border-radius: 8px;
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #174ea6;
}

.search-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.search-result-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
  word-break: break-all;
}

.search-result-btn:hover {
  text-decoration: underline;
}

.quick-chips-section {
  margin-bottom: 14px;
}

.quick-chips-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.quick-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.folder-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.folder-chip-star {
  background: #fef7e0;
  border-color: #f7d27a;
}

/* 共有ドライブ階層ツリー */
.drive-tree-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tree-drive-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.tree-drive-compact:hover {
  background: var(--primary-soft);
  border-color: #93c5fd;
  border-left-color: var(--primary-hover);
  color: var(--primary-hover);
}

.tree-drive-open-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.tree-drive {
  border: 1px solid var(--border);
  border-left: 3px solid #64748b;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 12px;
}

.tree-drive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  list-style: none;
  padding: 4px 0;
}

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

.tree-drive-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tree-drive-caret {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.tree-drive[open] > .tree-drive-summary .tree-drive-caret {
  transform: rotate(90deg);
}

.tree-list {
  list-style: none;
  margin: 6px 0 2px 10px;
  padding: 0 0 0 14px;
  border-left: 2px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tree-node-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 6px;
}

.tree-node-row:hover {
  background: #f1f5f9;
}

.tree-folder-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 2px 4px;
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  word-break: break-all;
}

.tree-folder-btn:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.tree-masked-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12.5px;
  font-style: italic;
}

.tree-pin-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  color: #94a3b8;
  line-height: 1;
}

.tree-pin-btn:hover,
.tree-pin-btn.pinned {
  color: #f59e0b;
}

.tree-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px 4px;
}

