/* ============================================================================
   FCM Design System — v1
   Extracted from FCM Document Format + FCM Platform Architecture + CrossHub IA
   ---------------------------------------------------------------------------
   The palette, and nothing else:
     Ink     — every letter and outline (deep chocolate/aubergine)
     Paper   — the page (warm cream)
     Action  — the ONE pink button per screen we want the reader to press
     Attention — butter yellow, only ever a status (waiting / needs / attention)
     Good    — green, only ever a status (met / done / on target)

   The type scale, and nothing else:
     Title    Schibsted Grotesk 800 · 34px
     Headline Schibsted Grotesk 800 · 22px
     Body     Schibsted Grotesk 500 · 15px / 1.6
     Label    SCHIBSTED GROTESK 800 · 11px UPPERCASE

   Gingham appears on the cover and nowhere else.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  /* Palette */
  --ink:        #2A1A1D;   /* chocolate-aubergine, every letter and outline */
  --ink-soft:   #5B4548;   /* secondary text */
  --ink-faint:  #94818A;   /* tertiary text / labels on paper */
  --paper:      #FBF4E4;   /* warm cream page background */
  --paper-2:    #F5EBD1;   /* slightly deeper cream for section breaks */
  --card:       #FFFFFF;   /* card/panel surface */
  --line:       #E7DBC4;   /* hairlines on paper */
  --line-soft:  #EFE6D0;

  /* Brand: the ORIGINAL Four Cross Media logo colours (sampled from the official
     logo artwork, 2026-10-03). Pink = the logo; yellow = the logo's gingham. */
  --brand-pink:   #DB7491;  /* exact logo pink */
  --brand-yellow: #FFE16C;  /* gingham, where the stripes cross */
  --brand-yellow-2: #FFEDA6;/* gingham, single stripe */

  --action:     #DB7491;   /* logo pink — one per screen, the thing we want done */
  --action-ink: #FFFFFF;   /* text on action */
  --action-hover:#C9607F;  /* pressed / hover fill */
  --action-text:#B5476A;   /* the same pink, deepened so small pink TEXT stays readable */
  --action-soft:#F8DDE5;   /* hover fill / subtle tint */

  --attention:  #FFE16C;   /* logo-gingham yellow — status only */
  --attention-soft: #FFEDA6;
  --attention-pale: #FFF6D2;
  --attention-ink:  #6B4D08;

  --good:       #3E7A5A;   /* green — status only */
  --good-soft:  #DDEBD9;

  --danger:     #B2374A;   /* rare, for destructive/overdue */

  /* Gingham (hero cover use only) — the logo's yellow gingham. Two crossing
     stripes of --gingham-stripe over white give exactly #FFEDA6 (one stripe)
     and #FFE16C (where they cross), matching the official artwork. */
  --gingham-a:  #FFE16C;
  --gingham-b:  #FFFFFF;
  --gingham-stripe: rgba(255, 201, 0, .34);
  --gingham-size: 48px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(42,26,29,.06), 0 2px 6px rgba(42,26,29,.04);
  --shadow-2: 0 4px 12px rgba(42,26,29,.08), 0 12px 40px rgba(42,26,29,.06);

  /* Type */
  --font: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Reset (light) ------------------------------------------------------------- */
*,*::before,*::after{ box-sizing: border-box; }
html,body{ margin:0; padding:0; background: var(--paper); color: var(--ink); }
body{ font-family: var(--font); font-weight: 500; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }
input,textarea,select{ font-family: inherit; color: inherit; }
kbd{ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper-2); }

/* Type scale --------------------------------------------------------------- */
.fcm-title    { font-weight: 800; font-size: 34px; line-height: 1.1;  letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.fcm-headline { font-weight: 800; font-size: 22px; line-height: 1.2;  letter-spacing: -0.005em; margin: 0; color: var(--ink); }
.fcm-body     { font-weight: 500; font-size: 15px; line-height: 1.6;  margin: 0; color: var(--ink); }
.fcm-body-soft{ font-weight: 500; font-size: 15px; line-height: 1.6;  margin: 0; color: var(--ink-soft); }
.fcm-label    { font-weight: 800; font-size: 11px; line-height: 1;    text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 0; }
.fcm-huge     { font-weight: 800; font-size: 56px; line-height: 1;    letter-spacing: -0.02em; margin: 0; color: var(--ink); }

/* Cards -------------------------------------------------------------------- */
.fcm-card       { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 20px; }
.fcm-card-ink   { background: var(--ink);  color: #F7EBEF; border-radius: var(--r-lg); padding: 20px; }
.fcm-card-attn  { background: var(--attention-pale); border: 1px solid var(--attention-soft); border-radius: var(--r-lg); padding: 20px; }
.fcm-card-attn .fcm-label { color: var(--attention-ink); }
.fcm-card-action{ background: var(--action-soft); border-radius: var(--r-lg); padding: 20px; }

.fcm-card-ink .fcm-label { color: var(--attention); }
.fcm-card-ink .fcm-body-soft { color: rgba(247,235,239,.72); }

/* Buttons ------------------------------------------------------------------ */
.fcm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  font-weight: 700; font-size: 14px; letter-spacing: -0.005em;
  border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.fcm-btn:active { transform: translateY(1px); }

.fcm-btn-action { background: var(--action); color: var(--action-ink); }
.fcm-btn-action:hover { background: var(--action-hover); }

.fcm-btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.fcm-btn-ghost:hover { background: var(--ink); color: #FFF; }

.fcm-btn-white { background: #FFF; color: var(--ink); border-color: var(--line); }
.fcm-btn-white:hover { background: var(--paper-2); }

.fcm-btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }

/* Chips / pills / badges --------------------------------------------------- */
.fcm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--paper-2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.fcm-chip-good      { background: var(--good-soft); border-color: transparent; color: var(--good); }
.fcm-chip-attention { background: var(--attention-soft); border-color: transparent; color: var(--attention-ink); }
.fcm-chip-action    { background: var(--action-soft); border-color: transparent; color: var(--action-text); }
.fcm-chip-ink       { background: var(--ink); border-color: var(--ink); color: #F7EBEF; }

.fcm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.fcm-dot-good { background: var(--good); }
.fcm-dot-attn { background: var(--attention); }
.fcm-dot-act  { background: var(--action); }
.fcm-dot-ink  { background: var(--ink); }

/* Layout ------------------------------------------------------------------- */
.fcm-app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.fcm-side { border-right: 1px solid var(--line); padding: 20px 16px; background: var(--paper); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.fcm-main { padding: 32px 40px 80px; max-width: 1400px; }
@media (max-width: 900px) {
  .fcm-app { grid-template-columns: 1fr; }
  .fcm-side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .fcm-main { padding: 24px 20px 60px; }
}

/* Sidebar nav -------------------------------------------------------------- */
.fcm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.fcm-brand-mark { width: 28px; height: 28px; background: url(/brand/fcm-mark-pink.png) center / contain no-repeat; position: relative; }

.fcm-nav { list-style: none; padding: 0; margin: 0 0 20px; }
.fcm-nav li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--r-md);
  color: var(--ink); font-weight: 600; font-size: 15px;
  transition: background .15s ease;
}
.fcm-nav li a:hover { background: var(--paper-2); }
.fcm-nav li a.active { background: var(--ink); color: #F7EBEF; }
.fcm-nav li a.active .fcm-nav-count { background: var(--attention); color: var(--ink); border-color: transparent; }
.fcm-nav-count {
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink);
}

.fcm-side-label { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); padding: 12px 12px 8px; }

.fcm-pinned { list-style: none; padding: 0; margin: 0 0 16px; }
.fcm-pinned li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); font-weight: 500; font-size: 14px; }
.fcm-pinned li:hover { background: var(--paper-2); cursor: pointer; }

