/* Relay — cross-posting studio. Cool-paper / ink / vermillion signature.
   Bricolage Grotesque (display) + Hanken Grotesk (body) + JetBrains Mono (labels). */

:root {
  /* palette */
  --bg:      #e9ebee;
  --bg-2:    #dfe2e6;
  --surface: #ffffff;
  --surface-2:#f6f7f9;
  --ink:     #14151a;
  --ink-2:   #3b3e46;
  --muted:   #6b6f79;
  --faint:   #9aa0aa;
  --line:    #e4e6eb;
  --line-2:  #d3d6dd;
  --accent:  #ff4a1f;
  --accent-ink:#c92c00;
  --accent-wash:#ffe9e2;
  --good:    #12996b;
  --good-wash:#dcf4ea;
  --warn:    #c98a00;
  --warn-wash:#fbefd2;
  --bad:     #d63a2f;
  --bad-wash:#fbe3e1;
  --info:    #2f6df0;

  /* spacing scale (4-based) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --shadow-1: 0 1px 2px rgba(20,21,26,.05), 0 1px 0 rgba(20,21,26,.02);
  --shadow-2: 0 4px 16px rgba(20,21,26,.08), 0 1px 3px rgba(20,21,26,.06);
  --shadow-3: 0 18px 50px -12px rgba(20,21,26,.28);

  --font-d: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-b: 'Hanken Grotesk', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, monospace;

  --nav-h: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
.mnav, .mnav-scrim { display: none; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
h1,h2,h3,h4 { font-family: var(--font-d); font-weight: 600; line-height: 1.08; letter-spacing: -.01em; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.eyebrow {
  font-family: var(--font-m);
  font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- app shell ---------- */
.app { min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s5);
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(233,235,238,.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center; flex: none;
  box-shadow: var(--shadow-1);
}
.brand .mark svg { width: 18px; height: 18px; display: block; }
.brand .dotwave { color: var(--accent); }

.nav { display: flex; gap: 2px; margin-left: var(--s3); }
.nav a {
  position: relative;
  padding: 8px 14px; border-radius: 999px;
  font-weight: 500; color: var(--ink-2);
  font-size: 14px;
  transition: background .16s, color .16s;
}
.nav a:hover { background: rgba(20,21,26,.06); color: var(--ink); }
.nav a.active { background: var(--ink); color: #fff; }
.nav a .cnt { font-family: var(--font-m); font-size: 10px; margin-left: 6px; opacity: .7; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.conn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  box-shadow: var(--shadow-1);
  transition: border-color .16s, transform .16s;
}
.conn-pill:hover { border-color: var(--ink); transform: translateY(-1px); }
.conn-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-wash); }

.hamburger { display: none; }

/* ---------- layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: clamp(18px, 3.2vw, 34px) clamp(16px, 4vw, 40px) 80px; }
.view { display: none; animation: fade .3s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s5); flex-wrap: wrap; }
.view-head h1 { font-size: clamp(26px, 4vw, 38px); }
.view-head p { color: var(--muted); margin-top: 6px; max-width: 52ch; }

/* ---------- compose grid ---------- */
.compose-grid { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: var(--s5); align-items: start; }
.compose-grid > * { min-width: 0; }
.card { min-width: 0; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.card-pad { padding: var(--s5); }

.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s4); }
.panel-title h3 { font-size: 15px; }
.panel-title .eyebrow { margin-left: auto; }

/* per-platform tabs */
.ovtabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; margin-bottom: var(--s3); scrollbar-width: none; }
.ovtabs::-webkit-scrollbar { display: none; }
.ovtab {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: all .15s;
}
.ovtab:hover { border-color: var(--ink); }
.ovtab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.ovtab.active .pglyph { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.ovtab .edited-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.pglyph {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-d); font-weight: 700; font-size: 11px; line-height: 1;
}
.pglyph.sm { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; }
.pglyph.lg { width: 34px; height: 34px; border-radius: 9px; font-size: 16px; }

/* editor */
.editor-wrap { position: relative; }
.editor {
  width: 100%; min-height: 172px; resize: vertical;
  border: none; outline: none; background: transparent;
  font-size: 17px; line-height: 1.55; color: var(--ink);
  font-family: var(--font-b);
}
.editor::placeholder { color: var(--faint); }
.editor-foot { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); flex-wrap: wrap; }

.tool-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: all .15s;
}
.tool-btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.tool-btn svg { width: 15px; height: 15px; }
.tool-btn.ai { background: var(--ink); color: #fff; border-color: var(--ink); }
.tool-btn.ai:hover { background: #000; }
.tool-btn.ai .spark { color: var(--accent); }

.counter { margin-left: auto; display: flex; align-items: center; gap: 10px; font-family: var(--font-m); font-size: 12px; color: var(--muted); }
.counter .ring { --p: 0; width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p)*1%), var(--line-2) 0);
  display: grid; place-items: center; }
