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

:root {
  --bg:         #111827;
  --surface:    #1f2937;
  --surface2:   #374151;
  --border:     #374151;
  --primary:    #10b981;  /* verde — "tenho" */
  --primary-dk: #059669;
  --danger:     #ef4444;
  --warn:       #f59e0b;
  --text:       #f9fafb;
  --text-muted: #9ca3af;
  --radius:     10px;
  --header-h:   52px;
  --bar-h:      64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  overflow: hidden;          /* each screen scrolls independently */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input  { font: inherit; color: inherit; }
a      { color: inherit; }

/* ─── Screens ──────────────────────────────────────────────────────────────── */
.screen {
  position: fixed; inset: 0;
  display: none; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.screen.active { display: flex; }

/* ─── Header ───────────────────────────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; gap: 8px;
  height: var(--header-h);
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.header-title {
  flex: 1;
  font-size: 1rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn-icon {
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  transition: background .15s;
}
.btn-icon:hover  { background: var(--surface2); }
.btn-icon:active { background: var(--border); }

.btn-text {
  font-size: .85rem; color: var(--text-muted);
  padding: 6px 8px;
}
.btn-text:hover { color: var(--text); }

.app-version {
  font-size: .7rem;
  color: var(--text-muted);
  font-family: monospace;
  opacity: .6;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .15s;
}
.btn-primary:hover  { background: var(--primary-dk); }
.btn-primary.full   { width: 100%; padding: 14px; font-size: 1rem; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 500;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
}

/* ─── Auth ─────────────────────────────────────────────────────────────────── */
#screen-auth { justify-content: center; align-items: center; }

.auth-box {
  width: 100%; max-width: 360px;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  text-align: center;
}
.auth-logo    { font-size: 4rem; margin-bottom: 8px; }
.auth-title   { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle{ font-size: .9rem; color: var(--text-muted); margin-bottom: 28px; }

.auth-box input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
}
.auth-box input:focus { border-color: var(--primary); }

.auth-msg         { margin-top: 14px; font-size: .85rem; min-height: 1.2em; }
.auth-msg.success { color: var(--primary); }
.auth-msg.error   { color: var(--danger); }

.auth-step.hidden { display: none; }

.otp-hint { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.otp-hint strong { color: var(--text); }

#input-otp {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-align: center;
  outline: none;
}
#input-otp:focus { border-color: var(--primary); }

.btn-text.full { width: 100%; text-align: center; margin-top: 8px; }

/* ─── Home — Álbuns ────────────────────────────────────────────────────────── */
.albums-list {
  flex: 1; overflow-y: auto;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.album-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.album-info  { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.album-name  { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-shared {
  font-size: .72rem; color: var(--text-muted);
  background: var(--surface2);
  padding: 2px 8px; border-radius: 20px;
  align-self: flex-start;
}

.fab {
  position: absolute; bottom: calc(20px + var(--safe-bottom)); right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 2rem; line-height: 1;
  box-shadow: 0 4px 16px rgba(16,185,129,.4);
  transition: transform .15s;
}
.fab:active { transform: scale(.93); }

/* ─── Modo busca: esconde progresso para maximizar área de resultados ────────── */
#screen-album.searching .progress-wrap {
  display: none;
}

/* ─── Progress ─────────────────────────────────────────────────────────────── */
.progress-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.progress-track {
  flex: 1; height: 8px;
  background: var(--surface2);
  border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width .4s ease;
}
.progress-label { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Filtros ──────────────────────────────────────────────────────────────── */
.filters-row {
  display: flex; gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.filter {
  flex: 1;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: .82rem; font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  transition: background .15s, color .15s;
}
.filter.active  { background: var(--primary); color: #fff; }
.filter:not(.active):hover { background: var(--surface2); color: var(--text); }

.filters-row-2 {
  padding: 5px 12px 6px;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border);
}
.filter-toggle {
  font-size: .75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-toggle[data-state="hide"] {
  border-color: var(--warn);
  color: var(--warn);
  background: rgba(245,158,11,.12);
}
.filter-toggle[data-state="only"] {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(16,185,129,.12);
}

/* ─── Grade de Figurinhas ──────────────────────────────────────────────────── */
.stickers-container {
  flex: 1; overflow-y: auto;
  padding: 10px 10px calc(var(--bar-h) + 10px + var(--safe-bottom));
}

.group { margin-bottom: 6px; }
.group-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 10px 4px 4px;
}

.section { margin-bottom: 10px; }
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 4px 4px;
}
.section-name     { font-size: .9rem; font-weight: 600; }
.section-progress { font-size: .78rem; color: var(--text-muted); }
.section-progress.complete { color: var(--primary); font-weight: 700; }

.section-bar {
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 4px 6px;
}
.section-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .4s ease;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 5px;
}

.sticker {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 700; letter-spacing: .02em;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  touch-action: manipulation;
  user-select: none;
}
.sticker.owned {
  background: var(--primary);
  border-color: var(--primary-dk);
  color: #fff;
}
.sticker:active { transform: scale(.88); }
.sticker.flash  { animation: sticker-flash .35s ease; }

/* ─── Modo Troca ───────────────────────────────────────────────────────────── */
.trade-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bar-h) + var(--safe-bottom));
  padding: 8px 12px;
  padding-bottom: calc(8px + var(--safe-bottom));
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 10;
}
.trade-bar.hidden { display: none; }

.trade-counter {
  flex: 1;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  color: #3b82f6;
}

/* Figurinha marcada na troca: azul */
.sticker.trade {
  background: #3b82f6;
  border-color: #2563eb;
  color: #fff;
}

/* No modo troca: já possuídas ficam esmaecidas e não clicáveis */
#screen-album.trade-mode .sticker.owned {
  pointer-events: none;
  opacity: 0.45;
}