.fcm-side-note {
  margin: 12px 0; padding: 12px; border-radius: var(--r-md);
  background: var(--good-soft); font-size: 12px; line-height: 1.5; color: #2C5A44;
}
.fcm-side-note strong { display: block; margin-bottom: 4px; }

.fcm-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin: 8px 0 16px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  color: var(--ink-faint); font-size: 13px; cursor: pointer;
}
.fcm-search:hover { border-color: var(--line); }

.fcm-viewing {
  padding: 12px; margin-top: auto; border-top: 1px solid var(--line);
}
.fcm-viewing-role { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; }
.fcm-viewing-role strong { font-size: 14px; }
.fcm-viewing-role button { background: transparent; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.fcm-viewing-user { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.fcm-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #F7EBEF; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.fcm-viewing-user small { font-size: 12px; color: var(--ink-faint); display: block; }

/* Utility ------------------------------------------------------------------ */
.stack   { display: grid; gap: var(--gap, 16px); }
.stack-4 { gap: 4px; } .stack-8 { gap: 8px; } .stack-12 { gap: 12px; } .stack-16 { gap: 16px; } .stack-20 { gap: 20px; } .stack-24 { gap: 24px; } .stack-32 { gap: 32px; }
.row     { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap, 12px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap, 16px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap, 16px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap, 16px); }
@media (max-width: 900px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }
.spacer { flex: 1; }
.hide-sm { display: initial; }
@media (max-width: 700px) { .hide-sm { display: none; } }

/* Gingham cover pattern (rare — hero only) --------------------------------- */
.fcm-gingham {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, var(--gingham-stripe) 50%, transparent 50%),
    linear-gradient(var(--gingham-stripe) 50%, transparent 50%);
  background-size: var(--gingham-size) var(--gingham-size);
}

/* ============================================================================
   Extended patterns — added for composer / analytics / mobile app / marketing
   ============================================================================ */

/* Browser chrome ---------------------------------------------------------- */
.fcm-browser {
  background: var(--ink); border-radius: var(--r-lg); padding: 6px;
  box-shadow: var(--shadow-2);
}
.fcm-browser-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  color: rgba(247,235,239,.5); font-size: 12px;
}
.fcm-browser-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); }
.fcm-browser-bar .url { margin-left: 12px; }
.fcm-browser-body { background: var(--paper); border-radius: 10px; overflow: hidden; }

/* Phone frame ------------------------------------------------------------- */
.fcm-phone {
  width: 380px; margin: 0 auto; background: var(--ink); border-radius: 46px;
  padding: 12px; box-shadow: var(--shadow-2); position: relative;
}
.fcm-phone-screen {
  background: var(--paper); border-radius: 36px; overflow: hidden; position: relative;
  min-height: 720px; display: flex; flex-direction: column;
}
.fcm-phone-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px 6px; font-weight: 700; font-size: 15px;
}
.fcm-phone-notch {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  width: 110px; height: 30px; background: #000; border-radius: 20px; z-index: 2;
}
.fcm-phone-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
.fcm-phone-nav {
  border-top: 1px solid var(--line); padding: 10px 8px 20px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
}
.fcm-phone-nav a { text-align: center; color: var(--ink-faint); font-size: 11px; font-weight: 600; padding: 4px; position: relative; }
.fcm-phone-nav a.active { color: var(--action-text); }
.fcm-phone-nav a .icon { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
.fcm-phone-nav a .badge { position: absolute; top: -2px; right: 26%; background: var(--action); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 999px; }

/* Chart bars (analytics) -------------------------------------------------- */
.chart-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); align-items: end; gap: 12px; height: 180px; padding: 12px 0; }
.chart-bar { display: flex; flex-direction: column; justify-content: end; gap: 2px; }
.chart-bar .bar-a { background: var(--attention); border-radius: 4px 4px 0 0; }
.chart-bar .bar-b { background: var(--action); border-radius: 4px 4px 0 0; }
.chart-bar .bar-label { text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-faint); margin-top: 4px; }

/* Horizontal bar ---------------------------------------------------------- */
.hbar { display: grid; grid-template-columns: 100px 1fr 50px; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.hbar .hbar-track { height: 10px; border-radius: var(--r-pill); background: var(--line-soft); overflow: hidden; }
.hbar .hbar-fill { height: 100%; background: var(--action); border-radius: var(--r-pill); }
.hbar .hbar-fill.good { background: var(--good); }
.hbar .hbar-fill.attn { background: var(--attention); }
.hbar .hbar-value { text-align: right; font-weight: 700; }

/* Gingham checkered hero -------------------------------------------------- */
.fcm-hero-gingham {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, var(--gingham-stripe) 50%, transparent 50%),
    linear-gradient(var(--gingham-stripe) 50%, transparent 50%);
  background-size: 64px 64px;
  padding: 60px 40px;
}

/* Placeholder creative tile ---------------------------------------------- */
.fcm-creative {
  aspect-ratio: 1; border-radius: var(--r-md);
  background:
    linear-gradient(135deg, var(--attention-soft) 0%, var(--action-soft) 100%);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
}
.fcm-creative.gingham {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, var(--gingham-stripe) 50%, transparent 50%),
    linear-gradient(var(--gingham-stripe) 50%, transparent 50%);
  background-size: 40px 40px;
}

/* Approval chain steps --------------------------------------------------- */
.chain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.chain li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.chain .pip { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink-faint); }
.chain .pip.done { background: var(--good); border-color: var(--good); position: relative; }
.chain .pip.done::after { content:'✓'; position: absolute; inset: -2px; color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 800; }
.chain .pip.current { background: var(--action); border-color: var(--action); }
.chain .step-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 800; }
.chain .step-name { font-weight: 700; }
.chain li.current .step-name { color: var(--action-text); }

