/* daynight schedule — brand system
   Tokens are Branding/08-color/daynight-tokens.css. Two themes, as the brand has two sides:
   day (paper surfaces, green signal) and night (night surfaces, lavender signal).
   The logo is never lavender — it stays green or neutral on both (brand rule). */

@font-face {
  font-family: "Clash Display";
  src: url("fonts/ClashDisplay-Variable.woff2") format("woff2-variations"), url("fonts/ClashDisplay-Variable.woff2") format("woff2");
  font-weight: 200 700; font-display: swap;
}
@font-face {
  font-family: "Gambetta";
  src: url("fonts/Gambetta-Variable.woff2") format("woff2-variations");
  font-weight: 300 700; font-display: swap;
}
@font-face {
  font-family: "Gambetta";
  src: url("fonts/Gambetta-VariableItalic.woff2") format("woff2-variations");
  font-weight: 300 700; font-style: italic; font-display: swap;
}

:root {
  --dn-night: #141615; --dn-dark: #374C4F; --dn-paper: #EEFFEC; --dn-mist: #EBF6F7;
  --dn-green: #01FF85; --dn-mint: #9FFFD1; --dn-lavender: #DCA3F8; --dn-coral: #FF854E; --dn-ink: #041F13;

  --font-display: "Clash Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Gambetta", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.28, 1.68, .36, 1);
  --side-w: 248px;
}

/* ── day ─────────────────────────────────────────────── */
:root, :root[data-theme="day"] {
  color-scheme: light;
  --bg: var(--dn-paper);
  --bg-pattern: url("img/daynight-pattern-overlay-dark.svg");
  --surface: #FFFFFF;
  --surface-2: var(--dn-mist);
  --surface-3: #DDEFEF;
  --line: rgba(55, 76, 79, .14);
  --line-strong: rgba(55, 76, 79, .28);
  --text: var(--dn-night);
  --text-2: var(--dn-dark);
  --muted: rgba(55, 76, 79, .66);
  --accent: var(--dn-green);
  --accent-ink: var(--dn-ink);
  --accent-soft: rgba(1, 255, 133, .16);
  --accent-text: #00804A;       /* green that reads as text on paper */
  --chip: var(--dn-mint);
  --shadow-1: 0 1px 2px rgba(20, 22, 21, .06), 0 2px 8px rgba(20, 22, 21, .04);
  --shadow-2: 0 10px 30px -8px rgba(20, 22, 21, .18), 0 2px 6px rgba(20, 22, 21, .06);
  --shadow-3: 0 30px 80px -20px rgba(20, 22, 21, .35);
  --focus: 0 0 0 3px rgba(1, 255, 133, .55);
  --overlay: rgba(20, 22, 21, .42);
  --warn-bg: #FFF1E9; --warn-text: #9A3A0C;
  --err-bg: #FFE4D8; --err-text: #A23300;
  --ok-text: #00804A;
}

/* ── night ───────────────────────────────────────────── */
:root[data-theme="night"] {
  color-scheme: dark;
  --bg: var(--dn-night);
  --bg-pattern: url("img/daynight-pattern-overlay-paper.svg");
  --surface: #1B1E1D;
  --surface-2: #222726;
  --surface-3: #2B3231;
  --line: rgba(238, 255, 236, .09);
  --line-strong: rgba(238, 255, 236, .2);
  --text: var(--dn-paper);
  --text-2: rgba(238, 255, 236, .82);
  --muted: rgba(238, 255, 236, .55);
  --accent: var(--dn-lavender);
  --accent-ink: #1A0F22;
  --accent-soft: rgba(220, 163, 248, .16);
  --accent-text: var(--dn-lavender);
  --chip: rgba(220, 163, 248, .2);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 14px 40px -10px rgba(0, 0, 0, .6);
  --shadow-3: 0 30px 90px -20px rgba(0, 0, 0, .75);
  --focus: 0 0 0 3px rgba(220, 163, 248, .55);
  --overlay: rgba(0, 0, 0, .6);
  --warn-bg: rgba(255, 133, 78, .12); --warn-text: #FFB48F;
  --err-bg: rgba(255, 133, 78, .2); --err-text: #FFA27A;
  --ok-text: var(--dn-green);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
::selection { background: var(--dn-green); color: var(--dn-ink); }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.1; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; letter-spacing: 0; }
.serif { font-family: var(--font-serif); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }

/* ── app shell ───────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  background: var(--dn-night);
  color: var(--dn-paper);
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px 16px;
  overflow: hidden;
  isolation: isolate;
  border-right: 1px solid rgba(238, 255, 236, .06);
}
.side::before { /* the pill field, held right back */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .028;
  background: url("img/daynight-pattern-overlay-green.svg") 0 0 / 260px;
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; }
.side .brand svg.mark { width: 30px; height: 30px; }
.side .brand svg.word { height: 21px; width: auto; }
.side .brand .tag {
  font-family: var(--font-display); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dn-night); background: var(--dn-green); padding: 3px 7px; border-radius: var(--r-pill); margin-left: 2px;
}
.side .new-post { margin: 0 0 14px; width: 100%; justify-content: center; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  color: rgba(238, 255, 236, .72); text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  transition: background .2s, color .2s;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: rgba(238, 255, 236, .06); color: var(--dn-paper); }
.nav a.on { background: rgba(1, 255, 133, .12); color: var(--dn-green); }
.nav a .count {
  margin-left: auto; font-family: var(--font-body); font-size: 11px; font-weight: 600;
  background: var(--dn-coral); color: var(--dn-night); border-radius: var(--r-pill); padding: 1px 7px;
}
.side .grow { flex: 1; }
.side .worker { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12px; color: rgba(238, 255, 236, .55); }
.side .me {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-lg);
  background: rgba(238, 255, 236, .05); border: 1px solid rgba(238, 255, 236, .07);
}
.side .me .who { min-width: 0; flex: 1; }
.side .me .who b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .who a { font-size: 12px; color: rgba(238, 255, 236, .55); text-decoration: none; }
.side .me .who a:hover { color: var(--dn-paper); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.live { background: var(--dn-green); box-shadow: 0 0 0 3px rgba(1, 255, 133, .18); animation: breathe 2.4s ease-in-out infinite; }
.dot.dead { background: var(--dn-coral); box-shadow: 0 0 0 3px rgba(255, 133, 78, .2); }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(1, 255, 133, 0); } }

/* the theme switch — the brandmark made operable, as on the website */
.theme-switch { border: 0; background: none; padding: 0; cursor: pointer; width: 46px; height: 46px; flex: none; border-radius: 50%; }
.theme-switch svg { width: 46px; height: 46px; overflow: visible; }
.theme-switch .knob { transition: transform .62s var(--spring); }
.theme-switch .face-day, .theme-switch .face-night { transition: opacity .3s; }
:root[data-theme="night"] .theme-switch .knob { transform: translate(16.93px, 31.07px); }
:root:not([data-theme="night"]) .theme-switch .knob { transform: translate(31.07px, 16.93px); }
:root[data-theme="night"] .theme-switch .face-day, :root:not([data-theme="night"]) .theme-switch .face-night { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .theme-switch .knob { transition: none; } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px 16px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 26px; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.topbar .spacer { flex: 1; }
.clock { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 500; color: var(--muted); font-size: 13px; white-space: nowrap; }
.clock b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.content { padding: 8px 32px 64px; max-width: 1480px; width: 100%; }

/* ── buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--text-2); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { filter: brightness(1.04); box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.signal { background: var(--dn-green); color: var(--dn-ink); border-color: transparent; } /* always green: the sidebar CTA */
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--err-text); }
.btn.danger:hover { border-color: var(--dn-coral); background: var(--err-bg); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.icon { width: 40px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 32px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--accent-ink) transparent var(--accent-ink) transparent; animation: spin .7s linear infinite;
}
.btn:not(.primary).busy::after { border-color: var(--text) transparent var(--text) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.split { display: inline-flex; }
.split .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 14px; }
.split .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 10px; border-left: 1px solid rgba(0,0,0,.12); }