.counter .ring::after { content: ''; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); }
.counter.over { color: var(--bad); }
.counter.over .ring { background: conic-gradient(var(--bad) 100%, var(--bad) 0); }
.counter.warn .ring { background: conic-gradient(var(--warn) calc(var(--p)*1%), var(--line-2) 0); }

/* media */
.media-strip { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s4); }
.media-thumb { position: relative; width: 84px; height: 84px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; display: grid; place-items: center; font-size: 13px; line-height: 1; }
.media-thumb .rm:hover { background: var(--bad); }
.media-thumb .upstate { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.7); font-size: 11px; font-family: var(--font-m); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 18px; text-align: center; color: var(--muted); font-size: 13px; transition: all .15s; cursor: pointer; margin-top: var(--s4); }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); }

/* platform picker */
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px,1fr)); gap: 8px; }
.plat-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  font-weight: 500; font-size: 13.5px; color: var(--ink-2);
  transition: all .15s; text-align: left; position: relative;
}
.plat-chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.plat-chip.on { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: var(--shadow-2); }
.plat-chip .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plat-chip .check { margin-left: auto; width: 16px; height: 16px; opacity: 0; flex: none; color: var(--accent); }
.plat-chip.on .check { opacity: 1; }
.plat-chip.unlinked::after { content: ''; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* schedule */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: all .15s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.input {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,21,26,.08); }

.actions-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  transition: all .16s; border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(255,74,31,.55); }
.btn-primary:hover { background: #ff3606; transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(255,74,31,.6); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }

/* previews column */
.preview-col { position: sticky; top: calc(var(--nav-h) + 22px); display: flex; flex-direction: column; gap: var(--s4); max-height: calc(100vh - var(--nav-h) - 44px); overflow-y: auto; padding-right: 4px; }
.preview-col::-webkit-scrollbar { width: 6px; }
.preview-col::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
.pv-empty { text-align: center; color: var(--muted); padding: var(--s7) var(--s4); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); }

.pv {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
}
.pv-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pv-top .pv-name { font-weight: 600; font-size: 13.5px; }
.pv-top .pv-limit { margin-left: auto; font-family: var(--font-m); font-size: 11px; color: var(--muted); }
.pv-top .pv-limit.over { color: var(--bad); font-weight: 600; }
.pv-body { padding: 14px; }
.pv-acct { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.pv-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-d); font-weight: 700; font-size: 15px; flex: none; }
.pv-handle b { display: block; font-size: 13.5px; }
.pv-handle span { font-size: 12px; color: var(--muted); }
.pv-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.pv-text .tag { color: var(--info); }
.pv-text .trunc { background: var(--bad-wash); color: var(--bad); border-radius: 3px; }
.pv-media { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: grid; gap: 2px; }
.pv-media.n1 { grid-template-columns: 1fr; }
.pv-media.n2 { grid-template-columns: 1fr 1fr; }
.pv-media.n3, .pv-media.n4 { grid-template-columns: 1fr 1fr; }
.pv-media img, .pv-media video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; display: block; background: var(--surface-2); }
.pv-actions { display: flex; gap: 16px; margin-top: 12px; color: var(--faint); }
.pv-actions svg { width: 17px; height: 17px; }
.pv-warn { margin-top: 10px; font-size: 12px; color: var(--warn); background: var(--warn-wash); padding: 7px 10px; border-radius: 8px; display: flex; gap: 7px; align-items: flex-start; }

/* ---------- queue ---------- */
.filters { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-bottom: var(--s5); }
.chip-select { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; box-shadow: var(--shadow-1); }
.chip-select button { padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: all .14s; }
.chip-select button.on { background: var(--ink); color: #fff; }
.filter-select { padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; box-shadow: var(--shadow-1); }

.q-list { display: flex; flex-direction: column; gap: var(--s3); }
.q-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s4); box-shadow: var(--shadow-1); transition: box-shadow .15s, transform .15s;
}
.q-item:hover { box-shadow: var(--shadow-2); }
.q-when { text-align: center; min-width: 62px; }
.q-when .d { font-family: var(--font-d); font-weight: 700; font-size: 20px; line-height: 1; }
.q-when .m { font-family: var(--font-m); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 3px; }
.q-when .t { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.q-body { min-width: 0; }
.q-plats { display: flex; gap: 4px; margin-bottom: 7px; flex-wrap: wrap; }
.q-text { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-media-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-family: var(--font-m); margin-top: 6px; }
.q-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.q-actions { display: flex; gap: 4px; }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; transition: all .14s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.icon-btn.danger:hover { background: var(--bad-wash); color: var(--bad); }
.icon-btn svg { width: 16px; height: 16px; }

.status-tag { font-family: var(--font-m); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; }
.status-tag.scheduled { background: var(--info); color: #fff; background: #eaf1fe; color: var(--info); }
.status-tag.draft { background: var(--surface-2); color: var(--muted); }
.status-tag.posted { background: var(--good-wash); color: var(--good); }

.empty-state { text-align: center; padding: var(--s9) var(--s4); color: var(--muted); }
.empty-state .big { font-family: var(--font-d); font-size: 21px; color: var(--ink); margin: var(--s4) 0 6px; }
.empty-state .ico { width: 54px; height: 54px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto; box-shadow: var(--shadow-1); color: var(--accent); }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.cal-head h2 { font-size: 22px; }
.cal-nav { display: flex; gap: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 9px; text-align: center; font-family: var(--font-m); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cal-cell { background: var(--surface); min-height: 108px; padding: 8px; display: flex; flex-direction: column; gap: 5px; transition: background .14s; cursor: pointer; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: var(--bg-2); color: var(--faint); cursor: default; }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; }
.cal-num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.cal-ev { display: flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.cal-ev:hover { border-color: var(--ink); }
.cal-ev .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cal-ev.posted { opacity: .6; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 6px; }

/* ---------- accounts ---------- */
.demo-banner {
  display: flex; align-items: flex-start; gap: var(--s3);
  background: var(--warn-wash); border: 1px solid #f0d89a; color: #7a5b00;
  padding: var(--s4); border-radius: var(--r-md); margin-bottom: var(--s5); font-size: 13.5px; line-height: 1.5;
}
.demo-banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: var(--s4); }
.acct-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--s3); }
.acct-card .acct-top { display: flex; align-items: center; gap: var(--s3); }
.acct-card .acct-meta b { display: block; font-size: 15px; }
.acct-card .acct-meta span { font-size: 12.5px; color: var(--muted); }
.acct-card .acct-status { margin-left: auto; font-family: var(--font-m); font-size: 11px; }
.acct-card .badge-live { color: var(--good); }
.acct-card .badge-off { color: var(--faint); }
.acct-card .acct-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.acct-card.linked { border-color: var(--ink); }