/* Tab strip -------------------------------------------------------------- */
.fcm-tabs { display: inline-flex; padding: 4px; background: var(--paper-2); border-radius: var(--r-pill); }
.fcm-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-soft); }
.fcm-tabs button.active { background: var(--ink); color: #F7EBEF; }

/* Input pill ------------------------------------------------------------- */
.fcm-input {
  width: 100%; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  font-family: var(--font); font-size: 15px; color: var(--ink);
}
.fcm-input:focus { outline: 2px solid var(--action); outline-offset: 2px; }
.fcm-textarea { min-height: 120px; resize: vertical; }

/* Calendar lanes --------------------------------------------------------- */
.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cal-day { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px; min-height: 240px; background: var(--card); }
.cal-day-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--ink-faint); margin-bottom: 4px; }
.cal-day-num { font-weight: 800; font-size: 18px; margin-bottom: 10px; }
.cal-post { padding: 8px 10px; border-radius: 8px; font-size: 12px; margin-bottom: 6px; border-left: 3px solid transparent; background: var(--paper-2); }
.cal-post.approved { border-left-color: var(--good); background: var(--good-soft); }
.cal-post.waiting  { border-left-color: var(--action); background: var(--action-soft); }
.cal-post.draft    { border-left-color: var(--attention); background: var(--attention-pale); }
.cal-post-time { font-size: 10px; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.cal-post-body { font-weight: 700; }

/* Inbox thread items ----------------------------------------------------- */
.thread { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.thread:hover { background: var(--paper-2); }
.thread.active { background: var(--attention-pale); }
.thread-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--action-soft); display: grid; place-items: center; font-weight: 800; color: var(--action-text); font-size: 13px; }
.thread-name { font-weight: 700; font-size: 14px; }
.thread-preview { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.thread-badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .06em; }

/* ============================================================================
   CrossHub app components (ch- prefix) — v1
   Used by crosshub.html, composer.html, approvals.html, schedule.html (team, with
   ch-shell.js) and portal-approval.html (public). Every class below starts with ch-.
   Rules of the palette still hold: magenta (--action) = the ONE primary button per
   screen; butter (--attention) and green (--good) are statuses only; gingham only on
   hero moments (.ch-hero).
   ============================================================================ */

/* Page base on data-ch pages (auth-gate skips crosshub.css there) ------------- */
html[data-ch] body { background: var(--paper); color: var(--ink); font-family: var(--font); margin: 0; }
html.ch-noscroll, html.ch-nav-locked { overflow: hidden; }
/* ch-shell shows the person + Sign out, so the floating auth-gate account chip is hidden */
html[data-ch-shell] #fcmChip { display: none !important; }
/* auth-gate UI keeps its own styles; only align its fonts with this page */
html[data-ch] #fcmGate .gbrand, html[data-ch] #fcmGate .cc h1 { font-family: var(--font); font-weight: 800; }
html[data-ch] #fcmGate .gleft span[style*="Fredoka"] { font-family: var(--font) !important; }
html[data-ch] #fcmCmdkOv { font-family: var(--font); }

.ch-ic { flex: none; display: inline-block; vertical-align: middle; }
:where(.ch-app, .ch-modal-wrap, .ch-drawer-wrap, .ch-portal) :focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

/* Shell --------------------------------------------------------------------- */
.ch-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; overflow-x: clip; }
.ch-topbar { display: none; }
.ch-side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px;
  padding: 20px 14px 14px; background: var(--paper); border-right: 1px solid var(--line);
}
.ch-side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 20px; }
.ch-side .ch-side-close { display: none; }
.ch-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
/* The CrossHub logo image (public/brand/crosshub-logo-sm.png, 420x301; product branding). */
.ch-brand:has(.ch-brand-logo) { flex-direction: column; align-items: flex-start; gap: 2px; }
.ch-brand-logo { display: block; width: 96px; max-width: 100%; height: auto; }
.ch-brand--sm .ch-brand-logo { width: 64px; }
.ch-brand:has(.ch-brand-logo) .ch-brand-hub { margin-top: 0; padding-left: 2px; }
.ch-brand--sm:has(.ch-brand-logo) .ch-brand-hub { display: none; }
.ch-brand-mark { width: 30px; height: 30px; flex: none; background: url(/brand/fcm-mark-pink.png) center / contain no-repeat; }
.ch-brand-text { display: flex; flex-direction: column; line-height: 1; }
.ch-brand-four { font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.ch-brand-hub  { font-weight: 800; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }
.ch-brand--sm .ch-brand-mark { width: 26px; height: 26px; border-radius: 6px; }

.ch-nav { display: flex; flex-direction: column; gap: 2px; }
.ch-nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink);
  font: 600 15px/1.2 var(--font); text-align: left; text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ch-nav-item:hover { background: var(--paper-2); }
.ch-nav-item.is-active { background: var(--ink); color: #F7EBEF; }
.ch-nav-item .ch-ic { opacity: .85; }
.ch-nav-item[hidden] { display: none; }
.ch-nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-nav-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--attention); color: var(--ink); font: 800 11px/22px var(--font); text-align: center; }
.ch-nav-badge[hidden] { display: none; }
.ch-nav--quiet .ch-nav-item { min-height: 40px; font-size: 14px; color: var(--ink-soft); }
.ch-nav--quiet .ch-nav-item:hover { color: var(--ink); }
.ch-kbd { font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink-faint); }
@media (hover: none) { .ch-kbd { display: none; } }
.ch-side-div { height: 1px; background: var(--line); margin: 12px 6px; flex: none; }
.ch-side-spacer { flex: 1; min-height: 16px; }
.ch-side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 8px; border-top: 1px solid var(--line); }
.ch-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #F7EBEF; display: grid; place-items: center; font: 800 13px/1 var(--font); flex: none; text-transform: uppercase; overflow: hidden; }
.ch-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ch-avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.ch-user-meta { min-width: 0; }
.ch-user-name { font: 700 14px/1.25 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-user-level { font-size: 12px; line-height: 1.3; color: var(--ink-faint); }
.ch-signout { min-height: 40px; font-size: 14px; color: var(--ink-soft); }
.ch-scrim { display: none; }
.ch-main { min-width: 0; width: 100%; max-width: 1360px; padding: 32px 40px 80px; outline: none; }
.ch-skip { position: absolute; left: -9999px; top: 8px; z-index: 4000; background: var(--ink); color: #FFF; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.ch-skip:focus { left: 8px; }

@media (max-width: 900px) {
  .ch-app { display: block; }
  .ch-topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 800;
    min-height: 56px; padding: env(safe-area-inset-top) 12px 0 6px;
    background: rgba(251,244,228,.95); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px);
  }
  .ch-topbar .ch-brand-text { display: none; }
  .ch-topbar-title { font: 800 16px/1.2 var(--font); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ch-menu-btn { position: relative; }
  .ch-menu-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--attention); box-shadow: 0 0 0 2px var(--paper); }
  .ch-menu-dot[hidden] { display: none; }
  .ch-side {
    position: fixed; z-index: 900; top: 0; left: 0; bottom: 0; width: min(84vw, 320px); height: auto;
    padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom));
    border-right: 1px solid var(--line); box-shadow: var(--shadow-2);
    transform: translateX(-104%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
  }
  .ch-app.is-nav-open .ch-side { transform: none; visibility: visible; transition: transform .22s ease; }
  .ch-side .ch-side-close { display: inline-grid; }
  .ch-scrim { display: block; position: fixed; inset: 0; z-index: 890; background: rgba(42,26,29,.4); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .ch-app.is-nav-open .ch-scrim { opacity: 1; pointer-events: auto; }
  .ch-main { max-width: none; padding: 20px 16px 96px; }
}