/* ─── Modo Leitura / Edição ────────────────────────────────────────────────── */
/* Por padrão (leitura): figurinhas não são clicáveis */
#screen-album:not(.edit-mode) .sticker {
  pointer-events: none;
  cursor: default;
}
#screen-album:not(.edit-mode) .sticker:active { transform: none; }

/* No modo leitura esconde apenas os botões de ação, mantém a busca */
#screen-album:not(.edit-mode) #btn-undo,
#screen-album:not(.edit-mode) #btn-camera { display: none; }

/* Botão de alternância de modo */
.btn-edit-mode {
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
#screen-album.edit-mode .btn-edit-mode {
  background: var(--primary);
  color: #fff;
}

.btn-trade {
  border-color: #3b82f6;
  color: #3b82f6;
}

@keyframes sticker-flash {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ─── Bottom Bar ───────────────────────────────────────────────────────────── */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bar-h) + var(--safe-bottom));
  padding: 8px 10px;
  padding-bottom: calc(8px + var(--safe-bottom));
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 10;
}

#quick-input, #repeats-search {
  flex: 1;
  padding: 11px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  outline: none;
  transition: border-color .15s;
}
#quick-input:focus, #repeats-search:focus { border-color: var(--primary); }
#quick-input.input-has   { border-color: var(--primary); background: rgba(16,185,129,.15); color: var(--primary); }
#quick-input.input-missing { border-color: var(--danger);  background: rgba(239,68,68,.15);  color: var(--danger); }
#quick-input::placeholder, #repeats-search::placeholder { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-muted); }

/* ─── Camera ───────────────────────────────────────────────────────────────── */
.camera-wrap { position: relative; flex: 1; overflow: hidden; background: #000; display: flex; flex-direction: column; }

#cam-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.cam-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.cam-frame {
  width: 70%; max-width: 340px;
  aspect-ratio: 2.5 / 1;
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
}

/* Resultado OCR */
.cam-result {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  z-index: 10;
}
.cam-result.hidden { display: none; }

.cam-result-badge {
  padding: 24px 40px;
  border-radius: 16px;
  text-align: center;
}
.cam-result-badge.cam-has     { background: var(--primary); }
.cam-result-badge.cam-missing { background: var(--danger); }

.cam-code        { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: .06em; }
.cam-status-text { display: block; font-size: 1rem; font-weight: 700; margin-top: 4px; opacity: .9; }

.cam-result-actions { display: flex; gap: 12px; }
.btn-confirm {
  padding: 12px 28px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius); font-weight: 700; font-size: .95rem;
}
.btn-skip {
  padding: 12px 28px;
  background: var(--surface2); color: var(--text);
  border-radius: var(--radius); font-weight: 600; font-size: .95rem;
}

.cam-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  z-index: 5;
}
.cam-status { font-size: .85rem; color: rgba(255,255,255,.8); text-align: center; margin-bottom: 12px; }

.cam-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.cam-mode-toggle {
  display: flex;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 3px;
  backdrop-filter: blur(4px);
}
.cam-mode-btn {
  padding: 7px 14px;
  border-radius: 16px;
  font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.7);
  transition: background .2s, color .2s;
}
.cam-mode-btn.active {
  background: #fff;
  color: #111827;
}

.btn-cam-secondary {
  padding: 10px 16px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius);
  font-size: .9rem;
  backdrop-filter: blur(4px);
}
.btn-cam-capture {
  padding: 12px 24px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius); font-weight: 700; font-size: .95rem;
}

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  padding: 0 0 var(--safe-bottom);
}
.modal-bg.hidden { display: none; }

