/* SocialDesk — дизайн-система. Тёмная тема, акцент «ржавый» (цвет Раста), мягкие поверхности и воздух. */
:root {
  --bg: #0a0c0f; --bg2: #0e1115; --surface: #13171c; --raised: #1a1f25; --hover: #222830;
  --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .13);
  --text: #eceff3; --text2: #b7bfca; --muted: #7f8995;
  --accent: #ea5a3c; --accent2: #f58a42; --accent-soft: rgba(234, 90, 60, .14); --accent-line: rgba(234, 90, 60, .45);
  --ok: #3fcf8e; --warn: #f3b64a; --bad: #ff6666; --info: #6db3ff;
  --news: #f58a42; --rast: #4cc9c0;
  --r: 12px; --r2: 18px; --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(1100px 480px at 78% -8%, rgba(234, 90, 60, .09), transparent 62%), radial-gradient(900px 500px at -10% 110%, rgba(76, 201, 192, .05), transparent 60%), var(--bg); background-attachment: fixed; }
a { color: var(--info); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(234, 90, 60, .4); }
* { scrollbar-width: thin; scrollbar-color: #2b323b transparent; }
svg.i { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }

/* ── шапка ── */
header.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; height: 58px; padding: 0 22px; background: rgba(10, 12, 15, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; font-size: 15px; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; }
nav.tabs { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; }
nav.tabs a { position: relative; color: var(--muted); padding: 7px 13px; border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap; transition: .15s; }
nav.tabs a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
nav.tabs a.on { background: var(--raised); color: var(--text); }
nav.tabs a.on::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -11px; height: 2px; border-radius: 2px; background: var(--accent); }
nav.tabs .n { display: inline-block; min-width: 19px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; text-align: center; line-height: 19px; }
.spacer { flex: 1; }
.status { color: var(--muted); font-size: 12.5px; display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #4a525c; margin-right: 6px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 207, 142, .18); } .dot.warn { background: var(--warn); }

main { padding: 26px 26px 70px; max-width: 1560px; margin: 0 auto; }
main.wide { max-width: none; padding: 0; }
h1, h2, h3 { margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 19px; } h3 { font-size: 12.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }

/* ── кнопки и поля ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border: 1px solid var(--line2); background: var(--raised); color: var(--text); border-radius: 10px; cursor: pointer; font-weight: 600; transition: .14s; white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: rgba(255, 255, 255, .2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--accent2), var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(234, 90, 60, .3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text2); } .btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.danger { color: var(--bad); background: rgba(255, 102, 102, .07); border-color: rgba(255, 102, 102, .22); } .btn.danger:hover { background: rgba(255, 102, 102, .15); }
.btn.small { height: 29px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; } .btn.small.icon { width: 29px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; background: #0d1014; border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px; outline: none; transition: .14s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
label.row { display: flex; align-items: center; gap: 9px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: "JetBrains Mono", Consolas, "SF Mono", monospace; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
kbd { font: 600 11px var(--font); padding: 1px 6px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line2); color: var(--text2); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 12px; background: #2a313a; transition: .18s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #c9d0d8; transition: .18s; }
.switch input:checked + i { background: var(--accent); } .switch input:checked + i::after { left: 21px; background: #fff; }
.switch input:disabled + i { opacity: .4; }

/* ── панели и прочее ── */
.col, .section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; min-width: 0; }
.section { margin-bottom: 16px; } .col { margin-bottom: 14px; }
.empty { text-align: center; color: var(--muted); padding: 38px 16px; border: 1px dashed var(--line2); border-radius: var(--r); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; border: 1px solid transparent; white-space: nowrap; }
.chip.src { background: var(--accent-soft); color: #ff9d86; border-color: rgba(234, 90, 60, .3); }
.chip.t-комитсов { background: rgba(245, 138, 66, .14); color: #f6a565; }
.chip.t-паблика { background: rgba(109, 179, 255, .14); color: #8cc3ff; }
.chip.t-запросу { background: rgba(168, 120, 255, .15); color: #bfa3ff; }
.chip.t-брейншторм { background: rgba(45, 200, 190, .14); color: #56d9cf; }
.chip.t-фишки { background: rgba(63, 207, 142, .14); color: #6fdba6; }
.chip.t-обновления { background: rgba(243, 182, 74, .14); color: #efc66a; }
.chip.t-мобайл { background: rgba(70, 200, 230, .14); color: #72d5ee; }
.chip.t-блогеры { background: rgba(240, 110, 170, .14); color: #f58cc2; }
.chip.warn { background: rgba(243, 182, 74, .14); color: var(--warn); } .chip.bad { background: rgba(255, 102, 102, .14); color: var(--bad); } .chip.ok { background: rgba(63, 207, 142, .14); color: var(--ok); }
.subtabs { display: flex; gap: 2px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.subtabs button { background: none; border: none; padding: 7px 14px; color: var(--muted); cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs button.on { color: var(--text); border-color: var(--accent); }
.preview { background: #0d1014; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; white-space: pre-wrap; word-break: break-word; }
.preview blockquote, .rte blockquote { margin: 8px 0; padding: 3px 12px; border-left: 3px solid var(--accent); color: #d3d8de; background: rgba(255, 255, 255, .025); border-radius: 0 8px 8px 0; }
.preview code, .rte code { background: #232a32; padding: 1px 5px; border-radius: 5px; font-family: "JetBrains Mono", Consolas, monospace; font-size: .92em; }
table.t { width: 100%; border-collapse: collapse; } table.t th, table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: .15s; } .tile:hover { border-color: var(--line2); transform: translateY(-2px); }
.tile img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #0b0d10; cursor: pointer; }
.tile .b { padding: 10px 12px; font-size: 13px; } .tile .b .tg { color: var(--muted); min-height: 18px; }
.form2 { display: grid; grid-template-columns: 240px 1fr; gap: 12px 18px; align-items: center; }
.form2 > label { color: var(--text2); } @media (max-width: 800px) { .form2 { grid-template-columns: 1fr; } }
.checker { background: repeating-conic-gradient(#20262d 0% 25%, #161b20 0% 50%) 50% / 16px 16px; border-radius: 10px; padding: 10px; display: inline-block; }
.checker img { display: block; max-width: 160px; max-height: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; } .chips button { cursor: pointer; }
.banner { background: rgba(109, 179, 255, .09); border: 1px solid rgba(109, 179, 255, .3); color: var(--info); padding: 9px 14px; border-radius: 10px; margin-bottom: 12px; cursor: pointer; }
.saved { color: var(--ok); font-size: 12px; }

/* ── модалки и тосты ── */
.overlay { position: fixed; inset: 0; background: rgba(4, 6, 8, .68); backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--line2); border-radius: 20px; padding: 24px; width: min(580px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); animation: pop .18s; }
.modal.wide { width: min(940px, 100%); } .modal h2 { margin-bottom: 4px; font-size: 20px; } .modal .sub { color: var(--muted); margin-bottom: 16px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 9px; }
.toast { background: #1f252c; border: 1px solid var(--line2); border-left: 4px solid var(--info); padding: 11px 16px; border-radius: 11px; max-width: 440px; box-shadow: var(--shadow); animation: pop .2s; }
.toast.ok { border-left-color: var(--ok); } .toast.err { border-left-color: var(--bad); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login form { background: var(--surface); border: 1px solid var(--line2); border-radius: 20px; padding: 30px; width: 360px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.login .brand { justify-content: center; font-size: 19px; }

/* ═════════ ПРЕДЛОЖКА: очередь | редактор | предпросмотр ═════════ */
.inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr) 420px; height: calc(100vh - 58px); min-height: 560px; }
.rail { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: rgba(14, 17, 21, .6); }
.rail-head { padding: 18px 18px 12px; display: grid; gap: 14px; }
.rail-title { display: flex; align-items: center; justify-content: space-between; }
.rail-title h2 { margin: 0; font-size: 20px; } .rail-title .cnt { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: 15px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #0d1014; border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 4px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: .14s; }
.seg button:hover { color: var(--text); } .seg button.on { background: var(--raised); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.seg .n { font-size: 11.5px; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .08); color: var(--text2); line-height: 17px; }
.seg .sw { width: 8px; height: 8px; border-radius: 50%; }
.qlist { flex: 1; overflow-y: auto; padding: 4px 10px 12px; min-height: 0; }
.qitem { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 11px 12px; margin-bottom: 4px; border-radius: 13px; cursor: pointer; border: 1px solid transparent; transition: .12s; }
.qitem:hover { background: var(--raised); }
.qitem.sel { background: var(--raised); border-color: var(--line2); box-shadow: inset 3px 0 0 var(--accent); }
.qthumb { width: 52px; height: 52px; border-radius: 10px; background: #0d1014 center/cover no-repeat; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: #4a535e; }
.qtitle { font-weight: 600; font-size: 13.8px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.qmeta { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 12px; min-width: 0; }
.qmeta .sc { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.qmeta .src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.qmeta .ago { margin-left: auto; white-space: nowrap; }
.newdot { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.qitem.revising .qtitle { opacity: .6; }
.qempty { text-align: center; color: var(--muted); padding: 30px 14px; }

.agentbox { margin: 0 10px 12px; padding: 12px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.agentbox .ah { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.agentbox .job { display: flex; gap: 9px; align-items: flex-start; margin-top: 9px; font-size: 12.8px; color: var(--text2); line-height: 1.4; }
.agentbox .job svg { margin-top: 2px; color: var(--warn); } .agentbox .job.run svg { color: var(--ok); animation: spin 1.4s linear infinite; }
.agentbox .job .jt { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.agentbox .note { color: var(--muted); font-size: 12px; margin-top: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }

.work { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; min-width: 0; }
.editor-col { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ed-head { display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 57px; }
.ed-head .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; align-items: center; }
.ed-head .nav { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.ed-scroll { flex: 1; overflow-y: auto; padding: 24px 26px 30px; min-height: 0; }
.ed-inner { max-width: 780px; margin: 0 auto; display: grid; gap: 22px; }
.blk-h { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.blk-h b { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }
.blk-h .r { margin-left: auto; color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.media { position: relative; border-radius: 16px; overflow: hidden; background: #0b0d10; border: 1px solid var(--line); }
.media img { display: block; width: 100%; max-height: 210px; object-fit: contain; background: #0b0d10; }
.media .ov { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; }
.media .ov .btn { background: rgba(10, 12, 15, .78); backdrop-filter: blur(8px); border-color: var(--line2); }
.media .wm { position: absolute; right: 12px; top: 12px; font-size: 11.5px; padding: 3px 9px; border-radius: 8px; background: rgba(10, 12, 15, .7); color: var(--text2); border: 1px solid var(--line); }
.drop { display: grid; place-items: center; gap: 10px; text-align: center; padding: 30px 20px; border: 2px dashed var(--line2); border-radius: 16px; color: var(--muted); transition: .15s; background: rgba(255, 255, 255, .015); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.idea { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 10px 13px; border-radius: 11px; background: rgba(168, 120, 255, .07); border: 1px solid rgba(168, 120, 255, .2); font-size: 12.8px; color: var(--text2); }
.idea .btn { margin-left: auto; }

.rte-wrap { border: 1px solid var(--line2); border-radius: 16px; background: #0d1014; transition: .14s; }
.rte-wrap:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.rte-tb { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 3px; padding: 7px 9px; background: #12161b; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; flex-wrap: wrap; }
.tbb { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--text2); cursor: pointer; transition: .12s; font-weight: 700; }
.tbb:hover { background: var(--raised); color: var(--text); } .tbb.on { background: var(--accent-soft); color: #ffb09d; }
.tb-sep { width: 1px; height: 20px; background: var(--line2); margin: 0 6px; }
.tb-sp { flex: 1; }
.rte { min-height: 220px; padding: 18px 22px; outline: none; white-space: pre-wrap; word-break: break-word; font-size: 16px; line-height: 1.65; }
.rte:empty::before { content: attr(data-ph); color: var(--muted); }
.rte a { color: var(--info); }
.codearea { width: 100%; min-height: 240px; border: 0; background: transparent; padding: 16px 20px; font-size: 13.5px; line-height: 1.6; border-radius: 0 0 16px 16px; resize: vertical; box-shadow: none !important; }
.pop { position: absolute; z-index: 20; background: #1b2026; border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; animation: pop .14s; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: 328px; max-height: 240px; overflow-y: auto; }
.emoji-grid button { font-size: 21px; line-height: 1; padding: 6px 0; border: 0; background: none; border-radius: 8px; cursor: pointer; } .emoji-grid button:hover { background: var(--hover); }
.pop .cap { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 2px 4px 6px; }
.linkpop { display: flex; gap: 6px; width: 340px; } .linkpop input { height: 34px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 15px 17px; transition: .15s; }
.card.off { opacity: .55; }
.card .ch { display: flex; align-items: center; gap: 12px; }
.card .ch .tt { flex: 1; } .card .ch .tt b { display: block; font-size: 14.5px; } .card .ch .tt span { color: var(--muted); font-size: 12.5px; }
.card textarea { margin-top: 12px; background: #0d1014; }
.card.fold summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; } .card.fold summary::-webkit-details-marker { display: none; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; } .counter.over { color: var(--bad); }

.actionbar { display: flex; align-items: center; gap: 10px; padding: 13px 26px; border-top: 1px solid var(--line); background: rgba(14, 17, 21, .94); backdrop-filter: blur(12px); flex-wrap: wrap; position: relative; }
.plats { display: flex; gap: 7px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line2); background: var(--raised); color: var(--text2); cursor: pointer; font-weight: 600; transition: .14s; }
.pchip:hover { border-color: rgba(255, 255, 255, .22); color: var(--text); }
.pchip.on { background: var(--accent-soft); border-color: var(--accent-line); color: #ffb9a8; }
.pchip.off { cursor: not-allowed; opacity: .5; border-style: dashed; }
.pchip .ck { width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid #59626d; display: grid; place-items: center; }
.pchip.on .ck { background: var(--accent); border-color: var(--accent); color: #fff; } .pchip .ck svg { width: 11px; height: 11px; stroke-width: 3.2; display: none; } .pchip.on .ck svg { display: block; }
.ab-r { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menu { position: absolute; right: 26px; bottom: 66px; z-index: 25; min-width: 250px; background: #1b2026; border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; animation: pop .14s; }
.menu button { display: flex; width: 100%; justify-content: space-between; gap: 18px; padding: 9px 12px; border: 0; background: none; border-radius: 9px; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover { background: var(--hover); } .menu button span { color: var(--muted); }
.menu .dt { padding: 8px 10px 10px; display: grid; gap: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.menu .dt .cap { font-size: 12px; color: var(--muted); }
.result { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.8px; }
.warnbar { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 10px; background: rgba(243, 182, 74, .09); border: 1px solid rgba(243, 182, 74, .25); color: #f0cb85; font-size: 13px; }

.preview-col { border-left: 1px solid var(--line); background: rgba(14, 17, 21, .55); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pv-head { padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 57px; display: flex; align-items: center; gap: 10px; }
.pv-head .seg { flex: 1; }
.pv-body { flex: 1; overflow-y: auto; padding: 22px 18px 30px; min-height: 0; }
.pv-label { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; }
.tgframe { background: #0e1621 linear-gradient(180deg, #0e1621, #101a26); border-radius: 18px; padding: 16px; border: 1px solid #1c2836; }
.tgbubble { max-width: 340px; margin: 0 auto; background: #182533; border-radius: 14px 14px 14px 4px; overflow: hidden; color: #e9eef4; font-size: 14.5px; line-height: 1.5; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.tgbubble img { display: block; width: 100%; }
.tgbubble .tx { padding: 9px 12px 6px; white-space: pre-wrap; word-break: break-word; }
.tgbubble .tx blockquote { margin: 6px 0; padding: 2px 10px; border-left: 3px solid #5aa9e6; background: rgba(90, 169, 230, .09); border-radius: 0 6px 6px 0; }
.tgbubble .tx code { background: rgba(255, 255, 255, .09); padding: 0 4px; border-radius: 4px; } .tgbubble .tx a { color: #6ab3f3; }
.tgbubble .tm { text-align: right; padding: 0 10px 6px; font-size: 11.5px; color: #7f91a4; }
.tgbubble .ad { margin-top: 10px; }
.dsmsg { background: #313338; border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; color: #dbdee1; font-size: 14.5px; line-height: 1.45; }
.dsmsg .av, .xcard .av { width: 40px; height: 40px; border-radius: 50%; background: #0b0d10 url(/logo.svg) center/cover; }
.dsmsg .nm { font-weight: 600; color: #f2f3f5; } .dsmsg .nm em { font-style: normal; font-size: 10px; background: #5865f2; color: #fff; padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; } .dsmsg .nm small { color: #949ba4; font-weight: 400; margin-left: 8px; }
.dsmsg .bd { white-space: pre-wrap; word-break: break-word; margin-top: 3px; } .dsmsg .bd blockquote { margin: 4px 0; padding: 0 0 0 12px; border-left: 4px solid #4e5058; }
.dsmsg .bd code { background: #2b2d31; padding: 1px 4px; border-radius: 4px; } .dsmsg img { margin-top: 8px; max-width: 100%; border-radius: 8px; display: block; }
.xcard { background: #000; border: 1px solid #2f3336; border-radius: 16px; padding: 14px 16px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; color: #e7e9ea; font-size: 15px; line-height: 1.4; }
.xcard .nm { font-weight: 700; } .xcard .nm small { color: #71767b; font-weight: 400; margin-left: 4px; }
.xcard .bd { white-space: pre-wrap; word-break: break-word; margin-top: 2px; } .xcard img { margin-top: 10px; width: 100%; border-radius: 14px; border: 1px solid #2f3336; display: block; }
.xcard .cnt { margin-top: 10px; color: #71767b; font-size: 12.5px; } .xcard .cnt.over { color: var(--bad); }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; }
.choice label { display: block; cursor: pointer; padding: 13px 15px; border: 1px solid var(--line2); border-radius: 14px; background: var(--raised); transition: .14s; }
.choice label:hover { border-color: rgba(255, 255, 255, .25); } .choice input { display: none; }
.choice label.on { border-color: var(--accent-line); background: var(--accent-soft); }
.choice b { display: flex; align-items: center; gap: 8px; } .choice small { display: block; color: var(--muted); margin-top: 3px; font-size: 12.5px; line-height: 1.4; }
.choice .sw { width: 9px; height: 9px; border-radius: 50%; }

.center-empty { display: grid; place-items: center; height: 100%; text-align: center; color: var(--muted); padding: 30px; }
.center-empty .big { width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); color: var(--accent2); display: grid; place-items: center; margin: 0 auto 18px; } .center-empty .big svg { width: 38px; height: 38px; }
.center-empty h2 { color: var(--text); margin-bottom: 6px; }
.back-btn { display: none; }

/* средние экраны: предпросмотр уезжает в выдвижную панель */
@media (max-width: 1500px) {
  .inbox { grid-template-columns: 340px minmax(0, 1fr); }
  .preview-col { position: fixed; right: 0; top: 58px; bottom: 0; width: min(440px, 100vw); z-index: 40; transform: translateX(105%); transition: transform .22s; background: #0f1318; box-shadow: var(--shadow); }
  .inbox.pv-open .preview-col { transform: none; }
  .pv-toggle { display: inline-flex !important; }
}
.pv-toggle { display: none; }
@media (max-width: 900px) {
  header.top { padding: 0 12px; gap: 10px; } .status { display: none; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 58px); }
  .inbox .work { display: none; } .inbox.has-sel .rail { display: none; } .inbox.has-sel .work { display: grid; }
  .ed-head, .actionbar { padding-left: 14px; padding-right: 14px; } .ed-scroll { padding: 16px 14px 24px; }
  .back-btn { display: inline-flex; } .menu { right: 14px; }
  .rte { padding: 14px; font-size: 15.5px; } .choice { grid-template-columns: 1fr; }
}

.noplat { display: inline-flex; align-items: center; gap: 7px; color: #f0cb85; font-size: 13px; padding: 0 4px; white-space: nowrap; }
.noplat:hover { text-decoration: underline; }
@media (max-width: 1400px) { header.top { gap: 14px; padding: 0 14px; } .status span:nth-child(2) { display: none; } nav.tabs a { padding: 7px 10px; } }
@media (max-width: 900px) {
  .actionbar { gap: 8px; }
  .actionbar > .btn { flex: 1; }
  .ab-r { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .ab-r .btn { flex: 1; } .ab-r .plats { width: 100%; } .ab-r .pchip { flex: 1; justify-content: center; }
  .noplat { width: 100%; }
  .ed-head .nav { margin-left: 0; width: 100%; justify-content: flex-end; }
}

.chip.t-обнова { background: rgba(234, 90, 60, .18); color: #ff9d86; }
.chip.t-разбор { background: rgba(109, 179, 255, .14); color: #8cc3ff; }
.chip.t-лайфхак { background: rgba(63, 207, 142, .14); color: #6fdba6; }
.chip.t-реддит { background: rgba(255, 138, 76, .14); color: #ffa06a; }

/* Студия картинок в посте (как в «Обновлениях» сайта) */
.studio { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.sj { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.sj.is-failed { border-color: rgba(255, 102, 102, .3); }
.sj-h { display: flex; align-items: center; gap: 8px; }
.sj-req { flex: 1; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.sj-log { margin: 0; padding-left: 18px; color: var(--text2); font-size: 12.5px; }
.sj-vars { display: flex; flex-wrap: wrap; gap: 8px; }
.sj-var { position: relative; margin: 0; display: flex; flex-direction: column; gap: 6px; width: 180px; }
.sj-var img { display: block; width: 180px; height: 101px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line2); background: #000; }
.sj-var.on img { border-color: var(--accent); }
.sj-en { position: absolute; top: 6px; left: 6px; padding: 0 6px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.st-ask { display: flex; flex-direction: column; gap: 8px; border-radius: 12px; }
.st-ask.over { outline: 2px dashed var(--accent-line); outline-offset: 4px; }
.st-src { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-src-i { position: relative; display: inline-grid; place-items: center; width: 64px; height: 44px; border-radius: 8px; overflow: hidden; border: 1px solid var(--accent-line); background: var(--bg2); }
.st-src-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-x { position: absolute; top: 2px; right: 2px; display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.st-add { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 1px dashed var(--line2); border-radius: 8px; background: transparent; color: var(--text2); font: inherit; font-size: 13px; cursor: pointer; }
.st-add:hover { color: var(--text); border-color: var(--accent-line); }
.st-row { display: flex; gap: 8px; align-items: flex-start; }
.st-in { flex: 1; resize: vertical; min-height: 44px; font-size: 13.5px; }
.st-btns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.st-ai { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2); cursor: pointer; white-space: nowrap; }
.st-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.st-tag-w { position: relative; display: inline-flex; }
.st-tag { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 3px 11px 3px 3px; border: 1px solid var(--line2); border-radius: 999px; background: var(--raised); color: var(--text2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.st-tag:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); }
.st-tag.on { color: #fff; border-color: var(--accent); background: var(--accent-soft); }
.st-tag-pic { width: 40px; height: 24px; object-fit: cover; border-radius: 999px; }
.st-tag-big { display: none; position: absolute; left: 0; bottom: calc(100% + 8px); width: 280px; border-radius: 10px; border: 1px solid var(--line2); box-shadow: 0 12px 30px rgba(0, 0, 0, .55); z-index: 20; pointer-events: none; }
.st-tag:hover .st-tag-big { display: block; }
.st-tag-x { position: absolute; top: -6px; right: -6px; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid var(--line2); border-radius: 50%; background: var(--bg2); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
.st-tag-w:hover .st-tag-x, .st-tag-x.armed { opacity: 1; }
.st-tag-x.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (hover: none) { .st-tag-x { opacity: 1; } }
.spin { animation: sd-spin 1s linear infinite; }
@keyframes sd-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .st-row { flex-direction: column; } .st-btns { flex-direction: row; } }
