/* ============================================================
   rafaelfinder — v2 styles
   macOS Finder (desktop) · iOS Files (mobile) · light + dark
   Aesthetic DNA inherited from the v1 prototype.
   ============================================================ */

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

:root {
  /* light theme */
  --bg: #ececec;
  --window-bg: #ffffff;
  --sidebar-bg: #f6f6f6;
  --toolbar-bg: #f6f6f6;
  --border: #d6d6d6;
  --border-light: #e9e9e9;
  --sidebar-active: rgba(0,0,0,0.07);
  --sidebar-hover: rgba(0,0,0,0.035);
  --row-hover: rgba(0,0,0,0.035);
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --accent: #007aff;
  --selected-bg: #0058d0;
  --selected-text: #ffffff;
  --field-bg: #ffffff;
  --panel-bg: #ffffff;
  --red: #ff5f57; --yellow: #febc2e; --green: #28c840;

  /* mood tags (Finder-style dots) */
  --mood-rage: #ff453a;
  --mood-melancolie: #5e9eff;
  --mood-lumiere: #ffd60a;
  --mood-doute: #bf5af2;
  --mood-nuit: #5e5ce6;
  --mood-feu: #ff9f0a;

  --transition: 0.15s ease;
  --spring: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: "Menlo", "Monaco", "SF Mono", "Courier New", monospace;
}

/* dark theme — applied automatically (auto mode) or via manual override */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e; --window-bg: #262628; --sidebar-bg: #2c2c2e;
    --toolbar-bg: #323234; --border: #3a3a3c; --border-light: #38383a;
    --sidebar-active: rgba(255,255,255,0.10); --sidebar-hover: rgba(255,255,255,0.05);
    --row-hover: rgba(255,255,255,0.05);
    --text: #f5f5f7; --text-secondary: #a0a0a5; --text-tertiary: #6e6e73;
    --accent: #0a84ff; --selected-bg: #0a64d0; --selected-text: #ffffff;
    --field-bg: #1c1c1e; --panel-bg: #2a2a2c;
  }
}
[data-theme="dark"] {
  --bg: #1c1c1e; --window-bg: #262628; --sidebar-bg: #2c2c2e;
  --toolbar-bg: #323234; --border: #3a3a3c; --border-light: #38383a;
  --sidebar-active: rgba(255,255,255,0.10); --sidebar-hover: rgba(255,255,255,0.05);
  --row-hover: rgba(255,255,255,0.05);
  --text: #f5f5f7; --text-secondary: #a0a0a5; --text-tertiary: #6e6e73;
  --accent: #0a84ff; --selected-bg: #0a64d0; --selected-text: #ffffff;
  --field-bg: #1c1c1e; --panel-bg: #2a2a2c;
}

html { font-size: 13px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}
.hidden { display: none !important; }

