/* ═════════════════════════════════════════════════════════════════
   ФАРШБОКС — стили. Тема «тёмная мясная».
   ═════════════════════════════════════════════════════════════════ */

:root {
  --bg: #1a0f0f;          /* тёмно-вишнёвый, почти чёрный */
  --bg-card: #2a1810;     /* карточки */
  --text: #f5e6d3;        /* светло-кремовый, как жир на мясе */
  --accent: #c75b39;      /* жареное мясо */
  --accent2: #8b4513;     /* сырой фарш */
  --success: #6b8e23;     /* свежая зелень */
  --error: #8b0000;       /* кроваво-красный */
  --muted: rgba(245, 230, 211, 0.55);
  --border: rgba(139, 69, 19, 0.6);
}

/* Светлая тема (переключается в Настройках) */
body.light {
  --bg: #f5e6d3;
  --bg-card: #fff8f0;
  --text: #2a1810;
  --accent: #c75b39;
  --accent2: #8b4513;
  --muted: rgba(42, 24, 16, 0.6);
  --border: rgba(199, 91, 57, 0.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  /* Едва заметная текстура «фарша» на фоне */
  background-image:
    repeating-radial-gradient(circle at 15% 25%, rgba(245,230,211,0.03) 0px, rgba(245,230,211,0.03) 2px, transparent 3px),
    repeating-radial-gradient(circle at 70% 60%, rgba(139,69,19,0.05) 0px, rgba(139,69,19,0.05) 2px, transparent 4px);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;
}

/* ═════════════════ ЛОГОТИП «ФАРШБОКС» ИЗ ФАРША ═════════════════ */

.logo{position:relative;display:block;width:min(100%,330px);margin-inline:auto;}
.logo img{display:block;width:100%;height:auto;}
.living-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
.logo-small{width:230px;max-width:66%;margin:0;flex-shrink:0;}
#splash-logo{width:min(65vw,280px);margin:0;}
.slogan{text-align:center;color:var(--muted);font-size:13px;margin-top:8px;letter-spacing:1px;}
.splash-caption{font-size:13px;color:#b69c97;letter-spacing:2px;margin-top:32px;}
/* ═════════════════ ЭКРАН-ЗАСТАВКА ═════════════════ */

#splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.6s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }

/* Полоска загрузки с заставки убрана: ждать на ней нечего,
   приложение открывается сразу, как будет готово. */

/* ═════════════════ ШАПКА ═════════════════ */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.greeting { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═════════════════ ЭКРАНЫ ═════════════════ */

.screen { display: none; padding: 16px 14px; animation: fade 0.25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h2.title { color: var(--accent); font-size: 20px; margin: 4px 0 16px; }
.muted { color: var(--muted); font-size: 13px; }

/* ═════════════════ ФОРМЫ ═════════════════ */

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }

input[type="text"], input[type="tel"], input[type="password"], input[type="email"], select, textarea {
  width: 100%;
  padding: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.checkbox-label input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ═════════════════ КНОПКИ (мясные штампы) ═════════════════ */

button, .btn {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #f5e6d3;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.2s ease;
}
button:hover { filter: brightness(1.15); }
button:active { transform: scale(0.97); }
button.wide { width: 100%; margin-top: 18px; }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.small { padding: 8px 14px; font-size: 13px; }
button.danger { background: linear-gradient(135deg, #5a0000, var(--error)); }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px;
  font-size: 14px;
}
.tabs button.active { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #f5e6d3; border-color: var(--accent); }

/* ═════════════════ КАРТОЧКИ ТРЕКОВ ═════════════════ */

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease;
  cursor: pointer;
}
/* «Прилипает» как фарш к рукам */
.track-card:active { transform: scale(0.98); }

.track-title { font-size: 16px; font-weight: bold; margin-bottom: 3px; }
.track-artist { font-size: 13px; color: var(--accent); margin-bottom: 6px; }
.track-genre {
  display: inline-block;
  font-size: 11px;
  background: rgba(139, 69, 19, 0.4);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 20px;
  color: var(--text);
}
.track-desc { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }
.more-btn { background: none; border: none; color: var(--accent); padding: 0 0 0 4px; font-size: 13px; font-weight: bold; }
.track-meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; align-items: center; }
.track-meta span { display: flex; align-items: center; gap: 4px; }
.energy-bar { height: 5px; background: rgba(139,69,19,0.3); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.energy-bar div { height: 100%; background: linear-gradient(90deg, #8b4513, #c75b39); border-radius: 3px; transition: width 0.4s ease; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; line-height: 1.6; }

/* ═════════════════ ПЛЕЕР ═════════════════ */

#player {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: none;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  overflow-y: auto;
  padding: 16px 18px 30px;
}
#player.open { display: flex; }

.player-close { align-self: flex-start; background: none; border: none; color: var(--accent); font-size: 26px; padding: 0; }

.player-title { font-size: 22px; font-weight: bold; text-align: center; }
.player-artist { font-size: 15px; color: var(--accent); text-align: center; margin-top: 4px; }
.player-desc { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 4px; line-height: 1.5; }

.progress {
  height: 8px;
  background: rgba(139, 69, 19, 0.35);
  border-radius: 4px;
  margin: 18px 0 6px;
  cursor: pointer;
  position: relative;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #8b4513 0%, #c75b39 100%);
}
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.player-controls { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 20px 0; }
.play-btn {
  width: 66px; height: 66px; border-radius: 50%;
  font-size: 24px; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.icon-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 50%; width: 48px; height: 48px; padding: 0; font-size: 18px; }

.comments { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 14px; }
.comment { background: var(--bg-card); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.comment b { color: var(--accent); }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; }

/* ═════════════════ НИЖНЕЕ МЕНЮ ═════════════════ */

nav.bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 60;
}
nav.bottom button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 10px 2px 12px;
  font-size: 10px;
  font-weight: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border-radius: 0;
}
nav.bottom button.active { color: var(--accent); }
nav.bottom .ico { font-size: 19px; }

/* Кнопка [+] загрузки трека */
#fab {
  position: fixed;
  right: calc(50% - 240px + 16px);
  bottom: 78px;
  width: 58px; height: 58px;
  border-radius: 50%;
  font-size: 28px;
  padding: 0;
  z-index: 70;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  display: none;
}
@media (max-width: 512px) { #fab { right: 16px; } }

/* ═════════════════ МОДАЛЬНЫЕ ОКНА ═════════════════ */

.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-inner {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px 16px 30px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h3 { margin: 0; color: var(--accent); font-size: 18px; }
.modal-head button { background: none; border: none; color: var(--muted); font-size: 24px; padding: 0; }

/* Аккордеон FAQ */
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 14px; font-weight: bold; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.faq-a { padding: 0 14px 14px; font-size: 13px; color: var(--muted); line-height: 1.6; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q { color: var(--accent); }

/* Roadmap */
.rm-group { margin-bottom: 20px; }
.rm-group h3 { font-size: 15px; margin-bottom: 8px; }
.rm-item { background: var(--bg-card); border-left: 3px solid var(--accent2); padding: 11px 13px; border-radius: 8px; margin-bottom: 7px; font-size: 14px; }
.rm-done .rm-item { border-left-color: var(--success); }
.rm-prog .rm-item { border-left-color: var(--accent); }

/* Правила */
.rules-text { font-size: 14px; line-height: 1.7; }
.rules-text li { margin-bottom: 8px; }

/* Уведомления (тосты) */
#toast {
  position: fixed;
  left: 50%; bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--error); }
#toast.ok { border-color: var(--success); }

/* Статистика профиля */
.stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 16px 0; }
.stat-cell { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 8px; text-align: center; }
.stat-cell b { display: block; font-size: 22px; color: var(--accent); }
.stat-cell span { font-size: 11px; color: var(--muted); }

.avatar {
  width: 74px; height: 74px;
  margin: 0 auto 12px;
  background-image:
    radial-gradient(ellipse at 25% 35%, rgba(245, 230, 211, 0.7) 0 1.7px, transparent 2.3px),
    radial-gradient(ellipse at 70% 68%, rgba(139, 69, 19, 0.65) 0 1.3px, transparent 1.9px),
    radial-gradient(ellipse at 50% 15%, rgba(150, 45, 38, 0.4) 0 1.1px, transparent 1.7px),
    linear-gradient(135deg, #e8c4b8, #c8836f);
  background-size: 11px 9px, 13px 15px, 8px 12px, 100% 100%;
  border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: bold; color: #5a2d1a;
  box-shadow: inset -2px -2px 5px rgba(139,69,19,0.35), 2px 2px 8px rgba(0,0,0,0.4);
}

/* Кнопка выбора MP3-файла */
.file-pick {
  display: block;
  margin: 0;
  padding: 14px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--accent2);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.file-pick:hover { border-color: var(--accent); }
.file-pick.chosen { border-style: solid; border-color: var(--success); }

.switch-row { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; font-size: 14px; }

/* ═════════════════ ЭКРАН «НЕТ СВЯЗИ С СЕРВЕРОМ» ═════════════════ */

#offline {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#offline.open { display: flex; }

.offline-inner { max-width: 380px; text-align: center; }
.offline-icon { font-size: 52px; margin-bottom: 10px; }
#offline h2 { color: var(--accent); font-size: 21px; margin: 0 0 14px; }
#offline p { font-size: 14px; line-height: 1.6; margin: 12px 0; }
#offline code {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
}
#offline button { margin-top: 18px; min-width: 170px; }
#offline button:disabled { opacity: 0.6; cursor: default; }


/* ═════════════════ РЕЖИМЫ ВОСПРОИЗВЕДЕНИЯ ═════════════════ */

.play-modes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 16px;
}
.play-modes .mode-btn {
  flex: 1;
  max-width: 130px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 17px;
  font-weight: normal;
  padding: 9px 6px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.play-modes .mode-btn span { font-size: 11px; }
.play-modes .mode-btn.on {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #f5e6d3;
  border-color: var(--accent);
}

/* Израсходованные действия: лайк и жалоба по одному на трек */
.icon-btn.used { opacity: 0.5; border-color: var(--accent); color: var(--accent); }
.comment-form input:disabled { opacity: 0.55; }
.comment-form button:disabled { opacity: 0.4; cursor: default; }

/* ═════════════════ ФИЛЬТР ПО ЖАНРАМ ═════════════════ */

.genre-picker { display: flex; gap: 8px; }
.genre-picker input { flex: 1; }
.genre-picker button { padding: 0 18px; font-size: 20px; }

#genre-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
#genre-chips:empty { margin-top: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 69, 19, 0.4);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 5px 6px 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}
.chip button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0 4px;
  font-size: 13px;
  line-height: 1;
}
.chip button:hover { color: var(--accent); }

.chip-clear {
  background: none;
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: normal;
}

/* ═════════════════ ВЫБОР ЖАНРОВ ГАЛОЧКАМИ ═════════════════ */

.genre-list { max-height: 55vh; overflow-y: auto; margin: 12px 0; }

.genre-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 6px;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-card);
  font-size: 14px;
  margin: 0;
  color: var(--text);
}
.genre-checkbox:hover { background: var(--bg-card); }
.genre-checkbox input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.genre-checkbox.ai span { color: #b98cd8; font-weight: bold; }

#track-genre[readonly] { cursor: pointer; }

/* Жанр как тег: кликабельный, ведёт в фильтр ленты */
.track-genre { cursor: pointer; margin-right: 5px; }
.track-genre:hover { border-color: var(--accent); }

.track-genre.ai-badge {
  background: linear-gradient(135deg, #5b2a7a, #8e4bb8);
  border-color: #b98cd8;
  color: #f3e6ff;
}

/* ═════════════════ БИТВА ═════════════════ */

.battle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.battle-genres { margin: 8px 0 4px; }
.battle-actions { display: flex; gap: 8px; margin-top: 12px; }
.battle-actions button { flex: 1; }

.battle-vs {
  text-align: center;
  color: var(--accent);
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 12px 0;
}

/* Победитель недели в шапке ленты */
.week-winner {
  background: var(--bg-card);
  border: 1px solid #c9a227;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  cursor: pointer;
}
.week-winner-label {
  font-size: 12px;
  color: #e3bf4a;
  font-weight: bold;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

/* Бейджи на своих треках */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: bold;
}
.badge-day  { background: rgba(199, 91, 57, 0.25); border: 1px solid var(--accent); color: var(--text); }
.badge-week { background: rgba(201, 162, 39, 0.2); border: 1px solid #c9a227; color: #e3bf4a; }

/* ═════════════════ БАННЕР СОСТОЯНИЯ СВЯЗИ ═════════════════ */

/* ═════════════════ НЕТ СВЯЗИ ═════════════════
   Раньше это была полоска вверху экрана. На телефоне она попадала
   под строку состояния и не читалась. Теперь — карточка по центру.
   Фон карточки сквозной: приложение не блокируется, по нему
   можно ходить и читать сохранённое. */

#conn-banner {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
#conn-banner.open { display: flex; }

.conn-card {
  pointer-events: auto;
  width: 100%;
  max-width: 320px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--error);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  animation: fade 0.25s ease;
}
.conn-icon { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.conn-card h3 { color: var(--accent); font-size: 17px; margin: 0 0 8px; }
.conn-card p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.conn-actions { display: flex; gap: 8px; }
.conn-actions button { flex: 1; white-space: nowrap; }

/* Свёрнутое напоминание — внизу, подальше от строки состояния */
#conn-pill {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 65;
  background: var(--bg-card);
  border: 1px solid var(--error);
  color: var(--text);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
#conn-pill.open { display: block; }

.cache-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
  text-align: center;
}

/* Оформление 27.10.2026: фактура сосредоточена в фирменном знаке. */
:root{--bg:#0e0c0e;--bg-card:#1c171a;--text:#f0e8e4;--accent:#e78b7f;--accent2:#a45e58;--muted:#b2a3a5;--border:#3b2c32;--error:#df7077;}
body{background-image:none;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;}
#splash{background:#000;}
header{padding:8px 16px;border-bottom-color:var(--border);}
.offline-tracks{padding:58px 12px!important;text-align:center;}
.offline-tracks h3{color:var(--text);font-weight:500;font-size:17px;margin:22px 0 10px;}
.offline-tracks p{font-size:13px;line-height:1.7;}
.offline-disc{width:75px;height:75px;border:1px solid var(--border);border-radius:50%;margin:auto;background:repeating-radial-gradient(circle,var(--bg-card) 0 6px,var(--border) 7px,var(--bg-card) 8px);position:relative;}
.offline-disc:after{content:'';position:absolute;inset:29px;border:1px solid var(--accent);border-radius:50%;background:var(--bg);}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;}}

/* Закреплённый плеер: один audio для ленты и полного экрана. */
:root { --nav-height: 62px; }
nav.bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }
body.has-mini-player #app { padding-bottom: calc(var(--nav-height) + 90px); }
body.has-mini-player #fab { bottom: calc(var(--nav-height) + 86px); }
body.player-expanded { position: fixed; width: 100%; overflow: hidden; }
#mini-player { position: fixed; z-index: 65; left: 0; right: 0; bottom: var(--nav-height); max-width: 480px; margin: auto; height: 72px; display: flex; align-items: center; background: var(--bg-card); border-top: 1px solid var(--border); box-shadow: 0 -8px 28px #0003; }
#mini-player[hidden] { display: none; }
.mini-open { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; border-radius: 0; padding: 10px 14px; color: var(--text); }
.mini-open img { flex-shrink: 0; border-radius: 10px; object-fit: contain; background: #000; }
.mini-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-copy strong, .mini-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-copy strong { font-size: 14px; }
.mini-copy span { font-size: 12px; color: var(--muted); font-weight: 400; }
#mini-play { width: 48px; height: 48px; flex-shrink: 0; padding: 0; margin-right: 10px; border-radius: 50%; font-size: 19px; }
.mini-progress-track { position: absolute; top: 0; left: 0; right: 0; height: 2px; pointer-events: none; }
#mini-progress { height: 100%; width: 0; background: var(--accent); }
#player { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(30px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }

/* Иконка битвы: две скрещённые жареные голени. */
.battle-icon { width: 1.65em; height: 1.65em; object-fit: contain; vertical-align: middle; flex-shrink: 0; }
nav .ico .battle-icon { width: 30px; height: 30px; }
