* {
  box-sizing: border-box;
}

:root {
  --sidebar-width: 250px;
  --sidebar-collapsed: 62px;

  /* TubeVoice brand palette */
  --tv-navy: #1A2340;
  --tv-blue: #2563EB;
  --tv-red: #E63946;
  --tv-purple: #7B3FE4;
  --tv-bg: #F0F4F8;
  --tv-white: #FFFFFF;
  --tv-border: #E2E8F0;
  --tv-text-primary: #1A2340;
  --tv-text-secondary: #64748B;
  --tv-text-muted: #94A3B8;
}

html,
body {
  overflow-x: visible;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  background: var(--tv-bg);
  color: var(--tv-text-primary);
  line-height: 1.6;
}

.app-layout {
  display: flex;
  min-height: 100vh;
  overflow: visible;
}

.sidebar-wrap {
  position: relative;
  flex-shrink: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  overflow: visible;
  z-index: 101;
  transition: width 0.2s ease, min-width 0.2s ease;
}

.sidebar-wrap.collapsed,
html.sidebar-collapsed-init .sidebar-wrap {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}

html.sidebar-collapsed-init .sidebar-wrap {
  transition: none;
}

.sidebar-tab {
  position: fixed;
  left: calc(var(--sidebar-width) - 12px);
  top: 50px;
  transform: translateY(-50%);
  width: 24px;
  height: 44px;
  background: #2a3350;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  z-index: 101;
  transition: left 0.2s ease;
}

.sidebar-wrap.collapsed .sidebar-tab,
html.sidebar-collapsed-init .sidebar-tab {
  left: calc(var(--sidebar-collapsed) - 12px);
}

.sidebar-tab:hover {
  background: #3a4470;
}