/* ============================================================ WINDOW */
.finder-window {
  width: 960px; max-width: 96vw;
  height: 620px; max-height: 88vh;
  background: var(--window-bg);
  border-radius: 10px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.18), 0 8px 40px rgba(0,0,0,0.20);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  animation: windowAppear 0.4s var(--spring) both;
  transition: width var(--spring), height var(--spring),
              max-width var(--spring), max-height var(--spring), border-radius var(--spring);
}
.finder-window.maximized {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0;
}
@keyframes windowAppear { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* Title bar */
.title-bar {
  display: flex; align-items: center; height: 38px; padding: 0 12px;
  background: var(--toolbar-bg); border-bottom: 0.5px solid var(--border);
  flex-shrink: 0; user-select: none;
}
.traffic-lights { display: flex; gap: 8px; flex-shrink: 0; padding-left: 1px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 0.5px solid rgba(0,0,0,0.12); }
.dot.red { background: var(--red); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.dot.red, .dot.green[role="button"], .green#greenDot { cursor: pointer; }
.title-bar-text { flex: 1; text-align: center; font-size: 13px; font-weight: 500; color: var(--text); }
.title-bar-spacer { width: 52px; }

.theme-toggle {
  width: 24px; height: 24px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 15px; cursor: pointer; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; transition: background var(--transition);
}
.theme-toggle:hover { background: var(--sidebar-hover); color: var(--text); }

/* Toolbar */
.toolbar {
  display: flex; align-items: center; height: 36px; padding: 0 8px; gap: 8px;
  background: var(--toolbar-bg); border-bottom: 0.5px solid var(--border); flex-shrink: 0;
}
.toolbar-nav { display: flex; gap: 2px; }
.toolbar-btn {
  width: 24px; height: 22px; border: none; background: transparent; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; color: var(--text-secondary);
  cursor: pointer; transition: background var(--transition);
}
.toolbar-btn:hover:not(:disabled) { background: var(--sidebar-hover); }
.toolbar-btn:disabled { opacity: 0.25; cursor: default; }
.toolbar-path { flex: 1; text-align: center; }
.toolbar-path-segment { font-size: 11px; color: var(--text-secondary); }
.toolbar-search {
  display: flex; align-items: center; gap: 5px; width: 150px; height: 24px; padding: 0 8px;
  background: var(--field-bg); border: 0.5px solid var(--border); border-radius: 6px; color: var(--text-tertiary);
}
.toolbar-search input {
  border: none; background: transparent; outline: none; font-family: var(--font);
  font-size: 12px; color: var(--text); width: 100%;
}

/* Body */
.window-body { display: flex; flex: 1; min-height: 0; }

/* Sidebar */
.sidebar {
  width: 180px; min-width: 180px; background: var(--sidebar-bg);
  border-right: 0.5px solid var(--border); padding: 4px 6px;
  display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0;
}
.sidebar-section-label {
  font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.02em; padding: 10px 6px 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 5px;
  border: none; background: transparent; font-family: var(--font); font-size: 12px;
  color: var(--text); cursor: pointer; transition: background var(--transition);
  text-align: left; width: 100%; line-height: 1.3;
}
.sidebar-item:hover { background: var(--sidebar-hover); }
.sidebar-item.active { background: var(--sidebar-active); }
.sidebar-icon { flex-shrink: 0; display: flex; align-items: center; width: 14px; height: 12px; }
.sidebar-icon-file { justify-content: center; }
.sidebar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.sidebar-close-mobile { display: none; }

/* Content */
.content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; min-width: 0; background: var(--window-bg); }

/* Curator banner */
.keyword-banner {
  margin: 12px 12px 4px; padding: 12px 14px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,204,77,0.14), rgba(255,159,10,0.08));
  border: 0.5px solid rgba(255,159,10,0.3);
}
.keyword-banner-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.keyword-banner-note { font-size: 12px; color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; }

/* Column headers */
.column-headers {
  display: flex; align-items: center; height: 24px; padding: 0 12px;
  font-size: 11px; color: var(--text-secondary); border-bottom: 0.5px solid var(--border);
  flex-shrink: 0; user-select: none; position: sticky; top: 0; background: var(--window-bg); z-index: 2;
}
.col-name { flex: 1; padding-left: 26px; }
.col-mood { width: 96px; }
.col-plays { width: 72px; text-align: right; }
.col-date { width: 110px; padding-left: 16px; }
.col-size { width: 64px; text-align: right; padding-right: 6px; }

/* File list */
.file-list { display: flex; flex-direction: column; }
.file-row {
  display: flex; align-items: center; height: 26px; padding: 0 12px; cursor: pointer;
  position: relative; transition: background 0.08s ease;
}
.file-row:hover { background: var(--row-hover); }
.file-row.selected { background: var(--selected-bg); }
.file-row.selected .file-name,
.file-row.selected .cell-plays,
.file-row.selected .cell-date,
.file-row.selected .cell-size,
.file-row.selected .mood-label { color: var(--selected-text); }
.file-row.playing .file-name { color: var(--accent); font-weight: 500; }
.file-row.playing.selected .file-name { color: var(--selected-text); }

