:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-hover: #f4f4f4;
  --bg-active: #ececec;
  --line: #ebebeb;
  --line-strong: #dcdcdc;
  --text: #111111;
  --text-2: #5c5c5c;
  --text-3: #8f8f8f;
  --accent: #111111;
  --accent-hover: #2e2e2e;
  --on-accent: #ffffff;
  --good: #1a7f37;
  --warn: #9a6700;
  --bad: #cf222e;
  --chart: #1f1f1f;
  --grid: #f0f0f0;
  --overlay: rgba(0, 0, 0, .28);
  --popover-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --bg-subtle: #151515;
    --bg-hover: #1e1e1e;
    --bg-active: #262626;
    --line: #242424;
    --line-strong: #363636;
    --text: #f2f2f2;
    --text-2: #a3a3a3;
    --text-3: #737373;
    --accent: #f2f2f2;
    --accent-hover: #d9d9d9;
    --on-accent: #111111;
    --good: #4ac26b;
    --warn: #d29922;
    --bad: #f85149;
    --chart: #d4d4d4;
    --grid: #1e1e1e;
    --overlay: rgba(0, 0, 0, .55);
    --popover-shadow: 0 8px 28px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 16px; font-weight: 600; }
h2 { font-size: 13px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 500; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.spacer-16 { height: 28px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 50; background: var(--bg); padding: 6px 10px; }

/* Shell */
.app { display: grid; grid-template-columns: 216px minmax(0, 1fr); height: 100%; }
.sidebar { display: flex; flex-direction: column; gap: 12px; padding: 14px 10px 12px; background: var(--bg-subtle); border-right: 1px solid var(--line); min-height: 0; overflow-y: auto; }
.brandmark { display: flex; align-items: center; gap: 8px; padding: 4px 6px; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.new-post { width: 100%; justify-content: center; text-decoration: none; }
#nav { display: flex; flex-direction: column; gap: 1px; }
#nav a { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 5px; color: var(--text-2); text-decoration: none; }
#nav a:hover { background: var(--bg-hover); color: var(--text); }
#nav a[aria-current="page"] { background: var(--bg-active); color: var(--text); font-weight: 500; }
#nav .count { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
#nav .count.alert { color: var(--bad); }
.icon { display: inline-flex; width: 15px; height: 15px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.brand-filter { margin-top: auto; display: grid; gap: 4px; padding: 0 2px; }
.brand-filter label { font-size: 12px; color: var(--text-3); }
.scheduler { display: grid; gap: 1px; padding: 0 2px; font-size: 12px; color: var(--text-3); }
.scheduler .off { color: var(--bad); }
#main { overflow-y: auto; min-width: 0; }
#view { padding: 18px 28px 48px; max-width: 1180px; margin: 0 auto; outline: none; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; min-height: 30px; }

/* Controls */
.button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--bg); color: var(--text); font-weight: 500; white-space: nowrap; text-decoration: none; }
.button:hover:not(:disabled) { background: var(--bg-hover); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.danger { color: var(--bad); }
.button.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.button.ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.button.small { height: 26px; padding: 0 8px; font-size: 12px; }
.icon-button { width: 30px; padding: 0; justify-content: center; }
.icon-button.small { width: 26px; padding: 0; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 30px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--bg);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 13px;
}
textarea { resize: vertical; line-height: 1.5; padding: 7px 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); }
::placeholder { color: var(--text-3); }
label.field { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
label.field > input, label.field > select { color: var(--text); font-size: 13px; }
.hint { font-size: 12px; color: var(--text-3); }
.check { display: flex; align-items: flex-start; gap: 7px; }
.check input { margin: 2px 0 0; accent-color: var(--accent); }
.segmented { display: inline-flex; justify-self: start; gap: 2px; }
.segmented button { height: 26px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text-2); }
.segmented button:hover { background: var(--bg-hover); }
.segmented button[aria-pressed="true"] { background: var(--bg-active); color: var(--text); font-weight: 500; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stack { display: grid; gap: 12px; }
.panel { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.section { display: grid; gap: 10px; }
.section + .section { padding-top: 22px; border-top: 1px solid var(--line); }
.sections { display: grid; gap: 22px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); display: grid; gap: 10px; justify-items: center; }
.empty h2 { color: var(--text); }

/* Status is words. Colour only appears when something needs doing. */
.status { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); white-space: nowrap; font-size: 12px; }
.status .icon { width: 13px; height: 13px; color: var(--text-3); }
.status.good .icon { color: var(--good); }
.status.warn, .status.warn .icon { color: var(--warn); }
.status.bad, .status.bad .icon { color: var(--bad); }
.notice { display: flex; align-items: center; gap: 8px; padding: 8px 0; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.notice a { white-space: nowrap; color: var(--text); }
#global-alert:empty { display: none; }
#global-alert { padding: 0 28px; max-width: 1180px; margin: 0 auto; }
#global-alert .notice { margin: 0; }

/* Platform marks are single-colour, always. */
.pf { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; color: var(--text-2); }
.pf svg { width: 100%; height: 100%; display: block; }
.pf.lg { width: 18px; height: 18px; color: var(--text); }
.pf.sm { width: 12px; height: 12px; color: var(--text-3); }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekday { padding: 6px 8px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.cal-day { position: relative; min-height: 112px; padding: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-date { display: flex; align-items: center; justify-content: center; align-self: flex-start; min-width: 20px; height: 20px; margin-bottom: 2px; padding: 0 4px; border-radius: 10px; font-size: 12px; color: var(--text-2); }
.cal-day.outside .cal-date { color: var(--text-3); opacity: .55; }
.cal-day.today .cal-date { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.cal-add { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; padding: 0; display: none; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--text-3); }
.cal-add .icon { width: 13px; height: 13px; }
.cal-add:hover { background: var(--bg-hover); color: var(--text); }
.cal-day:hover .cal-add, .cal-add:focus-visible { display: grid; }
.cal-post { display: flex; gap: 6px; width: 100%; padding: 3px; border: 0; border-radius: 4px; background: transparent; text-align: left; min-width: 0; }
.cal-post:hover { background: var(--bg-hover); }
.cal-post img, .cal-post .no-poster { width: 23px; height: 41px; border-radius: 2px; object-fit: cover; background: var(--bg-active); flex: none; }
.cal-post .meta { min-width: 0; display: grid; gap: 0; align-content: start; }
.cal-post .title { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-post .time { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-post .pfs { display: flex; gap: 3px; margin-top: 2px; }
.cal-post .status .icon { width: 11px; height: 11px; }

/* Lists */
.tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { padding: 6px 0; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; background: transparent; color: var(--text-2); white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.tabs .count { margin-left: 4px; font-size: 12px; color: var(--text-3); font-weight: 400; }
.post-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: var(--bg-hover); }
.post-row img, .post-row .no-poster { width: 34px; height: 60px; border-radius: 3px; object-fit: cover; background: var(--bg-active); }
.post-row .body { min-width: 0; display: grid; gap: 2px; }
.post-row .caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.post-row .when { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.post-row .dests { display: flex; gap: 10px; flex-wrap: wrap; }
.dest-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }

/* Drawer and modal */
dialog { color: inherit; border: 0; padding: 0; background: var(--bg); box-shadow: var(--popover-shadow); }
dialog::backdrop { background: var(--overlay); }
.drawer { margin: 0 0 0 auto; width: min(420px, 100vw); max-width: none; height: 100vh; max-height: none; border-left: 1px solid var(--line); }
.drawer[open] { display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 16px; align-content: start; }
.drawer-foot { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.drawer video { display: block; width: 100%; max-height: 320px; border-radius: 4px; background: #000; }
.section-label { font-size: 12px; color: var(--text-2); }
.dest-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.dest-row .err { grid-column: 2 / -1; font-size: 12px; color: var(--bad); }
.dest-row .stats { grid-column: 2 / -1; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.modal { width: min(480px, calc(100vw - 32px)); border-radius: 8px; max-height: calc(100vh - 48px); }
.modal[open] { display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px; display: grid; gap: 12px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); }
.platform-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.platform-option { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--bg); font-size: 12px; }
.platform-option:hover { background: var(--bg-hover); }
.platform-option[aria-pressed="true"] { border-color: var(--text); }
.platform-option[aria-pressed="true"] .pf { color: var(--text); }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.library button { padding: 0; border: 0; border-radius: 4px; background: none; text-align: left; font-size: 12px; color: var(--text-2); overflow: hidden; outline-offset: 1px; }
.library button[aria-pressed="true"] { outline: 2px solid var(--text); }
.library img, .library .no-poster { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 4px; background: var(--bg-active); }
.library span { display: block; padding: 3px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Compose */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 28px; align-items: start; }
.compose-side { position: sticky; top: 18px; display: grid; gap: 8px; }
.phone { position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--bg-hover); display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.preview-caption { font-size: 12px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 120px; overflow: hidden; }
.dest-group { display: grid; gap: 6px; }
.dest-group + .dest-group { margin-top: 10px; }
.dest-group-head { display: flex; align-items: center; min-height: 22px; font-size: 12px; color: var(--text-2); }
.dest-group-head button { margin-left: auto; }
.dest-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 6px; }
.dest-option { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 5px; cursor: pointer; min-width: 0; }
.dest-option:hover { background: var(--bg-hover); }
.dest-option:has(input:checked) { border-color: var(--text); }
.dest-option input { margin: 0; accent-color: var(--accent); flex: none; }
.dest-option .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-option.disabled { color: var(--text-3); cursor: not-allowed; border-color: var(--line); }
.dest-option.disabled:hover { background: none; }
.dest-option .sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropzone { display: grid; gap: 6px; justify-items: center; padding: 22px 16px; border: 1px dashed var(--line-strong); border-radius: 6px; text-align: center; color: var(--text-2); }
.dropzone.over { border-color: var(--text); background: var(--bg-hover); }
.dropzone .row { justify-content: center; }
.picked { display: flex; align-items: center; gap: 10px; }
.picked img, .picked .no-poster { width: 30px; height: 53px; border-radius: 3px; object-fit: cover; background: var(--bg-active); flex: none; }
.picked .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.options-block { display: grid; gap: 8px; }
.options-block + .options-block { padding-top: 12px; border-top: 1px solid var(--line); }
.options-block h3 { display: flex; align-items: center; gap: 6px; }
.series-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.series-item:first-child { border-top: 0; padding-top: 0; }
.series-item img, .series-item .no-poster { width: 34px; height: 60px; border-radius: 3px; object-fit: cover; background: var(--bg-active); }
.series-item .slot { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.series-item .slot .file { color: var(--text-3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.series-item .moves { display: flex; gap: 2px; }
.problem { color: var(--bad); font-size: 12px; margin-top: 4px; }
.warning-text { color: var(--warn); font-size: 12px; margin-top: 4px; }

/* Accounts */
.brand-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.brand-head .count { color: var(--text-3); font-size: 12px; }
.account-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto 26px; gap: 12px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); }
.account-row:first-child { border-top: 0; }
.account-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row .detail { font-size: 12px; color: var(--text-3); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); box-shadow: var(--popover-shadow); display: grid; }
.menu-heading { padding: 5px 8px 3px; font-size: 11px; color: var(--text-3); }
.menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 26px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; text-align: left; font-size: 12px; }
.menu button:hover:not(:disabled) { background: var(--bg-hover); }
.menu button.danger { color: var(--bad); }
.menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--line); width: 100%; }

/* Analytics */
.account-filter { width: auto; max-width: 240px; }
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 28px; }
.stat { padding: 12px 14px; display: grid; gap: 1px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .label { font-size: 12px; color: var(--text-2); }
.stat .value { font-size: 20px; font-weight: 500; }
.stat .delta { font-size: 12px; color: var(--text-3); }
.chart-wrap { position: relative; padding-top: 6px; }
.chart-wrap svg { display: block; width: 100%; height: 200px; overflow: visible; }
.chart-wrap text { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-wrap .gridline { stroke: var(--grid); stroke-width: 1; }
.chart-wrap .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart-wrap .bar { fill: var(--chart); transition: opacity .1s; }
.chart-wrap .hit { fill: transparent; }
.chart-wrap .hit:hover + .bar, .chart-wrap .hit:focus + .bar { opacity: .65; }
.chart-wrap .hit:focus { outline: none; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; padding: 5px 8px; border-radius: 5px; background: var(--text); color: var(--bg); font-size: 12px; white-space: nowrap; }
.chart-tip strong { display: block; font-weight: 600; }
.refetching { opacity: .55; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { padding: 6px 12px; text-align: right; font-size: 12px; font-weight: 400; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data th:first-child, table.data td:first-child { text-align: left; }
.table-scroll { overflow-x: auto; }
.content-cell { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 460px; }
.content-cell img, .content-cell .no-poster { width: 23px; height: 41px; border-radius: 2px; object-fit: cover; background: var(--bg-active); flex: none; }
.content-cell .text { min-width: 0; display: grid; text-align: left; text-decoration: none; }
.content-cell .cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-cell a:hover .cap { text-decoration: underline; }
.account-cell { display: flex; align-items: center; gap: 8px; }

/* Settings */
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
pre { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
code { padding: 0 3px; border: 1px solid var(--line); border-radius: 3px; }
.setting { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; padding-top: 4px; }
.setting-label { display: grid; gap: 4px; align-content: start; }
.setting-label p { font-size: 12px; color: var(--text-3); }
.setting-body { display: grid; gap: 12px; min-width: 0; }
.radio-row { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.radio-row input { margin: 2px 0 0; accent-color: var(--accent); }
.radio-row .text { display: grid; }
details.app-creds { border-top: 1px solid var(--line); }
details.app-creds:first-of-type { border-top: 0; }
details.app-creds summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; list-style: none; }
details.app-creds summary::-webkit-details-marker { display: none; }
details.app-creds summary:hover { background: var(--bg-hover); }
details.app-creds .inner { padding: 4px 12px 14px; display: grid; gap: 10px; }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 6px; width: min(340px, calc(100vw - 32px)); }
.toast { padding: 8px 12px; border-radius: 5px; background: var(--text); color: var(--bg); font-size: 12px; }
.toast.error { background: var(--bad); color: #fff; }

/* OAuth result page */
.callback { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.callback-card { display: grid; gap: 10px; justify-items: start; width: min(380px, 100%); }

@media (max-width: 1040px) {
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
}
@media (max-width: 900px) {
  .compose { grid-template-columns: minmax(0, 1fr); }
  .compose-side { position: static; grid-row: 1; grid-template-columns: 110px minmax(0, 1fr); }
  .setting { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .new-post { width: auto; margin-left: auto; }
  #nav { flex-direction: row; order: 5; width: 100%; overflow-x: auto; }
  #nav a { flex: none; }
  .brand-filter, .scheduler { display: none; }
  #view { padding: 14px 16px 32px; }
  #global-alert { padding: 0 16px; }
  .cal-grid.month { display: none; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .platform-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 761px) {
  .agenda { display: none; }
}

/* Hosted additions */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.panel.plan { padding: 16px; display: grid; gap: 10px; }
.panel.plan h3 { margin: 0; font-size: 15px; }
.panel.plan p { margin: 0; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); color: var(--text); }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 20px; }
.login-card .brandmark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; }
.login-card h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.login-card p { margin: 0; color: var(--text-2); line-height: 1.5; }
.login-card .button { width: 100%; justify-content: center; height: 40px; font-size: 14px; }
.login-card .google { width: 18px; height: 18px; }
.login-card .legal { font-size: 12px; color: var(--text-3); }
.login-card .legal a { color: var(--text-2); }
.login-error { color: var(--bad); font-size: 13px; }
label.check.disabled { color: var(--text-3); }