/* Type + page header -------------------------------------------------------- */
.ch-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 24px; }
.ch-page-head > :first-child { min-width: 0; flex: 1 1 320px; }
.ch-eyebrow { font: 800 11px/1.2 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--action-text); margin: 0 0 8px; }
.ch-page-title { font: 800 32px/1.1 var(--font); letter-spacing: -.01em; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ch-page-sub { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.55; max-width: 66ch; }
.ch-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ch-h2 { font: 800 20px/1.25 var(--font); margin: 0; letter-spacing: -.005em; }
.ch-h3 { font: 800 16px/1.3 var(--font); margin: 0; }
.ch-label { font: 800 11px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 0; }
.ch-section { margin-top: 28px; }
.ch-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
@media (max-width: 900px) { .ch-page-title { font-size: 26px; } .ch-page-head { margin-bottom: 18px; } }

/* Buttons ------------------------------------------------------------------- */
.ch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink);
  font: 700 14px/1.15 var(--font); letter-spacing: -.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.ch-btn:hover { background: var(--paper-2); border-color: var(--ink-faint); }
.ch-btn:active { transform: translateY(1px); }
.ch-btn:disabled, .ch-btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ch-btn--primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.ch-btn--primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.ch-btn--ink { background: var(--ink); border-color: var(--ink); color: #F7EBEF; }
.ch-btn--ink:hover { background: #3D2A2E; border-color: #3D2A2E; }
.ch-btn--ghost { background: transparent; border-color: var(--ink); }
.ch-btn--ghost:hover { background: var(--ink); color: #FFF; }
.ch-btn--text { background: transparent; border-color: transparent; padding: 0 10px; color: var(--ink-soft); }
.ch-btn--text:hover { background: var(--paper-2); border-color: transparent; color: var(--ink); }
.ch-btn--danger { background: var(--card); border-color: var(--danger); color: var(--danger); }
.ch-btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #FFF; }
.ch-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.ch-btn--lg { min-height: 52px; padding: 0 26px; font-size: 15px; }
.ch-btn--block { width: 100%; }
.ch-btn .ch-ic { width: 18px; height: 18px; }
.ch-btn.is-busy { pointer-events: none; opacity: .85; }
.ch-btn.is-busy::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: chSpin .7s linear infinite; flex: none; }
.ch-iconbtn {
  width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer;
}
.ch-iconbtn:hover { background: var(--paper-2); }
.ch-iconbtn--line { border-color: var(--line); background: var(--card); }
.ch-link { color: var(--action-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.ch-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--action); animation: chSpin .7s linear infinite; vertical-align: -3px; }
@keyframes chSpin { to { transform: rotate(360deg); } }

/* Status chips + counts ------------------------------------------------------ */
.ch-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 3px 10px 3px 8px; border-radius: var(--r-pill); border: 1px solid transparent;
  font: 700 12px/1.5 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.ch-chip--neutral   { background: var(--paper-2); border-color: var(--line); color: var(--ink-soft); }
.ch-chip--attention { background: var(--attention-soft); color: var(--attention-ink); }
.ch-chip--attention .ch-chip-dot { background: #D9A915; }
.ch-chip--good      { background: var(--good-soft); color: var(--good); }
.ch-chip--action    { background: var(--action-soft); color: var(--action-text); }
.ch-chip--danger    { background: #F8DDE1; color: var(--danger); }
.ch-chip--ink       { background: var(--ink); color: #F7EBEF; }
.ch-count { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--line); color: var(--ink); font: 800 11px/18px var(--font); text-align: center; }
.ch-count--attention { background: var(--attention); border-color: transparent; }
.ch-count--good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.ch-net-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.ch-net-dot--facebook { background: #1877F2; }
.ch-net-dot--instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.ch-net-dot--linkedin { background: #0A66C2; }
.ch-net-dot--youtube { background: #FF0000; }
.ch-net-dot--gmb { background: #4285F4; }
.ch-net-dot--pinterest { background: #E60023; }
/* A cancelled post: greyed out wherever it is listed (it never goes out). */
.is-cancelled { opacity: .58; filter: grayscale(.85); }
.is-cancelled:hover, .is-cancelled:focus-visible { opacity: .85; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-soft); }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ch-legend .is-good { background: var(--good); } .ch-legend .is-attention { background: var(--attention); }
.ch-legend .is-action { background: var(--action); } .ch-legend .is-danger { background: var(--danger); } .ch-legend .is-neutral { background: var(--ink-faint); }

/* Cards, KPIs, layout --------------------------------------------------------- */
.ch-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.ch-card--flush { padding: 0; overflow: hidden; }
.ch-card--ink { background: var(--ink); border-color: var(--ink); color: #F7EBEF; }
.ch-card--ink .ch-label { color: var(--attention); }
.ch-card--attention { background: var(--attention-pale); border-color: var(--attention-soft); }
.ch-card--good { background: var(--good-soft); border-color: transparent; }
.ch-card--action { background: var(--action-soft); border-color: transparent; }
.ch-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.ch-card-title { font: 800 17px/1.25 var(--font); margin: 0; }
.ch-card-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
a.ch-card { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
a.ch-card:hover { border-color: var(--line); box-shadow: var(--shadow-1); }
.ch-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ch-kpi { display: block; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px 18px; color: inherit; text-decoration: none; min-width: 0; }
.ch-kpi--attention { background: var(--attention-pale); border-color: var(--attention-soft); }
.ch-kpi--good { background: var(--good-soft); border-color: transparent; }
.ch-kpi--action { background: var(--action-soft); border-color: transparent; }
a.ch-kpi:hover { box-shadow: var(--shadow-1); }
.ch-kpi-num { font: 800 40px/1 var(--font); letter-spacing: -.02em; margin-top: 8px; }
.ch-kpi-sub { font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.45; }
.ch-grid { display: grid; gap: var(--gap, 16px); }
.ch-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ch-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ch-grid--cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ch-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ch-split--wide-aside { grid-template-columns: minmax(0, 1fr) 400px; }
@media (max-width: 1100px) { .ch-split, .ch-split--wide-aside { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .ch-grid--2, .ch-grid--3 { grid-template-columns: minmax(0, 1fr); } }
.ch-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 10px); }
.ch-row--nowrap { flex-wrap: nowrap; }
.ch-row--between { justify-content: space-between; }
.ch-stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.ch-grow { flex: 1; min-width: 0; }
.ch-muted { color: var(--ink-soft); }
.ch-faint { color: var(--ink-faint); }
.ch-small { font-size: 13px; line-height: 1.5; }
.ch-tiny { font-size: 12px; line-height: 1.45; }
.ch-strong { font-weight: 800; }
.ch-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ch-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-divider { height: 1px; background: var(--line-soft); border: 0; margin: 16px 0; }
.ch-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ch-only-mobile { display: none !important; }
@media (max-width: 900px) { .ch-hide-mobile { display: none !important; } .ch-only-mobile { display: revert !important; } }
.ch-hero {
  border-radius: var(--r-xl); padding: 28px; position: relative; overflow: hidden;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, var(--gingham-stripe) 50%, transparent 50%),
    linear-gradient(var(--gingham-stripe) 50%, transparent 50%);
  background-size: var(--gingham-size) var(--gingham-size);
}

/* Notes / banners ------------------------------------------------------------- */
.ch-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--attention-pale); border: 1px solid var(--attention-soft); color: var(--ink); font-size: 14px; line-height: 1.5; }
.ch-note > .ch-ic { margin-top: 1px; }
.ch-note--neutral { background: var(--paper-2); border-color: var(--line); }
.ch-note--good { background: var(--good-soft); border-color: transparent; color: #2C5A44; }
.ch-note--action { background: var(--action-soft); border-color: transparent; color: #6E2238; }
.ch-note--danger { background: #F8DDE1; border-color: transparent; color: #7A1F2E; }

/* Tabs / filters --------------------------------------------------------------- */
.ch-tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: var(--r-pill); max-width: 100%; overflow-x: auto; scrollbar-width: none; width: max-content; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-soft); font: 700 13px/1 var(--font); white-space: nowrap; cursor: pointer; }
.ch-tab:hover { color: var(--ink); }
.ch-tab.is-on, .ch-tab[aria-selected="true"], .ch-tab[aria-pressed="true"] { background: var(--ink); color: #F7EBEF; }
.ch-tab.is-on .ch-count, .ch-tab[aria-selected="true"] .ch-count { background: var(--attention); border-color: transparent; color: var(--ink); }

/* Board ------------------------------------------------------------------------ */
.ch-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ch-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--r-lg); scroll-snap-align: start; }
.ch-col--attention { background: var(--attention-pale); border-color: var(--attention-soft); }
.ch-col--good { background: #EEF5EC; border-color: var(--good-soft); }
.ch-col--action { background: #FBEEF1; border-color: var(--action-soft); }
.ch-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.ch-col-title { font: 800 14px/1.25 var(--font); margin: 0; min-width: 0; }
.ch-col-head .ch-count { margin-left: auto; }
.ch-col-hint { font-size: 12px; line-height: 1.45; color: var(--ink-faint); padding: 0 4px; margin: -4px 0 0; }
.ch-col-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ch-col-empty { padding: 16px 10px; border: 1.5px dashed var(--line); border-radius: var(--r-md); font-size: 13px; color: var(--ink-faint); text-align: center; }
@media (max-width: 900px) {
  .ch-board { grid-auto-columns: 86%; margin: 0 -16px; padding: 0 16px 8px; scroll-padding: 0 16px; }
}

/* Post card ---------------------------------------------------------------------- */
.ch-post { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-1); transition: border-color .15s ease, box-shadow .15s ease; }
.ch-post:hover { border-color: var(--line); }
.ch-post.is-selected { border-color: var(--action); box-shadow: 0 0 0 2px var(--action-soft); }
button.ch-post, a.ch-post { text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; padding: 0; width: 100%; }
.ch-post-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; flex: none; }
.ch-post-thumb img, .ch-post-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-post-thumb--empty { display: grid; place-items: center; color: var(--ink-faint); background: linear-gradient(135deg, var(--paper-2), #F9EFE0); }
.ch-post-thumb--empty .ch-ic { width: 28px; height: 28px; }
.ch-post-type { position: absolute; left: 8px; top: 8px; padding: 5px 8px; border-radius: var(--r-pill); background: rgba(42,26,29,.8); color: #FFF; font: 800 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.ch-post-count { position: absolute; right: 8px; top: 8px; padding: 5px 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.92); color: var(--ink); font: 800 10px/1 var(--font); }
.ch-post-pick { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.ch-post-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.ch-post-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.ch-post-client { font: 800 13px/1.3 var(--font); color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-post-caption { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ch-post-caption:empty::before { content: 'No caption yet'; color: var(--ink-faint); font-style: italic; }
.ch-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--ink-faint); }
.ch-post-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ch-post-meta .ch-ic { width: 14px; height: 14px; }
.ch-post-note { margin: 2px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--action-soft); color: #6E2238; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.ch-post-note--attention { background: var(--attention-pale); color: var(--attention-ink); }
.ch-post-note--danger { background: #F8DDE1; color: #7A1F2E; }
.ch-post-note--good { background: var(--good-soft); color: #2C5A44; }
.ch-post-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.ch-post-actions .ch-btn { flex: 1 1 auto; }
.ch-post--row { flex-direction: row; align-items: stretch; }
.ch-post--row .ch-post-thumb { width: 96px; aspect-ratio: auto; min-height: 96px; }
.ch-post--row .ch-post-body { flex: 1; }
input[type="checkbox"].ch-check, input[type="radio"].ch-check { width: 20px; height: 20px; margin: 0; accent-color: var(--action); cursor: pointer; flex: none; }

/* Lists ------------------------------------------------------------------------- */
.ch-list { display: flex; flex-direction: column; }
.ch-list-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.ch-list-row:first-child { border-top: 0; }
a.ch-list-row, button.ch-list-row { color: inherit; text-decoration: none; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; }
a.ch-list-row:hover, button.ch-list-row:hover { background: var(--paper); }
.ch-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.ch-kv dt { color: var(--ink-faint); font-weight: 700; }
.ch-kv dd { margin: 0; overflow-wrap: anywhere; }

/* Notes thread (internal review / client comments) ------------------------------ */
.ch-notes { display: flex; flex-direction: column; gap: 10px; }
.ch-notes-item { padding: 10px 12px; border-radius: 12px; background: var(--paper-2); }
.ch-notes-item--change { background: var(--action-soft); }
.ch-notes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 2px; }
.ch-notes-who { font: 800 12px/1.3 var(--font); }
.ch-notes-when { font-size: 11px; color: var(--ink-faint); }
.ch-notes-text { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Steps ("where it is") ---------------------------------------------------------- */
.ch-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ch-step { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
.ch-step-pip { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--ink-faint); background: var(--card); }
.ch-step.is-done .ch-step-pip { background: var(--good); border-color: var(--good); }
.ch-step.is-current .ch-step-pip { background: var(--attention); border-color: var(--attention-ink); }
.ch-step.is-problem .ch-step-pip { background: var(--action); border-color: var(--action); }
.ch-step-label { font: 800 11px/1.25 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.ch-step-name { font-weight: 700; line-height: 1.35; }
.ch-step:not(.is-done):not(.is-current):not(.is-problem) .ch-step-name { color: var(--ink-faint); }
.ch-steps--row { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }

/* Form fields ------------------------------------------------------------------- */
.ch-form { display: flex; flex-direction: column; gap: 18px; }
.ch-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ch-field-label { font: 800 11px/1.25 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); padding: 0; }
.ch-field-label .ch-faint { text-transform: none; letter-spacing: 0; font-weight: 600; }
.ch-field-hint { font-size: 12px; line-height: 1.45; color: var(--ink-faint); margin: 0; }
.ch-field-error { font-size: 12px; line-height: 1.45; color: var(--danger); font-weight: 700; margin: 0; }
.ch-field-error[hidden], .ch-field-hint[hidden] { display: none; }
.ch-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .ch-field-row { grid-template-columns: minmax(0, 1fr); } }
.ch-input, .ch-textarea, .ch-select {
  width: 100%; min-width: 0; min-height: 46px; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  font: 500 16px/1.4 var(--font); color: var(--ink); -webkit-appearance: none; appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ch-input::placeholder, .ch-textarea::placeholder { color: var(--ink-faint); }
.ch-input:focus, .ch-textarea:focus, .ch-select:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.ch-input[aria-invalid="true"], .ch-textarea[aria-invalid="true"], .ch-select[aria-invalid="true"] { border-color: var(--danger); }
.ch-input:disabled, .ch-textarea:disabled, .ch-select:disabled { background: var(--paper-2); color: var(--ink-faint); }
.ch-textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.ch-select { padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A1A1D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.ch-counter { font-size: 12px; color: var(--ink-faint); text-align: right; font-variant-numeric: tabular-nums; }
.ch-counter.is-over { color: var(--danger); font-weight: 800; }
.ch-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; max-width: 100%; background: var(--paper-2); border-radius: var(--r-pill); }
.ch-seg-btn { min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-soft); font: 700 14px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ch-seg-btn:hover { color: var(--ink); }
.ch-seg-btn.is-on, .ch-seg-btn[aria-pressed="true"], .ch-seg-btn[aria-checked="true"] { background: var(--ink); color: #F7EBEF; }
.ch-seg--block { display: flex; }
.ch-seg--block .ch-seg-btn { flex: 1; justify-content: center; }
.ch-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font: 700 14px/1 var(--font); cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.ch-toggle:hover { border-color: var(--ink-faint); }
.ch-toggle.is-on, .ch-toggle[aria-pressed="true"], .ch-toggle[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #F7EBEF; }
.ch-toggle.is-on .ch-net-dot, .ch-toggle[aria-pressed="true"] .ch-net-dot { box-shadow: 0 0 0 2px #F7EBEF; }

/* Drop zone + media tiles ---------------------------------------------------------- */
.ch-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--paper); color: var(--ink-soft); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ch-drop:hover, .ch-drop.is-over, .ch-drop:focus-within { border-color: var(--action); background: #FCF1F3; color: var(--ink); }
.ch-drop .ch-ic { width: 28px; height: 28px; color: var(--action-text); }
.ch-drop-title { font: 800 15px/1.3 var(--font); color: var(--ink); }
.ch-drop-hint { font-size: 12px; line-height: 1.45; color: var(--ink-faint); max-width: 40ch; }
.ch-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ch-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.ch-media-tile { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line-soft); }
.ch-media-tile img, .ch-media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-media-tile.is-error { border-color: var(--danger); }
.ch-media-tile.is-uploading::after { content: ''; position: absolute; inset: 0; background: rgba(251,244,228,.65); }
.ch-media-tile.is-uploading::before { content: ''; position: absolute; z-index: 1; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--action); animation: chSpin .7s linear infinite; }
.ch-media-x { position: absolute; z-index: 2; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(42,26,29,.82); color: #FFF; display: grid; place-items: center; cursor: pointer; }
.ch-media-x .ch-ic { width: 14px; height: 14px; }
.ch-media-n { position: absolute; z-index: 2; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: var(--r-pill); background: rgba(42,26,29,.82); color: #FFF; font: 800 10px/1 var(--font); }
.ch-media-move { position: absolute; z-index: 2; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.ch-media-move button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.ch-progress { height: 6px; border-radius: var(--r-pill); background: var(--line-soft); overflow: hidden; }
.ch-progress > span { display: block; height: 100%; width: 0; background: var(--action); border-radius: inherit; transition: width .2s ease; }

/* Phone preview frame (Instagram + Facebook) --------------------------------------- */
.ch-phone { width: 100%; max-width: 340px; margin: 0 auto; padding: 10px; border-radius: 42px; background: var(--ink); box-shadow: var(--shadow-2); }
.ch-phone-screen { position: relative; display: flex; flex-direction: column; min-height: 560px; max-height: 720px; overflow-y: auto; border-radius: 32px; background: #FFF; scrollbar-width: none; }
.ch-phone-screen::-webkit-scrollbar { display: none; }
.ch-phone-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 6px; font: 700 12px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; color: #111; }
.ch-phone-notch { width: 86px; height: 22px; border-radius: 14px; background: #000; }
.ch-ig, .ch-fb { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif; background: #FFF; }
.ch-ig { color: #111; }
.ch-ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ch-ig-avatar { width: 32px; height: 32px; flex: none; padding: 2px; border-radius: 50%; background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.ch-ig-avatar > span, .ch-ig-avatar > img { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #FFF; background: #FFF; object-fit: cover; font: 800 10px/1 var(--font); color: var(--action-text); }
.ch-ig-name { font-weight: 700; font-size: 13px; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-ig-name small { display: block; font-weight: 400; font-size: 11px; color: #737373; }
.ch-ig-media { position: relative; aspect-ratio: 1; background: #EFEFEF; overflow: hidden; display: grid; place-items: center; color: #9A9A9A; }
.ch-ig-media img, .ch-ig-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-ig-media--portrait { aspect-ratio: 4 / 5; }
.ch-ig-media--reel, .ch-ig-media--story { aspect-ratio: 9 / 16; }
.ch-ig-badge { position: absolute; z-index: 1; top: 10px; right: 10px; padding: 4px 8px; border-radius: var(--r-pill); background: rgba(0,0,0,.6); color: #FFF; font: 600 11px/1 -apple-system, system-ui, sans-serif; }
.ch-ig-actions { display: flex; align-items: center; gap: 14px; padding: 10px 12px 6px; color: #111; }
.ch-ig-actions .ch-ic { width: 23px; height: 23px; }
.ch-ig-actions .ch-ig-save { margin-left: auto; }
.ch-ig-caption { margin: 0; padding: 0 12px 14px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-ig-caption b { font-weight: 700; margin-right: 4px; }
.ch-ig-caption .ch-ig-more { color: #737373; }
.ch-ig-story-top { position: absolute; z-index: 1; left: 8px; right: 8px; top: 8px; display: flex; gap: 3px; }
.ch-ig-story-top i { flex: 1; height: 2px; border-radius: 2px; background: rgba(255,255,255,.55); }
.ch-dots { display: flex; justify-content: center; gap: 4px; padding: 6px 0 0; }
.ch-dots i { width: 6px; height: 6px; border-radius: 50%; background: #C7C7C7; }
.ch-dots i.is-on { background: #0095F6; }
.ch-fb { color: #050505; }
.ch-fb-head { display: flex; align-items: center; gap: 10px; padding: 12px; }
.ch-fb-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #1877F2; color: #FFF; display: grid; place-items: center; overflow: hidden; font: 800 13px/1 var(--font); }
.ch-fb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ch-fb-name { font-weight: 700; font-size: 14px; line-height: 1.25; min-width: 0; }
.ch-fb-name small { display: block; font-weight: 400; font-size: 12px; color: #65676B; }
.ch-fb-text { margin: 0; padding: 0 12px 10px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-fb-media { position: relative; background: #F0F2F5; aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; color: #9A9A9A; }
.ch-fb-media img, .ch-fb-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-fb-actions { display: flex; justify-content: space-around; margin: 0 12px; padding: 6px 0 10px; border-top: 1px solid #CED0D4; color: #65676B; font: 600 13px/1 -apple-system, system-ui, sans-serif; }
.ch-fb-actions span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; }
.ch-fb-actions .ch-ic { width: 18px; height: 18px; }

/* Month calendar ---------------------------------------------------------------- */
.ch-cal { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.ch-cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.ch-cal-month { font: 800 18px/1.2 var(--font); margin: 0 auto 0 4px; }
.ch-cal-head, .ch-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ch-cal-head { background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.ch-cal-head > div { padding: 8px 10px; font: 800 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); text-align: left; }
.ch-cal-cell { position: relative; min-width: 0; min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); text-align: left; font: inherit; color: inherit; }
.ch-cal-grid > .ch-cal-cell:nth-child(7n) { border-right: 0; }
.ch-cal-grid > .ch-cal-cell:nth-last-child(-n+7) { border-bottom: 0; }
button.ch-cal-cell, .ch-cal-cell[role="button"] { cursor: pointer; border-top: 0; border-left: 0; }
button.ch-cal-cell:hover, .ch-cal-cell[role="button"]:hover { background: #FFFCF5; }
.ch-cal-cell.is-out { background: var(--paper); }
.ch-cal-cell.is-out .ch-cal-date { color: var(--ink-faint); font-weight: 600; }
.ch-cal-cell.is-today .ch-cal-date { background: var(--ink); color: #F7EBEF; }
.ch-cal-cell.is-selected { box-shadow: inset 0 0 0 2px var(--action); }
.ch-cal-date { align-self: flex-start; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--r-pill); display: grid; place-items: center; font: 800 13px/1 var(--font); color: var(--ink); }
.ch-cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ch-cal-chip { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 7px; border: 0; border-left: 3px solid var(--ink-faint); border-radius: 7px; background: var(--paper-2); color: var(--ink); font: 700 11px/1.35 var(--font); text-align: left; cursor: pointer; overflow: hidden; }
.ch-cal-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-cal-chip-time { flex: none; font-weight: 800; color: var(--ink-soft); }
.ch-cal-chip--neutral { background: var(--paper-2); border-left-color: var(--ink-faint); }
.ch-cal-chip--good { background: var(--good-soft); border-left-color: var(--good); }
.ch-cal-chip--attention { background: var(--attention-pale); border-left-color: var(--attention); }
.ch-cal-chip--action { background: var(--action-soft); border-left-color: var(--action); }
.ch-cal-chip--danger { background: #F8DDE1; border-left-color: var(--danger); }
.ch-cal-chip.is-live::after { content: '✓'; flex: none; margin-left: auto; color: var(--good); font-weight: 800; }
.ch-cal-more { padding: 2px 6px; border: 0; background: none; font: 700 11px/1.3 var(--font); color: var(--ink-soft); text-align: left; cursor: pointer; }
@media (max-width: 640px) {
  .ch-cal-head > div { padding: 8px 0; text-align: center; font-size: 10px; letter-spacing: .04em; }
  .ch-cal-cell { min-height: 58px; padding: 4px 2px; align-items: center; gap: 3px; }
  .ch-cal-date { align-self: center; min-width: 24px; height: 24px; font-size: 12px; }
  .ch-cal-items { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .ch-cal-chip { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; font-size: 0; line-height: 0; flex: none; pointer-events: none; }
  .ch-cal-chip > *, .ch-cal-chip.is-live::after { display: none; }
  .ch-cal-chip--neutral { background: var(--ink-faint); } .ch-cal-chip--good { background: var(--good); }
  .ch-cal-chip--attention { background: var(--attention); } .ch-cal-chip--action { background: var(--action); } .ch-cal-chip--danger { background: var(--danger); }
  .ch-cal-more { font-size: 10px; padding: 0; }
}
.ch-agenda { display: flex; flex-direction: column; gap: 8px; }
.ch-agenda-day { font: 800 12px/1.3 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 12px 0 2px; }
.ch-agenda-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-soft); color: inherit; text-decoration: none; text-align: left; font: inherit; width: 100%; cursor: pointer; }
.ch-agenda-time { font: 800 13px/1.2 var(--font); color: var(--ink-soft); }

/* Drawer -------------------------------------------------------------------------- */
.ch-drawer-wrap { position: fixed; inset: 0; z-index: 2500; background: rgba(42,26,29,.38); opacity: 0; transition: opacity .2s ease; }
.ch-drawer-wrap.is-open { opacity: 1; }
.ch-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--shadow-2); outline: none; transform: translateX(28px); transition: transform .22s ease; }
.ch-drawer--wide { width: min(780px, 100%); }
.ch-drawer-wrap.is-open .ch-drawer { transform: none; }
.ch-drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 14px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.ch-drawer-title { font: 800 20px/1.25 var(--font); margin: 4px 0 0; overflow-wrap: anywhere; }
.ch-drawer-sub { font-size: 13px; line-height: 1.45; color: var(--ink-soft); margin-top: 2px; }
.ch-drawer-sub[hidden], .ch-drawer-foot[hidden] { display: none; }
.ch-drawer-body { flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ch-drawer-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .ch-drawer, .ch-drawer--wide { top: auto; left: 0; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; overflow: hidden; transform: translateY(28px); }
  .ch-drawer-body { padding: 16px; }
  .ch-drawer-foot { padding-left: 16px; padding-right: 16px; }
  .ch-drawer-foot > .ch-btn { flex: 1 1 auto; }
}

/* Modal --------------------------------------------------------------------------- */
.ch-modal-wrap { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(42,26,29,.45); opacity: 0; transition: opacity .18s ease; }
.ch-modal-wrap.is-open { opacity: 1; }
.ch-modal { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-2); outline: none; transform: translateY(8px) scale(.98); transition: transform .18s ease; }
.ch-modal-wrap.is-open .ch-modal { transform: none; }
.ch-modal-title { font: 800 19px/1.3 var(--font); margin: 0 0 6px; overflow-wrap: anywhere; }
.ch-modal-body { margin: 0 0 8px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.ch-modal .ch-field { margin-top: 12px; }
/* The dictation mic (auth-gate.js #fcmMicBtn, only where the browser can dictate) floats inside the right
   edge of a focused text field: keep the placeholder and the typed words clear of it in a confirm box. */
body:has(> #fcmMicBtn) .ch-modal :is(textarea.ch-textarea, input.ch-input:not([type]), input.ch-input[type="text"], input.ch-input[type="search"]):not([readonly]):not(:disabled) { padding-right: 44px; }
.ch-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@media (max-width: 480px) {
  .ch-modal-wrap { align-items: flex-end; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .ch-modal-actions > .ch-btn { flex: 1 1 auto; }
}

/* Toast --------------------------------------------------------------------------- */
.ch-toasts { position: fixed; z-index: 3500; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.ch-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #F7EBEF; font: 600 14px/1.4 var(--font); box-shadow: var(--shadow-2); cursor: pointer; animation: chToastIn .22s ease both; overflow-wrap: anywhere; }
.ch-toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: rgba(247,235,239,.55); }
.ch-toast--good::before { background: #9ED2B3; }
.ch-toast--attention::before { background: var(--attention); }
.ch-toast--action::before { background: #F0A3B6; }
.ch-toast--danger { background: var(--danger); color: #FFF; }
.ch-toast--danger::before { background: #FFF; }
.ch-toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
@keyframes chToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Empty state + skeleton ------------------------------------------------------------ */
.ch-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--r-lg); }
.ch-empty-mark { width: 44px; height: 44px; margin-bottom: 8px; background: url(/brand/fcm-mark-pink.png) center / contain no-repeat; opacity: .45; }
.ch-empty-title { font: 800 17px/1.3 var(--font); color: var(--ink); }
.ch-empty-body { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.ch-empty-action { margin-top: 12px; }
.ch-skeleton { display: grid; gap: 12px; }
.ch-skeleton--board { grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); overflow: hidden; }
.ch-skel { border-radius: var(--r-md); background: linear-gradient(90deg, var(--paper-2) 0%, #FFF9EC 50%, var(--paper-2) 100%); background-size: 200% 100%; animation: chShimmer 1.3s linear infinite; }
.ch-skel-line { height: 14px; border-radius: 7px; }
.ch-skel-card { height: 120px; }
.ch-skel-col { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
@keyframes chShimmer { to { background-position: -200% 0; } }

/* Sticky action bar (composer / decision footers on phones) -------------------------- */
.ch-actionbar { position: sticky; bottom: 0; z-index: 50; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 72%, rgba(251,244,228,0)); }
@media (max-width: 640px) { .ch-actionbar > .ch-btn { flex: 1 1 auto; } }

/* Public portal (portal-approval.html) helpers ---------------------------------------- */
.ch-portal { min-height: 100vh; background: var(--paper); }
.ch-portal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ch-portal-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
@media (max-width: 640px) { .ch-portal-bar { padding: 12px 16px; } .ch-portal-main { padding: 20px 16px 64px; } }

/* Motion -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html[data-ch] *, html[data-ch] *::before, html[data-ch] *::after,
  .ch-app *, .ch-toast, .ch-modal-wrap, .ch-modal, .ch-drawer-wrap, .ch-drawer, .ch-skel, .ch-btn, .ch-spin, .ch-side, .ch-scrim {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .ch-skel { animation: none !important; }
}

/* [hidden] guard ------------------------------------------------------------------ */
/* These components set `display`, which would otherwise beat the hidden attribute, so a page that
   sets el.hidden = true on them would still show them. (0,2,0): a page rule that deliberately shows
   a hidden element with a more specific selector still wins. */
.ch-btn[hidden], .ch-iconbtn[hidden], .ch-link[hidden], .ch-chip[hidden], .ch-count[hidden], .ch-tab[hidden],
.ch-toggle[hidden], .ch-seg[hidden], .ch-seg-btn[hidden], .ch-grid[hidden], .ch-split[hidden], .ch-row[hidden],
.ch-stack[hidden], .ch-note[hidden], .ch-card-head[hidden], .ch-card-foot[hidden], .ch-kpi[hidden], .ch-post[hidden],
.ch-post-body[hidden], .ch-post-actions[hidden], .ch-list-row[hidden], .ch-steps[hidden], .ch-step[hidden],
.ch-field[hidden], .ch-field-row[hidden], .ch-drop[hidden], .ch-agenda-item[hidden], .ch-empty[hidden],
.ch-actionbar[hidden] { display: none; }

/* One navigation (ch-shell.js v2) ------------------------------------------------- */
/* The menu's own look (doors, groups, pins, rail) is injected by ch-shell.js as #chNavCSS so it also
   works on classic pages; these rules only place it inside the new-page sidebar and top bar. */
.ch-side.ch-nt-host { gap: 0; }
.ch-side .ch-nt-slot { min-width: 0; }
.ch-side .ch-nt-pslot { min-width: 0; }
.ch-topbar .ch-topbar-title { flex: 1 1 auto; }
.ch-topbar .ch-brand-logo { width: auto; height: 42px; }