.cell { font-size: 12px; }
.cell-name { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.file-icon-svg { flex-shrink: 0; }
.file-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* equalizer bars when playing */
.eq { display: inline-flex; align-items: flex-end; gap: 1.5px; width: 14px; height: 11px; flex-shrink: 0; }
.eq span { width: 2.5px; background: var(--accent); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq span:nth-child(2){ animation-delay: 0.25s; } .eq span:nth-child(3){ animation-delay: 0.5s; }
.file-row.selected .eq span { background: var(--selected-text); }
@keyframes eq { 0%,100%{ height: 3px; } 50%{ height: 11px; } }

/* fresh badge */
.fresh-badge {
  font-size: 9px; font-weight: 600; color: #fff; background: var(--accent);
  padding: 1px 5px; border-radius: 100px; letter-spacing: 0.02em; flex-shrink: 0;
  animation: freshPulse 2s ease-in-out infinite;
}
@keyframes freshPulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(10,132,255,0.5);} 50%{ box-shadow: 0 0 0 4px rgba(10,132,255,0);} }

/* mood tag */
.cell-mood { width: 96px; display: flex; align-items: center; gap: 5px; }
.mood-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mood-label { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
[data-mood="rage"] .mood-dot, .chip[data-mood="rage"]::before { background: var(--mood-rage); }
[data-mood="melancolie"] .mood-dot, .chip[data-mood="melancolie"]::before { background: var(--mood-melancolie); }
[data-mood="lumiere"] .mood-dot, .chip[data-mood="lumiere"]::before { background: var(--mood-lumiere); }
[data-mood="doute"] .mood-dot, .chip[data-mood="doute"]::before { background: var(--mood-doute); }
[data-mood="nuit"] .mood-dot, .chip[data-mood="nuit"]::before { background: var(--mood-nuit); }
[data-mood="feu"] .mood-dot, .chip[data-mood="feu"]::before { background: var(--mood-feu); }

.cell-plays { width: 72px; text-align: right; color: var(--text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.cell-date { width: 110px; padding-left: 16px; color: var(--text-secondary); font-size: 11px; }
.cell-size { width: 64px; text-align: right; padding-right: 6px; color: var(--text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }

/* states */
.empty-state, .loading-state { padding: 60px 20px; text-align: center; color: var(--text-tertiary); }
.empty-icon { font-size: 40px; opacity: 0.4; margin-bottom: 10px; }
.empty-state p { font-size: 12px; }
.loading-state { font-size: 12px; }

/* Status bar */
.status-bar {
  display: flex; align-items: center; height: 24px; padding: 0 12px;
  background: var(--toolbar-bg); border-top: 0.5px solid var(--border); flex-shrink: 0;
  font-size: 11px; color: var(--text-secondary);
}
.status-items { width: 120px; }
.status-center { flex: 1; display: flex; justify-content: center; }
.status-playing { display: flex; align-items: center; gap: 5px; opacity: 0; transition: opacity 0.2s ease; }
.status-playing.visible { opacity: 1; }
.status-playing-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: statusPulse 1.5s ease-in-out infinite; }
@keyframes statusPulse { 0%,100%{ opacity: 1;} 50%{ opacity: 0.3;} }
.admin-link { width: 120px; text-align: right; color: var(--text-tertiary); text-decoration: none; font-size: 11px; opacity: 0.5; transition: opacity var(--transition); }
.admin-link:hover { opacity: 1; color: var(--text-secondary); }

/* ============================================================ MINI-PLAYER */
.mini-player {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: 420px; max-width: 92vw; height: 52px; padding: 0 14px;
  background: var(--panel-bg); border: 0.5px solid var(--border); border-radius: 12px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.22); display: flex; align-items: center; gap: 10px;
  z-index: 4000; animation: windowAppear 0.3s var(--spring) both;
}
.mini-art { width: 34px; height: 34px; border-radius: 6px; flex-shrink: 0; background: var(--sidebar-active); }
.mini-art[data-mood] { background: currentColor; }
.mini-info { flex: 1; min-width: 0; cursor: pointer; }
.mini-title { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 10px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-play, .player-play {
  border: none; background: var(--sidebar-active); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%;
  transition: background var(--transition);
}
.mini-play { width: 32px; height: 32px; }
.mini-play:hover, .player-play:hover { background: var(--accent); color: #fff; }
.mini-progress { width: 90px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; cursor: pointer; flex-shrink: 0; }
.mini-progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 2px; }
.mini-time { font-size: 10px; color: var(--text-secondary); font-variant-numeric: tabular-nums; width: 28px; text-align: right; flex-shrink: 0; }

/* ============================================================ QUICK LOOK / MODALS */
.quicklook-overlay {
  position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.32); opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.quicklook-overlay.active { opacity: 1; pointer-events: auto; }
.quicklook-panel {
  background: var(--panel-bg); border-radius: 10px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.18), 0 20px 60px rgba(0,0,0,0.32);
  overflow: hidden; transform: scale(0.93); transition: transform 0.25s var(--spring);
  display: flex; flex-direction: column;
}
.quicklook-overlay.active .quicklook-panel { transform: scale(1); }
.quicklook-panel .dot.red { cursor: pointer; }

/* Player modal */
.player-panel { width: 420px; max-width: 92vw; max-height: 90vh; }
.player-body { padding: 22px 26px 20px; display: flex; flex-direction: column; align-items: center; overflow-y: auto; }
.player-art { position: relative; color: var(--text); margin-bottom: 16px; }
.player-art[data-mood] { color: var(--mood-melancolie); }
.player-art[data-mood="rage"] { color: var(--mood-rage); }
.player-art[data-mood="lumiere"] { color: var(--mood-lumiere); }
.player-art[data-mood="doute"] { color: var(--mood-doute); }
.player-art[data-mood="nuit"] { color: var(--mood-nuit); }
.player-art[data-mood="feu"] { color: var(--mood-feu); }
.player-fresh {
  position: absolute; top: -4px; right: -4px; font-size: 9px; font-weight: 600; color: #fff;
  background: var(--accent); padding: 2px 7px; border-radius: 100px;
}
.player-title { font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 8px; }
.player-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary);
  background: var(--sidebar-active); padding: 3px 9px; border-radius: 100px;
}
.chip[data-mood]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }

.player-controls { width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.player-play { width: 40px; height: 40px; }
.player-progress { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; cursor: pointer; }
.player-progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 3px; }
.player-time { font-size: 10px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; white-space: nowrap; }

.player-info { width: 100%; border-top: 0.5px solid var(--border-light); padding-top: 14px; }
.player-info-heading { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.player-info-table { display: flex; flex-direction: column; }
.player-info-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 0.5px solid var(--border-light); }
.player-info-row:last-child { border-bottom: none; }
.player-info-label { font-size: 11px; color: var(--text-secondary); flex-shrink: 0; }
.player-info-value { font-size: 11px; color: var(--text); text-align: right; }

.player-downloads { display: flex; gap: 8px; width: 100%; margin-top: 16px; }
.dl-btn {
  flex: 1; padding: 7px 12px; border: 0.5px solid var(--border); border-radius: 7px;
  background: var(--sidebar-active); color: var(--text); font-family: var(--font); font-size: 12px;
  cursor: pointer; transition: background var(--transition);
}
.dl-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.dl-wav { flex: 0 0 80px; }

/* README + Notes */
.readme-panel, .notes-panel { width: 480px; max-width: 92vw; max-height: 82vh; }
.readme-body { padding: 0; overflow-y: auto; }
.readme-content { padding: 22px 26px; font-family: var(--mono); }
.readme-content p { font-size: 12px; line-height: 1.75; color: var(--text); margin-bottom: 12px; }
.readme-sign { margin-top: 4px; color: var(--text-secondary); }
.readme-sign strong { color: var(--text); }

