:root {
  --bg: #0d0c0b;
  --bg-2: #161412;
  --bg-3: #1f1c19;
  --line: #2c2824;
  --text: #ece7de;
  --muted: #958c80;
  --ember: #ff5a1f;
  --ember-2: #ffb36b;
  --chord: #ff8a4c;
  --ok: #7bd389;
  --danger: #ff5c5c;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --pad: 16px;
  --radius: 10px;
}
@media (min-width: 760px) { :root { --pad: 28px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13,12,11,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: 16px; padding: 12px var(--pad); max-width: 1100px; margin: 0 auto; }
.logo { font: 900 18px/1 var(--display); letter-spacing: .12em; }
.logo i { color: var(--ember); font-style: normal; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.on { background: var(--bg-3); color: var(--text); }
.tab .n { color: var(--muted); font-weight: 500; margin-left: 4px; }
.me { position: relative; }
.me__btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2);
  font-weight: 700; cursor: pointer; display: grid; place-items: center;
}
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 30;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.menu__who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px; }
.menu a, .menu button {
  display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px;
  background: none; border: 0; cursor: pointer; font-size: 14px;
}
.menu a:hover, .menu button:hover { background: var(--bg-3); }
@media (max-width: 560px) {
  .top__row { flex-wrap: wrap; gap: 10px; }
  .tabs { order: 3; flex-basis: 100%; }
  .logo { flex: 1; }
}

/* ---------- раскладка ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 24px var(--pad) 80px; }
.page--narrow { max-width: 720px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
h1 { font: 700 clamp(24px, 4vw, 34px)/1.15 var(--display); }
h2 { font: 700 20px/1.2 var(--display); }
.sub { color: var(--muted); margin-top: 4px; }

/* ---------- кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, opacity .15s;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.btn--accent { background: var(--ember); border-color: var(--ember); color: #160b05; }
.btn--accent:hover { background: var(--ember-2); border-color: var(--ember-2); }
.btn--ghost { background: none; }
.btn--danger { color: var(--danger); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--icon { width: 38px; height: 38px; padding: 0; font-size: 18px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-2); outline: none; transition: border-color .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--ember); }
.textarea { font: 14px/1.45 var(--mono); min-height: 340px; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-2); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--bg-3); color: var(--text); }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.note { padding: 12px 14px; border-radius: var(--radius); background: rgba(255,90,31,.08); border: 1px solid rgba(255,90,31,.3); font-size: 14px; margin-bottom: 14px; }
.note--ok { background: rgba(123,211,137,.08); border-color: rgba(123,211,137,.3); }

/* ---------- список песен ---------- */
.search { position: relative; margin-bottom: 16px; }
.search .input { padding-left: 40px; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; }
.list { list-style: none; border-top: 1px solid var(--line); }
.item {
  display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .12s;
}
.item:hover { background: var(--bg-2); }
.item__main { flex: 1; min-width: 0; }
.item__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key { font: 700 13px/1 var(--mono); color: var(--chord); background: rgba(255,138,76,.1); padding: 6px 8px; border-radius: 6px; min-width: 42px; text-align: center; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* ---------- песня ---------- */
.song-head { margin-bottom: 14px; }
.song-head .artist { color: var(--muted); font-size: 17px; margin-top: 4px; }
.tools {
  position: sticky; top: 61px; z-index: 10; background: var(--bg);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
@media (max-width: 560px) { .tools { top: 101px; } }
.tp { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-2); }
.tp button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; cursor: pointer; font-size: 18px; font-weight: 700; }
.tp button:hover { background: var(--bg-3); }
.tp__val { min-width: 92px; text-align: center; font-size: 13px; line-height: 1.15; }
.tp__val b { display: block; font: 700 15px/1.1 var(--mono); color: var(--chord); }
.spacer { flex: 1; }

.sheet {
  font: var(--fs, 16px)/1.38 var(--mono); white-space: pre; overflow-x: auto; padding-bottom: 8px;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; /* иначе в табах «-|» склеивается в стрелку */
  -webkit-overflow-scrolling: touch;
}
.sheet .ln { min-height: 1.38em; }
.sheet .gap { height: .9em; min-height: 0; }
.sheet .ch { color: var(--chord); font-weight: 700; }
.sheet .ch .c { font-weight: 700; }
.sheet .sec { color: var(--ember-2); font-weight: 700; margin-top: .4em; font-family: var(--body); }
.meta-line { margin-top: 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; }
.meta-line a { text-decoration: underline; }
.notes-box { white-space: pre-wrap; margin-bottom: 18px; }