/* ---------- AI panel / modal ---------- */
.modal-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(20,21,26,.42); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: var(--s4); }
.modal-scrim.open { display: flex; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 520px; box-shadow: var(--shadow-3); overflow: hidden; animation: pop .25s cubic-bezier(.2,.8,.3,1); max-height: 90vh; display: flex; flex-direction: column; }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; }
.modal-head .spark { color: var(--accent); }
.modal-head .x { margin-left: auto; }
.modal-body { padding: var(--s5); overflow-y: auto; }
.ai-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: var(--s4); }
.ai-opt { padding: 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); text-align: left; transition: all .15s; }
.ai-opt:hover { border-color: var(--ink); transform: translateY(-1px); }
.ai-opt b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.ai-opt span { font-size: 12px; color: var(--muted); }
.ai-out { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; background: var(--surface-2); min-height: 90px; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.ai-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* post-now sheet */
.postnow-list { display: flex; flex-direction: column; gap: 8px; }
.pn-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.pn-row .pn-meta { min-width: 0; }
.pn-row .pn-meta b { display: block; font-size: 14px; }
.pn-row .pn-meta span { font-size: 11.5px; color: var(--muted); }
.pn-row .pn-go { margin-left: auto; display: flex; gap: 6px; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-3); animation: toastin .3s cubic-bezier(.2,.8,.3,1); }
.toast svg { width: 16px; height: 16px; }
.toast.good svg { color: var(--good); }
.toast.bad { background: var(--bad); }
@keyframes toastin { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-2); margin-top: var(--s8); background: var(--bg); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: var(--s6) clamp(16px,4vw,40px); display: flex; gap: var(--s5); flex-wrap: wrap; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 700; }
.foot p { font-size: 12.5px; color: var(--muted); max-width: 46ch; }
.foot .cols { display: flex; gap: var(--s7); flex-wrap: wrap; }
.foot .cols div { display: flex; flex-direction: column; gap: 7px; }
.foot .cols b { font-family: var(--font-m); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 500; }
.foot .cols a { font-size: 13px; color: var(--ink-2); }
.foot .cols a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .compose-grid { grid-template-columns: minmax(0,1fr); }
  .preview-col { position: static; max-height: none; overflow: visible; min-width: 0; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .hamburger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
  .conn-pill .lbl { display: none; }
  .brand span.full { display: none; }
  .mnav-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20,21,26,.4); display: none; }
  .mnav-scrim.open { display: block; }
  .mnav { position: fixed; top: 0; right: 0; bottom: 0; width: 78%; max-width: 320px; background: var(--surface); z-index: 61; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.3,1); padding: var(--s5); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-3); }
  .mnav.open { transform: none; }
  .mnav a { padding: 14px 16px; border-radius: 12px; font-family: var(--font-d); font-size: 18px; font-weight: 600; color: var(--ink); }
  .mnav a.active { background: var(--ink); color: #fff; }
  .mnav .mnav-close { align-self: flex-end; width: 40px; height: 40px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .plat-grid { grid-template-columns: 1fr 1fr; }
  .ai-opts { grid-template-columns: 1fr; }
  .q-item { grid-template-columns: auto 1fr; }
  .q-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .cal-cell { min-height: 78px; padding: 5px; }
  .cal-ev .txt { display: none; }
  .cal-num { font-size: 12px; width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