.notes-body { display: flex; flex-direction: column; overflow: hidden; max-height: calc(82vh - 38px); }
.notes-header { padding: 14px 20px 10px; font-size: 12px; font-weight: 500; border-bottom: 0.5px solid var(--border-light); font-family: var(--mono); }
.notes-list { flex: 1; overflow-y: auto; padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.notes-empty { font-size: 11px; color: var(--text-tertiary); text-align: center; padding: 24px 0; font-style: italic; }
.note-entry { padding: 8px 10px; background: var(--sidebar-hover); border: 0.5px solid var(--border-light); border-radius: 6px; }
.note-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.note-entry-name { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.note-streak { font-size: 11px; }
.note-entry-date { font-size: 10px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.note-entry-message { font-size: 11px; color: var(--text); line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.notes-form { padding: 10px 20px 14px; border-top: 0.5px solid var(--border-light); display: flex; flex-direction: column; gap: 6px; }
.notes-input, .notes-textarea {
  width: 100%; padding: 6px 8px; border: 0.5px solid var(--border); border-radius: 5px;
  background: var(--field-bg); font-family: var(--font); font-size: 12px; color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.notes-input:focus, .notes-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,122,255,0.18); }
.notes-textarea { resize: none; min-height: 48px; line-height: 1.4; }
.notes-submit-btn {
  align-self: flex-end; padding: 5px 16px; border: 0.5px solid var(--border); border-radius: 6px;
  background: var(--sidebar-active); color: var(--text); font-family: var(--font); font-size: 12px;
  cursor: pointer; transition: background var(--transition);
}
.notes-submit-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.notes-submit-btn:disabled { opacity: 0.45; cursor: default; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none; position: fixed; top: 9px; left: 10px; z-index: 1000; width: 30px; height: 30px;
  border-radius: 6px; border: none; background: var(--panel-bg); box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.mobile-menu-btn span { display: block; width: 14px; height: 1.5px; background: var(--text); border-radius: 1px; }

/* ============================================================ MOBILE — iOS Files */
@media (max-width: 640px) {
  body { align-items: flex-start; overflow: hidden; }
  .finder-window { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; animation: none; }
  .title-bar { padding-left: 46px; }
  .theme-toggle { font-size: 17px; }
  .mobile-menu-btn { display: flex; }
  .toolbar-search { width: auto; flex: 1; }
  .toolbar-path { display: none; }

  .sidebar {
    position: absolute; top: 38px; left: 0; bottom: 0; z-index: 100; width: 220px;
    transform: translateX(-100%); transition: transform 0.25s var(--spring);
    box-shadow: 2px 0 16px rgba(0,0,0,0.18);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close-mobile {
    display: flex; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: none;
    background: transparent; color: var(--text-secondary); cursor: pointer; border-radius: 4px;
    align-items: center; justify-content: center;
  }

  /* iOS Files: switch the list into an icon grid */
  .column-headers { display: none; }
  .file-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px 6px; padding: 14px 12px 90px;
  }
  .file-row {
    flex-direction: column; height: auto; padding: 12px 6px 10px; gap: 8px; border-radius: 10px;
    text-align: center; background: var(--sidebar-hover);
  }
  .file-row.selected { background: var(--selected-bg); }
  .file-row.playing { box-shadow: inset 0 0 0 1.5px var(--accent); }
  .cell-name { flex-direction: column; gap: 6px; width: 100%; }
  .cell-name .file-icon-svg { width: 40px; height: 40px; }
  .file-name { white-space: normal; font-size: 12px; line-height: 1.3; max-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cell-mood { width: auto; justify-content: center; }
  .mood-label { display: none; }
  .cell-plays { width: auto; font-size: 10px; }
  .cell-date, .cell-size { display: none; }

  /* bottom tab bar */
  .status-bar { display: none; }
  .mobile-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: calc(54px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: var(--toolbar-bg);
    border-top: 0.5px solid var(--border); z-index: 3500;
  }
  .mini-player { bottom: calc(58px + env(safe-area-inset-bottom)); width: 92vw; }
}
@media (min-width: 641px) { .mobile-tabs { display: none; } }

.mobile-tabs {
  display: none; align-items: stretch;
}
.tab-btn {
  flex: 1; border: none; background: transparent; color: var(--text-secondary); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; font-family: var(--font);
}
.tab-btn.active { color: var(--accent); }
.tab-btn .tab-ico { font-size: 17px; line-height: 1; }

/* Scrollbars */
.content::-webkit-scrollbar, .sidebar::-webkit-scrollbar, .notes-list::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb, .notes-list::-webkit-scrollbar-thumb { background: rgba(128,128,128,0); border-radius: 4px; }
.content:hover::-webkit-scrollbar-thumb, .sidebar:hover::-webkit-scrollbar-thumb, .notes-list:hover::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.35); }