/* ---------- редактор ---------- */
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.editor .preview { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } .editor .preview { position: static; max-height: none; } }
.importer { display: flex; gap: 8px; }
.importer .input { flex: 1; }
@media (max-width: 560px) { .importer { flex-direction: column; } }

/* ---------- концерты ---------- */
.set-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); background: var(--bg); }
.set-item.drag { opacity: .4; }
.set-item.over { box-shadow: inset 0 2px 0 var(--ember); }
.set-item__n { width: 26px; text-align: right; color: var(--muted); font: 600 14px var(--mono); }
.handle { cursor: grab; color: var(--muted); padding: 4px; font-size: 18px; user-select: none; touch-action: none; }
.mini { display: inline-flex; align-items: center; gap: 2px; }
.mini button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; font-weight: 700; }
.mini .key { min-width: 48px; }
@media (max-width: 560px) { .hide-sm { display: none !important; } }

/* ---------- модалка ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .modal-bg { align-items: center; } }
.modal {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px 16px 0 0; width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column;
}
@media (min-width: 640px) { .modal { border-radius: 16px; } }
.modal__head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal__body { padding: 16px 18px; overflow-y: auto; }
.modal__foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--ember); }

/* ---------- сцена ---------- */
.stage { position: fixed; inset: 0; background: var(--bg); z-index: 40; display: flex; flex-direction: column; }
.stage__bar { display: flex; align-items: center; gap: 10px; padding: 10px var(--pad); border-bottom: 1px solid var(--line); }
.stage__title { flex: 1; min-width: 0; }
.stage .tp__val { min-width: 48px; }
.stage .tp button { width: 30px; height: 30px; }
@media (max-width: 560px) { .stage__bar { gap: 6px; padding: 8px 10px; } }
.stage__title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__title span { color: var(--muted); font-size: 13px; }
.stage__body { flex: 1; overflow: auto; padding: 18px var(--pad) 120px; }
.stage__nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.stage__nav .btn { pointer-events: auto; padding: 14px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }

/* ---------- вход ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--pad); background: radial-gradient(ellipse 70% 50% at 50% 110%, rgba(255,90,31,.22), transparent 70%), var(--bg); }
.auth__box { width: 100%; max-width: 380px; }
.auth__logo { font: 900 64px/1 var(--display); letter-spacing: .04em; text-align: center; margin-bottom: 6px; }
.auth__tag { text-align: center; color: var(--muted); margin-bottom: 28px; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }

/* =====================================================================
   ОФОРМЛЕНИЕ: сажа и угли — тёплое свечение, зерно, карточки
   ===================================================================== */