/* ── cards, fields ───────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.pad { padding: 20px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-h h2, .card-h h3 { flex: 1; }
.card-b { padding: 14px 20px 20px; }
.grid { display: grid; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  border-radius: var(--r-md); padding: 10px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input { height: 42px; }
.textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.select { height: 42px; appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.counter { margin-left: auto; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--err-text); font-weight: 700; }

.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .25s; flex: none; border: 1px solid var(--line); }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .35s var(--spring); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(16px); }
.toggle input:focus-visible + .track { box-shadow: var(--focus); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, box-shadow .2s;
}
.seg button svg { width: 16px; height: 16px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }

/* ── status chips ────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: 12px; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.plain::before { display: none; }
.chip.s-draft { background: var(--surface-2); color: var(--muted); }
.chip.s-scheduled { background: color-mix(in srgb, var(--dn-mint) 55%, transparent); color: var(--dn-ink); }
:root[data-theme="night"] .chip.s-scheduled { background: rgba(159, 255, 209, .14); color: var(--dn-mint); }
.chip.s-publishing, .chip.s-preparing, .chip.s-ready, .chip.s-pending { background: rgba(220, 163, 248, .22); color: #6B2E8C; }
:root[data-theme="night"] :is(.chip.s-publishing, .chip.s-preparing, .chip.s-ready, .chip.s-pending) { color: var(--dn-lavender); }
.chip.s-publishing::before, .chip.s-preparing::before { animation: pulse 1.2s ease-in-out infinite; }
.chip.s-published { background: var(--dn-night); color: var(--dn-green); }
:root[data-theme="night"] .chip.s-published { background: rgba(1, 255, 133, .12); }
.chip.s-partial, .chip.s-needs_check { background: var(--warn-bg); color: var(--warn-text); }
.chip.s-failed { background: var(--err-bg); color: var(--err-text); }
@keyframes pulse { 50% { opacity: .2; } }

.pf { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; flex: none; color: #fff; }
.pf svg { width: 14px; height: 14px; }
.pf.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.pf.facebook { background: #1877F2; }
.pf.sm { width: 18px; height: 18px; border-radius: 6px; }
.pf.sm svg { width: 11px; height: 11px; }
.pf.off { filter: grayscale(1); opacity: .35; }

.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; display: grid; place-items: center; overflow: hidden; }
.avatar.initials { font-family: var(--font-display); font-weight: 600; font-size: 13px; background: var(--dn-green); color: var(--dn-ink); }
.avatar svg { width: 60%; height: 60%; }

/* ── overview ────────────────────────────────────────── */
.hello { display: flex; align-items: center; gap: 18px; margin: 10px 0 26px; }
.hello .face { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.18)); }
.hello h2 { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 34px; letter-spacing: -.01em; }
.hello p { margin: 4px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .n { font-family: var(--font-display); font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { margin-top: 8px; color: var(--muted); font-size: 13px; }
.stat.hero { background: var(--dn-night); color: var(--dn-paper); border-color: transparent; }
.stat.hero::after { content: ""; position: absolute; inset: 0; background: url("img/daynight-pattern-overlay-green.svg") 0 0 / 200px; opacity: .035; }
.stat.hero .n { color: var(--dn-green); }
.stat.hero .l { color: rgba(238, 255, 236, .6); }
.ov { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }

.plist { display: flex; flex-direction: column; }
.pitem { display: flex; align-items: center; gap: 14px; padding: 12px 20px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); transition: background .15s; cursor: pointer; }
.pitem:first-child { border-top: 0; }
.pitem:hover { background: var(--surface-2); }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-3); flex: none; position: relative; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 22px; height: 22px; }
.thumb .badge { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.thumb .badge svg { width: 12px; height: 12px; }
.pitem .txt { flex: 1; min-width: 0; }
.pitem .cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.pitem .meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.pitem .when { text-align: right; font-family: var(--font-display); font-weight: 600; font-size: 13px; white-space: nowrap; }
.pitem .when small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 12px; }
.feed { list-style: none; margin: 0; padding: 4px 20px 16px; }
.feed li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.feed li:first-child { border-top: 0; }
.feed time { color: var(--muted); white-space: nowrap; font-size: 12px; min-width: 64px; }
.feed b { font-weight: 600; }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty img { width: 132px; height: 132px; margin: 0 auto 10px; }
.empty .serif { font-style: italic; font-size: 20px; color: var(--text); margin-bottom: 4px; }