.sidebar-tab i {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-tab:hover i {
  color: #fff;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--tv-navy);
  border-right: none;
  padding: 0 0 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}

html.sidebar-collapsed-init .sidebar {
  transition: none;
}

.sidebar-user {
  margin: 0;
  padding: 0 20px 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-help {
  margin-top: auto;
  padding: 0 12px 8px;
}

.sidebar-footer {
  padding: 12px 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.sidebar-logout-form {
  margin: 0;
}

.sidebar-logout-btn {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 12px;
  color: var(--tv-text-primary);
  flex-shrink: 0;
}

.sidebar-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-wrap.collapsed .sidebar-logo,
html.sidebar-collapsed-init .sidebar-logo {
  justify-content: center;
  gap: 0;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  color: rgba(255,255,255,0.75);
  margin-left: auto;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-toggle i {
  font-size: 16px;
  line-height: 1;
}

.sidebar-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.sidebar-wrap.collapsed .sidebar-toggle {
  display: none;
}

html.sidebar-collapsed-init .sidebar-toggle {
  display: none;
}

.sidebar-logo-mark {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-logo-main {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
}

.sidebar-logo-tube {
  color: var(--tv-red);
}

.sidebar-logo-voice {
  color: var(--tv-blue);
  margin-left: 2px;
}

.sidebar-logo-sub {
  font-size: 0.7rem;
  color: #1A2340;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section + .sidebar-section {
  margin-top: 10px;
}

.sidebar-section-label {
  padding: 4px 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.sidebar-link-active {
  background: var(--tv-blue);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-link-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.sidebar-link-label {
  flex: 1;
  min-width: 0;
  opacity: 1;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
}

/* 折りたたみ時：サイドバー幅 */
.sidebar-wrap.collapsed .sidebar,
.sidebar.collapsed,
html.sidebar-collapsed-init .sidebar {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}

/* 折りたたみ時：ロゴテキスト非表示 */
.sidebar-wrap.collapsed .sidebar-logo-text,
.sidebar-wrap.collapsed .sidebar-logo-sub,
html.sidebar-collapsed-init .sidebar-logo-text,
html.sidebar-collapsed-init .sidebar-logo-sub {
  display: none;
}

/* 折りたたみ時：ロゴ行を中央寄せ */
.sidebar-wrap.collapsed .sidebar-brand,
html.sidebar-collapsed-init .sidebar-brand {
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  padding: 0;
}

.sidebar-wrap.collapsed .sidebar-brand-header,
html.sidebar-collapsed-init .sidebar-brand-header {
  justify-content: center;
  padding: 12px 0;
}

/* 折りたたみ時：ロゴ画像サイズ調整 */
.sidebar-wrap.collapsed .sidebar-logo-mark,
html.sidebar-collapsed-init .sidebar-logo-mark {
  width: 28px;
  height: 28px;
}

.sidebar-wrap.collapsed .sidebar-logo-img,
html.sidebar-collapsed-init .sidebar-logo-img {
  width: 28px;
  height: 28px;
}

/* 折りたたみ時：ユーザー名・セクションラベル非表示 */
.sidebar-wrap.collapsed .sidebar-user,
.sidebar-wrap.collapsed .sidebar-section-label,
html.sidebar-collapsed-init .sidebar-user,
html.sidebar-collapsed-init .sidebar-section-label {
  display: none;
}

.sidebar-wrap.collapsed .sidebar-section:first-child > *:first-child,
html.sidebar-collapsed-init .sidebar-section:first-child > *:first-child {
  display: none;
}

/* 折りたたみ時：メニューテキスト非表示 */
.sidebar-wrap.collapsed .sidebar-link-label,
html.sidebar-collapsed-init .sidebar-link-label {
  display: none;
}

/* 折りたたみ時：メニュー項目を中央寄せ */
.sidebar-wrap.collapsed .sidebar-nav,
html.sidebar-collapsed-init .sidebar-nav {
  padding: 0 4px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-wrap.collapsed .sidebar-help,
html.sidebar-collapsed-init .sidebar-help {
  padding: 0 4px 8px;
}

.sidebar-wrap.collapsed .sidebar-link,
.sidebar-wrap.collapsed .sidebar-logout-btn,
html.sidebar-collapsed-init .sidebar-link,
html.sidebar-collapsed-init .sidebar-logout-btn {
  justify-content: center;
  padding: 10px 0;
}

/* 折りたたみ時：アイコンサイズ・色を明示 */
.sidebar-wrap.collapsed .sidebar-link-icon,
html.sidebar-collapsed-init .sidebar-link-icon {
  font-size: 18px;
  width: auto;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.sidebar-wrap.collapsed .sidebar-link-active .sidebar-link-icon,
html.sidebar-collapsed-init .sidebar-link-active .sidebar-link-icon {
  color: #ffffff;
}

.sidebar-tooltip {
  position: fixed;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 999;
  pointer-events: none;
}

.main-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  background: var(--tv-bg);
}

.content-inner {
  max-width: 1600px;
  width: 96%;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin: 0 0 20px;
  background: #ffffff;
  border-bottom: 0.5px solid var(--tv-border);
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--tv-text-primary);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--tv-text-secondary);
}

.topbar-company {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--tv-blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.page-header {
  margin-bottom: 24px;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.tag-filter-label {
  font-size: 0.9rem;
  color: #555;
  margin-right: 4px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.88rem;
  color: #2563eb;
  background: #fff;
  border: 1px solid #d0d7de;
}

.tag:hover {
  background: #eff6ff;
}

.tag-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.card-center {
  text-align: center;
  padding: 48px 24px;
}

.under-construction {
  font-size: 1.5rem;
  font-weight: 600;
  color: #666;
  margin: 0 0 12px;
}

.import-form .field {
  max-width: 480px;
}

.import-form input[type="file"] {
  width: 100%;
  padding: 8px 0;
}

.import-preview-notice {
  margin: 0 0 16px;
  color: #b42318;
  font-size: 0.95rem;
  font-weight: 500;
}

.import-preview-notice p {
  margin: 0;
}

.import-preview-notice p + p {
  margin-top: 6px;
}

.import-save-form {
  margin-top: 20px;
}

.import-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
}

.import-processing-overlay[hidden] {
  display: none;
}

.import-processing-panel {
  max-width: 420px;
  padding: 28px 32px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.import-processing-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e3a5f;
}

.import-processing-hint {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.error-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #555;
  font-size: 0.9rem;
}

.error-list-title {
  margin: 0 0 8px;
  font-weight: 600;
}

.card code {
  background: #f0f4f8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.channel-icon-cell {
  width: 56px;
}

.channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.channel-icon-placeholder {
  color: #999;
  font-size: 0.85rem;
}

.channel-inactive {
  background: #f5f5f5;
  color: #888;
}

.channel-inactive a {
  color: #888;
}

.channel-inactive .channel-icon {
  opacity: 0.45;
  filter: grayscale(100%);
}

.badge-inactive {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  background: #e0e0e0;
  border-radius: 4px;
  vertical-align: middle;
}

.channels-table td {
  vertical-align: middle;
}

.channel-name-cell {
  min-width: 140px;
}

.channel-hover-wrap {
  position: relative;
  display: inline-block;
}

.channel-name-trigger {
  color: #2563eb;
  cursor: default;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.channel-name-trigger:hover {
  color: #1d4ed8;
}

.channel-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  width: 320px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  text-align: left;
  font-weight: 400;
  line-height: 1.5;
  color: #222;
  pointer-events: auto;
}

.channel-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.channel-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.channel-modal-title {
  flex: 1;
  min-width: 0;
}

.channel-modal-title strong {
  display: block;
  font-size: 0.95rem;
  word-break: break-word;
}

.channel-modal-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0 0 10px;
  font-size: 0.85rem;
}

.channel-modal-stat-label {
  color: #666;
  font-weight: 500;
}

.channel-modal-stat-value {
  font-weight: 600;
}

.channel-modal-description {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-modal-link {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.channel-modal-link:hover {
  text-decoration: underline;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.subtitle {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.card {
  background: var(--tv-white);
  border: 0.5px solid var(--tv-border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.required {
  color: #c0392b;
  font-size: 0.85rem;
  font-weight: 500;
}

.form-section {
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 16px 18px 8px;
  margin: 0 0 20px;
}

.form-section legend {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 6px;
  color: #333;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.field-row .field {
  flex: 1 1 220px;
  min-width: 200px;
}

.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  cursor: pointer;
}

.radio-item input {
  margin: 0;
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
}

.input-suffix input {
  flex: 1;
  min-width: 0;
}

.suffix {
  white-space: nowrap;
  color: #555;
  font-size: 0.95rem;
}

input[type="text"],
select {
  width: 100%;
  max-width: 720px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.field-row input[type="text"],
.field-row select {
  max-width: none;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #666;
}

/* 検索条件: キーワードタグ入力 */
.keyword-tag-field {
  border: 0.5px solid var(--tv-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.keyword-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 10px;
}
.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  background: #EFF6FF;
  color: #1E40AF;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.3;
}
.keyword-tag-remove {
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  margin-left: 2px;
}
.keyword-tag-remove:hover {
  color: #E63946;
}
.keyword-tag-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.keyword-tag-input {
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  border: 0.5px solid var(--tv-border);
  border-radius: 6px;
  font-size: 14px;
}
.keyword-tag-input:focus {
  outline: none;
  border-color: var(--tv-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--tv-blue);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: #1D4ED8;
}

.btn-secondary {
  background: #fff;
  color: var(--tv-text-primary);
  border: 0.5px solid var(--tv-border);
}

.btn-secondary:hover {
  background: #F0F4F8;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.csv-format-help {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.csv-format-help .hint {
  margin: 0 0 8px;
}

.csv-format-help .hint-list {
  margin: 0 0 10px;
  padding-left: 1.2rem;
  color: #475569;
  font-size: 0.9rem;
}

.csv-format-help .hint-list li {
  margin-bottom: 4px;
}

.csv-format-help code {
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.group-cell {
  white-space: nowrap;
}

.results-group-cell {
  text-align: center;
}

.results-group-cell .group-cell {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 220px;
}

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px 3px 10px;
}

.group-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: #1e40af;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.group-remove-btn:hover {
  background: rgba(30, 64, 175, 0.15);
}

.group-add-wrap {
  position: relative;
  display: inline-flex;
}

.group-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.group-add-btn:hover {
  border-color: #3b82f6;
  color: #2563eb;
  background: #eff6ff;
}

.group-dropdown {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  min-width: 140px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.group-option {
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.group-option:hover:not(.is-assigned) {
  background: #f1f5f9;
}

.group-option.is-assigned {
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}

.group-option.is-pending {
  opacity: 0.6;
  pointer-events: none;
}

.group-cell-error {
  display: block;
  flex-basis: 100%;
  font-size: 0.75rem;
  color: #b91c1c;
}

.group-cell .group-name {
  display: inline-block;
  font-weight: 500;
}

.group-cell .group-ungrouped {
  color: #94a3b8;
  font-style: italic;
}

.badge-new {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.alert-error {
  background: #fdecea;
  color: #b42318;
  border: 1px solid #f5c2c0;
}

.alert-warning {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.report-filter-error {
  margin-top: 12px;
  margin-bottom: 0;
}

.alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.form-actions {
  margin-bottom: 8px;
}

.save-section {
  margin-bottom: 0;
}

.save-row {
  align-items: flex-end;
}

.save-button-wrap {
  flex: 0 0 auto;
  padding-bottom: 22px;
}

.btn-small {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 0.5px solid var(--tv-border);
  color: var(--tv-text-primary);
  background: #fff;
  cursor: pointer;
}

.btn-small:hover {
  background: #F0F4F8;
}

.btn-danger {
  background: #ffffff;
  border-color: #E63946;
  color: #E63946;
}

.btn-danger:hover {
  background: #FEE2E2;
}

.actions-cell {
  white-space: nowrap;
}

.inline-form {
  display: inline;
  margin-left: 6px;
}

.conditions-table td {
  vertical-align: middle;
}

.results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.results-header h2 {
  margin: 0;
  margin-right: auto;
}

.result-meta {
  margin: 0;
  color: #555;
  font-size: 0.9rem;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eaed;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8f9fb;
  font-weight: 600;
  white-space: nowrap;
}

.title-cell {
  min-width: 10rem;
  max-width: none;
}

.title-cell .title-link {
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.title-cell .title-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.results-category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.results-cat-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1.3;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.results-cat-badge-neg {
  background: #FEE2E2;
  color: #991B1B;
}

.results-cat-badge-pos {
  background: #DCFCE7;
  color: #166534;
}

.num-cell {
  white-space: nowrap;
}

.upload-date-cell {
  min-width: 10.5rem;
  color: #475569;
  font-size: 0.9rem;
}

a {
  color: #2563eb;
}

a:hover {
  text-decoration: underline;
}

.no-results {
  margin: 0;
  color: #666;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--tv-bg);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.login-subtitle {
  margin: 0 0 24px;
  text-align: center;
  color: #666;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.login-logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #fff;
  border: 0.5px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tv-blue);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
}

.login-logo-mark .ti {
  font-size: 28px;
}

.login-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.login-logo-text {
  text-align: center;
}

.login-logo-main {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-logo-tube {
  color: var(--tv-red);
}

.login-logo-voice {
  color: var(--tv-blue);
  margin-left: 4px;
}

.login-logo-sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--tv-text-secondary);
}

.login-form {
  padding: 24px;
}

.login-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}

.login-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 1rem;
}

.login-form .btn-primary {
  width: 100%;
  margin-top: 8px;
}

.user-create-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.user-create-form label {
  flex: 1;
  min-width: 200px;
  font-size: 0.9rem;
  font-weight: 500;
}

.user-create-form input,
.user-create-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}

.badge-self {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  background: #e8eaed;
  border-radius: 4px;
  color: #555;
}

.badge-active {
  color: #166534;
  font-weight: 600;
}

.badge-batch-active {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border-radius: 4px;
}

.badge-batch-inactive {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  background: #e5e7eb;
  border-radius: 4px;
}

.badge-btn {
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
  transition: opacity 0.15s, transform 0.1s;
  display: inline-block;
}

.badge-btn:hover {
  opacity: 0.75;
  transform: scale(0.97);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e0;
  border-radius: 24px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #4ade80;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge-group {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e40af;
  background: #dbeafe;
  border-radius: 4px;
}

.badge-group-ungrouped {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
}

.group-add-form {
  margin-bottom: 16px;
}

.group-list-wrap {
  margin-top: 8px;
}

.condition-breakdown-block {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8eaed;
}

.condition-breakdown-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.condition-breakdown-block h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #1a1a1a;
}

.condition-breakdown-block h4 {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: #444;
}

.tag-list {
  margin: 0;
  padding: 10px 12px;
  background: #f8f9fb;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.row-inactive td {
  color: #888;
}

.error-cell {
  max-width: 360px;
  font-size: 0.85rem;
  color: #b91c1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-multiselect {
  width: 100%;
  max-width: 480px;
  padding: 8px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 0.95rem;
}

.report-meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 24px;
  margin: 0;
}

.report-meta-list div {
  margin: 0;
}

.report-meta-list dt {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
}

.report-meta-list dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.summary-card {
  background: #f8f9fb;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 0.82rem;
  color: #555;
  font-weight: 500;
}

.summary-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
}

.summary-hint {
  font-size: 0.75rem;
  color: #888;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.chart-box h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.chart-box-wide {
  grid-column: 1 / -1;
}

.chart-container {
  position: relative;
  height: 280px;
}

.report-form .form-actions {
  margin-top: 8px;
}

.report-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm 16mm;
  }

  body.page-report {
    background: #fff !important;
    color: #222 !important;
    font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "MS PGothic", sans-serif !important;
    font-size: 10pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.page-report * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.page-report .sidebar-wrap,
  body.page-report .sidebar,
  body.page-report .report-settings,
  body.page-report .no-print,
  body.page-report .alert {
    display: none !important;
  }

  body.page-report .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.page-report .content-inner {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
  }

  body.page-report .page-header {
    margin-bottom: 12px;
  }

  body.page-report .page-header .subtitle {
    color: #555;
  }

  body.page-report .card {
    box-shadow: none !important;
    border: 1px solid #d0d7de;
    margin-bottom: 14px;
    padding: 14px 16px;
    page-break-inside: avoid;
  }

  body.page-report .report-document {
    max-width: none !important;
  }

  body.page-report .report-header {
    background: #1a1a1a !important;
    color: #fff !important;
    page-break-inside: avoid;
  }

  body.page-report .report-group-block {
    page-break-inside: avoid;
    margin-bottom: 14px;
  }

  body.page-report .report-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  body.page-report .report-metric,
  body.page-report .report-card {
    box-shadow: none !important;
    border: 1px solid #e8eaed;
  }

  body.page-report table,
  body.page-report .report-comp-table {
    font-size: 8.5pt;
    page-break-inside: auto;
  }

  body.page-report tr {
    page-break-inside: avoid;
  }

  body.page-report th {
    background: #f0f4f8 !important;
  }

  body.page-report a {
    color: #2563eb !important;
    text-decoration: none;
  }

  body.page-report .title-cell {
    max-width: none;
  }
}

/* --- 感情ラベル（全ページ共通） --- */
.sentiment-positive {
  background: #DCFCE7;
  color: #166534;
}

.sentiment-positive-light {
  background: #D1FAE5;
  color: #065F46;
}

.sentiment-neutral {
  background: #F1F5F9;
  color: #475569;
}

.sentiment-negative-light {
  background: #FEF3C7;
  color: #92400E;
}

.sentiment-negative {
  background: #FEE2E2;
  color: #991B1B;
}

.sentiment-pending {
  background: #F1F5F9;
  color: #94A3B8;
}

.sentiment-analyzing {
  background: #eff6ff;
  color: #1e40af;
}

.results-analyzing-banner {
  margin-bottom: 16px;
}

.results-sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.results-sentiment-score {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  font-weight: 600;
}

.sentiment-cell {
  text-align: center;
  white-space: nowrap;
}

.controversy-cell {
  text-align: center;
  white-space: nowrap;
}

.controversy-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.controversy-level-1 {
  background: #DCFCE7;
  color: #166534;
}

.controversy-level-2 {
  background: #DBEAFE;
  color: #1E40AF;
}

.controversy-level-3 {
  background: #FEF3C7;
  color: #92400E;
}

.controversy-level-4 {
  background: #FFEDD5;
  color: #C2410C;
}

.controversy-level-5 {
  background: #FEE2E2;
  color: #991B1B;
}

.controversy-level-6 {
  background: #E63946;
  color: #FFFFFF;
  font-weight: 800;
  border: 1px solid #E63946;
}

.controversy-pending {
  background: #f1efe8;
  color: #5f5e5a;
  font-weight: 500;
}

.controversy-analyzing {
  background: #eff6ff;
  color: #1e40af;
  font-weight: 500;
}

/* Controversy hover tooltip */
.controversy-hover-wrap {
  position: relative;
  display: inline-block;
}

.controversy-hover-wrap .controversy-badge {
  cursor: default;
}

.controversy-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  width: 300px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  text-align: left;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  color: #222;
  white-space: normal;
  pointer-events: none;
}

.controversy-tooltip-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 4px;
}

.controversy-tooltip-reason {
  margin: 4px 0 0;
  color: #333;
}

.controversy-tooltip-keywords {
  margin: 6px 0 0;
}

.controversy-tooltip-kw-label {
  font-size: 0.72rem;
  color: #666;
  font-weight: 600;
  margin-right: 2px;
}

.controversy-tooltip-nodata {
  width: 180px;
  color: #64748b;
}

.crisis-kw {
  display: inline-block;
  margin: 2px 3px 2px 0;
  padding: 1px 7px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #991b1b;
  font-size: 0.7rem;
}

.card-section-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* --- 動画モニタリング一覧（ページネーション・絞り込み・固定ヘッダー） --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.page-results .content-inner {
  max-width: none;
  width: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 48px);
}

body.page-results .results-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-bulk-delete-outline {
  border: 0.5px solid #E63946;
  color: #E63946;
  background: none;
}

.btn-bulk-delete-outline:hover {
  background: #FEE2E2;
}

.bulk-delete-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bulk-delete-toolbar-actions[hidden] {
  display: none;
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.confirm-modal-overlay[hidden] {
  display: none;
}

.confirm-modal-panel {
  max-width: 440px;
  width: 100%;
  padding: 24px 28px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.confirm-modal-message {
  margin: 0 0 20px;
  line-height: 1.6;
  color: #334155;
  font-size: 0.95rem;
}

.confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.btn-bulk-delete-confirm {
  background: #E63946;
  border-color: #E63946;
}

.btn-bulk-delete-confirm:hover {
  background: #c1121f;
  border-color: #c1121f;
}

body.confirm-modal-open {
  overflow: hidden;
}

.results-table .checkbox-col {
  text-align: center;
  vertical-align: middle;
}

.results-table .checkbox-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.results-filter-panel {
  display: none;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.results-filter-panel.is-open {
  display: block;
}

.results-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 16px;
  margin-bottom: 14px;
}

.results-filter-span-all {
  grid-column: 1 / -1;
}

.field-keyword-wide .filter-keyword-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 1rem;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}

.sentiment-checkbox-group,
.filter-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
}

.sentiment-checkbox-label,
.filter-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sentiment-checkbox-label input[type="checkbox"],
.filter-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
  accent-color: #2563eb;
}

.results-filter-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 20px;
}

.results-filter-compact-row .field {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}

.results-filter-compact-row .field input[type="number"] {
  width: 9.5rem;
  max-width: 100%;
}

.results-filter-compact-row .field input[type="date"] {
  width: 11rem;
  max-width: 100%;
}

.results-date-range-wrap {
  display: flex;
  align-items: center;
}

.results-date-range-input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  width: 220px;
  max-width: 100%;
  height: 38px;
  box-sizing: border-box;
  font-size: 14px;
  color: #334155;
  background: #fff;
  cursor: pointer;
}

.results-date-range-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.litepicker .container__months {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}

@media (max-width: 720px) {
  .results-filter-compact-row {
    flex-direction: column;
    align-items: stretch;
  }

  .results-filter-compact-row .field input[type="number"],
  .results-filter-compact-row .field input[type="date"],
  .results-date-range-input {
    width: 100%;
  }
}

.results-filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.results-delete-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.results-list-controls .results-per-page-form {
  margin-left: auto;
  flex-shrink: 0;
}

.results-per-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.results-per-page-form label {
  white-space: nowrap;
}

.results-per-page-form select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.results-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.results-pagination-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.9rem;
  color: #475569;
}

