:root {
  --bg: #14120f;
  --surface: #1d1a16;
  --surface-2: #26221c;
  --border: #3a342b;
  --text: #ece5d8;
  --muted: #9d9383;
  --accent: #d9a441;
  --accent-ink: #1a1408;
  --ok: #6cbf8a;
  --warn: #e0a84a;
  --danger: #d66a5a;
  --speech: #7fb3d5;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
h2 { font: 600 18px var(--serif); margin: 0 0 12px; letter-spacing: .2px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }

/* --- шапка --- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 10px 20px; background: #110f0cee; backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 26px; }
.brand-name { font: 700 20px var(--serif); color: var(--accent); line-height: 1; }
.brand-sub { font-size: 11px; color: var(--muted); }
.top-status { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.top-controls { display: flex; align-items: center; gap: 12px; }

.listen {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface);
}
.listen .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.listen.on .dot { background: var(--ok); box-shadow: 0 0 0 0 #6cbf8a88; animation: pulse 2s infinite; }
.listen.speech .dot { background: var(--speech); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px #6cbf8a00; } 100% { box-shadow: 0 0 0 0 #6cbf8a00; } }

.meter { position: relative; width: 140px; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.meter.big { width: 100%; height: 12px; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #4f8f68, var(--ok), var(--warn)); transition: width .08s linear; }
.meter-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--accent); }

.chip { padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: #3e6b4f; }
.chip.warn { color: var(--warn); border-color: #6b5530; }
.chip.err { color: var(--danger); border-color: #6b3a33; }
.chip.armed { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }

.campaign { display: flex; align-items: center; gap: 6px; }
.campaign select { max-width: 220px; padding: 5px 8px; }
.master { display: flex; align-items: center; gap: 6px; }
.master input { width: 110px; }

/* --- кнопки и поля --- */
.btn {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #5a5042; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: #f3c2b9; border-color: #6b3a33; background: #3a221d; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.icon { padding: 4px 8px; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=number], select, input:not([type]) {
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; min-width: 0;
}
input:focus, select:focus { outline: 2px solid #d9a44155; border-color: var(--accent); }
input[type=range] { accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

/* --- вкладки --- */
.tabs { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button {
  background: none; border: none; padding: 10px 16px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; font-weight: 600;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
main { padding: 20px; max-width: 1280px; margin: 0 auto; padding-bottom: 90px; }
.tab { display: none; }
.tab.active { display: block; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }

/* --- пульт --- */
.now { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.layer { background: var(--surface-2); border-radius: 8px; padding: 12px; border: 1px solid var(--border); }
.layer.playing { border-color: #6b5530; }
.layer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.layer-name { font-weight: 700; text-transform: capitalize; }
.layer-track { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-src { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer input[type=range] { width: 100%; margin-top: 8px; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 6px; }
.eq i { width: 3px; background: var(--accent); animation: eq 1s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }

.scene-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.scene-btn {
  text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); transition: transform .1s, border-color .2s;
}
.scene-btn:hover { border-color: var(--accent); }
.scene-btn:active { transform: scale(.97); }
.scene-btn .t { font-weight: 600; display: block; }
.scene-btn .s { font-size: 11px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-btns.dim .scene-btn { opacity: .55; }
.scene-btns.dim .scene-btn:hover { opacity: 1; }
label.scene-btn { display: block; }
label.scene-btn .check { align-items: flex-start; }
label.scene-btn .check > div { min-width: 0; overflow: hidden; }
label.scene-btn.chosen { border-color: var(--accent); background: #d9a4411a; }
.scene-btn.fired { animation: fired 1.2s ease-out; }
@keyframes fired { 0% { background: var(--accent); color: var(--accent-ink); } 100% { background: var(--surface-2); } }
.badge-passive { font-size: 10px; color: var(--speech); }

.testbox { display: flex; gap: 8px; flex-wrap: wrap; }
.testbox input { flex: 1; min-width: 200px; }
.test-result { margin-top: 10px; font-size: 13px; }
.lemma { display: inline-block; padding: 1px 6px; margin: 2px; border-radius: 4px; background: var(--surface-2); font-family: Consolas, monospace; font-size: 12px; }

.log { max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ev { display: grid; grid-template-columns: 62px 22px 1fr; gap: 6px; padding: 5px 6px; border-radius: 6px; font-size: 13px; }
.ev:hover { background: var(--surface-2); }
.ev .time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.ev.speech .text { color: var(--speech); }
.ev.command .text { color: var(--accent); font-weight: 600; }
.ev.error .text { color: var(--danger); }
.ev .meta { color: var(--muted); font-size: 11px; margin-left: 6px; }
.tag { display: inline-block; padding: 0 7px; margin-left: 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }

/* --- сцены --- */
.scenes { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 800px) { .scenes { grid-template-columns: 1fr; } }
.scene-list { display: flex; flex-direction: column; gap: 4px; }
.scene-item { padding: 9px 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.scene-item:hover { background: var(--surface-2); }
.scene-item.active { background: var(--surface-2); border-color: var(--accent); }
.scene-item .n { font-weight: 600; }
.scene-item .s { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1; min-width: 140px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.chips input { border: none; background: none; flex: 1; min-width: 160px; padding: 4px; }
.chips input:focus { outline: none; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-x button { background: none; border: none; cursor: pointer; color: var(--muted); padding: 0 4px; }
.chip-x button:hover { color: var(--danger); }

.actions {
  display: grid; gap: 10px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));   /* на широком экране — в два столбца */
}
.actions > .btn { grid-column: 1 / -1; justify-self: start; }
.action { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.action-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.action-head select { flex: 1; }
.action .row > .field { margin-bottom: 0; }
.range-val { display: flex; align-items: center; gap: 8px; }
.range-val input[type=range] { flex: 1; }
.range-val output { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.editor-foot { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* --- библиотека --- */
.lib { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 800px) { .lib { grid-template-columns: 1fr; } }
.folder { padding: 7px 10px; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.folder:hover { background: var(--surface-2); }
.folder.active { background: var(--surface-2); color: var(--accent); }
.folder .c { color: var(--muted); font-size: 12px; }
.file { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; }
.file:hover { background: var(--surface-2); }
.file .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .size { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.drop {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 22px; text-align: center;
  color: var(--muted); margin-bottom: 14px; cursor: pointer; transition: .15s;
}
.drop.over { border-color: var(--accent); color: var(--accent); background: #d9a44111; }
.used { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; }

/* --- настройки --- */
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }

/* --- низ --- */
.savebar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 18px;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 12px;
  box-shadow: 0 10px 30px #000a;
}
.toasts { position: fixed; right: 18px; bottom: 80px; display: flex; flex-direction: column; gap: 8px; z-index: 30; }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 6px 20px #0008; max-width: 380px; animation: tin .2s; }
.toast.err { border-color: var(--danger); }
.toast.ok { border-color: var(--ok); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.empty { color: var(--muted); padding: 20px; text-align: center; }
/* поле, которое видит только браузер: ему нужно куда-то подставить логин */
.offscreen { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.err { color: var(--danger); background: #3a221d; border: 1px solid #6b3a33; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }

/* --- вход --- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login { width: 100%; max-width: 380px; }
.login .field { margin-bottom: 14px; }
.login input { width: 100%; }

/* --- пользователи и пульт --- */
.who { display: flex; align-items: center; gap: 8px; }
.who .name { font-weight: 600; }
#micBtn.on { border-color: var(--ok); color: var(--ok); }
#modeSel { padding: 5px 8px; }
.pult-btn.mine { border-color: var(--ok); color: var(--ok); }
.pult-btn.busy { border-color: var(--warn); color: var(--warn); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.user-row:hover { background: var(--surface-2); }
.user-row .name { flex: 1; font-weight: 600; }
.readonly { opacity: .75; }
.scene-item.preset .n::after { content: " общая"; font-size: 10px; color: var(--muted); font-weight: 400; }
.banner { background: var(--surface-2); border: 1px solid var(--warn); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }

/* --- локации, эффекты, карта --- */
.scene-btn.here { border-color: var(--ok); background: #6cbf8a18; }
.badge-here { font-size: 10px; color: var(--ok); }
.scene-btn.fx { background: var(--surface); }
.map { position: relative; display: inline-block; max-width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.map img { display: block; max-width: 100%; height: auto; }
.map.editing { cursor: crosshair; }
.map.full { border: none; max-height: 86vh; }
.map.full img { max-height: 86vh; width: auto; }
.marker {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px;
  background: #14120fcc; border: 1px solid var(--border); color: var(--text);
  border-radius: 99px; padding: 3px 10px 3px 6px; cursor: pointer; font-size: 12px;
}
.marker:hover { border-color: var(--accent); }
.marker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.marker.here { border-color: var(--ok); color: var(--ok); }
.marker.here .dot { background: var(--ok); animation: pulse 2s infinite; }
.marker.selected { border-color: var(--accent); box-shadow: 0 0 0 2px #d9a44155; }
/* перетаскивание локаций в дереве */
.scene-item { position: relative; }
.scene-item[draggable="true"] { cursor: grab; }
.scene-item.dragging { opacity: .5; }
.scene-item.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.scene-item.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.scene-item.drop-inside { outline: 2px dashed var(--accent); outline-offset: -2px; }
.item-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.drop-root {
  margin-top: 8px; padding: 10px; text-align: center; font-size: 12px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 8px;
}
.drop-root.over { border-color: var(--accent); color: var(--accent); background: #d9a4411a; }
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.crumb { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.crumb:hover { background: var(--surface-2); color: var(--text); }
.crumb + .crumb::before { content: "›"; margin-right: 8px; color: var(--border); }
.crumb.cur { color: var(--accent); font-weight: 600; }
.scene-btn.inside { border-style: dashed; }
.map.editing .marker { cursor: grab; touch-action: none; }
.map.editing .marker.dragging { cursor: grabbing; opacity: .85; box-shadow: 0 4px 14px #000a; }
.overlay {
  position: fixed; inset: 0; z-index: 50; background: #0b0a08f2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px;
}
.overlay-head { display: flex; align-items: center; gap: 14px; }

/* --- рабочий стол кампании: три колонки, каждая крутится сама --- */
/* страница ровно в экран: крутятся только колонки, а не всё полотно */
@media (min-width: 1001px) {
  body.workspace { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
  body.workspace main { flex: 1; min-height: 0; width: 100%; overflow: hidden; padding-bottom: 20px; }
  body.workspace #tab-campaigns.active { height: 100%; }
  .camp { height: 100%; }
}
body.workspace main { max-width: 1920px; }
.camp {
  display: grid; gap: 14px; align-items: stretch;
  grid-template-columns: 270px minmax(330px, 1fr) minmax(460px, 1.15fr);
  grid-template-areas: "nav map edit";
}
.camp .col-nav { grid-area: nav; }
.camp .col-map { grid-area: map; }
.camp .col-edit { grid-area: edit; }
.camp .col {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; padding-right: 4px;
}
body.unsaved .camp .col { padding-bottom: 54px; }
.camp .col::-webkit-scrollbar { width: 10px; }
.camp .col::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; border: 2px solid var(--bg); }
.camp .card { padding: 12px; }
.camp .card.locs { flex: 1; min-height: 160px; }
/* поуже — карта уезжает под редактор, но колонки всё ещё независимы */
@media (max-width: 1499px) {
  .camp {
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-areas: "nav map" "nav edit";
    grid-template-rows: minmax(180px, 0.9fr) minmax(240px, 1.1fr);
  }
}
/* узкий экран и телефон — обычная лента */
@media (max-width: 1000px) {
  .camp { display: block; height: auto; }
  .camp .col { display: block; overflow: visible; margin-bottom: 14px; }
  .camp .card.locs { min-height: 0; }
}

/* --- спойлеры --- */
.sec { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
/* отступ только между блоками редактора: внутри сеток за это отвечает gap */
.card > .sec + .sec { margin-top: 10px; }
.sec > summary {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  cursor: pointer; user-select: none; list-style: none; border-radius: 8px;
}
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.sec[open] > summary::before { transform: rotate(90deg); }
.sec > summary:hover { background: var(--surface-2); }
.sec-t { font: 700 12px/1.4 var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); white-space: nowrap; }
.sec-s { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec[open] > summary .sec-s { opacity: .55; }
.sec-tools { display: flex; gap: 6px; margin-left: auto; }
.sec-b { padding: 2px 12px 12px; }
.sec-b > .field:last-child, .sec-b > .row:last-child > .field { margin-bottom: 0; }
.sec.act, .sec.fx { background: var(--surface-2); }
.sec.act > summary, .sec.fx > summary { padding: 7px 10px; }
.sec.act .sec-t, .sec.fx .sec-t { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); }
.sec.act .action-head { margin-bottom: 10px; }
.sec.act .action-head select { flex: 0 0 200px; }
.sec .field { margin-bottom: 10px; }
.field.checks { flex: 0 0 auto; flex-direction: row; gap: 14px; align-items: center; }

/* --- редактор локации --- */
.ed-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ed-head .name-in { flex: 1; min-width: 150px; font: 600 16px var(--serif); padding: 6px 10px; }
.ed-path { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; flex: 1 0 100%; }
.hr { height: 1px; background: var(--border); margin: 12px 0; }
.fx-list { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fx-list > .sec { align-self: stretch; }
.fx-linked { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.fx-linked .muted { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-item.global { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }

/* карта подгоняется по высоте колонки, чтобы не тянуть страницу */
.map-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.map-wrap { text-align: center; }
.map.fit img { max-height: calc(100vh - 380px); width: auto; }
@media (max-width: 1499px) { .map.fit img { max-height: 24vh; } }
@media (max-width: 1000px) { .map.fit img { max-height: none; } }

/* --- свои диалоги вместо prompt() --- */
.modal-ov { z-index: 60; }
.modal {
  width: min(560px, 94vw); max-height: 82vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 20px 60px #000b;
}
.modal.wide { width: min(880px, 94vw); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.modal-head b { flex: 1; font: 600 17px var(--serif); color: var(--accent); }
.modal-body { padding: 14px; overflow: auto; }
.modal-body > .field:last-child { margin-bottom: 0; }
.modal input[type=text] { width: 100%; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.pick-list + .pick-new, input + .pick-list { margin-top: 10px; }
.pick-item {
  text-align: left; padding: 9px 11px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); transition: border-color .15s;
}
.pick-item:hover, .pick-item:focus-visible { border-color: var(--accent); }
.pick-item .t { display: block; font-weight: 600; }
.pick-item .s { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-new { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* поля в спойлере равняются по верху: у источника снизу висит подпись о плейлисте */
.sec .row { align-items: flex-start; }
.sec .row > .field.checks { align-self: flex-end; padding-bottom: 6px; }
/* файл в обзоре библиотеки: имя слева, прослушать справа */
.pick-item.file { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 11px; }
.pick-item.file .as-link { flex: 1; min-width: 0; background: none; border: none; cursor: pointer; text-align: left; padding: 0; }
.pick-item.file .as-link:hover .t { color: var(--accent); }