/* ── calendar ────────────────────────────────────────── */
.cal-bar { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; flex-wrap: wrap; }
.cal-bar h2 { font-size: 24px; min-width: 210px; }
.cal-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: start; }
.cal { overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-head div { padding: 12px 12px 10px; font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.day {
  min-height: 132px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 8px; display: flex; flex-direction: column; gap: 4px; position: relative; transition: background .15s;
}
.day:nth-child(7n) { border-right: 0; }
.day.out { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.day.out .num { opacity: .4; }
.day.past:not(.today) { background: color-mix(in srgb, var(--surface-2) 30%, transparent); }
.day .num { font-family: var(--font-display); font-weight: 600; font-size: 13px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); }
.day.today .num { background: var(--dn-green); color: var(--dn-ink); }
.day .add {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: scale(.8); transition: opacity .15s, transform .2s var(--spring);
}
.day .add svg { width: 15px; height: 15px; }
.day:hover .add, .day .add:focus-visible { opacity: 1; transform: none; }
.day.drop { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ev {
  display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-size: 12px; text-decoration: none; color: inherit;
  transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; position: relative; overflow: hidden;
}
.ev:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.ev .t { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: none; background: var(--surface-3); }
.ev .tm { font-weight: 600; font-variant-numeric: tabular-nums; }
.ev .cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; color: var(--muted); }
.ev::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.ev.s-scheduled::after { background: var(--dn-green); }
.ev.s-draft { border-style: dashed; background: transparent; }
.ev.s-draft::after { background: var(--line-strong); }
.ev.s-publishing::after { background: var(--dn-lavender); }
.ev.s-published { background: transparent; }
.ev.s-published::after { background: var(--dn-dark); }
:root[data-theme="night"] .ev.s-published::after { background: var(--dn-mint); }
.ev.s-failed::after, .ev.s-partial::after { background: var(--dn-coral); }
.ev[draggable="true"] { cursor: grab; }
.ev.dragging { opacity: .4; }
.more { font-size: 12px; color: var(--muted); padding: 2px 6px; cursor: pointer; border: 0; background: none; text-align: left; }
.more:hover { color: var(--text); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.wcol { display: flex; flex-direction: column; gap: 10px; min-height: 420px; padding: 10px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); position: relative; }
.wcol.today { box-shadow: inset 0 0 0 2px var(--dn-green); }
.wcol.drop { background: var(--accent-soft); }
.wcol header { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.wcol header b { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.wcol header span { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wcol header button { margin-left: auto; }
.wcard { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s; text-decoration: none; color: inherit; display: block; }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.wcard .im { aspect-ratio: 4/5; background: var(--surface-3) center/cover; position: relative; }
.wcard .im .pfs { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 3px; }
.wcard .im .fmt { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.55); color: #fff; border-radius: 7px; padding: 2px 6px; font-size: 11px; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.wcard .im .fmt svg { width: 12px; height: 12px; }
.wcard .bd { padding: 8px 10px 10px; font-size: 12px; }
.wcard .bd .tm { font-family: var(--font-display); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.wcard .bd .cap { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

.tray .card-b { display: flex; flex-direction: column; gap: 8px; }
.tray .ev { padding: 6px 8px 6px 6px; }
.tray .ev .t { width: 34px; height: 34px; }

/* ── posts list ──────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  border: 0; background: none; cursor: pointer; padding: 10px 14px 12px; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; display: flex; gap: 8px; align-items: center;
}
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs .n { font-family: var(--font-body); font-size: 11px; background: var(--surface-2); padding: 1px 7px; border-radius: 99px; color: var(--muted); }

/* ── composer ────────────────────────────────────────── */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.composer .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sect { padding: 18px 20px; }
.sect > .label { margin-bottom: 12px; }
.sect .label .n { width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--bg); display: inline-grid; place-items: center; font-size: 11px; }

.chans { display: flex; gap: 10px; flex-wrap: wrap; }
.chan {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; position: relative;
  transition: border-color .2s, background .2s, box-shadow .2s, opacity .2s;
}
.chan input { position: absolute; opacity: 0; pointer-events: none; }
.chan .avatar { width: 32px; height: 32px; position: relative; }
.chan .pf { position: absolute; right: -4px; bottom: -4px; border: 2px solid var(--surface); }
.chan .avwrap { position: relative; }
.chan b { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; display: block; line-height: 1.2; }
.chan small { color: var(--muted); font-size: 12px; }
.chan .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; margin-left: 4px; transition: background .2s, border-color .2s; }
.chan .tick svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--spring); }
.chan:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chan:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chan:has(input:checked) .tick svg { opacity: 1; transform: none; }
.chan:has(input:focus-visible) { box-shadow: var(--focus); }
.chan.bad { opacity: .6; }

.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fmt {
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; background: var(--surface);
  display: flex; gap: 12px; align-items: center; transition: border-color .2s, background .2s; text-align: left;
}
.fmt svg { width: 24px; height: 24px; flex: none; color: var(--text-2); }
.fmt b { font-family: var(--font-display); font-weight: 600; display: block; font-size: 14px; }
.fmt small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.fmt.on { border-color: var(--accent); background: var(--accent-soft); }
.fmt.on svg { color: var(--accent-text); }

.tray-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.mi {
  position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3);
  border: 1px solid var(--line); cursor: grab;
}
.mi img, .mi video { width: 100%; height: 100%; object-fit: cover; }
.mi .ord { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: rgba(20,22,21,.72); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mi .kind { position: absolute; left: 6px; bottom: 6px; background: rgba(20,22,21,.72); color: #fff; border-radius: 7px; padding: 2px 6px; font-size: 11px; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.mi .kind svg { width: 12px; height: 12px; }
.mi .tools { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .15s; }
.mi:hover .tools, .mi:focus-within .tools { opacity: 1; }
.mi .tools button { width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(255,255,255,.92); color: var(--dn-night); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.mi .tools button svg { width: 15px; height: 15px; }
.mi .tools button:hover { background: #fff; }
.mi .tools button.del:hover { background: var(--dn-coral); }
.mi .alt-flag { position: absolute; right: 6px; bottom: 6px; background: var(--dn-green); color: var(--dn-ink); font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; }
.mi.drag { opacity: .35; }
.mi.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.mi .prog { position: absolute; inset: 0; background: rgba(20,22,21,.6); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 600; }
.mi .prog i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--dn-green); transition: width .2s; }
.drop-zone {
  aspect-ratio: 1; border-radius: var(--r-md); border: 1.5px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--muted); cursor: pointer; text-align: center; padding: 10px; font-size: 12px; transition: border-color .2s, background .2s, color .2s;
}
.drop-zone svg { width: 26px; height: 26px; }
.drop-zone b { font-family: var(--font-display); color: var(--text-2); font-size: 13px; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text-2); }
.drop-zone.big { aspect-ratio: auto; min-height: 168px; grid-column: 1 / -1; }

.caption-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cover-pick { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.cover-pick video { width: 72px; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; }
.cover-pick input[type=range] { flex: 1; accent-color: var(--accent); }

.when { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.quick button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 5px 11px; font-size: 12px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.quick button:hover { border-color: var(--accent); }

details.more-opt { border-top: 1px solid var(--line); }
details.more-opt summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
details.more-opt summary::-webkit-details-marker { display: none; }
details.more-opt summary svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
details.more-opt[open] summary svg { transform: rotate(90deg); }
details.more-opt .inner { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }

.issues { display: flex; flex-direction: column; gap: 6px; }
.issue { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; }
.issue svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.issue.error { background: var(--err-bg); color: var(--err-text); }
.issue.warning { background: var(--warn-bg); color: var(--warn-text); }
.issue.ok { background: var(--accent-soft); color: var(--ok-text); }

.actionbar {
  position: sticky; bottom: 16px; z-index: 15; margin-top: 4px;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-pill); box-shadow: var(--shadow-2);
}
.actionbar .summary { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar .summary b { color: var(--text); font-family: var(--font-display); font-weight: 600; }

.status-panel .tgt { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.status-panel .tgt:first-child { border-top: 0; padding-top: 0; }
.status-panel .tgt .body { flex: 1; min-width: 0; }
.status-panel .err { margin-top: 8px; font-size: 13px; padding: 9px 12px; border-radius: 12px; background: var(--err-bg); color: var(--err-text); }
.status-panel .err.warn { background: var(--warn-bg); color: var(--warn-text); }

/* ── preview (phone) ─────────────────────────────────── */
.preview { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.phone {
  width: 340px; margin: 0 auto; border-radius: 44px; padding: 12px; background: #0B0C0C;
  box-shadow: var(--shadow-3), inset 0 0 0 1.5px rgba(255,255,255,.08); position: relative;
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 20px; background: #000; z-index: 3; }
.screen { border-radius: 34px; overflow: hidden; background: #fff; color: #000; height: 640px; position: relative; display: flex; flex-direction: column; font: 13px/1.4 -apple-system, system-ui, sans-serif; }
.screen .sbar { height: 46px; flex: none; }
.ig-top { display: flex; align-items: center; gap: 8px; padding: 6px 12px; }
.ig-top img, .ig-top .ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #eee; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d6249f; }
.ig-top b { font-weight: 600; font-size: 13px; }
.ig-top .dots { margin-left: auto; letter-spacing: 1px; font-weight: 700; }
.ig-media { position: relative; background: #f1f1f1; overflow: hidden; flex: none; }
.ig-media .slides { display: flex; height: 100%; transition: transform .35s var(--ease); }
.ig-media .slides > * { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }
.ig-media .count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.ig-media .nav-l, .ig-media .nav-r { position: absolute; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.85); border: 0; display: grid; place-items: center; cursor: pointer; color: #000; }
.ig-media .nav-l { left: 8px; } .ig-media .nav-r { right: 8px; }
.ig-media .nav-l svg, .ig-media .nav-r svg { width: 14px; height: 14px; }
.ig-acts { display: flex; gap: 14px; padding: 10px 12px 4px; align-items: center; }
.ig-acts svg { width: 22px; height: 22px; }
.ig-acts .save { margin-left: auto; }
.ig-acts .pager { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.ig-acts .pager i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.ig-acts .pager i.on { background: #0095f6; }
.ig-cap { padding: 2px 12px; font-size: 13px; white-space: pre-wrap; word-break: break-word; overflow: hidden; }
.ig-cap b { font-weight: 600; margin-right: 4px; }
.ig-cap .tag { color: #00376b; }
.ig-time { padding: 4px 12px; color: #737373; font-size: 11px; }
.ig-comment { padding: 2px 12px; font-size: 13px; color: #262626; }
.ig-comment b { font-weight: 600; margin-right: 4px; }
.screen.vertical { background: #000; color: #fff; }
.vert { position: absolute; inset: 0; }
.vert > img, .vert > video { width: 100%; height: 100%; object-fit: cover; }
.vert .shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.vert .who { position: absolute; left: 14px; bottom: 64px; right: 64px; display: flex; flex-direction: column; gap: 6px; }
.vert .who .u { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.vert .who .u img, .vert .who .u .ph { width: 28px; height: 28px; border-radius: 50%; background: #333; object-fit: cover; }
.vert .who .c { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vert .rail { position: absolute; right: 12px; bottom: 70px; display: flex; flex-direction: column; gap: 18px; }
.vert .rail svg { width: 26px; height: 26px; }
.vert .bars { position: absolute; top: 52px; left: 10px; right: 10px; display: flex; gap: 3px; }
.vert .bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.4); }
.vert .bars i:first-child { background: #fff; }
.vert .story-top { position: absolute; top: 62px; left: 12px; display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.vert .story-top img, .vert .story-top .ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #333; }
.vert .story-top small { opacity: .7; font-weight: 400; }
.fb-post { padding: 10px 12px; }
.fb-post .top { display: flex; gap: 8px; align-items: center; }
.fb-post .top img, .fb-post .top .ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e4e6eb; }
.fb-post .top b { font-weight: 600; font-size: 13.5px; color: #050505; display: block; }
.fb-post .top small { color: #65676b; font-size: 11.5px; }
.fb-post .txt { margin: 10px 0; white-space: pre-wrap; color: #050505; font-size: 13.5px; word-break: break-word; }
.fb-post .imgs { display: grid; gap: 2px; margin: 0 -12px; }
.fb-post .imgs img, .fb-post .imgs video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.fb-post .acts { display: flex; justify-content: space-around; border-top: 1px solid #e4e6eb; margin-top: 10px; padding-top: 8px; color: #65676b; font-weight: 600; font-size: 12.5px; }
.fb-post .linkcard { margin: 0 -12px; background: #f0f2f5; padding: 10px 12px; color: #65676b; font-size: 12px; border-top: 1px solid #e4e6eb; }
.preview .ph-empty { flex: 1; display: grid; place-items: center; color: #8e8e8e; text-align: center; padding: 24px; font-size: 13px; background: #fafafa; }

/* ── settings ────────────────────────────────────────── */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 96px; }
.subnav a { padding: 10px 14px; border-radius: var(--r-md); text-decoration: none; color: var(--muted); font-family: var(--font-display); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.subnav a svg { width: 18px; height: 18px; }
.subnav a:hover { color: var(--text); background: var(--surface-2); }
.subnav a.on { color: var(--text); background: var(--surface); box-shadow: var(--shadow-1); }
.chcard { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.chcard:first-child { border-top: 0; }
.chcard .avwrap { position: relative; }
.chcard .avatar { width: 48px; height: 48px; }
.chcard .pf { position: absolute; right: -4px; bottom: -4px; border: 2px solid var(--surface); }
.chcard .info { flex: 1; min-width: 0; }
.chcard .info b { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.connect-hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px; color: var(--dn-paper); background: var(--dn-night);
  display: flex; gap: 22px; align-items: center;
}
.connect-hero::after { content: ""; position: absolute; inset: 0; background: url("img/daynight-pattern-overlay-green.svg") 0 0 / 220px; opacity: .03; pointer-events: none; }
.connect-hero > * { position: relative; z-index: 1; }
.connect-hero h2 { font-size: 22px; }
.connect-hero p { margin: 6px 0 0; color: rgba(238,255,236,.7); max-width: 52ch; }
.connect-hero .logos { display: flex; gap: 8px; }
.connect-hero .logos .pf { width: 44px; height: 44px; border-radius: 14px; }
.connect-hero .logos .pf svg { width: 24px; height: 24px; }
.steps { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); }
.steps li { margin: 6px 0; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.linkbox { display: flex; gap: 8px; align-items: center; padding: 10px 10px 10px 14px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px dashed var(--accent); margin-top: 12px; }
.linkbox code { background: none; flex: 1; padding: 0; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 20px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }

/* ── auth ────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .art {
  position: relative; overflow: hidden; background: var(--dn-night); color: var(--dn-paper);
  display: flex; flex-direction: column; justify-content: space-between; padding: 44px;
}
.auth .art::before { content: ""; position: absolute; inset: -10%; background: url("img/daynight-pattern-overlay-green.svg") 0 0 / 240px; opacity: .04; }
.auth .art .glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(80px); opacity: .35; }
.auth .art .glow.g { background: var(--dn-green); left: -160px; bottom: -200px; }
.auth .art .glow.l { background: var(--dn-lavender); right: -200px; top: -180px; opacity: .25; }
.auth .art > * { position: relative; z-index: 1; }
.auth .art .logo svg { height: 40px; width: auto; }
.auth .art h1 { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(40px, 5vw, 68px); line-height: 1.02; letter-spacing: -.02em; max-width: 11ch; }
.auth .art h1 em { font-style: normal; font-family: var(--font-display); font-weight: 600; color: var(--dn-green); letter-spacing: -.03em; }
.auth .art .pills { display: flex; gap: 10px; flex-wrap: wrap; }
.auth .art .pills span { border: 1px solid rgba(238,255,236,.18); padding: 6px 12px; border-radius: 99px; font-family: var(--font-display); font-weight: 500; font-size: 13px; color: rgba(238,255,236,.8); }
.auth .form { display: grid; place-items: center; padding: 40px 24px; }
.auth .form .box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth .form h2 { font-size: 30px; }
.auth .form .err { background: var(--err-bg); color: var(--err-text); padding: 10px 14px; border-radius: 12px; font-size: 13px; }

/* ── overlays ────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: grid; place-items: center; padding: 20px; animation: fade .2s var(--ease); }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); animation: rise .35s var(--spring); }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 20px 22px 6px; }
.modal-h h2 { flex: 1; }
.modal-b { padding: 12px 22px 18px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: center; max-width: 420px;
  padding: 12px 16px; border-radius: 16px; background: var(--dn-night); color: var(--dn-paper); box-shadow: var(--shadow-3);
  font-size: 13.5px; animation: rise .4s var(--spring);
}
.toast svg { width: 18px; height: 18px; flex: none; color: var(--dn-green); }
.toast.err svg { color: var(--dn-coral); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }

.menu { position: absolute; z-index: 50; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: 6px; animation: rise .25s var(--spring); }
.menu button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.menu button svg { width: 16px; height: 16px; color: var(--muted); }
.menu button:hover { background: var(--surface-2); }
.menu button .sn { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* cropper */
.crop-stage { position: relative; background: #0B0C0C; border-radius: var(--r-lg); overflow: hidden; height: min(60vh, 520px); display: grid; place-items: center; touch-action: none; user-select: none; }
.crop-stage canvas { max-width: 100%; max-height: 100%; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.crop-tools input[type=range] { flex: 1; min-width: 160px; accent-color: var(--accent); }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.page-in { animation: pagein .45s var(--ease); }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } }

/* ── responsive ──────────────────────────────────────── */
@media (max-width: 1240px) {
  .composer { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .cal-wrap { grid-template-columns: 1fr; }
  .ov { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 60; flex-direction: row; align-items: center;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid rgba(238,255,236,.08);
  }
  .side .brand, .side .worker, .side .grow, .side .me .who { display: none; }
  .side .new-post { order: 3; width: auto; margin: 0; padding: 0 14px; }
  .side .new-post span { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 8px; }
  .nav a .count { position: absolute; margin: -4px 0 0 14px; }
  .side .me { background: none; border: 0; padding: 0; }
  .main { padding-bottom: 84px; }
  .topbar { padding: 14px 16px; }
  .topbar h1 { font-size: 22px; }
  .clock { display: none; }
  .content { padding: 4px 16px 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .settings { grid-template-columns: 1fr; }
  .subnav { position: static; flex-direction: row; overflow-x: auto; }
  .formats { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth .art { min-height: 300px; padding: 28px; }
  .week { grid-template-columns: 1fr; }
  .wcol { min-height: 0; }
  .cal-head div { padding: 8px 4px; font-size: 10px; text-align: center; }
  .day { min-height: 74px; padding: 4px; }
  .day .ev .cap, .day .ev .tm { display: none; }
  .day .ev { padding: 2px; }
  .actionbar { border-radius: var(--r-lg); flex-wrap: wrap; bottom: 92px; }
  .phone { transform: scale(.92); transform-origin: top center; }
  .tbl .hide-sm { display: none; }
}
.pv-mark { width: 62%; height: 62%; }