.modal-box {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 28px;
  max-height: 85vh; overflow-y: auto;
}
.modal-box h3   { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.modal-box p    { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

.modal-box input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  margin-bottom: 16px;
}
.modal-box input:focus { border-color: var(--primary); }

.modal-actions { display: flex; gap: 10px; margin-top: 4px; }
.modal-actions > * { flex: 1; }

.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  padding: 14px 16px;
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: .95rem;
  transition: background .15s;
}
.menu-item:hover  { background: var(--surface2); }
.menu-item.danger { color: var(--danger); }

.share-hint { font-size: .82rem; color: var(--text-muted); margin-bottom: 12px; }

/* ── Parse Modal (GenAI) ─────────────────────────────────────────────────── */
.parse-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.parse-tab {
  flex: 1; padding: 8px; border-radius: var(--radius);
  border: 1.5px solid var(--border); font-size: .85rem;
  background: transparent; cursor: pointer; transition: background .15s, color .15s;
}
.parse-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.parse-panel textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); padding: 10px; font-size: .85rem;
  resize: vertical; margin-bottom: 4px; font-family: inherit;
}
.parse-panel textarea:focus { outline: none; border-color: var(--primary); }
.parse-upload-btn {
  display: block; text-align: center; padding: 14px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: .85rem; color: var(--text-muted);
  transition: border-color .15s; margin-bottom: 10px;
}
.parse-upload-btn:hover { border-color: var(--primary); color: var(--text); }
.parse-upload-btn input { display: none; }
.parse-img-preview {
  width: 100%; max-height: 220px; object-fit: contain;
  border-radius: var(--radius); border: 1px solid var(--border); display: block;
}

/* ── Comparação de repetidas ─────────────────────────────────────────────── */
.cmp-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; max-height: 40vh; overflow-y: auto; }
.cmp-row  { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 4px; background: var(--bg); }
.cmp-team { font-size: .8rem; font-weight: 700; min-width: 54px; white-space: nowrap; }
.cmp-nums { font-size: .82rem; color: var(--text-muted); }
.share-url  {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: .78rem;
  word-break: break-all;
  margin-bottom: 14px;
  color: var(--text-muted);
}

/* ─── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bar-h) + 12px + var(--safe-bottom));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: .88rem; font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 200;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}
.toast.visible          { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success          { background: var(--primary); color: #fff; }
.toast.error            { background: var(--danger);  color: #fff; }
.toast.warn             { background: var(--warn);    color: #000; }

/* ─── Loading ──────────────────────────────────────────────────────────────── */
.loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
  z-index: 300;
}
.loading.hidden { display: none; }

.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Update Banner ───────────────────────────────────────────────────────── */
.update-banner {
  position: fixed; bottom: calc(var(--bar-h) + 8px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%);
  background: var(--warn); color: #000;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: .88rem; font-weight: 600;
  cursor: pointer;
  z-index: 200;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.update-banner.hidden { display: none; }

/* ─── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  line-height: 1.6;
}

/* ─── Tela de Figurinhas Repetidas ────────────────────────────────────────── */

.repeats-home-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 14px 16px;
  background: rgba(245,158,11,.08);
  border: 1.5px solid rgba(245,158,11,.25);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.repeats-home-card:active { background: rgba(245,158,11,.18); }

.rhc-icon { font-size: 1.4rem; }
.rhc-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rhc-title { font-weight: 700; font-size: .95rem; color: var(--warn); }
.rhc-hint  { font-size: .75rem; color: var(--text-muted); }
.rhc-arrow { color: var(--text-muted); font-size: 1.1rem; }

.home-albums-title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 14px 16px 4px;
}

/* Tiles de figurinhas repetidas */
.rep-container .sticker-grid {
  /* herda o grid existente */
}

.rep-sticker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 4px 4px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background .12s, border-color .12s;
}
.rep-sticker:active { opacity: .75; }
.rep-sticker.has-repeats {
  background: rgba(245,158,11,.12);
  border-color: var(--warn);
}

.rep-code {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .02em;
}
.rep-sticker.has-repeats .rep-code { color: var(--warn); }

.rep-count {
  font-size: 12px;
  font-weight: 900;
  color: var(--warn);
  line-height: 1;
  margin-top: 2px;
}

.rep-dec {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245,158,11,.2);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--warn);
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
.rep-dec:active { background: rgba(245,158,11,.4); }

.rep-total {
  font-size: .78rem;
  color: var(--warn);
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