body {
  background:
    radial-gradient(ellipse 80% 40% at 15% -10%, rgba(255,90,31,.13), transparent 60%),
    radial-gradient(ellipse 60% 35% at 100% 0%, rgba(255,179,107,.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app { position: relative; z-index: 1; }

/* шапка */
.top { background: rgba(13,12,11,.78); }
.logo { position: relative; padding-right: 4px; }
.logo { white-space: nowrap; }
.logo .logo__band {
  display: inline-block; margin-left: 6px; font: 600 13px/1 var(--body); letter-spacing: .14em; text-transform: lowercase;
  color: var(--ember); vertical-align: 2px;
  text-shadow: 0 0 10px rgba(255,90,31,.8), 0 0 22px rgba(255,90,31,.45); animation: ember 3.2s ease-in-out infinite;
}
.auth__band {
  display: block; margin-top: 6px; font: 600 18px/1 var(--body); letter-spacing: .5em; text-indent: .5em; text-transform: lowercase;
  color: var(--ember); -webkit-text-fill-color: var(--ember); text-shadow: 0 0 14px rgba(255,90,31,.7);
}
@keyframes ember { 0%, 100% { opacity: 1; } 45% { opacity: .55; } 60% { opacity: .9; } }
.tab { position: relative; }
.tab.on { background: linear-gradient(180deg, rgba(255,90,31,.16), rgba(255,90,31,.06)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,90,31,.28); }
.tab .n { font-size: 12px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.06); }
.me__btn { background: linear-gradient(145deg, #2a221c, #15110e); border-color: rgba(255,90,31,.35); color: var(--ember-2); }

/* заголовки */
h1 { letter-spacing: -.01em; }
.head h1, .song-head h1 {
  background: linear-gradient(100deg, var(--text) 30%, #ffd2b0 70%, var(--ember-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--ember); vertical-align: middle; margin-right: 8px; border-radius: 2px; }
.back { display: inline-block; color: var(--muted); font-size: 14px; padding: 4px 0; transition: color .15s; }
.back:hover { color: var(--ember-2); }

/* кнопки */
.btn--accent { background: linear-gradient(135deg, #ff7a2f, var(--ember) 55%, #e8430f); border-color: transparent; box-shadow: 0 6px 20px -8px rgba(255,90,31,.7); }
.btn--accent:hover { background: linear-gradient(135deg, var(--ember-2), #ff7a2f); box-shadow: 0 8px 26px -8px rgba(255,90,31,.9); }
.btn.on { border-color: rgba(255,90,31,.6); color: var(--ember-2); }
.btn--stop { background: rgba(255,92,92,.12); border-color: rgba(255,92,92,.45); color: #ffb0b0; }
.btn--stop:hover { background: rgba(255,92,92,.22); border-color: var(--danger); }
.scroll-ctl { display: inline-flex; gap: 6px; }

/* списки песен — карточки */
.list { border-top: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { #list { grid-template-columns: 1fr 1fr; } }
.item {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  transition: border-color .2s, transform .2s, box-shadow .2s, background .2s;
}
.item:hover { background: linear-gradient(180deg, rgba(255,90,31,.07), rgba(255,90,31,.015)); border-color: rgba(255,90,31,.35); transform: translateY(-1px); box-shadow: 0 10px 30px -18px rgba(255,90,31,.6); }
.item > .muted:last-child { transition: transform .2s, color .2s; }
.item:hover > .muted:last-child { transform: translateX(3px); color: var(--ember-2); }
.key {
  border-radius: 10px; min-width: 46px; padding: 9px 8px;
  background: radial-gradient(circle at 30% 25%, rgba(255,138,76,.28), rgba(255,90,31,.08) 70%);
  box-shadow: inset 0 0 0 1px rgba(255,138,76,.25);
}
.empty { position: relative; overflow: hidden; border: 1px dashed var(--line); border-radius: 16px; }
.empty::after { content: "САЖА"; position: absolute; inset: auto 0 -30px; font: 900 110px/1 var(--display); color: rgba(255,255,255,.025); pointer-events: none; }

/* песня */
.song-head { margin: 14px 0 10px; }
.song-head__eyebrow { color: var(--ember); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 6px; }
.song-head h1 { font-size: clamp(28px, 5vw, 46px); }
.song-head__row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
.song-head .artist { margin: 0; font-size: 18px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); transition: color .15s, border-color .15s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip--ss { color: #8fd3ff; border-color: rgba(143,211,255,.3); }
.chip--ss:hover { color: #c4e8ff; border-color: rgba(143,211,255,.6); }
.tools { background: linear-gradient(180deg, var(--bg) 75%, rgba(13,12,11,.92)); }
.sheet-card {
  position: relative; border-radius: 18px; padding: clamp(14px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.03);
}
.sheet-card::before {
  content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, transparent, var(--ember), transparent); opacity: .6;
}
.sheet .ch .c { color: var(--chord); text-shadow: 0 0 14px rgba(255,90,31,.45); }
.sheet .sec {
  display: inline-block; font-size: .78em; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 10px; margin: .9em 0 .35em; border-radius: 999px;
  background: rgba(255,179,107,.1); box-shadow: inset 0 0 0 1px rgba(255,179,107,.28);
}
.notes-box { border-left: 3px solid var(--ember); }

/* детали */
.det { display: grid; gap: 18px; }
.det__sec { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.det__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.det__head b { flex: 1; }
.det__ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(255,90,31,.15); color: var(--ember-2); }
.det__ico--ss { background: rgba(143,211,255,.14); color: #8fd3ff; }
.ss-list { list-style: none; margin-top: 10px; max-height: 260px; overflow: auto; }
.ss-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* концерты */
.date-badge {
  width: 52px; flex: none; text-align: center; border-radius: 12px; padding: 6px 0 7px;
  background: linear-gradient(160deg, rgba(255,90,31,.22), rgba(255,90,31,.05)); box-shadow: inset 0 0 0 1px rgba(255,90,31,.3);
}
.date-badge b { display: block; font: 800 20px/1.1 var(--display); color: var(--text); }
.date-badge span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ember-2); }
.date-badge--none b { font-size: 16px; color: var(--muted); }
.set-item { border-radius: 12px; border: 1px solid transparent; border-bottom-color: var(--line); padding-left: 8px; padding-right: 8px; }
.set-item:hover { border-color: var(--line); background: rgba(255,255,255,.02); }

/* сцена */
.stage { background: radial-gradient(ellipse 90% 30% at 50% -5%, rgba(255,90,31,.12), transparent 70%), var(--bg); }
.stage .sheet .ch .c { text-shadow: 0 0 18px rgba(255,90,31,.55); }

/* вход */
.auth__logo { background: linear-gradient(180deg, var(--text), #ffb36b 140%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(255,90,31,.25)); }
.auth .card { background: rgba(22,20,18,.85); backdrop-filter: blur(8px); }

/* статистика (админ) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.stat { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008)); }
.stat--wide { grid-column: 1 / -1; }
.stat__label { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.stat__big { font: 800 28px/1.1 var(--display); }
.stat__big small { font: 500 14px var(--body); color: var(--muted); }
.stat__sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.stat__sub b { color: var(--ember-2); font-weight: 600; }
.meter { display: flex; height: 10px; border-radius: 10px; background: var(--bg-3); overflow: hidden; margin: 14px 0 10px; }
.meter i { display: block; height: 100%; }
.meter__photo { background: linear-gradient(90deg, var(--ember), var(--ember-2)); }
.meter__video { background: linear-gradient(90deg, #4fa8e8, #8fd3ff); }
.stat__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-3); margin-right: 6px; vertical-align: 0; box-shadow: inset 0 0 0 1px var(--line); }
.dot--photo { background: var(--ember); } .dot--video { background: #8fd3ff; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
.tbl td { padding: 8px 4px; border-top: 1px solid var(--line); }
.tbl td:nth-child(2), .tbl td:nth-child(3) { text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* галерея */
.gallery { columns: 3 240px; column-gap: 10px; }
.tile {
  position: relative; break-inside: avoid; margin: 0 0 10px; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: var(--bg-2); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tile:hover { transform: translateY(-2px); border-color: rgba(255,90,31,.4); box-shadow: 0 14px 34px -18px rgba(255,90,31,.6); }
.tile img, .tile video { display: block; width: 100%; height: auto; background: #000; }
.tile--video video { aspect-ratio: 16 / 9; object-fit: cover; pointer-events: none; }
.tile__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 4px; font-size: 20px; color: #fff;
  background: rgba(255,90,31,.85); box-shadow: 0 0 0 6px rgba(255,90,31,.25), 0 10px 30px rgba(0,0,0,.5);
}
.tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 13px;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 560px) { .gallery { columns: 2 140px; column-gap: 6px; } .tile { margin-bottom: 6px; border-radius: 9px; } }

.queue { display: grid; gap: 6px; margin-bottom: 14px; }
.q { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.q__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q__bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.q__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--ember-2)); transition: width .2s; }
.q--ok { border-color: rgba(123,211,137,.4); }
.q--ok .q__bar i { background: var(--ok); }
.q--err { border-color: rgba(255,92,92,.5); }
.q--err .q__size { color: #ffb0b0; }
.q--err .q__bar { display: none; }

.drop-hint {
  position: fixed; inset: 12px; z-index: 45; border-radius: 20px; border: 2px dashed var(--ember); pointer-events: none;
  background: rgba(13,12,11,.82); display: grid; place-items: center; font: 700 22px var(--display); color: var(--ember-2);
}

.lb { position: fixed; inset: 0; z-index: 55; background: rgba(5,4,4,.96); display: flex; flex-direction: column; }
.lb__bar { display: flex; align-items: center; gap: 8px; padding: 10px var(--pad); }
.lb__count { color: var(--muted); font: 600 14px var(--mono); }
.lb__stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 var(--pad); }
.lb__stage img, .lb__stage video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; z-index: 2;
  border: 1px solid var(--line); background: rgba(22,20,18,.8); color: var(--text); font-size: 26px; cursor: pointer;
}
.lb__nav:hover { border-color: var(--ember); color: var(--ember-2); }
.lb__nav--l { left: 12px; } .lb__nav--r { right: 12px; }
@media (max-width: 560px) { .lb__nav { display: none; } }
.lb__foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom)); }
.lb__foot .input { flex: 1; min-width: 200px; background: rgba(22,20,18,.9); }
.lb__foot .muted { font-size: 13px; }

@media (prefers-reduced-motion: reduce) { .logo .logo__band { animation: none; } .item, .item:hover { transform: none; } }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--danger); color: #fff; }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
