/* Postslot — editorial desk. Warm paper, ink type, one amber accent. */
:root {
  --bg: #F6F3EE; --bg-2: #F1EDE6; --bg-3: #E9E3D9; --surface: #FFFDF9; --surface-2: #FFFFFF;
  --ink: #17150F; --ink-2: #4F4A40; --ink-3: #8A8376; --ink-4: #A9A295;
  --line: #E6E0D6; --line-2: #EFEAE2; --line-dash: #D9D2C6;
  --accent: #D4611C; --accent-ink: #A94A12; --accent-soft: #FBE7DA; --accent-tint: #FDF8F2; --accent-tint-2: #FBF1E8;
  --ok: #2E9B5F; --ok-soft: #E3F3EA;
  --warn: #8A6A0B; --warn-soft: #FFF9E3; --warn-line: #E6D9A8;
  --bad: #C9432F; --bad-soft: #FDF1EE; --bad-line: #F0C9C1;
  --shadow-1: 0 1px 2px rgba(23,21,15,0.05); --shadow-2: 0 4px 14px rgba(23,21,15,0.10); --shadow-3: 0 30px 80px rgba(23,21,15,0.28);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --r-s: 7px; --r-m: 10px; --r-l: 14px; --r-xl: 18px;
  --sidebar: 232px; --rail: 296px;
}
:root[data-theme="dark"] {
  --bg: #16150F; --bg-2: #1C1A14; --bg-3: #26231B; --surface: #1F1D16; --surface-2: #26231B;
  --ink: #F1ECE2; --ink-2: #C9C2B4; --ink-3: #8F8878; --ink-4: #6B655A;
  --line: #2E2B22; --line-2: #282520; --line-dash: #3A362B;
  --accent: #E8792F; --accent-ink: #F3A06A; --accent-soft: #3A2415; --accent-tint: #201C15; --accent-tint-2: #261F16;
  --ok: #4DB97E; --ok-soft: #17301F;
  --warn: #D9B34A; --warn-soft: #2C2611; --warn-line: #4A3F17;
  --bad: #E36A56; --bad-soft: #2E1915; --bad-line: #4E2820;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.3); --shadow-2: 0 4px 14px rgba(0,0,0,0.4); --shadow-3: 0 30px 80px rgba(0,0,0,0.6);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); font-size: 13px; line-height: 1.4; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
h1, h2, h3 { margin: 0; font-weight: 400; font-family: var(--serif); letter-spacing: -0.015em; line-height: 1; }
h1 { font-size: 32px; } h2 { font-size: 26px; } h3 { font-size: 20px; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.muted { color: var(--ink-3); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.eyebrow { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 8px; } .col { display: flex; flex-direction: column; gap: 6px; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot.lg { width: 8px; height: 8px; }
.pip { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.pip.ok { background: var(--ok); } .pip.bad { background: var(--bad); } .pip.warn { background: var(--accent); }

/* ---------- layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex-shrink: 0; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px 18px; border-right: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.brand .name { font-family: var(--serif); font-size: 20px; line-height: 1; }
.brand .ws { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); }
.nav a:hover { background: var(--bg-3); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 rgba(23,21,15,0.06); }
.nav .count { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.nav .badge { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 999px; }
.side-channels { display: flex; flex-direction: column; gap: 6px; }
.side-channels .hd { display: flex; justify-content: space-between; padding: 0 10px; }
.side-channels .ch { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--ink); width: 100%; text-align: left; font-size: 12px; }
.side-channels .ch:hover { background: var(--bg-3); }
.side-channels .ch.off { opacity: 0.45; }
.side-channels .ch .pip { margin-left: auto; }
.side-note { margin-top: auto; padding: 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 14px; padding: 18px 28px 14px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); }
.content { padding: 0 28px 24px; display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; }
.with-rail { display: flex; flex: 1; min-height: 0; }
.with-rail > .page { flex: 1; min-width: 0; }
.rail { width: var(--rail); flex-shrink: 0; border-left: 1px solid var(--line); padding: 22px 20px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 1200px) { .rail { display: none; } }
@media (max-width: 900px) { .sidebar { display: none; } .page-head, .content { padding-left: 16px; padding-right: 16px; } }

/* ---------- controls */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.btn:hover { background: var(--bg-3); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn.primary:hover { background: #2B2A26; color: var(--bg); }
:root[data-theme="dark"] .btn.primary:hover { background: #FFFFFF; }
.btn.accent { background: var(--accent); color: #FFF8F2; border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-s); }
.btn.xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }
.btn .kbd { font-size: 11px; color: var(--ink-4); font-weight: 500; }
.btn.primary .kbd { color: var(--ink-4); }
.iconbtn { width: 28px; height: 28px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.iconbtn:hover { background: var(--bg-3); }
.iconbtn svg.i { width: 13px; height: 13px; }
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; background: var(--bg-3); }
.seg button { padding: 5px 12px; border-radius: var(--r-s); font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.seg button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 rgba(23,21,15,0.06); }
.input, textarea.input, select.input { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); outline: none; }
.input:focus, textarea.input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(212,97,28,0.12); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); }
label.field .input { font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; background: var(--surface); }
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 500; }
.chip .ring { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; }
.chip:not(.on) .ring { background: transparent; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px; background: var(--bg-2); color: var(--ink-3); font-size: 11px; }
.pill { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.pill.ok { color: var(--ok); background: var(--ok-soft); } .pill.accent { color: var(--accent); background: var(--accent-soft); } .pill.warn { color: var(--warn); background: var(--warn-soft); } .pill.bad { color: var(--bad); background: var(--bad-soft); } .pill.muted { color: var(--ink-3); background: var(--bg-2); }
.toggle { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); transition: background .15s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); box-shadow: var(--shadow-1); transition: transform .15s; }
.toggle.on { background: var(--ink); border-color: var(--ink); } .toggle.on::after { transform: translateX(14px); }
.avatar { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; color: #fff; flex-shrink: 0; }

/* ---------- cards & panels */
.panel { border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); }
.panel.pad { padding: 16px 18px; }
.panel .hd { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); font-weight: 600; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.stat .v { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.stat .d { font-size: 12px; } .stat .d.up { color: var(--ok); } .stat .d.down { color: var(--bad); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .serif { font-size: 24px; color: var(--ink); }

/* ---------- calendar */
.cal { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; flex: 1; min-height: 0; }
.cal .days { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal .day-h { padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.cal .day-h .n { font-family: var(--serif); font-size: 22px; line-height: 1; }
.cal .day-h.today { background: var(--accent-tint-2); } .cal .day-h.today .eyebrow, .cal .day-h.today .n { color: var(--accent); }
.cal .day-h.today .eyebrow { font-weight: 600; }
.cal .slot-row { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line-2); flex: 1; min-height: 96px; }
.cal .slot-row:last-child { border-bottom: 0; }
.cal .slot-label { padding: 12px 0 0 14px; font-size: 11px; color: var(--ink-3); }
.cal .slot-label .x { display: block; color: var(--ink-4); font-size: 10px; }
.cal .cell { padding: 10px 8px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal .cell.today { background: var(--accent-tint); }
.cal .cell.drop { background: var(--accent-soft); outline: 1.5px dashed var(--accent); outline-offset: -4px; }
.fill { border-radius: var(--r-m); border: 1px dashed var(--line-dash); padding: 9px 10px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-4); font-size: 12px; min-height: 44px; width: 100%; }
.fill:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-tint-2); }
.fill.past { visibility: hidden; }
.card { border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-1); cursor: pointer; text-align: left; width: 100%; min-width: 0; position: relative; }
.card:hover { border-color: var(--ink-3); }
.card.published { opacity: 0.72; } .card.published:hover { opacity: 1; }
.card.approval { background: var(--warn-soft); border-color: var(--warn-line); }
.card.failed, .card.retrying { background: var(--bad-soft); border-color: var(--bad-line); }
.card.next { border: 1.5px solid var(--accent); box-shadow: 0 4px 14px rgba(212,97,28,0.14); }
.card.dragging { opacity: 0.4; }
.card .top { display: flex; align-items: center; gap: 4px; }
.card .st { margin-left: auto; font-size: 10px; font-weight: 600; white-space: nowrap; }
.card .st.ok { color: var(--ok); } .card .st.accent { color: var(--accent); } .card .st.warn { color: var(--warn); } .card .st.bad { color: var(--bad); } .card .st.muted { color: var(--ink-3); }
.card .txt { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); flex-wrap: wrap; }
.card .thumb { height: 54px; border-radius: 6px; background: var(--bg-3); object-fit: cover; width: 100%; display: block; }
.card .thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; } .card .thumbs img { height: 30px; width: 100%; object-fit: cover; border-radius: 4px; display: block; }
.card .who { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.card .err { font-size: 11px; color: var(--bad); }
/* month */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); flex: 1; }
.month .mh { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.month .mc { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 8px; min-height: 108px; display: flex; flex-direction: column; gap: 4px; }
.month .mc:nth-child(7n) { border-right: 0; }
.month .mc.dim { background: var(--bg-2); } .month .mc.dim .n { color: var(--ink-4); }
.month .mc .n { font-family: var(--serif); font-size: 18px; line-height: 1; margin-bottom: 4px; }
.month .mc.today .n { color: var(--accent); }
.month .mc.drop { background: var(--accent-soft); }
.mini { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 5px; background: var(--bg-2); font-size: 11px; cursor: pointer; width: 100%; text-align: left; overflow: hidden; white-space: nowrap; }
.mini:hover { background: var(--bg-3); }
.mini .t { color: var(--ink-3); flex-shrink: 0; } .mini .b { overflow: hidden; text-overflow: ellipsis; }
.mini.published { opacity: 0.6; } .mini.approval { background: var(--warn-soft); } .mini.failed, .mini.retrying { background: var(--bad-soft); }
.mini .more { color: var(--ink-3); }
/* list & day */
.list { display: flex; flex-direction: column; gap: 14px; }
.list .group .gh { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 8px; }
.list .group .gh .n { font-family: var(--serif); font-size: 22px; }
.rowcard { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.rowcard:hover { border-color: var(--ink-3); }
.rowcard .time { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.rowcard .time b { font-size: 13px; }
.rowcard .dots { display: flex; gap: 3px; }
.rowcard .body { font-size: 14px; line-height: 1.45; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rowcard .body .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); align-items: center; }
.rowcard.approval { background: var(--warn-soft); border-color: var(--warn-line); }
.rowcard.failed, .rowcard.retrying { background: var(--bad-soft); border-color: var(--bad-line); }
.rowcard.published { opacity: 0.8; }
.day-list { display: flex; flex-direction: column; gap: 10px; }
/* bulk selection in the list view */
.rowsel { display: flex; gap: 10px; align-items: stretch; }
.rowsel .selbox { display: flex; align-items: flex-start; padding-top: 16px; cursor: pointer; }
.rowsel .selbox input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.rowsel.on .rowcard { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bulkbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); position: sticky; top: 8px; z-index: 5; }
.bulkbar.on { border-color: var(--ink); box-shadow: var(--shadow-2); }
.bulkbar input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.list .group .gh .right { margin-left: auto; }
/* rail */
.nextup { border-radius: 12px; background: var(--ink); color: var(--bg); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.nextup .big { font-family: var(--serif); font-size: 34px; line-height: 1; letter-spacing: -0.02em; }
.nextup .t { font-size: 12px; line-height: 1.4; color: var(--line-dash); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nextup .ch { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #2B2A26; color: var(--bg); }
:root[data-theme="dark"] .nextup { background: var(--surface-2); color: var(--ink); } :root[data-theme="dark"] .nextup .ch { background: var(--bg-3); color: var(--ink); } :root[data-theme="dark"] .nextup .t { color: var(--ink-2); }
.nextup button { color: inherit; font-size: 11px; opacity: 0.75; } .nextup button:hover { opacity: 1; }
.health { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.health .h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.health .h:last-child { border-bottom: 0; }
.health .h .nm { font-size: 12px; font-weight: 600; } .health .h .s { font-size: 11px; color: var(--ink-3); }
.health .h .s.bad { color: var(--bad); }
.heat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.heat span { height: 22px; border-radius: 4px; background: var(--accent); }
.heat24 { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat24 .lab { font-size: 10px; color: var(--ink-3); }
.heat24 span.c { height: 18px; border-radius: 3px; background: var(--accent); position: relative; }
.heat24 span.c:hover::after { content: attr(data-tip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 10px; padding: 3px 6px; border-radius: 4px; white-space: nowrap; z-index: 2; }
.activity { display: flex; flex-direction: column; gap: 8px; }
.activity .ev { display: flex; gap: 8px; font-size: 12px; line-height: 1.4; }
.activity .ev .pip { margin-top: 5px; } .activity .ev .when { color: var(--ink-4); font-size: 11px; white-space: nowrap; margin-left: auto; }

/* ---------- ideas (kanban) */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; flex: 1; min-height: 0; }
.kcol { display: flex; flex-direction: column; gap: 8px; border-radius: var(--r-l); background: var(--bg-2); padding: 10px; min-height: 300px; }
.kcol.drop { background: var(--accent-soft); }
.kcol .kh { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-weight: 600; } .kcol .kh .count { color: var(--ink-3); font-weight: 400; }
.kadd { display: flex; gap: 6px; } .kadd .input { padding: 7px 10px; font-size: 12px; }
.idea { border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); padding: 10px 12px; font-size: 13px; line-height: 1.4; cursor: grab; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.idea:hover { border-color: var(--ink-3); } .idea.dragging { opacity: 0.4; }
.idea .acts { display: flex; gap: 6px; opacity: 0; transition: opacity .12s; } .idea:hover .acts { opacity: 1; }

/* ---------- analytics */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { .an-grid { grid-template-columns: 1fr; } }
.bars { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.bars .b { display: flex; align-items: center; gap: 8px; } .bars .b .nm { width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; } .bars .b .bar i { display: block; height: 100%; background: var(--ink); }
.bars .b .v { width: 48px; text-align: right; }
.toplist .tp { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; text-align: left; width: 100%; }
.toplist .tp:last-child { border-bottom: 0; }
.toplist .tp .rank { font-family: var(--serif); font-size: 18px; color: var(--ink-3); width: 18px; line-height: 1.2; }
.toplist .tp .v { font-weight: 600; }
.insight { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--bg); font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.insight svg.i { color: var(--accent); margin-top: 1px; }
.chart-tip { font-size: 11px; color: var(--ink-3); }

/* ---------- channels */
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.chcard { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.chcard .name { font-weight: 600; font-size: 14px; } .chcard .handle { color: var(--ink-3); font-size: 12px; }
.chcard .plat { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slots .s { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--bg-2); font-size: 12px; }
.slots .s button { color: var(--ink-4); display: inline-flex; } .slots .s button:hover { color: var(--bad); }
.slots input { width: 82px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; }
.platgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.platbtn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); text-align: left; }
.platbtn:hover { border-color: var(--ink-3); } .platbtn.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.platbtn .plat { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
.platbtn .m { font-size: 11px; color: var(--ink-3); }
.help { padding: 10px 12px; border-radius: var(--r-m); background: var(--bg); font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* ---------- team / settings */
.members { display: flex; flex-direction: column; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.member:last-child { border-bottom: 0; }
.member .avatar { width: 28px; height: 28px; font-size: 12px; }
.member select { padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-2); } .kv .v { color: var(--ink-3); font-size: 12px; }
code, .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
pre.code { padding: 12px; overflow: auto; line-height: 1.5; margin: 0; white-space: pre-wrap; word-break: break-all; }

/* ---------- modal / composer */
.overlay { position: fixed; inset: 0; background: rgba(23,21,15,0.28); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3), 0 0 0 1px rgba(23,21,15,0.06); width: min(1260px, 100%); max-height: min(860px, 100%); display: flex; overflow: hidden; animation: rise .18s ease; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet.narrow { width: min(560px, 100%); flex-direction: column; }
.sheet.medium { width: min(760px, 100%); flex-direction: column; }
.sheet .body-pad { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.sheet .foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px 18px; border-top: 1px solid var(--line); }
.composer { flex: 1; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); min-height: 0; }
.composer .c-head { display: flex; align-items: center; gap: 12px; padding: 20px 26px 0; flex-wrap: wrap; }
.composer .c-chips { display: flex; align-items: center; gap: 8px; padding: 16px 26px 0; flex-wrap: wrap; }
.composer .c-body { flex: 1; display: flex; flex-direction: column; padding: 16px 26px 0; gap: 12px; min-height: 0; overflow-y: auto; }
.editor { border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; min-height: 220px; flex: 1; }
.editor textarea { border: 0; background: transparent; padding: 16px 20px 6px; font-size: 15px; line-height: 1.55; resize: none; outline: none; min-height: 150px; width: 100%; flex: 1; }
.editor .media { display: flex; gap: 10px; padding: 6px 20px 16px; flex-wrap: wrap; }
.media .m { width: 116px; height: 86px; border-radius: 8px; background: var(--bg-3); position: relative; overflow: hidden; }
.media .m img, .media .m video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .m .alt { position: absolute; left: 6px; bottom: 6px; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(23,21,15,0.7); color: #F6F3EE; }
.media .m .alt.missing { background: var(--bad); }
.media .m .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(23,21,15,0.7); color: #fff; display: flex; align-items: center; justify-content: center; }
.media .add { width: 86px; height: 86px; border-radius: 8px; border: 1px dashed var(--line-dash); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); font-size: 11px; }
.media .add:hover { color: var(--accent); border-color: var(--accent); }
.editor.dropping { border-color: var(--accent); background: var(--accent-tint-2); }
.thread-part { display: flex; gap: 10px; align-items: flex-start; }
.thread-part .n { font-family: var(--serif); font-size: 18px; color: var(--ink-3); width: 20px; padding-top: 8px; }
.thread-part textarea { min-height: 64px; }
.toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.toolbar .tb { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 12px; }
.toolbar .tb:hover { background: var(--bg-2); color: var(--ink); }
.toolbar .tb.ai { color: var(--accent); font-weight: 600; }
.toolbar .counter { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.toolbar .counter b { color: var(--ink); } .toolbar .counter b.over { color: var(--bad); }
.c-foot { display: flex; align-items: center; gap: 10px; padding: 14px 26px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.when { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); }
.when input { border: 0; background: transparent; font-size: 13px; outline: none; color: var(--ink); }
.split { display: inline-flex; align-items: stretch; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px; overflow: hidden; }
.split button { color: inherit; padding: 9px 16px; } .split button:hover { background: #2B2A26; }
.split .more { padding: 9px 10px; border-left: 1px solid #3A3830; display: inline-flex; align-items: center; }
:root[data-theme="dark"] .split button:hover { background: #ffffff; }
.menu { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 6px; display: flex; flex-direction: column; min-width: 200px; z-index: 60; }
.menu button { text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.menu button:hover { background: var(--bg-2); } .menu button.danger { color: var(--bad); }
.menu .sep { height: 1px; background: var(--line-2); margin: 4px 0; }
.previews { width: 440px; flex-shrink: 0; background: var(--bg); display: flex; flex-direction: column; min-height: 0; }
.previews .p-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; }
.previews .p-body { flex: 1; overflow-y: auto; padding: 0 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.preview { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.preview.bad { border-color: var(--bad-line); }
.preview .ph { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.preview .ph .cnt { margin-left: auto; } .preview .ph .cnt.over { color: var(--bad); font-weight: 600; }
.preview .pb { display: flex; gap: 10px; }
.preview .av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.preview .av.sq { border-radius: 6px; }
.preview .pt { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; min-width: 0; flex: 1; }
.preview .pt .txt { white-space: pre-wrap; word-wrap: break-word; }
.preview .pt .txt mark { background: var(--bad-soft); color: var(--bad); }
.preview .pimg { display: grid; gap: 4px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .preview .pimg img, .preview .pimg video { height: 90px; width: 100%; object-fit: cover; border-radius: 8px; display: block; }
.preview .pimg.one { grid-template-columns: 1fr; } .preview .pimg.one img { height: 160px; }
.preview .pimg.sq img { aspect-ratio: 1; height: auto; }
.preview .issue { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.preview .issue.error { background: var(--bad-soft); color: var(--bad); } .preview .issue.warn { background: var(--warn-soft); color: var(--warn); }
.preview .issue .fix { margin-left: auto; font-weight: 600; color: var(--ink); display: flex; gap: 10px; }
.preview .issue .fix button { color: var(--ink); font-weight: 600; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { display: flex; gap: 8px; font-size: 12px; line-height: 1.45; } .note .avatar { margin-top: 2px; }
.note .by { font-weight: 600; } .note .at { color: var(--ink-4); margin-left: 6px; }
.note.reply { margin-left: 26px; padding-left: 10px; border-left: 2px solid var(--line); }
.note .mention { color: var(--accent); font-weight: 600; }
.note .note-acts { opacity: 0; transition: opacity .12s; } .note:hover .note-acts { opacity: 1; } .note .note-acts button:hover { color: var(--ink); }
.ai-box { border-radius: var(--r-m); border: 1px solid var(--accent-soft); background: var(--accent-tint); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-box .opt { text-align: left; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.45; width: 100%; }
.ai-box .opt:hover { border-color: var(--accent); }
.tabs { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; background: var(--bg-2); align-self: flex-start; flex-wrap: wrap; }
.tabs button { padding: 5px 12px; border-radius: var(--r-s); font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.tabs button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 rgba(23,21,15,0.06); }
.tabs button .cust { color: var(--accent); font-weight: 700; }

/* ---------- inbox */
.inbox-list { display: flex; flex-direction: column; gap: 10px; }
.inbox-item { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); }
.inbox-item.unread { border-left: 3px solid var(--accent); padding-left: 14px; }
.inbox-item.done { opacity: 0.6; }
.inbox-item .msg { font-size: 14px; line-height: 1.5; }
.inbox-item .replied { padding: 8px 10px; border-radius: 8px; background: var(--bg); color: var(--ink-2); }
.inbox-item .avatar img { object-fit: cover; }
.reply-box .opt { text-align: left; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; width: 100%; margin-top: 6px; }
.reply-box .opt:hover { border-color: var(--accent); }
.ob-step:hover { background: var(--bg-2); }
.toggle.sm { width: 28px; height: 16px; } .toggle.sm::after { width: 10px; height: 10px; } .toggle.sm.on::after { transform: translateX(12px); }
/* ---------- media library */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; }
.tile:hover { border-color: var(--ink-3); } .tile.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile img, .tile video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg-3); }
.tile .cap { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; font-size: 11px; }
.tile .cap .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; } .tile .cap .mt { color: var(--ink-3); }
.tile .vid { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(23,21,15,.75); color: #F6F3EE; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.tile .chk { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; } .tile .chk svg.i { width: 12px; height: 12px; }
/* ---------- link card, recycle, import, alt modal */
.linkcard { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.linkcard img { width: 96px; height: 96px; object-fit: cover; flex-shrink: 0; }
.linkcard .lc { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.linkcard .lc .t { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard .lc .d { font-size: 12px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.linkcard .lc .h { font-size: 11px; color: var(--ink-4); }
.recycle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; }
.recycle select { border: 0; background: transparent; font-size: 12px; color: var(--ink); }
.recycle.on { border-color: var(--accent); color: var(--accent-ink); }
table.grid { width: 100%; border-collapse: collapse; font-size: 12px; }
table.grid th { text-align: left; color: var(--ink-3); padding: 6px 8px; font-weight: 500; }
table.grid td { padding: 6px 8px; border-top: 1px solid var(--line-2); vertical-align: top; }
.altprev { max-height: 220px; border-radius: 10px; object-fit: contain; width: 100%; background: var(--bg-3); }
.oauth-note { font-size: 11px; color: var(--ink-3); word-break: break-all; }
/* ---------- toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 10px; animation: rise .18s ease; max-width: 360px; }
.toast.bad { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
.toast button { color: inherit; font-weight: 600; text-decoration: underline; }
/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .panel { width: 360px; display: flex; flex-direction: column; gap: 14px; padding: 26px; }
/* mobile */
.daystrip { display: flex; gap: 6px; }
.daystrip .ds { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 64px; }
.daystrip .ds .n { font-size: 20px; line-height: 1; }
.daystrip .ds .c { font-size: 10px; color: var(--ink-3); min-height: 12px; }
.daystrip .ds.today .eyebrow, .daystrip .ds.today .n { color: var(--accent); }
.daystrip .ds.on { background: var(--ink); border-color: var(--ink); color: var(--bg); } .daystrip .ds.on .eyebrow, .daystrip .ds.on .n, .daystrip .ds.on .c { color: var(--bg); }
@media (max-width: 720px) {
  h1 { font-size: 28px; } .page-head { gap: 10px; padding-top: 14px; } .page-head .right { width: 100%; margin-left: 0; flex-wrap: wrap; row-gap: 8px; }
  .page-head .right .btn { flex: 1; justify-content: center; } .btn .kbd { display: none; }
  .page-head .right .seg, .page-head .right select { max-width: 100%; }
  .seg { flex-wrap: wrap; } .seg button { flex: 1 1 auto; justify-content: center; }
  .rowcard { grid-template-columns: 52px 1fr; } .day-list .rowcard > div:last-child { display: none; }
  .rowcard.approval > div:last-child { grid-column: 1 / -1; display: flex; flex-direction: row; gap: 6px; }
  .rowsel .selbox { padding-top: 14px; }
  .sheet .foot, .c-foot { flex-wrap: wrap; } .c-foot .right { width: 100%; margin-left: 0; } .c-foot .right .btn { flex: 1; min-width: 0; } .c-foot .right .split { flex: 1 1 100%; min-width: 0; } .split button:first-child { flex: 1; } .split button { padding: 9px 12px; }
  .c-chips { padding-top: 10px; } .chip { padding: 6px 9px 6px 6px; font-size: 11px; }
  .overlay { padding: 0; } .sheet { max-height: 100%; border-radius: 0; }
  .settings { grid-template-columns: 1fr; } .settings .panel, .settings .kv, .settings .row, .row > code, .kv .k, .kv .v { min-width: 0; }
  .settings .kv, .member, .health .h { flex-wrap: wrap; row-gap: 8px; }
  .member form { width: 100%; } .member form input { width: 100% !important; flex: 1; }
  code { max-width: 100%; overflow-wrap: anywhere; }
  .chgrid { grid-template-columns: 1fr; }
  .bulkbar { top: 0; border-radius: 0 0 var(--r-l) var(--r-l); margin: 0 -16px; padding: 10px 16px; }
  .bulkbar .btn.sm { padding: 5px 8px; }
}
@media (max-width: 900px) {
  .sheet { border-radius: 12px; } .previews { display: none; } .composer { border-right: 0; }
  .cal .days, .cal .slot-row { grid-template-columns: 48px repeat(7, minmax(0, 1fr)); }
  .stats { grid-template-columns: 1fr 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .mobile-nav { display: flex !important; }
  .main { padding-bottom: 64px; }
}
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; justify-content: space-around; padding: 8px 6px 14px; border-top: 1px solid var(--line); background: var(--bg); z-index: 40; }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--ink-3); padding: 4px 10px; }
.mobile-nav a.active { color: var(--ink); font-weight: 600; }
.mobile-nav svg.i { width: 20px; height: 20px; }