.results-pagination-pages {
  font-weight: 600;
  color: #1e293b;
}

.results-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.results-page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
}

.results-page-input {
  width: 4rem;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
}

.btn-sm.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.results-table-panel {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.results-table-scroll {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 200px;
  max-height: calc(100vh - 22rem);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.results-table {
  width: 100%;
  min-width: 1600px;
  table-layout: auto;
  border-collapse: collapse;
}

.results-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.results-table thead th {
  background: #f1f5f9;
  box-shadow: 0 1px 0 #e2e8f0;
  white-space: nowrap;
}

.results-table th.sortable {
  padding: 0;
}

.sort-header-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
}

.sort-header-link:hover {
  background: #e2e8f0;
  color: #1d4ed8;
}

.sort-arrow {
  font-size: 0.75rem;
  color: #64748b;
  min-width: 1em;
}

.results-table tbody td {
  background: #fff;
}

.results-table tbody tr:hover td {
  background: #f8fafc;
}

/* 横スクロール時: チェックボックス〜タイトル列を左固定 */
body.page-results .results-table .results-sticky-col {
  position: sticky;
  z-index: 2;
  background: #fff;
}

body.page-results .results-table thead .results-sticky-col {
  z-index: 6;
  background: #f1f5f9;
}

body.page-results .results-table tbody tr:hover .results-sticky-col {
  background: #f8fafc;
}

body.page-results .results-table .results-sticky-3 {
  box-shadow: 4px 0 8px -2px rgba(15, 23, 42, 0.1);
  border-right: 1px solid #e2e8f0;
}
