:root {
  --bg: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 頂部列 */
.topbar {
  min-height: 52px;
  height: auto;
  padding: 8px 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

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

.topbar-right, .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
}

.tag-neutral { background: #f1f5f9; color: #475569; }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-full { width: 100%; }

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

.btn-outline { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { background: var(--surface-alt); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #047857; }

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

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-alt); color: var(--text); }

.btn-icon {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.view-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 畫面 1：角色選擇 */
.view-role {
  justify-content: space-between;
}

.role-hero {
  padding: 28px 20px 18px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.role-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.role-hero p { font-size: 13px; color: var(--text-muted); }

.role-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 680px) {
  .role-split { grid-template-columns: 1fr; }
}

.role-pane {
  border: none;
  background: var(--bg);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.role-pane-host { border-right: 1px solid var(--border); }
@media (max-width: 680px) {
  .role-pane-host { border-right: none; }
}
.role-pane:hover { background: var(--surface-alt); }

.role-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}

.role-name { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.role-desc { font-size: 14px; color: var(--text-muted); max-width: 380px; }

.flat-strip {
  padding: 12px 20px;
  background: var(--surface-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.strip-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-progress { display: flex; align-items: center; gap: 8px; }
.progress-bar { width: 120px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); transition: width 0.2s; }

/* 畫面 2A / 2B */
.page-nav-bar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-nav-title { font-size: 14px; font-weight: 700; }
.flat-section { padding: 16px 20px; border-bottom: 1px solid var(--border); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.section-head h3 { font-size: 15px; font-weight: 700; }

.profiles-strip { display: flex; gap: 8px; flex-wrap: wrap; }

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
}
.profile-chip.active { border-color: var(--primary); background: #eff6ff; }
.profile-chip-del { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; }
.profile-chip-del:hover { color: var(--danger); }

.setup-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  padding: 0;
  border-bottom: none;
}

@media (max-width: 820px) {
  .setup-split { grid-template-columns: 1fr; }
}

.setup-col { padding: 18px 20px; }
.setup-col:first-child { border-right: 1px solid var(--border); }
@media (max-width: 820px) {
  .setup-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.form-group label { font-size: 12px; font-weight: 600; }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-preview-wrap { margin-bottom: 14px; }
.grid-preview-mini { margin-top: 6px; display: grid; gap: 3px; max-width: 240px; }
.grid-preview-cell { height: 16px; background: #e2e8f0; border-radius: 2px; }

.toggle-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
}
.toggle-switch { width: 20px; height: 20px; cursor: pointer; }
.setup-submit-bar { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.upload-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.catalog-table-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 440px;
  overflow-y: auto;
}

.catalog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.catalog-row img { width: 36px; height: 48px; object-fit: cover; border-radius: 3px; }
.catalog-row input.cat-id-input { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }
.cat-use-check { width: 18px; height: 18px; flex: 0 0 18px; cursor: pointer; }

.guest-join-box { max-width: 520px; border-bottom: none; }
.guest-saved-wrap { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.guest-saved-wrap h4 { font-size: 13px; margin-bottom: 8px; }

/* 畫面 3：點算工作區 */
.view-counting { flex: 1; min-height: 0; overflow: hidden; }
.app-shell { height: 100vh; }

.ws-status-bar {
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-status-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#ws-shelf-name { white-space: nowrap; }
@media (max-width: 640px) { .ws-status-left { flex-direction: column; align-items: flex-start; gap: 2px; } }
.ws-peers-bar { display: flex; align-items: center; gap: 6px; }
.peers-inline { display: flex; gap: 6px; flex-wrap: wrap; }

.shelf-workspace {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
  background: var(--bg);
}

.shelf-grid { display: grid; gap: 8px; min-width: 300px; }

.shelf-cell {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-alt);
  padding: 8px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}
.shelf-cell:hover { border-color: var(--primary); }
.shelf-cell.is-done { background: var(--success-bg); border-color: #6ee7b7; }
.shelf-cell.is-locked-other { background: var(--warn-bg); border-color: #fcd34d; cursor: not-allowed; }
.shelf-cell.is-occupied-mine { background: #eff6ff; border: 2px solid var(--primary); }

.cell-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-muted); }
.cell-main { font-size: 12px; font-weight: 600; margin-top: 4px; word-break: break-word; }
.cell-sub { font-size: 11px; color: var(--text-muted); }

/* 下方點算操作面板 */
.counting-dock {
  border-top: 2px solid var(--border-strong);
  background: var(--surface-alt);
  max-height: 62vh;
  overflow-y: auto;
}
.dock-active {
  min-height: 250px;
}

.dock-idle { padding: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.dock-active { padding: 12px 18px 16px; }

.dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.dock-title-group { display: flex; align-items: center; gap: 8px; }
.coord-pill { font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 4px; background: var(--primary); color: #fff; }

.dock-columns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 780px) { .dock-columns { grid-template-columns: 1fr; } }

.dock-btn-bar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

.dock-form-row {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 540px) { .dock-form-row { grid-template-columns: 1fr; } }

/* 自訂 Autocomplete 建議選單 */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: 4px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 45;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.autocomplete-item {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: #eff6ff; }
.autocomplete-item img { width: 24px; height: 32px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }

.stepper { display: flex; align-items: center; gap: 4px; }
.stepper input { width: 56px !important; text-align: center; font-weight: 700; }

.dock-list-head { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.dock-cell-items { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.dock-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
}

/* 相機與識別條 */
.camera-box { position: relative; width: 100%; background: #0f172a; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.camera-box video { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.cover-guide-frame {
  position: absolute;
  inset: 14% 22%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
}
.cover-guide-frame span { background: rgba(15, 23, 42, 0.75); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.camera-action-overlay { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.qr-reticle { position: absolute; inset: 20%; border: 2px solid #38bdf8; border-radius: 8px; pointer-events: none; }

.rec-strip { display: flex; gap: 10px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; }
.captured-thumb { width: 46px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.rec-info { flex: 1; min-width: 0; }
.rec-status { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.rec-candidates-row { display: flex; gap: 6px; flex-wrap: wrap; }
.rec-cand-btn { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--bg); cursor: pointer; font-size: 11px; }
.rec-cand-btn.active { border-color: var(--primary); background: #eff6ff; }
.rec-cand-btn img { width: 24px; height: 32px; object-fit: cover; border-radius: 2px; }

/* 彈窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-box {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-sm { max-width: 420px; }
.modal-lg { max-width: 740px; }

.modal-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 16px; overflow-y: auto; }

/* 缺失出版物清單 */
.missing-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.missing-row {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface-alt);
}

.missing-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.missing-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.missing-manual-add {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.missing-manual-add h4 {
  font-size: 13px;
  margin-bottom: 10px;
}

.review-preview-box {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
}

.review-thumb {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  word-break: break-all;
}

.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.qrcode-box { padding: 10px; border: 1px solid var(--border); }
.verify-code-box { font-size: 32px; font-weight: 700; letter-spacing: 8px; padding: 10px 24px; background: #eff6ff; color: var(--primary); border: 1px dashed var(--primary); border-radius: 6px; }
.export-choice-body { display: flex; flex-direction: column; gap: 10px; }
.export-option-btn { width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-alt); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.export-option-btn:hover { border-color: var(--primary); background: #eff6ff; }
.export-option-btn strong { font-size: 14px; }
.export-option-btn span { font-size: 12px; color: var(--text-muted); }

.hint-text, .empty-hint { font-size: 12px; color: var(--text-muted); }

.toast-container { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 80; }
.toast { background: #0f172a; color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 12px; }
.toast-error { background: var(--danger); }
.toast-success { background: var(--success); }
.toast-warn { background: var(--warn); }

/* 手機版右上角子選單 */
.top-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
}

@media (max-width: 760px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  .top-menu-wrap .top-actions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    z-index: 50;
  }
  .top-menu-wrap .top-actions.is-open {
    display: flex;
  }
  .top-menu-wrap .top-actions .btn {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 數量加減 1, 5, 10, 50, 100 */
.stepper-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btn-xs {
  padding: 4px 7px;
  font-size: 11px;
  border-radius: 4px;
}

.qty-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.qty-neg {
  color: var(--danger);
}

.qty-pos {
  color: var(--primary);
}

/* 左編號右數量兩欄排版 */
.dock-input-2col {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 10px;
  margin-bottom: 10px;
}

.dock-input-2col .form-group {
  margin-bottom: 0;
}

input:disabled {
  background: #e2e8f0 !important;
  color: #475569 !important;
  cursor: not-allowed;
}

/* 房主快速新增純編號列 */
.quick-add-pub-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-add-pub-bar input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
}

.catalog-row-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.catalog-thumb-empty {
  width: 36px;
  height: 48px;
  border-radius: 3px;
  background: #e2e8f0;
  color: var(--text-muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

/* 設定檔底下的點算狀態選擇區 */
.sessions-section {
  background: var(--surface-alt);
  border-top: 2px solid var(--border);
  border-bottom: none;
}

.new-session-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.new-session-bar input {
  flex: 1;
  min-width: 200px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg);
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  flex-wrap: wrap;
}

.shelf-col-scope {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
  margin-bottom: 10px;
}

.col-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--bg);
  font-size: 12px;
  cursor: pointer;
}

.collection-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.col-select {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg);
}

.collection-toolbar input {
  flex: 1;
  min-width: 120px;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
}

.collection-backup-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.shelf-cell.is-empty-confirmed {
  background: #cbd5e1;
  border-color: #64748b;
  color: #1e293b;
}

.export-options-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.export-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.export-check-row input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 防止手機點選輸入框時自動放大 (iOS Safari 需 >= 16px) 及雙擊縮放 */
html, body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

input[type="text"],
input[type="number"],
input[type="url"],
select,
textarea {
  font-size: 16px !important;
}

.resume-banner {
  background: #eff6ff;
  border-top: 1px solid #bfdbfe;
  border-bottom: 1px solid #bfdbfe;
}

.conflict-banner {
  padding: 8px 18px;
  background: var(--warn-bg);
  border-bottom: 1px solid #fcd34d;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
}

.conflict-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.conflict-item {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface-alt);
}

.conflict-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .conflict-compare { grid-template-columns: 1fr; }
}

.conflict-side {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.lazy-load-footer {
  padding: 8px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}
