/* ADMAE: Bone, Lacquer and Gilt.
   A private studio for people who publish under their own name: paper-white surfaces on bone, text in a bottle-green
   lacquer deep enough to read as black, buttons in emerald lacquer, and champagne gold kept for fine lines and focus
   only. The one signature is the coachline: a single hand-painted-looking gold line under the top bar and the
   active tab. Hairlines and space carry the structure, not heavy shadows; no frosted glass, so it stays quick on a
   phone. Anek Bangla carries Bangla and English; Bodoni Moda is kept for the wordmark and the big titles. */
:root {
  --bg: #F4F4F1;          /* bone: the page */
  --deep: #FFFFFF;        /* paper: bars, drawers, windows */
  --surface: #FFFFFF;     /* paper: cards */
  --fill-2: #F3F2EE;      /* wells and fields */
  --fill: rgba(16, 36, 30, .06);
  --ink: #10241E;         /* lacquer: bottle green, read as black */
  --ink-2: #47564F;
  --ink-3: #5F6B66;       /* the faintest text, still 4.5:1 or more on every surface (contrast check) */
  --line: rgba(16, 36, 30, .14);
  --hair: rgba(16, 36, 30, .09);
  --plat: linear-gradient(180deg, #256650 0%, #1C513F 55%, #163F32 100%); /* emerald lacquer */
  --gold: #B8955A;        /* champagne gold: lines, focus, small marks; never small text */
  --gold-deep: #7D5E28;   /* gold that may carry words */

  --accent: #1E5A47;      /* emerald: links, selection, what is active */
  --accent-press: #174A3A;
  --accent-soft: rgba(30, 90, 71, .09);
  --accent-ring: #A0803F;  /* gilt deep enough for a focus ring: 3.4:1 on bone, 3.7:1 on paper */
  --on-light: #FBF8F1;    /* ivory: words on lacquer and on the deep colours */

  /* meaning only */
  --green: #2D7A57;
  --green-soft: rgba(45, 122, 87, .1);
  --red: #A3302B;         /* garnet */
  --red-soft: rgba(163, 48, 43, .08);
  --amber: #8E5D0E;       /* bronze */
  --amber-soft: rgba(184, 129, 30, .12);

  --shadow-1: 0 1px 2px rgba(16, 36, 30, .05), 0 6px 18px rgba(16, 36, 30, .05);
  --shadow-2: 0 14px 40px rgba(16, 36, 30, .12);
  --shadow-3: 0 28px 80px rgba(16, 36, 30, .16), 0 0 0 1px var(--hair);
  --proof-shadow: 0 10px 26px rgba(16, 36, 30, .14), 0 0 0 1px rgba(16, 36, 30, .07);

  --radius-slip: 20px;
  --radius-ctl: 12px;
  --font: 'Anek Bangla', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 400 15.5px/1.55 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 70% 38% at 50% -10%, rgba(184, 149, 90, .1), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent-ring); outline-offset: 2px; }
::selection { background: rgba(184, 149, 90, .3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: -.005em; }
a { color: var(--accent); }
svg { flex: none; }
* { scrollbar-width: thin; scrollbar-color: rgba(16, 36, 30, .2) transparent; }

/* ---------- buttons, fields, small parts ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: var(--radius-ctl);
  background: #FFFFFF; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer; font-weight: 600; font-size: .93rem; white-space: nowrap; text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: #F7F6F2; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--plat); color: var(--on-light); box-shadow: 0 6px 18px rgba(16, 36, 30, .18), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(184, 149, 90, .4); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #2B7059 0%, #1F5847 55%, #18463A 100%); }
.btn.danger { background: var(--red); color: var(--on-light); box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--fill); color: var(--ink); }
.btn.icon { width: 40px; padding: 0; border-radius: 50%; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: .86rem; border-radius: 10px; }
.btn.small svg { width: 15px; height: 15px; }
.btn.wide { width: 100%; margin-top: 4px; }
a.btn { color: var(--ink); }
a.btn.primary { color: var(--on-light); }
.linkish { background: none; border: 0; padding: 0; margin-top: 8px; color: var(--accent); font-weight: 600; font-size: .84rem; cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }

textarea, input[type="text"], input[type="password"], input[type="datetime-local"], select.field {
  width: 100%; padding: 10px 13px; border: 1px solid transparent; border-radius: var(--radius-ctl);
  background: var(--fill-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair);
  transition: background .15s ease, box-shadow .15s ease;
}
textarea::placeholder, input::placeholder { color: var(--ink-3); }
textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime-local"]:focus, select.field:focus {
  outline: none; background: #FFFFFF; box-shadow: 0 0 0 3px rgba(184, 149, 90, .28); border-color: var(--accent-ring);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
select.field.mini { width: auto; padding: 6px 30px 6px 12px; font-size: .86rem; font-weight: 600; min-height: 34px; }
option { background: var(--deep); color: var(--ink); }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--accent); }

.hint { font-size: .86rem; color: var(--ink-2); margin: 6px 0 0; line-height: 1.5; }
.err { color: var(--red); font-size: .9rem; margin: 8px 0 0; }
code { background: var(--fill); color: var(--ink); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.notice { margin: 0; padding: 12px 16px; border-radius: var(--radius-ctl); background: var(--amber-soft); color: var(--amber); }
.notice button { margin-left: 8px; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(16, 36, 30, .05); box-shadow: inset 0 0 0 1px var(--hair); }
.seg button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--ink-2); transition: background .15s ease, color .15s ease; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 36, 30, .12), inset 0 0 0 1px var(--hair); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.seg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--fill); color: var(--ink-2); }
.badge.ready { background: var(--green-soft); color: var(--green); }
.badge.posted { background: var(--ink); color: var(--on-light); }
.badge.scheduled { background: var(--amber-soft); color: var(--amber); }
.badge.blocked { background: var(--red-soft); color: var(--red); }

/* a state: a small dot and words, coloured only by meaning */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.ok { color: var(--green); }
.state.warn { color: var(--amber); }
.state.bad { color: var(--red); }

.spin { width: 14px; height: 14px; flex: none; display: inline-block; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 12px 28px; background: var(--surface);
  border-bottom: 1px solid var(--hair);
}
/* the coachline: one fine gold line under the bar, fading out at both ends like a hand-painted pinstripe */
.bar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold) 14%, var(--gold) 86%, transparent);
}
.brand { display: flex; flex-direction: column; margin-right: auto; text-decoration: none; color: inherit; line-height: 1; }
.wordmark {
  font-family: var(--display); font-weight: 500; font-size: 1.6rem; letter-spacing: .22em; font-variation-settings: 'opsz' 40;
  background: linear-gradient(180deg, #2A5A4A 0%, #10241E 70%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .sub { margin-top: 6px; font-size: .74rem; color: var(--ink-3); letter-spacing: .02em; }
.job-chip {
  display: inline-flex; align-items: center; gap: 9px; max-width: 420px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: inset 0 0 0 1px rgba(30, 90, 71, .25);
}
.job-chip::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(30, 90, 71, .5); } 50% { box-shadow: 0 0 0 6px rgba(30, 90, 71, 0); } }
.tools { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(16, 36, 30, .04); box-shadow: inset 0 0 0 1px var(--hair); }
.tool {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: .88rem; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.tool:hover { background: var(--fill); color: var(--ink); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.make { display: flex; gap: 8px; }
.make svg { width: 16px; height: 16px; }
.me {
  display: inline-flex; align-items: center; gap: 9px; padding: 3px 12px 3px 3px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: .86rem; box-shadow: inset 0 0 0 1px var(--hair);
}
.me:hover { color: var(--ink); background: var(--fill); }
.me .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ---------- date strip: each day as a small slate, one mark per post ---------- */
.datestrip { display: flex; align-items: center; gap: 6px; padding: 16px 20px 0; }
.reel-track {
  flex: 1; min-width: 0; list-style: none; margin: 0; padding: 4px 8px 12px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}
.reel-track li { flex: none; scroll-snap-align: center; }
.reel-day {
  display: grid; justify-items: start; gap: 1px; min-width: 96px; padding: 9px 13px 10px; border: 0; border-radius: 16px; cursor: pointer; text-align: left;
  background: #FFFFFF; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair);
  transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}
.reel-day:hover { background: #FBFAF7; color: var(--ink); }
.reel-day[aria-current="true"] {
  background: #FFFFFF; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--gold), 0 10px 24px rgba(16, 36, 30, .1);
}
.rd-top { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; }
.rd-today { padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-light); font-size: .66rem; line-height: 1.5; }
.rd-date { display: flex; align-items: baseline; gap: 5px; }
.rd-num { font-family: var(--display); font-size: 1.85rem; line-height: 1.05; color: var(--ink); font-variation-settings: 'opsz' 40; }
.rd-mon { font-size: .8rem; font-weight: 600; }
.rd-kind { font-size: .7rem; color: var(--ink-3); }
.rd-marks { display: flex; align-items: flex-end; gap: 3px; height: 14px; margin-top: 5px; }
.rd-mark { display: block; width: 8px; height: 9px; border-radius: 2px; background: var(--c); }
.rd-mark.reel { width: 5px; height: 14px; }
.reel-empty { padding: 12px; color: var(--ink-2); font-size: .9rem; }
.reel-nav { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 8px; }
.reel-nav:hover { background: var(--fill); color: var(--ink); }
.reel-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the day ---------- */
.main { min-width: 0; padding: 0 32px 80px; }
.day-head { padding-top: 18px; }
.day-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }
.dateplate { display: flex; align-items: flex-end; gap: 18px; font-weight: 400; }
.dp-num {
  font-family: var(--display); font-weight: 500; font-size: clamp(76px, 8.5vw, 124px); line-height: 1; letter-spacing: -.02em;
  padding: 0 .04em; margin: -.14em 0 -.17em; /* a gradient-filled glyph only paints inside its own line box, so the box keeps full height */
  font-variation-settings: 'opsz' 96; background: var(--plat); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: none;
}
.dp-rest { display: grid; gap: 4px; padding-bottom: 6px; }
.dp-month { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.dp-day { font-size: .98rem; color: var(--ink-2); }
.meters { display: grid; grid-template-columns: repeat(4, minmax(104px, 1fr)); gap: 10px; min-width: min(560px, 100%); }
.meter { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 8px; padding: 10px 12px 12px; border-radius: 14px; background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--hair); }
.m-label { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.m-val { font-size: 1.15rem; font-weight: 700; }
.m-val small { margin-left: 4px; font-size: .74rem; font-weight: 500; color: var(--ink-3); }
.m-bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: rgba(16, 36, 30, .08); overflow: hidden; }
.m-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ink-2); transition: width .6s var(--ease); }
.meter.full .m-bar i { background: var(--green); }
.day-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px var(--hair); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.day-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.pack { display: inline-flex; gap: 6px; align-items: center; }
.path { margin: 10px 4px 0; font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the board ---------- */
.board { padding-top: 22px; }
.board.v-detail { display: grid; gap: 14px; }

/* Detail: one lane per page */
.lane {
  position: relative; display: grid; grid-template-columns: 236px minmax(0, 1fr); border-radius: 22px; overflow: hidden;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-1);
}
.lane::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--page); box-shadow: 0 0 22px 1px color-mix(in srgb, var(--page) 70%, transparent); }
.lane-id {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 18px 18px 24px;
  border-right: 1px solid var(--hair); background: linear-gradient(100deg, color-mix(in srgb, var(--page) 16%, transparent), transparent 75%);
}
.lane-id .pm { font-size: 1.6rem; line-height: 1; }
.lane-id .pm.logo { width: 40px; height: 40px; border-radius: 10px; padding: 3px; box-shadow: 0 4px 12px rgba(16, 36, 30, .12); }
.lane-name h2 { font-size: 1.12rem; font-weight: 700; }
.lane-name p { margin: 4px 0 0; font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
.lane-id .linkish { margin-top: auto; }
.lane-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lane-posts.one { grid-template-columns: minmax(0, 1fr); }
.tile { position: relative; display: grid; grid-template-rows: 1fr auto; min-width: 0; border-left: 1px solid var(--hair); container-type: inline-size; transition: background .2s ease; }
.tile:first-child { border-left: 0; }
.tile:hover { background: rgba(16, 36, 30, .025); }
.tile.is-open { background: color-mix(in srgb, var(--page) 12%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--page) 70%, #fff 20%); }
.tile-open { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px 18px 10px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.tile-open[data-format="Reel"] { grid-template-columns: 88px minmax(0, 1fr); }
.proof { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--fill-2); box-shadow: var(--proof-shadow); }
.proof.reel { aspect-ratio: 9 / 16; }
.proof .pic, .g-proof .pic, .s-proof .pic, .l-thumb .pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.proof.none, .g-proof.none, .s-proof.none { display: grid; place-items: center; padding: 8px; text-align: center; font-size: .74rem; color: var(--ink-3); background: repeating-linear-gradient(135deg, rgba(16, 36, 30, .035) 0 8px, transparent 8px 16px), var(--fill-2); }
.tile-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.tile-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.tile-title { font-size: 1.06rem; font-weight: 600; line-height: 1.42; overflow-wrap: break-word; text-wrap: pretty; }
.tile-time { font-size: .82rem; color: var(--ink-3); }
.tile-notion { padding: 0 18px 16px; }
.tile.ghost { display: grid; place-items: center; min-height: 150px; padding: 20px; color: var(--ink-3); font-size: .86rem; text-align: center;
  background: repeating-linear-gradient(135deg, rgba(16, 36, 30, .03) 0 10px, transparent 10px 20px); }

/* Notion controls */
.slip-notion { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.nbtn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 13px; border: 0; border-radius: 999px;
  background: var(--fill-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600; font-size: .82rem; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .15s ease;
}
.nbtn:hover { background: #F7F6F2; }
.nbtn svg, .mini-n svg { width: 14px; height: 14px; flex: none; }
.nbtn.sent { background: var(--green-soft); color: var(--green); box-shadow: none; }
.nbtn.sent:hover { background: rgba(45, 122, 87, .16); }
.nbtn.busy { background: var(--fill); color: var(--ink-2); box-shadow: none; cursor: progress; }
.nbtn.failed { background: var(--red-soft); color: var(--red); box-shadow: none; }
.nnote { font-size: .78rem; line-height: 1.3; color: var(--ink-2); }
.nnote.bad { color: var(--red); font-weight: 600; }
.nlink { background: none; border: 0; padding: 2px 0; font-size: .8rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.nlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.nlink.warn { color: var(--amber); }
.mini-n {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--fill); color: var(--ink-2); font-size: .76rem; font-weight: 600;
}
.mini-n:hover { color: var(--ink); background: rgba(16, 36, 30, .08); }
.mini-n.sent { background: var(--green-soft); color: var(--green); }
.mini-n.warn { background: var(--amber-soft); color: var(--amber); }
.mini-n.bad { background: var(--red-soft); color: var(--red); }
.mini-n.busy { cursor: progress; }
.mini-n .spin { width: 12px; height: 12px; }
.notion-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.notion-strip p { margin: 0; flex: 1 1 240px; font-size: .9rem; }
.notion-strip .row-btns { margin: 0; }
.notion-strip.sent { background: var(--green-soft); box-shadow: none; }
.notion-strip.warn { background: var(--amber-soft); box-shadow: none; }
.notion-strip.failed { background: var(--red-soft); box-shadow: none; }

/* Thumbnails: a gallery of the designs */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 26px 20px; }
.g-item { display: grid; align-content: start; gap: 10px; min-width: 0; }
.g-open { display: grid; gap: 10px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.g-proof { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--fill-2); box-shadow: var(--proof-shadow); transition: box-shadow .2s ease; }
.g-proof.reel .bg, .s-proof.reel .bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(22px) brightness(.45) saturate(1.2); }
.g-proof.reel .pic, .s-proof.reel .pic { position: relative; object-fit: contain; }
.g-item.is-open .g-proof, .s-item.is-open .s-proof { box-shadow: 0 0 0 2px var(--page), 0 0 0 5px color-mix(in srgb, var(--page) 35%, transparent), var(--proof-shadow); }
.g-open:hover .g-proof { box-shadow: 0 0 0 1.5px var(--gold), var(--proof-shadow); }
.g-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .78rem; color: var(--ink-2); }
.g-meta .pm { flex: none; }
.g-meta .pm.logo { width: 20px; height: 20px; border-radius: 5px; }
.g-page { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.g-fmt { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--page) 22%, transparent); color: var(--ink); font-weight: 600; }
.g-title { font-size: .98rem; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }

/* Small thumbnails: a contact sheet */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px 12px; }
.s-item { display: grid; gap: 7px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.s-proof { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 9px; overflow: hidden; background: var(--fill-2); box-shadow: var(--proof-shadow); }
.s-item:hover .s-proof { box-shadow: 0 0 0 1.5px var(--gold), var(--proof-shadow); }
.s-cap { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.s-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--page); flex: none; }
.s-ok { margin-left: auto; color: var(--green); display: inline-flex; }
.s-ok svg { width: 13px; height: 13px; }

/* List */
.ltable-wrap { overflow-x: auto; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-1); }
.ltable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ltable th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--ink-3); padding: 14px 14px 10px; white-space: nowrap; }
.ltable td { padding: 9px 14px; border-top: 1px solid var(--hair); vertical-align: middle; }
.ltable tr { box-shadow: inset 3px 0 0 transparent; }
.ltable tbody tr:hover { background: rgba(16, 36, 30, .025); }
.ltable tr.is-open { background: color-mix(in srgb, var(--page) 12%, transparent); box-shadow: inset 3px 0 0 var(--page); }
.l-open { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; min-width: 260px; }
.l-thumb { position: relative; flex: none; display: block; width: 38px; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--fill-2); box-shadow: 0 0 0 1px rgba(16, 36, 30, .08); }
.l-thumb.reel .bg { display: none; }
.l-thumb.none span { display: none; }
.l-title { font-weight: 600; line-height: 1.35; }
.l-open:hover .l-title { color: #fff; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.l-page { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.l-page .pm.logo { width: 20px; height: 20px; border-radius: 5px; }
.l-time { white-space: nowrap; color: var(--ink-2); }

/* The one orchestrated moment: a new day's designs develop like prints. */
.board.develop .pic { animation: develop 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.board.develop .tile .pic { animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes develop {
  from { opacity: .25; filter: blur(10px) grayscale(1) brightness(1.7); transform: scale(1.03); }
  to { opacity: 1; filter: none; transform: none; }
}

.empty { max-width: 560px; margin: 56px auto; text-align: center; padding: 40px 32px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-2); }
.empty h2 { font-size: 1.4rem; margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin: 0 0 14px; }

/* page logos: logos keep their own colours on a small white tile */
img.logo { object-fit: contain; background: #fff; border-radius: 6px; vertical-align: middle; }
.pm { display: inline-block; }

/* ---------- post drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: min(660px, 100vw);
  display: flex; flex-direction: column; background: var(--deep); color: var(--ink);
  border-radius: 24px 0 0 24px; box-shadow: -24px 0 70px rgba(16, 36, 30, .14), inset 1px 0 0 var(--hair);
  transform: translateX(calc(100% + 100px)); transition: transform .4s var(--ease); /* past its own shadow, so none shows while closed */
}
.drawer::before { content: ''; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 0 3px 3px 0; background: var(--page, var(--accent)); box-shadow: 0 0 20px var(--page, var(--accent)); }
.drawer.open { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 15; background: rgba(16, 36, 30, .26); }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 24px 26px 16px; border-bottom: 1px solid var(--hair); }
.drawer-head h2 { font-size: 1.32rem; font-weight: 700; line-height: 1.35; }
.drawer-head .btn.icon { background: var(--fill-2); }
.drawer-meta { margin: 0 0 6px; font-size: .84rem; color: var(--ink-2); }
.drawer-meta .pm.logo { width: 18px; height: 18px; margin-right: 4px; }
.drawer-body { overflow-y: auto; padding: 4px 26px 48px; }
.block { padding: 22px 0; border-bottom: 1px solid var(--hair); }
.block:last-child { border-bottom: 0; }
.block h3 { font-size: 1.04rem; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.block h4 { margin: 16px 0 8px; font-size: .92rem; font-weight: 600; }
.caption { white-space: pre-wrap; background: var(--fill-2); border-radius: 14px; padding: 15px 17px; max-height: 360px; overflow-y: auto; font-size: 1rem; line-height: 1.75; box-shadow: inset 0 0 0 1px var(--hair); }
.caption.small { font-size: .92rem; max-height: 240px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
ul.plain { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
ul.sources { font-size: .86rem; overflow-wrap: anywhere; }
.doc { white-space: pre-wrap; font: inherit; font-size: .9rem; background: var(--fill-2); padding: 14px; border-radius: var(--radius-ctl); max-height: 60vh; overflow: auto; margin: 0; }
.media-preview { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.media-preview .frame { width: 200px; border-radius: 12px; overflow: hidden; background: var(--fill-2); }
.media-preview .frame.tall { width: 150px; }
.media-preview img, .media-preview video { width: 100%; display: block; }
.drop { flex: 1; min-width: 200px; border: 1.5px dashed var(--line); border-radius: 14px; padding: 20px; text-align: center; color: var(--ink-2); background: var(--fill-2); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop label { color: var(--accent); font-weight: 600; cursor: pointer; }
.prompt-box { font-size: .9rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks label { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; cursor: pointer; }
.checks input { width: 18px; height: 18px; margin-top: 4px; }
.checks .done span { color: var(--ink-3); text-decoration: line-through; }
.publish-box { background: var(--fill-2); border-radius: var(--radius-slip); padding: 16px; display: grid; gap: 12px; }
.publish-box .reasons { margin: 0; padding-left: 18px; color: var(--red); font-size: .92rem; }
.publish-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.publish-opts label { display: flex; gap: 6px; align-items: center; font-size: .92rem; }
.published { padding: 14px 16px; border-radius: 14px; background: var(--green-soft); color: var(--green); font-weight: 600; }
details.raw summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
details.raw pre { white-space: pre-wrap; font: inherit; font-size: .9rem; background: var(--fill-2); padding: 12px; border-radius: var(--radius-ctl); margin: 6px 0 12px; }

/* finished design inside the drawer: the design on a dark light-table */
.design-block { margin: 0 -26px; padding: 22px 26px; background: radial-gradient(ellipse 80% 70% at 30% 20%, color-mix(in srgb, var(--page, var(--accent)) 14%, transparent), transparent 70%); }
.design-frame { width: 100%; max-width: 420px; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 44px rgba(16, 36, 30, .16), 0 0 0 1px rgba(16, 36, 30, .07); background: #fff; }
.design-frame.tall { max-width: 280px; }
.design-frame.land { max-width: 100%; }
.design-frame img { width: 100%; display: block; }
.bg-box { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); display: grid; gap: 4px; }
.bg-box.over { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.bg-box.busy { opacity: .6; pointer-events: none; }
.logo-opts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.logo-opts select { padding: 5px 10px; margin-left: 6px; }
.custom-logo { height: 34px; max-width: 160px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 8px; }

/* ---------- windows ---------- */
.dlg { border: 0; border-radius: 24px; padding: 0; width: min(560px, calc(100vw - 32px)); color: var(--ink); background: var(--deep); box-shadow: var(--shadow-3); overflow: auto; }
.dlg.wide { width: min(780px, calc(100vw - 32px)); }
.dlg.xwide { width: min(1000px, calc(100vw - 32px)); }
.dlg::backdrop, .chat-dlg::backdrop, .studio::backdrop { background: rgba(16, 36, 30, .3); }
.dlg-inner { padding: 26px 28px; display: grid; gap: 16px; }
.dlg-inner h2 { font-size: 1.4rem; font-weight: 700; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dlg .btn.icon.ghost { background: var(--fill-2); }
.log { white-space: pre-wrap; background: #10241E; color: #E8E2D2; border-radius: var(--radius-ctl); padding: 12px; max-height: 260px; overflow: auto; font-size: .8rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field-grid label, .stack label { display: grid; gap: 6px; font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.stack { display: grid; gap: 12px; }
.section { border-top: 1px solid var(--hair); padding-top: 16px; display: grid; gap: 10px; }
.section h3 { font-size: 1.04rem; }
.page-map { display: grid; gap: 8px; }
.page-map .pm { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; }
.pub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.pub-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--radius-ctl); background: var(--fill-2); }
.pub-list .res { font-size: .85rem; max-width: 42%; text-align: right; }
.pub-list .res.ok { color: var(--green); }
.pub-list .res.bad { color: var(--red); }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* New content and Today's content */
.q { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.q > span:first-child, .q legend { font-weight: 600; font-size: 1rem; padding: 0; margin-bottom: 6px; color: var(--ink); }
.pick-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 14px; align-items: start; }
.pick { position: relative; }
.pick-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 10px 14px; cursor: pointer; text-align: left;
  border: 0; border-radius: var(--radius-ctl); background: var(--fill-2); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--hair);
}
.pick-btn:hover { background: #F7F6F2; }
.pick-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-ring); }
.pick-btn .chev { color: var(--ink-2); font-size: .8rem; }
.pick-menu { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: 360px; overflow: auto; padding: 8px; background: #FFFFFF; border-radius: 16px; box-shadow: var(--shadow-3); }
.pick-tools { display: flex; gap: 14px; padding: 4px 8px 8px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.pick .pick-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; font-size: .92rem; font-weight: 400; color: var(--ink); }
.pick-item:hover { background: var(--fill); }
.pick-item input { width: 18px; height: 18px; flex: none; }
.pick-item span { display: grid; min-width: 0; line-height: 1.3; }
.pick-item small { color: var(--ink-2); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-item:has(input:checked) { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--page, var(--accent)); }
.pick-item .pm { flex: none; }
.pick-item .pm.logo { width: 28px; height: 28px; border-radius: 7px; }
.pick-add { margin: 6px 8px 2px; }
.guides { display: grid; gap: 8px; }
.guides-title { margin: 0; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.guide { border-radius: 14px; background: var(--fill-2); box-shadow: inset 3px 0 0 var(--page, var(--accent)), inset 0 0 0 1px var(--hair); padding: 10px 14px 12px 18px; }
.guide summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95rem; }
.guide summary .pm.logo { width: 22px; height: 22px; }
.guide-badge { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: .74rem; font-weight: 700; }
.guide dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 14px; margin: 12px 0 10px; font-size: .88rem; }
.guide dt { font-weight: 600; color: var(--ink-2); }
.guide dd { margin: 0; line-height: 1.55; overflow-wrap: break-word; }
.guide dd ul { margin: 0; padding-left: 18px; }
.guide-contact { margin: 0; white-space: pre-wrap; font: inherit; padding: 8px 10px; border-radius: 10px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--hair); }
.guide-warn { display: block; margin: 6px 0 0; padding: 6px 9px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: .8rem; line-height: 1.4; }
.count { font-size: .76rem; color: var(--ink-3); text-align: right; }
.count.over { color: var(--red); font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices.pages { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; gap: 2px; padding: 11px 14px; border-radius: var(--radius-ctl); background: var(--fill-2); box-shadow: inset 4px 0 0 var(--page, transparent); transition: background .15s ease, box-shadow .15s ease; }
.choice small { color: var(--ink-2); font-size: .8rem; }
.choice input:checked + span { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--page, var(--accent)), 0 0 0 2px var(--accent); }
.choice input:focus-visible + span { outline: 2.5px solid var(--accent-ring); outline-offset: 2px; }
.choice .pm.logo { width: 22px; height: 22px; }
.concept { margin: 0; padding: 12px 16px; background: var(--fill-2); border-radius: var(--radius-ctl); font-style: italic; color: var(--ink-2); }
.timer { margin: 0; font-size: 1.6rem; font-weight: 600; }
.timer.small { font-size: .95rem; color: var(--ink-2); }
.progress-steps { margin: 0; padding-left: 22px; display: grid; gap: 4px; max-height: 260px; overflow: auto; font-size: .88rem; color: var(--ink-2); }
.progress-steps li.now { color: var(--ink); font-weight: 600; }

/* the team at work */
.team-progress { display: grid; gap: 8px; }
.bar-track { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s ease; }
.team-status { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.pipeline { list-style: none; margin: 0; padding: 0 0 2px; display: flex; gap: 6px; overflow-x: auto; }
.stage { flex: 1 0 96px; display: grid; justify-items: center; gap: 2px; text-align: center; padding: 12px 6px; border-radius: 14px; background: var(--fill-2); position: relative; transition: background .2s ease, box-shadow .2s ease; }
.stage .av, .agent .av, .lead-note .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .76rem; font-weight: 700; color: #fff; background: var(--agent, #636366); }
.stage.waiting .av { background: #E4E2DB; color: var(--ink-2); }
.stage.waiting { color: var(--ink-2); }
.stage.working { background: var(--surface); box-shadow: 0 0 0 2px var(--agent), var(--shadow-1); }
.stage.working .av { animation: breathe 1.4s ease-in-out infinite; }
.stage.done .av { background: var(--green); }
.stage.failed { box-shadow: 0 0 0 2px var(--red); }
.stage.failed .av { background: var(--red); }
.st-name { font-size: .78rem; font-weight: 600; line-height: 1.2; }
.st-title { font-size: .68rem; color: var(--ink-2); line-height: 1.2; }
.st-state { font-size: .7rem; color: var(--ink-2); }
.stage.working .st-state { color: var(--agent); font-weight: 600; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--agent) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.lead-note { margin: 0; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--hair); }
.lead-note .av { background: var(--accent); color: var(--on-light); }
.lead-note p { margin: 0; font-size: .9rem; line-height: 1.5; }
.lead-note strong { display: block; font-size: .78rem; margin-bottom: 2px; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.agent { border-radius: 16px; padding: 14px; display: grid; gap: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.agent.done { opacity: .72; }
.agent.failed { box-shadow: 0 0 0 1.5px var(--red); }
.agent header { display: flex; gap: 10px; align-items: center; }
.agent header div { min-width: 0; flex: 1; display: grid; }
.agent header strong { font-size: .9rem; }
.agent header div span { font-size: .78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-title { font-weight: 500; color: var(--ink-2); font-size: .76rem; margin-left: 4px; }
.pill { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--fill); color: var(--ink-2); }
.pill.working { background: color-mix(in srgb, var(--agent) 22%, transparent); color: var(--ink); }
.pill.done { background: var(--green-soft); color: var(--green); }
.pill.failed { background: var(--red-soft); color: var(--red); }
.agent-now { margin: 0; font-size: .86rem; font-weight: 600; display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.agent-now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--agent); flex: none; animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.agent-summary { margin: 0; font-size: .8rem; color: var(--ink-2); }
.agent-actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: .78rem; color: var(--ink-2); }
.agent-actions li { display: flex; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.agent-actions time { flex: none; font-size: .7rem; opacity: .8; }
.agent footer { font-size: .72rem; color: var(--ink-2); }
details.feed .progress-steps { max-height: 220px; }
.team-strip { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: var(--fill-2); border-radius: 14px; }
.team-strip .ts { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; background: var(--surface); border-radius: 99px; box-shadow: inset 0 0 0 1px var(--hair); font-size: .8rem; }
.team-strip .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .64rem; font-weight: 700; color: #fff; background: var(--agent); }
.team-strip small { color: var(--ink-2); font-size: .7rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.member { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.member .av.big { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; color: #fff; background: var(--agent); }
.member-body { min-width: 0; display: grid; gap: 2px; }
.member-body strong { font-size: 1.02rem; }
.member-title { font-size: .78rem; font-weight: 600; color: color-mix(in srgb, var(--agent) 60%, #fff); }
.member-body p { margin: 4px 0 0; font-size: .84rem; color: var(--ink-2); line-height: 1.45; }
.rename { display: flex; gap: 6px; margin-top: 8px; }
.rename input { padding: 6px 10px; font-size: .85rem; min-width: 0; }
.flow { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: .9rem; }

/* Pages */
.page-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.page-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 3px 0 0 var(--page), inset 0 0 0 1px var(--hair); }
.pl-emoji { font-size: 1.5rem; line-height: 1; }
.pl-emoji.logo { width: 40px; height: 40px; flex: none; }
.pl-body { flex: 1; min-width: 0; }
.pl-body p { margin: 2px 0 6px; font-size: .84rem; color: var(--ink-2); }
.pl-body .badge { margin-right: 4px; }
.pl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sw input { position: absolute; opacity: 0; }
.sw span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(16, 36, 30, .16); }
.sw input:checked + span { outline: 2.5px solid var(--c); outline-offset: 3px; }
.sw input:focus-visible + span { outline: 2.5px solid var(--accent-ring); outline-offset: 3px; }
.logo-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.logo-row > .stack { flex: 1; min-width: 220px; }
.logo-preview { width: 96px; height: 96px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: #fff; flex: none; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview span { font-size: .78rem; color: var(--ink-3); text-align: center; padding: 6px; }
.stack label.publish-opts, .field-grid label.publish-opts { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.stack label.publish-opts input[type="checkbox"] { width: 18px; height: 18px; flex: none; }

/* Account */
.user-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.user-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--fill-2); border-radius: var(--radius-ctl); }

/* ---------- design editor ---------- */
.studio { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
.studio[open] { display: flex; flex-direction: column; }
.ed-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 18px; background: #FFFFFF; border-bottom: 1px solid var(--hair); }
.ed-title { display: grid; line-height: 1.25; margin-right: auto; }
.ed-title strong { font-size: 1.05rem; }
.ed-title span { font-size: .8rem; color: var(--ink-2); }
.ed-sizes button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; }
.ed-sizes button span { display: grid; line-height: 1.1; text-align: left; }
.ed-sizes small { font-size: .68rem; font-weight: 500; color: var(--ink-2); }
.ed-sizes .ratio { display: block; border: 1.5px solid currentColor; border-radius: 3px; opacity: .7; }
.ed-layout { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.ed-layout select { width: auto; padding: 6px 10px; }
.ed-actions { display: flex; gap: 6px; align-items: center; }
.ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; }
.ed-layers, .ed-props { background: var(--deep); overflow: auto; min-height: 0; }
.ed-layers { border-right: 1px solid var(--hair); padding: 8px 10px 14px; }
.ed-tip { margin: 14px 8px 0; font-size: .78rem; }
.ed-group { margin: 14px 8px 6px; font-size: .74rem; font-weight: 600; color: var(--ink-3); }
.ed-layer { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 4px; border-radius: 10px; cursor: pointer; user-select: none; }
.ed-layer:hover { background: var(--fill); }
.ed-layer[aria-selected="true"] { background: var(--accent-soft); }
.ed-layer[aria-selected="true"] .ed-li-name { color: var(--accent); }
.ed-layer.off .ed-li-name, .ed-layer.off .ed-li-icon { opacity: .4; }
.ed-eye { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.ed-eye:hover { background: var(--fill); color: var(--ink); }
.ed-eye svg { width: 17px; height: 17px; }
.ed-li-icon { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--fill); font-size: .78rem; font-weight: 700; }
.ed-li-name { min-width: 0; display: grid; font-size: .88rem; font-weight: 600; line-height: 1.25; }
.ed-li-name small { font-size: .75rem; font-weight: 400; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-stage { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; align-content: center; gap: 12px; padding: 24px; overflow: hidden; background: repeating-conic-gradient(#ECEBE6 0% 25%, #F4F3EF 0% 50%) 50% / 24px 24px; }
.ed-holder { position: relative; }
.ed-canvas { position: relative; width: 300px; height: 375px; background: #fff; border-radius: 3px; box-shadow: 0 24px 60px rgba(16, 36, 30, .2), 0 0 0 1px rgba(16, 36, 30, .06); overflow: hidden; }
.ed-frame { position: absolute; left: 0; top: 0; z-index: 1; border: 0; pointer-events: none; background: transparent; }
.ed-frame.on { z-index: 2; }
#edHit { position: absolute; inset: 0; z-index: 3; cursor: default; touch-action: none; }
#edHit.can-move { cursor: grab; }
#edHit.dragging { cursor: grabbing; }
#edHit.over-sel { cursor: move; }
/* the selected layer's corner handles (the outline itself is drawn in the preview), and the centre guides */
.ed-selbox { position: absolute; z-index: 5; pointer-events: none; }
.ed-h { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 3px; background: #FFFFFF; border: 2px solid var(--gold); box-shadow: 0 1px 4px rgba(16, 36, 30, .3); pointer-events: auto; touch-action: none; }
.ed-h.nw { left: 0; top: 0; cursor: nwse-resize; }
.ed-h.ne { left: 100%; top: 0; cursor: nesw-resize; }
.ed-h.sw { left: 0; top: 100%; cursor: nesw-resize; }
.ed-h.se { left: 100%; top: 100%; cursor: nwse-resize; }
.ed-selbox.scaling .ed-h { background: var(--gold); }
.ed-guide { position: absolute; z-index: 5; pointer-events: none; background: #FF4FA3; }
.ed-guide.v { top: 0; bottom: 0; left: 50%; width: 1px; }
.ed-guide.h { left: 0; right: 0; top: 50%; height: 1px; }
#edHit:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: -3px; }
.ed-busy { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(244, 244, 241, .86); color: var(--ink-2); font-weight: 600; pointer-events: none; text-align: center; padding: 16px; }
.ed-busy.soft { inset: 10px 10px auto auto; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--ink); font-size: .75rem; box-shadow: inset 0 0 0 1px var(--hair); }
.ed-cap { margin: 0; font-size: .8rem; color: var(--ink-2); text-align: center; }
.ed-props { border-left: 1px solid var(--hair); padding: 16px 18px 28px; display: grid; align-content: start; gap: 18px; }
.ed-props h3 { font-size: 1.1rem; }
.ed-sec { display: grid; gap: 8px; }
.ed-sec > .lbl { margin: 0; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.ed-sec textarea { min-height: 84px; }
.ed-sec .seg { flex-wrap: wrap; }
.ed-range { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .86rem; font-weight: 500; }
.ed-range output { font-weight: 700; }
.ed-range input { grid-column: 1 / -1; width: 100%; }
.ed-check { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 500; }
.ed-check input { width: 18px; height: 18px; }
.ed-warn { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: .84rem; line-height: 1.4; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { position: relative; width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer; border: 3px solid var(--deep); box-shadow: 0 0 0 1px var(--line); background: var(--sw); }
.swatch[aria-pressed="true"], .swatch.custom.on { box-shadow: 0 0 0 2.5px var(--accent); }
.swatch.page { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--fill-2); color: var(--ink); font-size: .8rem; font-weight: 600; }
.swatch.page .dotc { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.swatch.custom { overflow: hidden; background: conic-gradient(#FF6B6B, #FFD166, #06D6A0, #4CC9F0, #5856D6, #B983FF, #FF6B6B); }
.swatch.custom.on { background: var(--sw); }
.swatch.custom input { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); opacity: 0; cursor: pointer; }

/* ---------- Facebook ---------- */
.fb-card { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.fb-card h3 { font-size: 1.04rem; }
.fb-card h4 { margin: 6px 0 0; font-size: .92rem; }
.fb-status { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 500; }
.fb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; transform: translateY(-1px); box-shadow: 0 0 10px var(--green); }
.fb-status.bad .fb-dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.fb-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.fb-table th { text-align: left; font-size: .76rem; font-weight: 600; color: var(--ink-2); padding: 0 8px 6px; }
.fb-table td { padding: 8px; border-top: 1px solid var(--hair); vertical-align: middle; }
.fb-table tr.on td { background: var(--accent-soft); }
.fb-table td:first-child { font-weight: 600; white-space: nowrap; }
.fb-table .pm.logo { width: 22px; height: 22px; }
.fb-table select { width: 100%; min-width: 150px; padding: 6px 8px; }
.fb-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-stats span { padding: 6px 10px; border-radius: 10px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--hair); font-size: .84rem; }
.fb-top { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: .88rem; }
.fb-top li { display: grid; gap: 2px; }
.fb-nums { color: var(--ink-2); font-size: .8rem; }
.fb-ideas-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fb-ideas-head h4 { margin: 0 auto 0 0; }
.fb-ideas { margin: 0; white-space: pre-wrap; font: inherit; font-size: .92rem; line-height: 1.6; padding: 12px 14px; border-radius: 12px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--hair); max-height: 460px; overflow: auto; }

/* ---------- Chat with ADMAE ---------- */
.chat-dlg { border: 0; padding: 0; width: min(1120px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); max-width: none; max-height: none; border-radius: 24px; background: var(--deep); color: var(--ink); box-shadow: var(--shadow-3); overflow: hidden; }
.chat { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100%; }
.chat-side { display: flex; flex-direction: column; gap: 10px; padding: 14px 10px; background: #F7F6F2; border-right: 1px solid var(--hair); min-height: 0; }
.chat-newbtn { margin: 0 4px; }
.chat-list { overflow: auto; display: grid; align-content: start; gap: 2px; min-height: 0; }
.chat-item { display: flex; align-items: center; border-radius: 10px; }
.chat-item:hover, .chat-item.on { background: var(--surface); }
.chat-item.on { box-shadow: inset 3px 0 0 var(--accent); }
.chat-pick { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; padding: 8px 6px 8px 10px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.chat-pick span { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pick small { font-size: .74rem; color: var(--ink-2); }
.chat-del { flex: none; width: 26px; height: 26px; margin-right: 4px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; opacity: 0; }
.chat-item:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-del:hover { background: var(--fill); color: var(--red); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--hair); }
.chat-head h2 { font-size: 1.12rem; font-weight: 700; }
.chat-log { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 86%; }
.msg.me { align-self: flex-end; }
.msg .bubble { padding: 10px 15px; border-radius: 18px; line-height: 1.6; font-size: .97rem; overflow-wrap: break-word; min-width: 0; }
.msg.me .bubble { background: var(--accent); color: var(--on-light); border-bottom-right-radius: 6px; }
.msg.me .bubble a { color: var(--on-light); }
.msg.admae .bubble { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); border-bottom-left-radius: 6px; }
.bubble p { margin: 0; }
.bubble ul, .bubble ol { margin: 4px 0; padding-left: 20px; }
.bubble code { font-size: .86em; padding: 1px 5px; border-radius: 5px; background: rgba(16, 36, 30, .08); }
.chat-gap { height: 8px; }
.chat-h { font-weight: 700; margin-top: 4px !important; }
.chat-code { white-space: pre-wrap; font: inherit; font-size: .92rem; margin: 6px 0; padding: 10px 12px; border-radius: 12px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--hair); }
.chat-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--plat); color: var(--on-light); font-family: var(--display); font-weight: 600; font-size: .95rem; box-shadow: inset 0 0 0 1px var(--line); }
.chat-av.big { width: 56px; height: 56px; font-size: 1.6rem; }
.chat-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; padding: 10px 12px; border-radius: 14px; background: var(--deep); box-shadow: inset 0 0 0 1px var(--hair), inset 3px 0 0 var(--accent); }
.chat-action p { margin: 2px 0 0; font-size: .84rem; color: var(--ink-2); }
.chat-steps { margin-top: 6px; font-size: .8rem; color: var(--ink-2); }
.chat-steps summary { cursor: pointer; }
.chat-steps ul { margin: 4px 0 0; }
.chat-tools { display: flex; gap: 12px; margin-top: 6px; font-size: .8rem; }
.chat-typing { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .86rem; margin-top: 4px !important; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: chatdot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-empty { margin: auto; max-width: 560px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.chat-empty h3 { font-size: 1.3rem; }
.chat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.chip { border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: .88rem; color: var(--ink); }
.chip:hover { background: var(--accent-soft); color: var(--accent); }
.chat-compose { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px 6px; border-top: 1px solid var(--hair); }
.chat-compose textarea { flex: 1; min-height: 48px; max-height: 180px; resize: vertical; border-radius: 16px; }
.chat-note { margin: 0; padding: 0 18px 12px; font-size: .74rem; }

/* ---------- Future Plan ---------- */
.plan-summary { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.plan-bar { height: 10px; border-radius: 999px; background: rgba(16, 36, 30, .08); overflow: hidden; }
.plan-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.plan-stats { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.plan-summary .seg { justify-self: start; }
.plan-sec { display: grid; gap: 8px; }
.plan-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.plan-sec-head h3 { font-size: 1.04rem; }
.plan-when { font-size: .8rem; color: var(--ink-2); }
.plan-count { margin-left: auto; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-item { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 13px; border-radius: 13px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.plan-item.done .plan-text strong { color: var(--ink-2); }
.plan-text p { margin: 2px 0 0; font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.plan-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.plan-select { width: auto; padding: 4px 8px; font-size: .8rem; }
.plan-pill { justify-self: start; display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: var(--fill); color: var(--ink-2); }
.plan-pill.done { background: var(--green-soft); color: var(--green); }
.plan-pill.doing, .plan-pill.next { background: var(--accent-soft); color: var(--accent); }
.plan-pill.waiting { background: var(--amber-soft); color: var(--amber); }
.plan-pill.idea { background: rgba(106, 63, 135, .1); color: #6A3F87; }
.plan-pill.note { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- toast ---------- */
.toast {
  position: fixed; top: auto; right: auto; left: 50%; bottom: 28px; margin: 0; border: 0; overflow: visible; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px);
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: var(--ink); color: var(--on-light); box-shadow: 0 14px 34px rgba(16, 36, 30, .28), inset 0 0 0 1px rgba(184, 149, 90, .35);
}
.toast.bad { background: var(--red); color: var(--on-light); }

/* ======================================================================
   Intro + login: bone, lacquer and one gold coachline
   ====================================================================== */
body.auth { background: var(--bg); color: var(--ink); min-height: 100vh; overflow-x: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, #FFFFFF 0%, #F7F6F2 55%, #EEEDE7 100%);
  transition: opacity .9s ease, transform .9s var(--ease), filter .9s ease;
}
.intro.leaving { opacity: 0; transform: scale(1.04); filter: blur(8px); pointer-events: none; }
.intro-rain {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .7s ease;
  -webkit-mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, #000 25%, transparent 75%);
}
.intro.rain .intro-rain { opacity: .55; }

/* Phase 1: the full name, small and tracked */
.intro-phrase {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); margin: 0; padding: 0 16px;
  text-align: center; white-space: nowrap;
  font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .14em; line-height: 1.6; color: var(--ink-3);
}
.intro-phrase .w { display: inline-block; margin: 0 .3em; }
.intro-phrase .line { display: inline-block; }
.intro-phrase .ch { display: inline-block; text-align: center; opacity: 0; filter: blur(6px); transform: translateY(6px); }
.intro-phrase.go .ch { animation: chIn .8s var(--ease) forwards; animation-delay: var(--d, 0ms); }
.intro-phrase.shown .ch { animation: none; opacity: 1; filter: none; transform: none; }
.intro-phrase .ch.ini { color: var(--ink); }
.intro.glow .intro-phrase .ch.ini { color: var(--ink); text-shadow: 0 0 14px rgba(184, 149, 90, .55); transition: color .6s ease, text-shadow .6s ease; }
.intro.glow .intro-phrase .ch:not(.ini) { color: #9AA39E; transition: color .6s ease; }
@keyframes chIn { to { opacity: 1; filter: blur(0); transform: none; } }
/* Phase 2: everything but the initials turns to code and falls away */
.intro-phrase .ch.glitch { font-family: 'SF Mono', Menlo, monospace; color: var(--gold-deep); text-shadow: 0 0 8px rgba(184, 149, 90, .55); }
.intro-phrase.shown .ch.fall {
  opacity: 0; filter: blur(3px); transform: translateY(var(--fy, 60px));
  transition: transform .75s cubic-bezier(.55, 0, .9, .45), opacity .75s ease, filter .75s ease;
}

/* Phase 3: the initials become ADMAE, and the coachline is drawn under it */
.intro-mark { position: relative; width: 100%; text-align: center; padding: 0 16px; }
.intro-word {
  margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(64px, 13vw, 176px); line-height: 1; font-variation-settings: 'opsz' 40;
  display: inline-flex; filter: drop-shadow(0 10px 30px rgba(16, 36, 30, .1));
}
.intro-word .ltr {
  display: inline-block; margin: 0 .05em; opacity: 0; will-change: transform;
  background: linear-gradient(180deg, #2A5A4A 0%, #10241E 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-rule { display: block; width: 0; height: 1px; margin: 26px auto 0; background: linear-gradient(90deg, transparent, var(--gold) 15%, var(--gold) 85%, transparent); transition: width 1.1s var(--ease); }
.intro.named .intro-rule { width: min(420px, 60vw); }
.intro-slogan {
  margin: 20px 0 0; font-family: var(--font); font-size: clamp(11px, 1.1vw, 13px); font-weight: 500; text-transform: uppercase; letter-spacing: .32em;
  color: var(--ink-2); opacity: 0; transform: translateY(8px); transition: opacity .9s ease .25s, transform .9s var(--ease) .25s;
}
.intro.named .intro-slogan { opacity: 1; transform: none; }
.intro-slogan span { white-space: nowrap; }
.intro-slogan .sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); margin: 0 16px; vertical-align: middle; font-size: 0; }
@media (max-width: 620px) {
  .intro-slogan span { display: block; margin: 4px 0; }
  .intro-slogan .sep { display: none; }
}
.intro-skip { position: absolute; bottom: 28px; margin: 0; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); opacity: 0; animation: fadeIn .8s ease forwards 1.4s; }
@keyframes fadeIn { to { opacity: 1; } }
.intro.still .intro-word .ltr { opacity: 1; }
.intro.still .intro-phrase { display: none; }

/* ---------- login ---------- */
.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(460px, 1fr); opacity: 0; transition: opacity .8s ease .15s; }
.gate.shown { opacity: 1; }
.gate-photo { position: relative; overflow: hidden; background: var(--bg); min-height: 100vh; }
.gate-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%;
  filter: saturate(.95) contrast(1.02); transform: scale(1.05); transition: transform 2.2s var(--ease);
}
.gate.shown .gate-photo img { transform: none; }
.gate-photo::before { /* a warm, gilt grade */
  content: ''; position: absolute; inset: 0; z-index: 1; background: #B8955A; mix-blend-mode: soft-light; opacity: .28;
}
.gate-photo::after { /* fade into bone on the right and at the bottom */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(244, 244, 241, 0) 55%, #F4F4F1 99%),
    linear-gradient(180deg, rgba(244, 244, 241, 0) 60%, rgba(244, 244, 241, .9) 100%);
}
.gate-photo-mark { position: absolute; left: 36px; bottom: 32px; z-index: 2; font-family: var(--display); font-size: 1.05rem; letter-spacing: .3em; color: var(--ink); }
.gate-side {
  display: grid; place-content: center; gap: 34px; padding: 40px 24px; position: relative; z-index: 2;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #FFFFFF 0%, #F7F6F2 70%, #F4F4F1 100%);
}
.gate-brand { text-align: center; }
.gate-word {
  font-family: var(--display); font-weight: 500; font-size: 3.4rem; letter-spacing: .1em; line-height: 1; font-variation-settings: 'opsz' 40;
  background: linear-gradient(180deg, #2A5A4A 0%, #10241E 75%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-brand p { margin: 14px 0 0; font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .28em; color: var(--ink-2); }
.gate-brand p span { white-space: nowrap; }
.gate-brand .sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--gold); margin: 0 12px; vertical-align: middle; font-size: 0; }
.gate-card {
  width: min(400px, calc(100vw - 32px)); color: var(--ink); border-radius: 24px; padding: 30px 28px;
  background: #FFFFFF linear-gradient(90deg, transparent, var(--gold), transparent) 50% 0 / 70% 1px no-repeat;
  box-shadow: 0 0 0 1px var(--hair), 0 24px 60px rgba(16, 36, 30, .12);
}
.gate-card h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.015em; margin-bottom: 18px; }
.gate-card .stack label { display: grid; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.gate-card input[type="text"], .gate-card input[type="password"] { background: var(--fill-2); color: var(--ink); border-color: transparent; padding: 12px 14px; }
.gate-card input::placeholder { color: var(--ink-3); }
.gate-card input:focus { background: #FFFFFF; border-color: var(--accent-ring); box-shadow: 0 0 0 3px rgba(184, 149, 90, .28); }
.gate-card .btn.primary { min-height: 48px; font-size: 1rem; }
.gate-card .hint { margin-top: 16px; color: var(--ink-2); }
.gate-card .err { color: var(--red); }

@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; }
  .gate-photo { min-height: 0; height: 42vh; }
  .gate-photo img { object-position: 50% 12%; }
  .gate-photo::after { background: linear-gradient(180deg, rgba(244, 244, 241, 0) 45%, #F4F4F1 100%); }
  .gate-photo-mark { display: none; }
  .gate-side { place-content: start center; padding: 0 16px 40px; margin-top: -48px; background: transparent; }
  .gate-word { font-size: 2.8rem; }
  .gate-brand p span { display: block; margin: 3px 0; }
  .gate-brand .sep { display: none; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1840px) {
  .tool span { display: none; }
  .tool { padding: 0 10px; }
}
/* a laptop screen: the whole bar on one row (the subtitle under ADMAE goes, the gaps get smaller) */
@media (max-width: 1400px) and (min-width: 901px) {
  .bar { gap: 10px; padding-left: 20px; padding-right: 20px; }
  .brand .sub { display: none; }
}
/* four make buttons (with Create ads, 20 October 2026) on one row with the bar: lighter on laptop screens */
@media (max-width: 1720px) and (min-width: 901px) {
  .make { gap: 6px; }
  .make .btn { padding-left: 13px; padding-right: 13px; }
  .make .btn:not(.primary) svg { display: none; }
}
@media (max-width: 1180px) {
  .lane { grid-template-columns: minmax(0, 1fr); }
  .lane-id { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 18px 14px 22px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .lane-name { flex: 1 1 260px; }
  .lane-id .linkish { margin: 0; }
  .meters { grid-template-columns: repeat(2, minmax(120px, 1fr)); min-width: 0; }
  .day-tools { margin-left: 0; }
}
@media (max-width: 900px) {
  .bar { padding: 10px 16px; }
  .main { padding: 0 16px 60px; }
  .datestrip { padding: 12px 8px 0; }
  .reel-nav { display: none; }
  .views button span { display: none; }
  .ed-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(340px, 1fr) auto; overflow: auto; }
  .ed-layers { border-right: 0; border-bottom: 1px solid var(--hair); max-height: 190px; }
  .ed-props { border-left: 0; border-top: 1px solid var(--hair); }
}
@media (max-width: 760px) {
  .brand .sub, .me span { display: none; }
  .tools { order: 5; width: 100%; justify-content: space-between; }
  .make { order: 4; width: 100%; }
  .make .btn { flex: 1; }
  .lane-posts { grid-template-columns: minmax(0, 1fr); }
  .tile { border-left: 0; border-top: 1px solid var(--hair); }
  .tile:first-child { border-top: 0; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
  .chat { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .chat-side { border-right: 0; border-bottom: 1px solid var(--hair); max-height: 210px; }
  .msg { max-width: 100%; }
}
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .choices, .choices.pages { grid-template-columns: 1fr; }
  .pick-row { grid-template-columns: 1fr; }
  .guide dl { grid-template-columns: 1fr; gap: 2px; }
  .guide dd { margin-bottom: 8px; }
  .plan-item { grid-template-columns: 1fr; }
  .plan-act { align-items: flex-start; flex-direction: row; }
  .fb-table td:first-child { white-space: normal; }
  .drawer { border-radius: 0; }
  .drawer-body, .drawer-head { padding-left: 16px; padding-right: 16px; }
  .design-block { margin: 0 -16px; padding: 18px 16px; }
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-open { grid-template-columns: 92px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .tile, .btn, .intro, .gate, .gate-photo img, .intro-rule, .intro-slogan, .m-bar i { transition: none; }
  .board.develop .pic { animation: none; }
  .spin { animation: none; border-right-color: currentColor; opacity: .6; }
  .stage.working .av, .agent-now .dot, .job-chip::before, .dots i { animation: none; }
  .bar-track span { transition: none; }
  .gate-photo img { transform: none; }
}

/* ---------- Post to Facebook and Share with team ---------- */
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.act {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 13px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-size: .82rem; font-weight: 600; background: var(--fill-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s ease;
}
.act:hover { background: #F7F6F2; }
.act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act.fb { background: #1877F2; color: #fff; box-shadow: none; }
.act.fb:hover { background: #2D86FF; }
.act.posted { background: var(--green-soft); color: var(--green); box-shadow: none; }
.act.sched { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.g-foot .act, .ltable .act { min-height: 28px; padding: 3px 10px; font-size: .76rem; }
.tile-acts { padding: 0 18px 16px; }
.s-ok.sched { color: var(--amber); }
.pub-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.pub-strip p { margin: 0; flex: 1 1 240px; font-size: .9rem; }
.pub-strip .row-btns { margin: 0; }
.pub-strip.posted { background: var(--green-soft); box-shadow: none; }
.pub-strip.sched { background: var(--amber-soft); box-shadow: none; }
.pub-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.pub-media { border-radius: 14px; overflow: hidden; background: var(--fill-2); box-shadow: var(--proof-shadow); aspect-ratio: 4 / 5; display: grid; place-items: center; color: var(--ink-3); font-size: .86rem; }
.pub-media.tall { aspect-ratio: 9 / 16; width: 180px; justify-self: center; }
.pub-media img, .pub-media video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.pub-form { display: grid; gap: 12px; min-width: 0; }
.pub-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pub-when legend { width: 100%; }
.pub-when input[type="datetime-local"] { width: auto; padding: 6px 10px; }
.pub-when input:disabled { opacity: .45; }
.share-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.share-people, .share-msg { display: grid; gap: 12px; min-width: 0; }
.share-people h3 { font-size: 1rem; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--fill-2); }
.people label span { display: grid; min-width: 0; line-height: 1.3; }
.people small { color: var(--ink-2); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; }
.person-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.person-acts .chat-del { opacity: 1; }
.share-ways { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) { .pub-grid, .share-grid { grid-template-columns: 1fr; } .pub-media { width: 200px; justify-self: center; } }

/* ---------- motion reel ---------- */
.motion-block { margin: 0 -26px; padding: 22px 26px; background: radial-gradient(ellipse 80% 70% at 30% 20%, color-mix(in srgb, var(--page, var(--accent)) 14%, transparent), transparent 70%); }
.motion-frame { width: 100%; max-width: 280px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 18px 44px rgba(16, 36, 30, .2), 0 0 0 1px rgba(16, 36, 30, .07); }
.motion-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
@media (max-width: 640px) { .motion-block { margin: 0 -16px; padding: 18px 16px; } }

/* ---------- Facebook: refresh pages, report actions ---------- */
.fb-keyrow { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.fb-keyrow > .btn { flex: none; }
.fb-keyrow > details { flex: 1 1 260px; margin: 0; }
.fb-report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-report-head h3 { margin: 0 auto 0 0; }
/* deleting is possible, not prominent: an outline, not a filled red button */
.fb-report-head .btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent); }
.fb-report-head .btn.danger:hover { background: var(--red-soft); }

/* ---------- printing a report (Print or save as PDF): only the report, black on white ---------- */
#printArea { display: none; }
@media print {
  html.print-report { color-scheme: light; }
  html.print-report, html.print-report body { background: #fff !important; color: #000 !important; }
  html.print-report body > *:not(#printArea), html.print-report dialog, html.print-report dialog::backdrop { display: none !important; }
  html.print-report #printArea { display: block !important; }
  .pr { font-family: 'Hind Siliguri', 'Anek Bangla', -apple-system, sans-serif; font-size: 11pt; line-height: 1.55; color: #111; }
  .pr header { border-bottom: 1px solid #ccc; padding-bottom: 10pt; margin-bottom: 14pt; }
  .pr h1 { font-size: 18pt; line-height: 1.25; margin: 0 0 4pt; }
  .pr h2 { font-size: 13pt; margin: 18pt 0 6pt; break-after: avoid; }
  .pr p { margin: 0 0 4pt; }
  .pr-meta { color: #555; font-size: 9.5pt; }
  .pr-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6pt 18pt; }
  .pr-stats b { font-size: 13pt; }
  .pr-top { padding-left: 16pt; margin: 0; }
  .pr-top li { margin-bottom: 9pt; break-inside: avoid; }
  .pr-ideas { white-space: pre-wrap; font: inherit; margin: 0; }
  @page { margin: 16mm; }
}

/* ---------- Polish panel in the post drawer ---------- */
.pol-status { margin: 0 0 6px; font-weight: 600; }
.pol-status.ok { color: var(--green); }
.pol-status.warn { color: var(--amber); }
.pol-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.pol-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--radius-ctl); background: var(--fill); }
.pol-item.rule { background: var(--red-soft); }
.pol-tag { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); white-space: nowrap; margin-top: 1px; }
.pol-item.rule .pol-tag { background: var(--red-soft); color: var(--red); }
.pol-where { margin: 0; font-size: .8rem; color: var(--ink-3); }
.pol-text { margin: 2px 0; color: var(--ink); overflow-wrap: anywhere; }
.pol-note { margin: 0; font-size: .86rem; color: var(--ink-2); }
.polish-block details.raw { margin-top: 8px; }

/* ---------- channels: LinkedIn, X and website posts ---------- */
.rd-mark.ch { width: 8px; height: 8px; border-radius: 50%; }
.proof.land { aspect-ratio: 16 / 9; }
.g-proof.land .bg, .s-proof.land .bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(22px) brightness(.45) saturate(1.2); }
.g-proof.land .pic, .s-proof.land .pic { position: relative; object-fit: contain; }
.l-thumb.land .bg { display: none; }
.chan-pick { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.chan-pick legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: .92rem; }
.chan-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chan { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: var(--radius-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.chan:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.chan input { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.chan span { display: grid; gap: 1px; }
.chan small { color: var(--ink-3); font-size: .78rem; line-height: 1.3; }
@media (max-width: 640px) { .chan-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
select:disabled { opacity: .45; }
.x-thread { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.x-post { display: grid; gap: 6px; }
.x-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x-count { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: auto; }
.x-post.over .x-count { color: var(--red); font-weight: 600; }

/* human score chips in the Polish panel (ADMAE LINKEDIN humanizer) */
.pol-scores { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.pol-score { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--fill); font-variant-numeric: tabular-nums; }
.pol-score.ok { background: var(--green-soft); color: var(--green); }
.pol-score.warn { background: var(--amber-soft); color: var(--amber); }

/* ---------- LinkedIn window (ADMAE LINKEDIN) ---------- */
.li-accts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.li-acct { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius-ctl); background: var(--fill); }
.li-acct-name { margin: 0; display: grid; gap: 2px; }
.li-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.li-file { display: grid; gap: 1px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 0; background: var(--fill-2); color: var(--ink); cursor: pointer; font: inherit; box-shadow: inset 0 0 0 1px var(--hair); }
.li-file:hover { box-shadow: inset 0 0 0 1px var(--accent-ring); }
.li-file b { font-size: .86rem; }
.li-file span { font-size: .76rem; color: var(--ink-3); }
.li-file.ok span { color: var(--green); }
.li-file.warn span { color: var(--amber); }
.li-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.li-tool { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); cursor: pointer; font: inherit; }
.li-tool:hover { background: #F7F6F2; }
.li-tool.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.li-tool b { font-size: .9rem; }
.li-tool span { font-size: .78rem; line-height: 1.35; color: var(--ink-2); }
.li-toolform { display: grid; gap: 8px; padding-top: 4px; }
.li-human { display: grid; gap: 8px; }
.li-editor { width: 100%; min-height: 380px; font: .88rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 640px) { .li-files { grid-template-columns: minmax(0, 1fr); } }

/* LinkedIn: the Post button on cards, and where LinkedIn posts go in the forms */
.act.li { background: #0A66C2; color: #fff; box-shadow: none; }
.act.li:hover { background: #1478D6; }
.li-route { display: grid; gap: 6px; padding-top: 4px; }
.li-write textarea { width: 100%; }

/* ---------- on a phone ---------- */
/* iPhone zooms into any field whose text is under 16px when it is tapped: keep fields at 16px on touch screens. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}
/* ---------- installed on a phone's home screen: clear the status bar, the notch and the home bar ---------- */
@media (display-mode: standalone) {
  .bar { padding-top: calc(10px + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .drawer { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .studio[open] { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .toast { bottom: calc(28px + env(safe-area-inset-bottom)); }
  .gate-side { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}
/* ADMAE on the server: no Finder to open folders in */
body.no-folders [data-open-folder] { display: none !important; }

/* ---------- Feed | Desk ---------- */
.modes { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(16, 36, 30, .04); box-shadow: inset 0 0 0 1px var(--hair); }
.modes button { height: 32px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.modes button:hover { color: var(--ink); }
.modes button[aria-selected="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 36, 30, .12), inset 0 0 0 1px var(--hair); }
.modes button:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
body[data-mode="feed"] .datestrip, body[data-mode="feed"] #dayHead, body[data-mode="feed"] #board { display: none; }

/* ---------- the Feed: the Pages' posts, laid out like Facebook ---------- */
.feed { max-width: 640px; margin: 18px auto 0; }
.f-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.f-chips::-webkit-scrollbar { display: none; }
.f-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 5px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .86rem; white-space: nowrap; cursor: pointer; box-shadow: inset 0 0 0 1px var(--hair); }
.f-chip:first-child { padding-left: 14px; }
.f-chip[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.f-chip-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.f-refresh { width: 38px; padding: 0; justify-content: center; }
.f-refresh svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.f-note { position: relative; margin: 0 0 12px; padding: 10px 40px 10px 14px; border-radius: 12px; background: var(--fill-2); color: var(--ink-2); font-size: .82rem; line-height: 1.45; }
.f-note button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.f-note button:hover { background: var(--fill); color: var(--ink); }

.f-post { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1); margin-bottom: 14px; overflow: hidden; }
.f-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.f-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--fill-2); box-shadow: 0 0 0 1px var(--hair); }
.f-who { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.f-who b { font-weight: 650; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-when { display: inline-flex; align-items: center; gap: 3px; width: fit-content; color: var(--ink-3); font-size: .8rem; text-decoration: none; }
.f-when:hover { text-decoration: underline; }
.f-when svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.f-admae { flex: none; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer; font-family: var(--display); font-size: .74rem; letter-spacing: .16em; color: var(--on-light); background: var(--plat); box-shadow: 0 2px 10px rgba(16, 36, 30, .22), inset 0 0 0 1px rgba(184, 149, 90, .45); }
.f-text { margin: 0 0 12px; padding: 0 16px; font-size: 1rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.f-text.open { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.f-text a, .f-bubble a { color: var(--accent); text-decoration: none; }
.f-tag { color: var(--accent); }
.f-see { display: block; margin: -6px 0 12px 16px; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 650; font-size: .92rem; cursor: pointer; }

.f-media { display: block; background: var(--fill-2); }
.f-media img, .f-media video { display: block; width: 100%; }
.f-one img { aspect-ratio: var(--ar, auto); max-height: 78vh; object-fit: cover; }
.f-video { position: relative; display: flex; justify-content: center; }
.f-video video:not([controls]) { cursor: pointer; }
.f-sound {
  position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(7, 11, 22, .62); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.f-sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.f-sound:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.f-video.has-controls .f-sound { display: none; }
.f-video video, .f-video img { aspect-ratio: var(--ar, 16 / 9); max-height: 78vh; object-fit: contain; background: #000; }
.f-video.reel video, .f-video.reel img { width: auto; height: min(78vh, 720px); max-width: 100%; object-fit: cover; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.f-grid .f-cell { position: relative; aspect-ratio: 1; overflow: hidden; }
.f-grid.n3 .f-cell:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.f-grid img { height: 100%; object-fit: cover; }
.f-plus { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); font-size: 1.8rem; font-weight: 700; }
.f-linkcard { text-decoration: none; color: inherit; background: var(--fill-2); }
.f-linkcard img { aspect-ratio: 1.91; object-fit: cover; }
.f-linkcard span { display: grid; gap: 2px; padding: 10px 16px 12px; }
.f-linkcard small { color: var(--ink-3); text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.f-linkcard b { font-weight: 650; line-height: 1.35; }

.f-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 8px; color: var(--ink-2); font-size: .88rem; }
.f-reacts { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.f-emos { display: inline-flex; }
.f-emos i { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-right: -5px; border-radius: 50%; background: var(--fill-2); box-shadow: 0 0 0 2px var(--surface); font-style: normal; font-size: 12px; line-height: 1; }
.f-emos i:last-child { margin-right: 0; }
.f-counts { display: flex; gap: 12px; }
.f-counts button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.f-counts button:hover, .f-reacts:hover { text-decoration: underline; }
.f-breakdown { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0 16px 10px; color: var(--ink-2); font-size: .88rem; }
.f-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 12px; padding: 4px 0; border-top: 1px solid var(--hair); }
.f-actions button, .f-actions a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; }
.f-actions button:hover, .f-actions a:hover { background: var(--fill); color: var(--ink); }
.f-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.f-comments { padding: 2px 16px 14px; border-top: 1px solid var(--hair); margin: 0 12px; padding-left: 4px; padding-right: 4px; }
.f-c-order { margin: 10px 0 0; color: var(--ink-3); font-size: .78rem; font-weight: 600; }
.f-c-note { margin: 12px 0 0; color: var(--ink-3); font-size: .86rem; }
.f-c { display: flex; gap: 8px; margin-top: 10px; }
.f-c.reply { margin-top: 8px; }
.f-c-av { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.f-c.reply .f-c-av { width: 26px; height: 26px; }
.f-noav { display: inline-grid; place-items: center; background: var(--fill-2); color: var(--ink-3); }
.f-noav svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.f-c-body { min-width: 0; }
.f-bubble { display: inline-block; max-width: 100%; padding: 8px 12px; border-radius: 18px; background: var(--fill-2); }
.f-bubble b { font-weight: 650; font-size: .86rem; }
.f-bubble p { margin: 2px 0 0; font-size: .95rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.f-author { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 700; vertical-align: 1px; }
.f-c-img { display: block; max-width: 220px; margin-top: 6px; border-radius: 12px; }
.f-c-meta { display: flex; gap: 12px; margin: 3px 12px 0; color: var(--ink-3); font-size: .76rem; font-weight: 600; }
.f-link-btn { display: block; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 650; font-size: .88rem; cursor: pointer; }
.f-link-btn:hover { text-decoration: underline; }
.f-replies-btn { margin: 6px 0 0 12px; font-size: .82rem; }

.f-end { min-height: 60px; }
.f-done { margin: 20px 0 40px; text-align: center; color: var(--ink-3); font-size: .86rem; }
.f-empty { padding: 36px 20px; text-align: center; border-radius: 16px; background: var(--surface); }
.f-empty h3 { margin: 0 0 8px; font-size: 1.05rem; }
.f-empty p { margin: 0 0 14px; color: var(--ink-2); }
.f-spin { width: 26px; height: 26px; margin: 22px auto 40px; border-radius: 50%; border: 2.5px solid var(--hair); border-top-color: var(--ink-2); animation: f-spin .8s linear infinite; }
@keyframes f-spin { to { transform: rotate(360deg); } }
.f-skel .f-avatar, .f-skel i, .f-skel-media { display: block; background: var(--fill-2); border-radius: 8px; }
.f-skel .f-avatar { border-radius: 50%; }
.f-skel .f-who { gap: 6px; }
.f-skel .f-who i { height: 12px; width: 40%; }
.f-skel .f-who i + i { width: 25%; }
.f-skel-text { display: grid; gap: 8px; padding: 0 16px 14px; }
.f-skel-text i { height: 12px; }
.f-skel-text i:last-child { width: 60%; }
.f-skel-media { height: 260px; border-radius: 0; }
.f-skel .f-avatar, .f-skel i, .f-skel-media { animation: f-pulse 1.4s ease-in-out infinite; }
@keyframes f-pulse { 50% { opacity: .5; } }

@media (max-width: 760px) {
  /* the top bar slides away while scrolling down the feed, and back on the way up */
  .bar { transition: transform .3s var(--ease); }
  body.bar-away .bar { transform: translateY(-105%); }
  .modes button { padding: 0 12px; }
}
@media (max-width: 640px) {
  .feed { margin: 10px -16px 0; }
  .f-chips { padding: 2px 12px 10px; }
  .f-note { margin: 0 12px 10px; }
  .f-post { border-radius: 0; margin-bottom: 8px; box-shadow: none; }
  .f-empty { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .f-spin, .f-skel .f-avatar, .f-skel i, .f-skel-media { animation: none; }
  .bar { transition: none; }
}

/* ---------- the owner's Activity page ---------- */
body[data-mode="activity"] .datestrip, body[data-mode="activity"] #dayHead, body[data-mode="activity"] #board { display: none; }
.act-page { max-width: 760px; margin: 18px auto 0; }
.act-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.act-head h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 500; font-size: 1.9rem; letter-spacing: .02em; }
.act-push { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); }
.act-push p { margin: 0; flex: 1 1 280px; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.act-push b { color: var(--ink); }
.act-push-msg { color: var(--green); }
.act-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.act-person { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow-1), inset 0 0 0 1px transparent; transition: box-shadow .15s var(--ease); font: inherit; }
.act-person:hover { box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.act-person[aria-pressed="true"] { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--accent-ring); background: linear-gradient(180deg, var(--accent-soft), transparent), var(--surface); }
.act-pinfo { display: grid; gap: 2px; min-width: 0; }
.act-pinfo b { font-weight: 650; }
.act-pinfo small { color: var(--ink-3); font-size: .78rem; line-height: 1.35; }
.act-pinfo .act-week { color: var(--ink-2); }
.act-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--plat); color: var(--on-light); font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.act-av.sm { width: 32px; height: 32px; font-size: .92rem; }
.act-kinds { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.act-kinds::-webkit-scrollbar { display: none; }
.act-kinds .f-chip { padding: 0 14px; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-day { margin: 18px 0 8px; color: var(--ink-3); font-size: .78rem; font-weight: 700; text-transform: none; letter-spacing: .02em; }
.act-day:first-child { margin-top: 4px; }
.act-row { display: flex; gap: 12px; padding: 12px 14px; margin-bottom: 6px; border-radius: 14px; background: var(--surface); }
.act-row.bad { box-shadow: inset 3px 0 0 var(--red); }
.act-row.k-post { box-shadow: inset 3px 0 0 var(--green); }
.act-row.k-run .act-kind { color: var(--accent); }
.act-main { min-width: 0; flex: 1; }
.act-who { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.act-who b { font-weight: 650; }
.act-who time { color: var(--ink-3); font-size: .78rem; }
.act-kind { margin-left: auto; color: var(--ink-3); font-size: .86rem; }
.act-text { margin: 3px 0 0; color: var(--ink); font-size: .94rem; line-height: 1.45; overflow-wrap: anywhere; }
.act-detail { margin: 4px 0 0; color: var(--red); font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; }
.act-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 8px 0 0; font-size: .82rem; }
.act-links a, .act-links button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.act-links a:hover, .act-links button:hover { text-decoration: underline; }
.act-ip { color: var(--ink-3); }
.act-end { min-height: 40px; }
.chip-sm { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--fill); color: var(--ink-2); font-size: .76rem; font-weight: 600; }
.act-chat .dlg-inner { max-width: 640px; }
.act-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.act-chat-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.act-chat-log { display: grid; gap: 10px; max-height: min(70vh, 640px); overflow-y: auto; }
.act-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; background: var(--fill-2); }
.act-msg.mine { justify-self: end; background: var(--accent-soft); }
.act-msg b { font-size: .8rem; }
.act-msg p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .94rem; line-height: 1.5; }
.act-msg time { color: var(--ink-3); font-size: .74rem; }

/* the drawer: who made and changed the post */
.who-line { display: block; margin-top: 3px; color: var(--ink-3); font-size: .8rem; }

/* the Account window: the team and each member's pages */
.team-list li.member { display: grid; gap: 8px; }
.member-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.member-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.member-edit { display: grid; gap: 10px; padding-top: 4px; }
.page-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.page-pick { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--fill-2); font-size: .88rem; cursor: pointer; }
.page-pick input { width: 16px; height: 16px; accent-color: var(--accent); }
.add-member { margin-top: 16px; }

@media (max-width: 640px) {
  .act-page { margin: 10px 0 0; }
  .act-people { grid-template-columns: 1fr; }
  .act-row { padding: 12px; }
}
/* the owner's three views get their own full-width row on a phone */
@media (max-width: 760px) {
  body.is-owner .modes { order: 3; width: 100%; }
  body.is-owner .modes button { flex: 1; }
}
/* a member opens only their own pages' folders, never the whole day's */
body.is-member [data-open-folder=""] { display: none !important; }

/* ---------- Chat: the ADMAE and Team tabs, and Team chat ---------- */
.chat-tabs { display: flex; gap: 2px; padding: 3px; margin: 0 4px; border-radius: 12px; background: rgba(16, 36, 30, .05); box-shadow: inset 0 0 0 1px var(--hair); }
.chat-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.chat-tabs button[aria-selected="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 36, 30, .12), inset 0 0 0 1px var(--hair); }
.chat-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: var(--on-light); font-size: .7rem; font-weight: 700; line-height: 1; }
.chat-item > .chat-count { margin-right: 8px; }
.tool { position: relative; }
.tool > .chat-count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; font-size: .64rem; box-shadow: 0 0 0 2px var(--bg); }
.team-pick { display: flex; align-items: center; gap: 10px; }
.team-pick-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.team-pick-text > span { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-pick-text > small { font-size: .74rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-when { flex: none; align-self: start; margin-top: 2px; color: var(--ink-3); font-size: .7rem; }
.chat-av.sm { width: 32px; height: 32px; font-size: .9rem; }
.chat-av.room { background: var(--accent-soft); color: var(--accent); font-family: var(--font); font-weight: 700; }
.team-sect { margin: 12px 8px 4px; color: var(--ink-3); font-size: .72rem; font-weight: 700; }
.team-notify { display: grid; gap: 6px; margin-top: auto; padding: 10px 6px 2px; border-top: 1px solid var(--hair); }
.team-notify p { margin: 0; font-size: .76rem; line-height: 1.4; }
.team-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-log { gap: 4px; }
.team-day { align-self: center; margin: 12px 0 6px; padding: 3px 12px; border-radius: 999px; background: var(--fill); color: var(--ink-2); font-size: .74rem; font-weight: 600; }
.team-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; margin-top: 6px; }
.team-msg.cont { margin-top: 0; padding-left: 40px; }
.team-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.team-msg.mine.cont { padding-left: 0; }
.team-bubble { padding: 8px 12px 6px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.team-msg.mine .team-bubble { background: rgba(30, 90, 71, .1); box-shadow: inset 0 0 0 1px rgba(30, 90, 71, .12); }
.team-bubble b { display: block; margin-bottom: 2px; color: var(--accent); font-size: .78rem; font-weight: 700; }
.team-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.45; }
.team-bubble a { color: var(--accent); }
.team-bubble time { display: block; margin-top: 2px; text-align: right; color: var(--ink-3); font-size: .68rem; }
@media (max-width: 760px) {
  .team-msg { max-width: 90%; }
  .team-notify { margin-top: 0; }
}
/* the unread count stays visible on the Chat button even where the tool buttons hide their text labels */
.tool > .chat-count:not([hidden]) { display: inline-grid !important; }
/* Team chat on a phone: the list fills the screen; a conversation opens full screen with a back arrow */
.team-back { display: none; font-size: 1.6rem; line-height: 1; }
@media (max-width: 760px) {
  .team-chat { grid-template-rows: minmax(0, 1fr); }
  .team-chat .chat-side { max-height: none; border-bottom: 0; }
  .team-chat.show-list .chat-main, .team-chat.show-conv .chat-side { display: none; }
  .team-chat .team-back { display: inline-grid; }
  .team-chat .chat-head { justify-content: flex-start; }
  .team-chat .chat-head > [data-close] { margin-left: auto; }
}
.team-side-top { display: flex; align-items: center; gap: 6px; }
.team-side-top .chat-tabs { flex: 1; }
.team-close { display: none; }
@media (max-width: 760px) { .team-chat .team-close { display: inline-grid; } }

/* ---------- Team chat: photos, videos and files (kept on devices) ---------- */
.team-attach svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chat-compose .team-attach { flex: none; align-self: flex-end; margin-bottom: 4px; }
.chat-av.online { box-shadow: 0 0 0 2px var(--deep), 0 0 0 4px var(--green); }
.team-msg.has-file { max-width: min(78%, 380px); }
.team-file { display: grid; gap: 6px; margin: 2px 0 4px; }
.team-fcard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(16, 36, 30, .05); }
.team-ficon { flex: none; font-size: 1.5rem; line-height: 1; }
.team-fmeta { display: grid; min-width: 0; }
.team-fmeta b { font-size: .9rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-fmeta small { color: var(--ink-3); font-size: .76rem; }
.team-fstate { margin: 0; color: var(--ink-3); font-size: .76rem; line-height: 1.4; }
.team-fstate .f-link-btn { display: inline; margin: 0; font-size: .8rem; color: var(--accent); }
.team-bar { display: inline-block; width: 70px; height: 5px; margin-right: 6px; border-radius: 3px; background: var(--fill); vertical-align: middle; overflow: hidden; }
.team-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s ease; }
.team-img { display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; }
.team-img img { display: block; max-width: 100%; max-height: 360px; object-fit: cover; }
.team-video { display: block; width: 100%; max-height: 420px; border-radius: 12px; background: #000; }
.team-file audio { width: 100%; }
.team-save { margin: 0; font-size: .8rem; }
.team-viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 18, 15, .95); }
.team-viewer[open] { display: grid; place-items: center; grid-template-rows: minmax(0, 1fr) auto; }
.team-viewer img { max-width: 100vw; max-height: calc(100vh - 80px); object-fit: contain; cursor: zoom-out; }
.team-viewer-bar { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.team-fmeta b { display: block; margin: 0; color: var(--ink); }

/* ======================================================================
   Simple like Facebook: the ☰ menu, everyone's profile, and on a phone the tools in a bar at the bottom with Home
   ====================================================================== */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.round-btn {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--fill); color: var(--ink); transition: background .15s var(--ease);
}
.round-btn:hover { background: rgba(16, 36, 30, .1); }
.round-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:focus-visible, .tabbar button:focus-visible, .menu-tile:focus-visible, .menu-me:focus-visible, .menu-person:focus-visible, .menu-row:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
/* Chat at the top right is the phone's (a computer has it among the tools); its red count sits on its corner */
#topChat { display: none; position: relative; }
.round-btn .chat-count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; font-size: .62rem; box-shadow: 0 0 0 2px var(--bg); }
/* in the bar, like Facebook: your photo only (your name is on your profile and in the menu) */
.me #accountName { display: none; }
.me { padding: 3px; }

/* a person's photo, or their initial on a platinum disc */
.pp { display: block; flex: none; border-radius: 50%; object-fit: cover; background: var(--fill-2); }
.pp-i, .me .avatar.pp-i { display: grid; place-items: center; background: var(--plat); color: var(--on-light); font-family: var(--display); font-weight: 600; line-height: 1; }
.me .avatar.pp-i { font-size: .95rem; }
img.chat-av, img.act-av { object-fit: cover; }

/* ---------- the sheets: the menu slides in at the side, a profile opens in the middle ---------- */
.pane-sheet { border: 0; padding: 0; color: var(--ink); background: var(--deep); box-shadow: var(--shadow-3); overflow: auto; overscroll-behavior: contain; }
.pane-sheet::backdrop { background: rgba(16, 36, 30, .3); }
.menu-sheet { margin: 12px auto 12px 12px; width: 400px; max-width: calc(100vw - 24px); height: calc(100dvh - 24px); max-height: none; border-radius: 24px; }
.profile-sheet { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border-radius: 24px; }

/* the menu */
.menu { padding: 18px 16px 28px; }
.menu-top { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 14px; }
.menu-top h2 { margin: 0; font-size: 1.65rem; font-weight: 700; letter-spacing: -.01em; }
.menu-top .btn.icon { background: var(--fill-2); }
.menu-me, .menu-person, .menu-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; cursor: pointer; color: var(--ink); font: 600 .95rem/1.25 var(--font); }
.menu-me { padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-1); }
.menu-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.menu-me b { font-size: 1.08rem; font-weight: 700; }
.menu-me small, .menu-person small { color: var(--ink-3); font-size: .8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-av { width: 46px; height: 46px; font-size: 1.25rem; }
.menu-av.sm { width: 38px; height: 38px; font-size: 1rem; }
.menu-h { margin: 22px 6px 8px; color: var(--ink-3); font-size: .84rem; font-weight: 600; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.menu-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 86px; padding: 14px;
  border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); font: 600 .95rem/1.2 var(--font); text-align: left; cursor: pointer;
  box-shadow: var(--shadow-1); transition: background .15s var(--ease);
}
.menu-tile svg { width: 25px; height: 25px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-tile:hover, .menu-me:hover { background: #FBFAF7; }
.menu-tile.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-ring); }
.menu-tile .chat-count { position: absolute; top: 12px; right: 12px; }
.menu-views { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
.menu-views .menu-tile { min-height: 76px; }
.menu-people { display: grid; gap: 2px; }
.menu-person { padding: 8px 10px; border-radius: 14px; background: transparent; }
.menu-person:hover, .menu-row:hover { background: var(--fill); }
.menu-list { display: grid; gap: 2px; padding: 4px; border-radius: 16px; background: var(--surface); }
.menu-row { padding: 12px 10px; border-radius: 12px; background: transparent; }
.menu-row svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* a profile */
.prof { padding-bottom: 26px; }
.prof-cover {
  position: relative; aspect-ratio: 3 / 1; min-height: 120px;
  background: radial-gradient(120% 160% at 88% -10%, rgba(184, 149, 90, .55) 0%, rgba(184, 149, 90, 0) 55%), linear-gradient(160deg, #24604C 0%, #10241E 100%);
  background-size: cover; background-position: center;
}
.prof-x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(7, 11, 22, .62); color: #fff; font-size: .95rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.prof-head { position: relative; margin-top: -60px; padding: 0 22px; }
.prof-av { width: 124px; height: 124px; font-size: 3.1rem; box-shadow: 0 0 0 5px var(--deep); }
.prof-head h2 { margin: 14px 0 0; font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.prof-desig { margin: 4px 0 0; color: var(--accent); font-weight: 600; }
.prof-headline { margin: 6px 0 0; color: var(--ink-2); line-height: 1.5; }
.prof-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 22px 0; }
.prof-actions .btn { flex: 1 1 160px; justify-content: center; }
.prof-sec { margin: 18px 22px 0; padding-top: 16px; border-top: 1px solid var(--hair); }
.prof-sec h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.prof-about { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.prof-facts p { display: flex; gap: 14px; margin: 0 0 10px; line-height: 1.45; }
.prof-facts span { flex: none; width: 118px; color: var(--ink-3); }
.prof-facts a { color: var(--accent); text-decoration: none; word-break: break-word; }
/* editing */
.prof-pic-btn { position: absolute; z-index: 2; right: 12px; bottom: 12px; gap: 6px; cursor: pointer; color: #fff; background: rgba(10, 18, 15, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.prof-pic-btn:hover:not(.busy) { background: rgba(10, 18, 15, .75); }
.prof-pic-btn svg, .prof-cam svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.prof-av-edit { position: relative; display: inline-block; border-radius: 50%; cursor: pointer; }
.prof-cam { position: absolute; right: 2px; bottom: 6px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--plat); color: var(--on-light); box-shadow: 0 0 0 3px var(--deep), 0 6px 14px rgba(16, 36, 30, .22); transition: transform .15s var(--ease); }
.prof-cam svg { width: 19px; height: 19px; }
.prof-av-edit:hover .prof-cam { transform: scale(1.06); }
.prof-av-edit:active .prof-cam { transform: scale(.94); }
:is(.prof-pic-btn, .prof-av-edit).busy { opacity: .55; pointer-events: none; cursor: progress; }
.prof-pic-rm { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 10px 0 0 -8px; }
.prof-pic-rm .btn { color: var(--ink-2); }
.prof-pic-btn:has(.vh:focus-visible), .prof-av-edit:has(.vh:focus-visible) { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
.prof-fields { display: grid; gap: 14px; padding: 18px 22px 0; }
.prof-fields label { display: grid; gap: 6px; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.prof-fields input { width: 100%; padding: 10px 13px; border: 1px solid transparent; border-radius: var(--radius-ctl); background: var(--fill-2); color: var(--ink); font: inherit; font-size: 1rem; font-weight: 500; box-shadow: inset 0 0 0 1px var(--hair); }
.prof-fields input:focus { outline: none; background: #FFFFFF; box-shadow: 0 0 0 3px rgba(184, 149, 90, .28); border-color: var(--accent-ring); }
.prof-fields textarea { min-height: 110px; font-weight: 500; color: var(--ink); }

/* ---------- no internet: a small strip over everything ---------- */
.net-strip {
  position: fixed; inset: calc(env(safe-area-inset-top) + 10px) auto auto 50%; transform: translateX(-50%); margin: 0; border: 0; z-index: 60;
  padding: 8px 16px; border-radius: 999px; background: var(--amber); color: var(--on-light); font-weight: 600; font-size: .85rem;
  box-shadow: 0 10px 26px rgba(16, 36, 30, .2); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Search ---------- */
.search-sheet { margin: 64px auto auto; width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 128px); border-radius: 24px; }
.srch { display: flex; flex-direction: column; min-height: 100%; }
.srch-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; background: var(--deep); border-bottom: 1px solid var(--hair); }
.srch-top .btn.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.srch-field { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 999px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.srch-field:focus-within { box-shadow: 0 0 0 3px var(--accent-ring); }
.srch-field svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.srch-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 500 1rem var(--font); outline: none; }
.srch-field input::-webkit-search-cancel-button { filter: invert(.7); }
.srch-body { padding: 4px 8px 20px; }
.srch-h { display: flex; align-items: center; justify-content: space-between; margin: 16px 10px 6px; color: var(--ink-3); font-size: .84rem; font-weight: 600; }
.srch-h p { margin: 0; }
.srch-clear { border: 0; background: none; color: var(--accent); font: 600 .84rem var(--font); cursor: pointer; }
.srch-list { display: grid; gap: 2px; }
.srch-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.srch-row:hover, .srch-row:focus-visible { background: var(--fill); outline: none; }
.srch-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--fill-2); color: var(--accent); }
.srch-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.srch-av { width: 38px; height: 38px; font-size: 1rem; }
.srch-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.srch-txt b { font-size: .97rem; font-weight: 650; line-height: 1.35; }
.srch-txt small { color: var(--ink-3); font-size: .8rem; }
.srch-snip { color: var(--ink-2); font-size: .86rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srch-row mark { background: rgba(184, 149, 90, .3); color: inherit; border-radius: 3px; padding: 0 1px; }
.srch-snip mark { background: none; padding: 0; color: var(--ink); font-weight: 650; }
.srch-empty p { margin: 8px 10px; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }

/* ---------- every page comes in from the right ----------
   On a computer a window glides in a little from the right. On a phone every window is a full page (app.js opens
   it as a page, not a screen-locking window) that slides in from the right and stops above the bottom bar, which
   stays on top of every page. */
:root { --tbh: calc(58px + env(safe-area-inset-bottom)); }
@media (min-width: 761px) {
  dialog:not(.team-viewer)[open] { animation: page-in-soft .24s var(--ease); }
}
@keyframes page-in-soft { from { transform: translateX(32px); opacity: 0; } }
@media (max-width: 760px) {
  dialog:not(.team-viewer) {
    position: fixed; inset: 0 auto auto 0; z-index: 100; overscroll-behavior: contain; margin: 0 !important; width: 100vw !important; max-width: none !important;
    height: calc(100dvh - var(--tbh)) !important; max-height: none !important; border-radius: 0 !important; box-shadow: none !important;
  }
  dialog.dlg, dialog.chat-dlg, dialog.pane-sheet { padding-top: env(safe-area-inset-top); }
  dialog:not(.team-viewer)[open] { animation: page-in .3s cubic-bezier(.2, .8, .2, 1); }
  dialog:not(.team-viewer)::backdrop { background: rgba(16, 36, 30, .18); }
  /* the post drawer also stops above the bar */
  .drawer { bottom: var(--tbh); border-radius: 0; }
}
@keyframes page-in { from { left: 100vw; } }
/* the menu button sits on the left, so the menu comes in from the left */
@media (min-width: 761px) { dialog.menu-sheet[open] { animation-name: menu-in-soft; } }
@media (max-width: 760px) { dialog.menu-sheet[open] { animation-name: menu-in; } }
@keyframes menu-in-soft { from { transform: translateX(-32px); opacity: 0; } }
@keyframes menu-in { from { left: -100vw; } }
@media (prefers-reduced-motion: reduce) {
  dialog[open] { animation: none !important; }
}

/* ---------- the main pages: Chat, Future Plan, Facebook, LinkedIn, Pages, AI team, Today's content, New content ----------
   Each is a page of its own under the top bar (and above the bottom bar on a phone), never a window over another
   page: opening one closes the one before (app.js). Its writing keeps a readable width on a wide screen. */
:root { --hdr: 64px; }
html dialog.as-page {
  position: fixed; inset: var(--hdr) auto auto 0; z-index: 50; margin: 0 !important; padding: 0;
  width: 100vw !important; max-width: none !important; height: calc(100dvh - var(--hdr)) !important; max-height: none !important;
  border: 0; border-radius: 0 !important; box-shadow: none !important; background: var(--bg); overflow: auto; overscroll-behavior: contain;
}
html dialog.as-page.chat-dlg { overflow: hidden; background: var(--deep); }
html dialog.as-page > .dlg-inner { max-width: 980px; margin: 0 auto; padding-bottom: 56px; }
.tool[aria-current="page"], .make .btn[aria-current="page"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 36, 30, .12), inset 0 0 0 1px var(--hair); }
@media (max-width: 760px) {
  html dialog.as-page { height: calc(100dvh - var(--hdr) - var(--tbh)) !important; }
  html dialog.as-page > .dlg-inner { padding: 20px 16px 32px; }
}

/* ---------- the bottom bar: only on a phone ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .bar { flex-wrap: nowrap; gap: 8px; }
  /* on a phone the top bar is only ☰, ADMAE, Chat and Search; the rest is in the menu and the bottom bar */
  .bar .modes, .bar .tools, .bar .make, .bar .me { display: none; }
  #topChat { display: grid; }
  .job-chip { flex: 0 1 auto; min-width: 0; max-width: 38vw; padding: 7px 11px; font-size: .78rem; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: var(--tbh);
    padding: 0 max(2px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(2px, env(safe-area-inset-right));
    background: var(--surface); box-shadow: 0 -6px 20px rgba(16, 36, 30, .04);
    border-top: 1px solid var(--hair);
  }
  .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 58px; padding: 0;
    border: 0; background: transparent; color: var(--ink-3); font: 600 .66rem/1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s var(--ease); }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar button:active svg { transform: scale(.88); }
  .tabbar button.on { color: var(--ink); }
  .tabbar button.on svg { fill: currentColor; }
  .tabbar button:is([data-tab="activity"], [data-tab="new"]).on svg { fill: none; stroke-width: 2.4; }
  .tabbar button.on::before { content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold) 22%, var(--gold) 78%, transparent); }
  .tabbar .tab-av { display: block; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; font-size: .82rem; box-shadow: 0 0 0 1.5px var(--line); }
  .tabbar button.on .tab-av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--gold); }
  .tabbar .tab-av.pp-i { display: grid; }
  .tabbar button:active .tab-av { transform: scale(.88); }
  .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* the sheets fill the phone, like Facebook's menu */
  .menu-sheet, .profile-sheet, .search-sheet { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .prof-head { padding: 0 16px; margin-top: -52px; }
  .prof-av { width: 112px; height: 112px; }
  .prof-actions, .prof-fields { padding-left: 16px; padding-right: 16px; }
  .prof-sec { margin-left: 16px; margin-right: 16px; }
  .prof-facts span { width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .tabbar svg { transition: none; }
}

/* ---------- the Content Engine's Topic Directive in the post panel ---------- */
.directive { display: grid; gap: 8px; margin: 0; }
.directive div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.directive dt { color: var(--ink-3); font-size: .86rem; font-weight: 600; }
.directive dd { margin: 0; line-height: 1.5; }
.hook-opts li { padding-left: 14px; box-shadow: inset 2px 0 0 var(--accent-ring); }
@media (max-width: 760px) { .directive div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- the Reel video: which engine made it ---------- */
.engine-line { margin: 8px 0 0; font-size: .86rem; color: var(--ink-2); }
.engine-line.hf { color: var(--accent); font-weight: 600; }
.engine-line.hf::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent-ring); vertical-align: middle; }

/* ---------- Create post (like Meta Business Suite): the form on the left, the Facebook preview on the right ---------- */
.cp { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: 32px; align-items: start; }
.cp-form { display: grid; gap: 16px; min-width: 0; }
.cp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cp-head h2 { margin: 0; }
.cp-card { margin: 0; padding: 18px 20px 20px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--hair); min-width: 0; }
.cp-card > legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-weight: 700; font-size: 1.05rem; }
.cp-card > legend + * { clear: both; }
.cp-card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.cp-sub { display: block; margin: 0 0 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
/* Post to: one Page, from a dropdown */
.cp-select { position: relative; }
.cp-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.cp-pick:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.cp-pick.open { box-shadow: inset 0 0 0 1.5px var(--accent-ring); }
.cp-caret { flex: none; width: 22px; height: 22px; margin-left: auto; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.cp-pick.open .cp-caret { transform: rotate(180deg); }
.cp-options { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 2px; max-height: 340px; overflow: auto; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--hair); }
.cp-option { display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cp-option:hover, .cp-option:focus-visible { background: var(--fill-2); outline: none; }
.cp-option.on { background: var(--accent-soft); }
.cp-tick { flex: none; width: 20px; height: 20px; margin-left: auto; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cp-radio input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
/* the logo as it is: never on a box or a background (Rubel's rule) */
.cp-mark { flex: none; width: 72px; height: 26px; display: grid; place-items: center; }
.cp-mark img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cp-pname { display: grid; line-height: 1.3; min-width: 0; }
.cp-pname small { color: var(--ink-3); font-size: .8rem; }
.cp-ig { margin: 10px 0 0; font-size: .82rem; }
/* a Reel with ADMAE's AI voice: Meta's AI label is added in Facebook's own apps */
.cp-ai { display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-ctl); background: var(--amber-soft); color: var(--ink); font-size: .86rem; line-height: 1.5; }
.cp-ai > svg { width: 20px; height: 20px; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; margin-top: 1px; }
.cp-ai .row-btns { grid-column: 2; margin-top: 6px; }
.voice-line { margin: 6px 0 0; font-size: .86rem; color: var(--ink-2); }
.voice-line.off { color: var(--amber); }
.cp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 12px; }
.cp-tile { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill-2); }
.cp-tile img, .cp-tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-tile.up { display: grid; place-items: center; align-content: center; gap: 4px; padding: 6px; text-align: center; }
.cp-pct { font-weight: 800; font-size: 1.1rem; color: var(--accent); }
.cp-tile.up figcaption { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--ink-3); }
.cp-rm { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(10, 18, 15, .62); color: #fff; cursor: pointer; }
.cp-rm svg, .cp-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cp-add { cursor: pointer; }
.cp-add:has(.vh:focus-visible) { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.cp-text { width: 100%; min-height: 150px; resize: vertical; font: inherit; line-height: 1.55; }
.cp-count { min-height: 1em; margin: 6px 0 0; font-size: .8rem; text-align: right; }
.cp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; }
.cp-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cp-switch i { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(16, 36, 30, .2); transition: background .2s var(--ease); }
.cp-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(16, 36, 30, .25); transition: transform .2s var(--ease); }
.cp-switch input:checked + i { background: var(--accent); }
.cp-switch input:checked + i::after { transform: translateX(18px); }
.cp-switch input:focus-visible + i { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.cp-when { margin-top: 14px; }
.cp-when .field, .cp-restrict select { max-width: 280px; }
.cp-radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; }
.cp-radio.on { background: var(--accent-soft); }
.cp-radio input { margin-top: 3px; }
.cp-radio span { display: grid; gap: 2px; }
.cp-radio small { color: var(--ink-2); font-size: .84rem; }
.cp-restrict { display: grid; gap: 8px; margin: 8px 0 0 44px; }
.cp-countries { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cp-countries .chip.on { background: var(--accent); color: var(--on-light); }
.cp-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 0 6px; background: linear-gradient(rgba(255, 255, 255, 0), var(--deep) 32%); }
.cp-issue { margin: 0 auto 0 0; font-size: .84rem; }
.cp-draft-list { display: grid; gap: 6px; }
.cp-draft { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--fill-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cp-draft:hover { background: #ECEBE6; }
.cp-draft small { color: var(--ink-3); font-size: .8rem; }
.cp-draft-row { display: flex; align-items: stretch; gap: 6px; }
.cp-draft-row .cp-draft { flex: 1; min-width: 0; }
.cp-draft-del { flex: none; width: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--fill-2); color: var(--ink-2); cursor: pointer; }
.cp-draft-del svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cp-draft-del:hover, .cp-draft-del:focus-visible { background: var(--red-soft); color: var(--red); }
.cp-progress { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; margin: 10px 0 8px; }
.cp-progress i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s var(--ease); }
.cp-add-row { margin: 0; flex-wrap: wrap; }
.cp-lib { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--fill-2); display: grid; gap: 10px; }
.cp-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 420px; overflow: auto; }
.cp-lib-item { display: grid; gap: 6px; padding: 6px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.cp-lib-item:hover, .cp-lib-item:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.cp-lib-item:disabled { opacity: .5; cursor: progress; }
.cp-lib-thumb { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--fill); }
.cp-lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-lib-play { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(16, 36, 30, .72); color: #fff; }
.cp-lib-play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.cp-lib-text { display: grid; gap: 2px; min-width: 0; }
.cp-lib-text b { font-size: .86rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cp-lib-text small { font-size: .74rem; color: var(--ink-3); }
.cp-result li { margin: 0 0 6px; }
.cp-result li.bad { color: var(--red); }
.cp-result li.ok b { color: var(--green); }
.cp-busy { margin: 0; font-weight: 600; color: var(--accent); }
.cp-preview { position: sticky; top: 8px; min-width: 0; }
/* the Facebook card, drawn the way Facebook shows a post */
.fbp { overflow: hidden; border-radius: 14px; background: #FFFFFF; color: #1C1E21; box-shadow: var(--shadow-2), 0 0 0 1px var(--hair); font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.fbp header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.fbp-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); color: var(--accent); font-weight: 700; }
.fbp-av img { width: 34px; height: 34px; object-fit: contain; }
.fbp header b { display: block; font-size: .95rem; }
.fbp header small { display: inline-flex; align-items: center; gap: 4px; color: #65676B; font-size: .8rem; }
.fbp-ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.fbp-text { margin: 0; padding: 0 14px 12px; white-space: pre-wrap; word-break: break-word; font-size: .95rem; line-height: 1.4; }
.fbp-empty { color: #8A8D91; }
.fbp-more { color: #65676B; font-weight: 600; }
.fbp-media { background: #F0F2F5; }
.fbp-media > video { display: block; width: 100%; max-height: 560px; object-fit: contain; background: #000000; }
.cp-ph { display: grid; place-items: center; aspect-ratio: 4 / 3; color: #BCC0C4; }
.cp-ph svg { width: 120px; height: 120px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.cp-grid { display: grid; gap: 2px; }
.cp-grid span { position: relative; display: block; overflow: hidden; background: #E4E6EB; aspect-ratio: 1; }
.cp-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-grid.n1 span { aspect-ratio: auto; }
.cp-grid.n1 img { height: auto; max-height: 560px; object-fit: contain; }
.cp-grid.n2, .cp-grid.n3, .cp-grid.n4 { grid-template-columns: 1fr 1fr; }
.cp-grid.n3 span:first-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.cp-grid.n5 { grid-template-columns: repeat(6, 1fr); }
.cp-grid.n5 span:nth-child(-n+2) { grid-column: span 3; }
.cp-grid.n5 span:nth-child(n+3) { grid-column: span 2; }
.cp-grid b { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #FFFFFF; font-size: 2rem; }
.fbp footer { display: flex; justify-content: space-around; padding: 8px 10px; border-top: 1px solid #E4E6EB; color: #65676B; font-size: .9rem; font-weight: 600; }
.fbp footer span { display: inline-flex; align-items: center; gap: 6px; }
.fbp footer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
@media (max-width: 960px) {
  .cp { grid-template-columns: 1fr; }
  .cp-preview { position: static; }
}
@media (max-width: 760px) {
  .cp-restrict { margin-left: 0; }
  .cp-card { padding: 16px; }
}

/* ---------- Create post: the Post details tools (as in Meta Business Suite) ---------- */
.cp-textwrap { position: relative; }
.cp-textwrap .cp-text { padding-bottom: 46px; }
.cp-corner { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 2px; }
.cp-mini { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.cp-mini:hover { background: var(--fill); color: var(--ink); }
.cp-mini svg, .cp-tool svg, .cp-panel-h svg, .cp-chip svg, .cp-chosen svg, .cp-more-item svg, .fbp-cta-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cp-emoji { position: absolute; right: 8px; bottom: 48px; z-index: 6; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--hair); }
.cp-emoji[hidden] { display: none; }
.cp-emoji button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; font-size: 1.2rem; cursor: pointer; }
.cp-emoji button:hover { background: var(--fill-2); }
.cp-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.cp-tool { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--accent); cursor: pointer; }
.cp-tool:hover, .cp-tool.open { background: var(--accent-soft); }
.cp-tool.on::after { content: ''; position: absolute; right: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ring); box-shadow: 0 0 0 2px var(--surface); }
.cp-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 7; display: none; width: 280px; padding: 14px 16px; border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: .86rem; font-weight: 400; line-height: 1.45; text-align: left; transform: translateX(-50%); box-shadow: var(--shadow-2), 0 0 0 1px var(--hair); pointer-events: none; }
.cp-tip b { display: block; margin-bottom: 4px; color: var(--ink); font-size: .98rem; }
.cp-tip small { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink); font-size: .84rem; }
.cp-tip .cp-fb { width: 18px; height: 18px; stroke: none; }
.fb-c { fill: #1877F2; stroke: none; }
.fb-f { fill: #FFFFFF; stroke: none; }
@media (hover: hover) {
  .cp-tool:hover .cp-tip { display: block; }
}
.cp-tool:focus-visible .cp-tip { display: block; }
.cp-tool:first-child .cp-tip { left: 0; transform: none; }
.cp-panel { display: grid; gap: 10px; margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.cp-panel p { margin: 0; line-height: 1.5; }
.cp-panel .btn { justify-self: start; }
.cp-panel-h { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.cp-panel-h b { color: var(--ink); }
.cp-close { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.cp-close:hover { background: var(--fill); }
.cp-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cp-inline .field { flex: 1 1 200px; min-width: 0; }
.cp-chosen { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.cp-chosen span { color: var(--ink); }
.cp-more { display: grid; gap: 4px; }
.cp-more-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 10px; background: var(--surface); color: var(--accent); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--hair); }
.cp-more-item:hover { background: var(--accent-soft); }
.cp-more-item span { display: grid; gap: 2px; color: var(--ink); }
.cp-more-item small { color: var(--ink-2); font-size: .82rem; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .86rem; font-weight: 600; }
.cp-chip span { color: var(--ink); }
.cp-chip button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.cp-chip button:hover { background: var(--surface); }
.cp-chip button svg { width: 14px; height: 14px; }
/* the preview: "is at", the link card, the button strip */
.fbp-who { display: block; font-size: .95rem; }
.fbp-who b { font-weight: 700; }
.fbp-link { display: block; color: inherit; text-decoration: none; background: #F0F2F5; }
.fbp-link img { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; }
.fbp-link span { display: grid; gap: 2px; padding: 10px 14px; }
.fbp-link small { color: #65676B; font-size: .74rem; letter-spacing: .02em; }
.fbp-link b { font-size: .98rem; line-height: 1.3; }
.fbp-link em { color: #65676B; font-size: .86rem; font-style: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.fbp-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #F0F2F5; border-top: 1px solid #E4E6EB; }
.fbp-cta > span:first-child { color: #65676B; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbp-cta-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px; background: #E4E6EB; color: #1C1E21; font-size: .88rem; font-weight: 600; }
.fbp-cta-btn svg { width: 16px; height: 16px; }

/* ---------- Pages: the signature tone ---------- */
.tone-field { display: grid; gap: 10px; }
/* a page's Reel pattern: three moments side by side */
.pattern-field { display: grid; gap: 10px; }
.pattern-preview { display: block; width: 100%; max-width: 552px; aspect-ratio: 1104 / 640; border-radius: 12px; background: var(--line, rgba(16, 36, 30, 0.06)); object-fit: cover; }
.tone-now { margin: 0; }
.tone-play { width: 100%; max-width: 420px; height: 40px; }

/* ---------- chat like WhatsApp and Messenger: typing, reactions, replies, sounds (chatfx.js) ---------- */
.chat-head-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.fx-bell svg, .fx-act svg, .fx-pick-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fx-bell[aria-pressed="false"] { color: var(--ink-3); }

/* the typing bubble: three dots that rise in turn */
.fx-typing-bubble { padding: 12px 16px !important; }
.fx-typing { display: inline-flex; align-items: center; }
.fx-dots { display: inline-flex; gap: 5px; align-items: center; height: 14px; }
.fx-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); animation: fxdot 1.25s infinite ease-in-out; }
.fx-dots i:nth-child(2) { animation-delay: .16s; }
.fx-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes fxdot { 0%, 70%, 100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-5px); opacity: 1; } }
.fx-typing-row, .msg.admae.live { animation: fxIn .25s var(--ease); }
@keyframes fxIn { from { opacity: 0; transform: translateY(6px); } }
.team-typing-now { color: var(--accent) !important; font-weight: 600; }

/* a message: its bubble with the reactions under it, and React and Reply beside it */
.team-stack, .fx-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.team-msg.mine .team-stack, .msg.me .fx-stack { align-items: flex-end; }
/* (the account button's .me style must not reach your own chat messages) */
.msg.me, .msg.me:hover { flex-direction: row-reverse; padding: 0; border-radius: 0; box-shadow: none; background: transparent; color: inherit; font-weight: inherit; font-size: inherit; cursor: auto; display: flex; gap: 10px; }
.fx-acts { display: flex; gap: 2px; align-self: center; flex: none; opacity: 0; transition: opacity .15s; }
.fx-act { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--ink-2); background: transparent; border: 0; cursor: pointer; }
.fx-act:hover { background: var(--fill); color: var(--ink); }
[data-fx-key]:hover > .fx-acts, [data-fx-key]:focus-within > .fx-acts { opacity: 1; }
@media (hover: none) {
  .fx-acts { display: none; }
  [data-fx-bubble] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}
.fx-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -10px; padding: 0 10px; position: relative; z-index: 1; }
.fx-chip { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); font: inherit; font-size: .9rem; line-height: 1; color: var(--ink); cursor: pointer; animation: fxPop .2s var(--ease); }
.fx-chip b { font-size: .74rem; color: var(--ink-2); font-weight: 700; margin: 0; }
.fx-chip.on { border-color: var(--accent); background: #EEF4F1; }
.fx-chip:hover { transform: scale(1.06); }
.fx-quote { display: block; width: 100%; text-align: left; margin: 2px 0 6px; padding: 6px 10px; border: 0; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--fill); color: inherit; font: inherit; cursor: pointer; }
.fx-quote b { display: block; font-size: .76rem; color: var(--accent); font-weight: 700; margin: 0 0 1px; }
.fx-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; line-height: 1.35; color: var(--ink-2); }
.msg.me .fx-quote { background: rgba(255, 255, 255, .16); border-left-color: var(--on-light); }
.msg.me .fx-quote b, .msg.me .fx-quote span { color: var(--on-light); }
[data-fx-key].fx-flash [data-fx-bubble] { animation: fxFlash 1.6s var(--ease); }
@keyframes fxFlash { 0%, 35% { box-shadow: 0 0 0 3px var(--accent-ring); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* replying to a message: what you answer, above the box */
#teamReplyBar, #chatReplyBar { padding: 8px 18px 0; }
.fx-replybar { display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 12px; border-radius: 12px; background: var(--fill-2); border-left: 3px solid var(--accent); }
.fx-replybar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fx-replybar-text b { font-size: .78rem; color: var(--accent); }
.fx-replybar-text span { font-size: .87rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the reaction bar: six reactions, Reply and Copy */
.fx-picker { position: absolute; z-index: 60; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-3); animation: fxPop .16s var(--ease); }
@keyframes fxPop { from { opacity: 0; transform: scale(.9) translateY(6px); } }
.fx-emojis { display: flex; gap: 2px; }
.fx-emoji { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 1.55rem; line-height: 1; cursor: pointer; transition: transform .12s var(--ease), background .12s; }
.fx-emoji:hover, .fx-emoji:focus-visible { transform: scale(1.22); background: var(--fill); }
.fx-emoji.on { background: #EEF4F1; box-shadow: inset 0 0 0 2px var(--accent); }
.fx-more { display: flex; gap: 4px; border-top: 1px solid var(--hair); padding-top: 6px; }
.fx-pick-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; }
.fx-pick-btn:hover, .fx-pick-btn:focus-visible { background: var(--fill); }

/* ADMAE's quick first reply and its progress notes while it works */
.msg.admae.progress .bubble { background: var(--fill-2); box-shadow: none; color: var(--ink-2); font-size: .92rem; padding: 7px 13px; }
.msg.admae.ack .bubble { padding: 8px 14px; }

/* a new message somewhere else: the Chat button nudges */
#chatBtn.nudge, #topChat.nudge { animation: fxNudge .7s var(--ease); }
@keyframes fxNudge { 0%, 100% { transform: none; } 20% { transform: rotate(-12deg) scale(1.08); } 40% { transform: rotate(10deg) scale(1.08); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }

@media (prefers-reduced-motion: reduce) {
  .fx-dots i { animation: none; opacity: .7; }
  .fx-typing-row, .msg.admae.live, .fx-picker, .fx-chip, #chatBtn.nudge, #topChat.nudge, [data-fx-key].fx-flash [data-fx-bubble] { animation: none; }
  [data-fx-key].fx-flash [data-fx-bubble] { box-shadow: 0 0 0 3px var(--accent-ring); }
}

/* ---------- the access list: what a team member may do (Account, owner only) ---------- */
.access-details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.access-box { display: grid; gap: 10px; margin-top: 8px; }
.access-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.access-group { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.access-group legend { padding: 0; margin-bottom: 4px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.access-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--fill-2); cursor: pointer; }
.access-item input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.access-item span { display: grid; gap: 1px; }
.access-item b { font-size: .92rem; }
.access-item small { color: var(--ink-3); font-size: .8rem; }
.member-access { font-size: .82rem; }

/* ---------- Top posts beside the Feed, like Facebook's Friends box (feed.js) ---------- */
@media (min-width: 1120px) {
  .feed.with-top { max-width: 1012px; display: grid; grid-template-columns: 348px minmax(0, 640px); column-gap: 24px; align-items: start; }
  .feed.with-top .tp-box { position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow: auto; margin-bottom: 0; }
}
.tp-box { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-1), 0 0 0 1px var(--hair); padding: 16px 16px 12px; margin-bottom: 14px; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-head h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.tp-days select { font: inherit; font-size: .84rem; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); }
.tp-tabs { display: flex; gap: 6px; margin: 10px 0 12px; }
.tp-tab { flex: 1; padding: 7px 10px; border-radius: 999px; border: 0; background: var(--fill-2); font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tp-tab[aria-selected="true"] { background: var(--accent); color: var(--on-light); }
.tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.tp-tile { display: grid; gap: 3px; align-content: start; padding: 0; border: 0; background: transparent; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-width: 0; }
.tp-pic { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--pc); }
.tp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-textpic { position: absolute; inset: 0; padding: 8px; display: flex; align-items: center; color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.25; overflow: hidden; background: var(--pc); }
.tp-play { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.tp-play svg { width: 11px; height: 11px; fill: currentColor; }
.tp-metric { font-size: .76rem; font-weight: 700; color: var(--accent); }
.tp-cap { font-size: .8rem; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tp-tile small { font-size: .7rem; color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tp-tile:hover .tp-pic, .tp-tile:focus-visible .tp-pic { box-shadow: 0 0 0 3px var(--accent-ring); }
.tp-skel { aspect-ratio: 1; border-radius: 10px; background: var(--fill-2); animation: f-pulse 1.4s infinite; }
.tp-note { margin: 4px 0; }
.tp-foot { margin: 10px 0 0; font-size: .74rem; color: var(--ink-3); }
@media (max-width: 1119px) {
  .tp-grid { grid-auto-flow: column; grid-auto-columns: 120px; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
  .tp-tile { scroll-snap-align: start; }
}
/* the insight card of a top post */
.tp-dlg .dlg-inner { max-width: 640px; }
.tp-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; margin: 8px 0 12px; }
.tp-pic.big { aspect-ratio: 4 / 5; }
.tp-why { margin: 0 0 10px; font-weight: 600; line-height: 1.45; }
.tp-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tp-nums span { display: grid; padding: 8px; border-radius: 10px; background: var(--fill-2); }
.tp-nums b { font-size: 1.1rem; }
.tp-nums small { font-size: .74rem; color: var(--ink-3); }
.tp-text summary { cursor: pointer; font-weight: 600; }
.tp-text p { white-space: pre-wrap; margin: 6px 0 0; font-size: .92rem; max-height: 220px; overflow: auto; }
.tp-h { font-size: .95rem; margin: 14px 0 6px; }
.tp-asks { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }
.tp-asks small { color: var(--ink-3); }
.tp-results { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.tp-res { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--fill-2); }
@media (max-width: 560px) { .tp-card { grid-template-columns: 1fr; } .tp-pic.big { max-width: 220px; } }
@media (prefers-reduced-motion: reduce) { .tp-skel { animation: none; } }

/* ---------- Storage (owner): delete content by date ---------- */
.st-total { margin: 0; font-size: 1.02rem; color: var(--ink-2); }
.st-total b { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em; margin-right: 4px; }
.st-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.st-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); max-height: min(52vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.st-list li { border-bottom: 1px solid var(--hair); }
.st-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 4px 14px; padding: 12px 10px; cursor: pointer; border-radius: 10px; }
.st-row:hover { background: var(--fill-2); }
.st-row.on { background: var(--red-soft); }
.st-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.st-what { display: flex; flex-direction: column; min-width: 0; }
.st-what b { font-weight: 600; }
.st-what small { color: var(--ink-3); font-size: .84rem; }
.st-today { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .74rem; font-weight: 600; vertical-align: 2px; }
.st-size { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.st-bar { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: var(--hair); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--gold); border-radius: 2px; }
.st-row.on .st-bar i { background: var(--red); }
.st-confirm { padding: 14px 16px; border-radius: var(--radius-ctl); background: var(--red-soft); border: 1px solid rgba(163, 48, 43, .22); }
.st-confirm p { margin: 0 0 8px; }
.st-confirm b { color: var(--red); }

/* ---------- the colour wheel (colorwheel.js): quick colours, a wheel, brightness and the colour code ---------- */
.cw { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.cw legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.cw-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cw-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-sw { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer; font: inherit; font-size: .84rem; color: var(--ink-2); }
.cw-sw > span { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(16, 36, 30, .16); }
.cw-sw[aria-pressed="true"] > span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.cw-sw.cw-auto { padding-right: 12px; background: var(--fill-2); }
.cw-sw.cw-auto > span { width: 26px; height: 26px; margin-left: 4px; }
.cw-rainbow { display: block; background: conic-gradient(#FF3B30, #FF9500, #FFCC00, #34C759, #00C7BE, #0A84FF, #5E5CE6, #FF2D55, #FF3B30) !important; }
.cw-more[aria-expanded="true"] > span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.cw-code { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; border-radius: var(--radius-ctl); background: var(--fill-2); border: 1px solid var(--line); }
.cw-chip { width: 22px; height: 22px; border-radius: 6px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(16, 36, 30, .16); }
.cw-code input { width: 6.5em; border: 0; background: none; font: inherit; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); padding: 4px 0; }
.cw-code input:focus { outline: none; }
.cw-code:focus-within { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.cw-code input[aria-invalid="true"] { color: var(--red); }
.cw-panel { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 14px; border-radius: var(--radius-slip); background: var(--fill-2); width: max-content; max-width: 100%; }
.cw-wheel { display: block; border-radius: 50%; cursor: crosshair; touch-action: none; }
.cw-wheel:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
.cw-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); pointer-events: none; transform: translate(14px, 14px); }
.cw-bright { display: grid; gap: 6px; font-size: .86rem; color: var(--ink-2); min-width: 180px; }
.cw-bright input { width: 100%; accent-color: var(--accent); }
.cw-hint { margin: 0; }
.cw-warn { margin: 0; color: var(--amber); font-size: .86rem; }

/* ---------- the Reel style picker (reelstyle.js): named styles, fine-tuning, live preview ---------- */
.rs { display: grid; gap: 12px; min-width: 0; }
.rs-title { margin: 0; font-weight: 600; }
.rs-preview { position: relative; border-radius: 16px; overflow: hidden; background: var(--fill-2); aspect-ratio: 1104 / 640; max-width: 560px; }
.rs-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s var(--ease); }
.rs-preview[data-busy] img { opacity: .55; }
.rs-preview[data-failed] img { visibility: hidden; }
.rs-label { margin: 0; color: var(--ink-2); font-size: .9rem; }
.rs-check { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .88rem; }
.rs-check:empty { display: none; }
.rs-check.good { color: var(--green); }
.rs-check.warn { color: var(--amber); }
.rs-check.bad { color: var(--red); font-weight: 600; }
.rs-pair i { display: grid; place-items: center; width: 34px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(16, 36, 30, .14); font-style: normal; }
.rs-pair b { font-size: .86rem; font-weight: 700; }
.rs-h { margin: 4px 0 0; font-weight: 600; }
.rs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 10px; }
.rs-card { display: grid; gap: 4px; justify-items: start; padding: 6px; border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.rs-card:hover { background: var(--fill-2); }
.rs-card[aria-checked="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.rs-thumb { display: block; width: 90px; height: 160px; border-radius: 9px; background-color: var(--fill-2); background-repeat: no-repeat; box-shadow: 0 1px 2px rgba(16, 36, 30, .08), 0 6px 14px rgba(16, 36, 30, .08); }
.rs-card b { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.rs-card small { font-size: .74rem; color: var(--ink-3); line-height: 1.3; }
.rs-card small.mine { color: var(--accent); font-weight: 600; }
.rs-tune { border-top: 1px solid var(--hair); padding-top: 10px; }
.rs-tune summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.rs-tune-grid { display: grid; gap: 16px; margin-top: 14px; }
.rs-row { display: grid; gap: 6px; }
.rs-lbl { font-weight: 600; font-size: .9rem; }
.rs-seg { flex-wrap: wrap; width: max-content; max-width: 100%; }
@media (max-width: 560px) { .rs-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 4px; } }
@media (prefers-reduced-motion: reduce) { .rs-preview img { transition: none; } }
/* the colour code and the style picker's rows inside a form: not the stacked form label */
.stack .cw label.cw-code, .field-grid .cw label.cw-code, .cw label.cw-code { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; }
.cw .cw-code input[type="text"] { width: 7.2em; min-height: 0; padding: 6px 2px; border: 0; border-radius: 0; background: none; box-shadow: none; text-transform: uppercase; }
.cw .cw-code input::placeholder { text-transform: none; color: var(--ink-3); }
.stack .rs label.rs-row { display: grid; gap: 6px; }
.rs-row select.field { max-width: 440px; }

/* ---------- New content: Look and sound (newlook.js) ---------- */
.nlook { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.nlook h3 { margin: 0; font-family: var(--display); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.nl-group { display: grid; gap: 10px; min-width: 0; }
.nl-h { margin: 0; font-weight: 600; color: var(--ink); }
.nl-colours { display: grid; gap: 16px; }
.nl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.nl-card { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-radius: var(--radius-ctl); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); }
.nl-card.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.stack .nl-card label, .nl-card label { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; color: var(--ink); font-size: inherit; font-weight: inherit; }
.nl-card input[type="radio"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.nl-card span { display: grid; gap: 2px; min-width: 0; }
.nl-card b { font-weight: 600; }
.nl-card small { color: var(--ink-3); font-size: .8rem; line-height: 1.3; }
.nl-play { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; color: var(--accent); }
.nl-play svg { width: 16px; height: 16px; fill: currentColor; }
.nl-play[aria-pressed="true"] { background: var(--accent); color: var(--on-light); box-shadow: none; }
.nl-play:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

/* ---------- Create ads (ads.js): the form, the team at work, the ads as they will look in the feed ---------- */
.ad-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.ad-head h2 { margin: 0; }
.ad-seg { flex-wrap: wrap; width: max-content; max-width: 100%; }
.ad-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stack .ad-chip, .ad-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; color: var(--ink); font-size: .9rem; font-weight: 500; }
.ad-chip.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ad-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.ad-fb { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; max-height: 330px; overflow-y: auto; }
.stack .ad-fbcard, .ad-fbcard { display: grid; grid-template-columns: 18px 56px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-ctl); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; color: var(--ink); font-weight: 400; }
.ad-fbcard.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ad-fbcard img, .ad-nopic { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line); }
.ad-fbcard span { display: grid; gap: 2px; min-width: 0; }
.ad-fbcard b { font-weight: 600; font-size: .88rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ad-fbcard small { color: var(--accent); font-size: .78rem; font-weight: 600; }
.ad-team { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ad-team li { display: grid; grid-template-columns: 36px 160px 1fr; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-ctl); background: var(--fill-2); }
.ad-team .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--agent); color: #FFFFFF; font-size: .8rem; font-weight: 700; }
.ad-team li span:nth-child(2) { display: grid; }
.ad-team small { color: var(--ink-3); font-size: .78rem; }
.ad-now { color: var(--ink-2); font-size: .86rem; }
.ad-team li.working .ad-now { color: var(--agent); font-weight: 600; }
.ad-team li.done .ad-now { color: var(--green); }
.ad-team li.failed .ad-now { color: var(--red); }
.ad-team li.wait { opacity: .6; }
@media (max-width: 560px) { .ad-team li { grid-template-columns: 36px 1fr; } .ad-now { grid-column: 2; } }
.ad-summary { margin: 0; font-size: 1.02rem; line-height: 1.55; max-width: 70ch; }
.ad-facts { display: grid; gap: 8px; margin: 0; }
.ad-facts dt { font-weight: 600; font-size: .84rem; color: var(--ink-2); }
.ad-facts dd { margin: 2px 0 0; }
.ad-flags { padding: 12px 16px; border-radius: var(--radius-ctl); background: var(--amber-soft); }
.ad-flags b { color: var(--amber); }
.ad-flags ul { margin: 6px 0 0; padding-left: 20px; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.ad-card { display: grid; gap: 10px; min-width: 0; }
.ad-card header { display: flex; align-items: center; gap: 8px; }
.ad-id { font-size: 1.05rem; font-weight: 700; letter-spacing: .01em; }
.ad-tag { font-size: .8rem; color: var(--ink-2); }
.ad-angle { margin: 0; font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.ad-angle b { color: var(--ink); }
/* the feed card: how the ad will look */
.ad-mock { background: #FFFFFF; border-radius: 14px; box-shadow: var(--shadow-1), 0 0 0 1px var(--hair); overflow: hidden; color: #1C1E21; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hind Siliguri', sans-serif; }
.ad-who { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 12px 6px; }
.ad-who img, .ad-dot { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; background: #F0F2F5; flex: none; }
.ad-dot { background: var(--c); }
.ad-who span { display: grid; line-height: 1.2; }
.ad-who b { font-size: .9rem; }
.ad-who small { font-size: .76rem; color: #65676B; }
.ad-primary { margin: 0; padding: 0 12px 10px; font-size: .9rem; line-height: 1.4; white-space: pre-line; }
.ad-more { color: #65676B; font-weight: 600; }
.ad-media { background: #F0F2F5; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.ad-media.portrait { aspect-ratio: 4 / 5; }
.ad-media.tall { aspect-ratio: 9 / 16; max-height: 520px; }
.ad-media img, .ad-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-pic-wait { padding: 16px; color: #65676B; font-size: .84rem; text-align: center; }
.ad-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #F0F2F5; }
.ad-bar span:first-child { display: grid; min-width: 0; }
.ad-bar b { font-size: .9rem; line-height: 1.25; }
.ad-bar small { font-size: .78rem; color: #65676B; }
.ad-cta { flex: none; padding: 7px 12px; border-radius: 6px; background: #E4E6EB; font-size: .84rem; font-weight: 600; }
.ad-cards { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 12px; scroll-snap-type: x mandatory; }
.ad-cards figure { margin: 0; flex: 0 0 72%; scroll-snap-align: start; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px #E4E6EB; }
.ad-cards img, .ad-cards .ad-pic-wait { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #F0F2F5; }
.ad-cards figcaption { display: grid; padding: 8px 10px; background: #F0F2F5; }
.ad-cards figcaption b { font-size: .86rem; }
.ad-cards figcaption small { font-size: .76rem; color: #65676B; }
.ad-mock > .btn { margin: 0 12px 12px; }
.ad-google { padding: 14px 16px; }
.ad-gtop { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.ad-gfav { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #F1F3F4; }
.ad-gfav svg { width: 15px; height: 15px; fill: none; stroke: #5F6368; stroke-width: 1.6; }
.ad-gtop span:last-child { display: grid; line-height: 1.2; }
.ad-gtop b { font-size: .86rem; color: #202124; }
.ad-gtop small { font-size: .76rem; color: #202124; font-weight: 700; }
.ad-gtitle { margin: 0; font-size: 1.1rem; color: #1A0DAB; line-height: 1.3; }
.ad-gdesc { margin: 4px 0 8px; font-size: .86rem; color: #4D5156; line-height: 1.45; }
.ad-google details { font-size: .84rem; }
.ad-google summary { cursor: pointer; color: #1A0DAB; }
.ad-google ol { margin: 6px 0; padding-left: 20px; }
.ad-google li small { color: #70757A; margin-left: 4px; }
.ad-sec h3 { margin: 0 0 6px; }
.ad-sec ul, .ad-sec ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ad-sec summary { cursor: pointer; font-weight: 600; color: var(--accent); }

/* ---------- What ADMAE has learned (learning.js), in AI team ---------- */
.learn { display: grid; gap: 10px; }
.lr-lessons { max-height: 360px; overflow-y: auto; padding: 14px 16px; border-radius: var(--radius-slip); background: var(--fill-2); line-height: 1.5; }
.lr-lessons p { margin: 0 0 6px; }
.lr-lessons ul { margin: 0 0 10px; padding-left: 20px; }
.lr-h1 { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.lr-h2 { font-weight: 700; margin-top: 10px !important; }
.lr-h3 { font-weight: 600; color: var(--ink-2); }
.lr-sub { margin: 6px 0 0; font-weight: 600; }
.lr-prop { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-ctl); box-shadow: inset 0 0 0 1px var(--line); }
.lr-prop p, .lr-prop ul { margin: 0; }
.lr-prop pre { max-height: 260px; overflow: auto; white-space: pre-wrap; font-size: .8rem; background: var(--fill-2); padding: 10px; border-radius: 8px; }
.lr-skills { margin: 0; padding-left: 20px; }

/* ---------- Create ads, guided (20 October 2026): numbered steps, purposes, competitor report, keywords ---------- */
.ad-form { gap: 18px; }
.ad-step { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--radius-slip); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.ad-step h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1rem; }
.ad-n { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-light); font-size: .82rem; font-weight: 700; }
.ad-purposes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.stack .ad-purpose, .ad-purpose { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: var(--radius-ctl); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; color: var(--ink); font-weight: 400; }
.ad-purpose.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.ad-purpose input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.ad-purpose span { display: grid; gap: 2px; }
.ad-purpose small { color: var(--ink-3); font-size: .8rem; line-height: 1.35; }
.ad-shots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-shots figure { position: relative; margin: 0; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.ad-shots img { width: 100%; height: 100%; object-fit: cover; }
.ad-shot-rm { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(16, 36, 30, .75); color: #FFFFFF; font-size: .7rem; cursor: pointer; }
.ad-more-opts summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.ad-for { margin: 0; color: var(--ink-2); }
.ad-comp summary { cursor: pointer; list-style: none; }
.ad-comp summary h3 { display: inline; }
.ad-gaps { padding: 12px 16px; border-radius: var(--radius-ctl); background: var(--green-soft); margin: 10px 0; }
.ad-gaps b { color: var(--green); }
.ad-gaps ul { margin: 6px 0 0; padding-left: 20px; }
.ad-comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ad-comp-card { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-ctl); box-shadow: inset 0 0 0 1px var(--line); font-size: .88rem; line-height: 1.45; align-content: start; }
.ad-comp-card p { margin: 0; }
.ad-comp-card small { display: inline-block; min-width: 4.8em; color: var(--ink-3); font-weight: 600; }
.ad-comp-card a { font-size: .82rem; }
.ad-red { color: var(--red); }
.ad-libs { display: flex; gap: 12px; }
.ad-kw-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.ad-kw-row p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ad-kw-chip { padding: 3px 10px; border-radius: 999px; background: var(--fill-2); font-size: .84rem; }
@media (max-width: 560px) { .ad-kw-row { grid-template-columns: 1fr auto; } .ad-kw-row p { grid-column: 1 / -1; } .ad-step { padding: 14px; } }
/* a long option (an earlier batch, a post title) never makes Create ads wider than a phone */
.ad-head > * { min-width: 0; }
.ad-past, .ad-past select, .ad-form select.field { max-width: 100%; }
.ad-past select { width: 100%; text-overflow: ellipsis; }
@media (max-width: 560px) { .ad-head { flex-direction: column; align-items: stretch; } .ad-purposes { grid-template-columns: minmax(0, 1fr); } }
/* each step is as wide as the window, never wider: its button rows wrap instead */
.ad-step { grid-template-columns: minmax(0, 1fr); }
.ad-step > * { min-width: 0; }
.ad-seg { width: auto; }
.ad-seg button { white-space: normal; }
.ad-form .field-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ---------- AI Studio (20 October 2026): voice-overs, pictures, cut-outs and moving clips (aistudio.js) ---------- */
.as-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.as-head h2 { margin: 0; }
.as-state { font-size: .85rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.as-state.ok { color: var(--green); background: var(--green-soft); }
.as-state.busy { color: var(--accent); background: var(--accent-soft); }
.as-state.wait { color: var(--amber); background: var(--amber-soft); }
.as-state.off { color: var(--ink-2); background: var(--fill-2); }
.as-tabs { display: flex; gap: 4px; padding: 4px; margin: 14px 0 4px; border-radius: 14px; background: var(--fill-2); overflow-x: auto; scrollbar-width: none; }
.as-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.as-tabs button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.as-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.as-pane { display: grid; gap: 18px; padding-top: 10px; }
.as-form { gap: 12px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.as-chips legend { width: 100%; margin-bottom: 6px; padding: 0; font-weight: 600; font-size: .92rem; }
.stack .as-chip, .as-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; color: var(--ink); font-size: .9rem; font-weight: 500; }
.as-chip small { color: var(--ink-3); font-size: .78rem; font-weight: 400; }
.as-chip.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.as-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.as-more summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.as-more[open] { display: grid; gap: 12px; }
.as-sliders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px 20px; margin-top: 10px; }
.stack .as-slider, .as-slider { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.as-slider input { width: 100%; accent-color: var(--accent); }
.as-slider small { display: flex; justify-content: space-between; color: var(--ink-3); font-weight: 400; font-size: .78rem; }
.as-time { color: var(--ink-3); }
.as-job { display: grid; gap: 12px; padding: 16px 18px; border-radius: var(--radius-slip); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.as-job h3 { margin: 0; font-size: 1rem; }
.as-prog p { margin: 0 0 6px; }
.as-prog.wait { margin: 0; color: var(--amber); }
.as-bar { height: 6px; border-radius: 999px; background: var(--fill-2); overflow: hidden; }
.as-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.as-lines { display: grid; gap: 10px; margin: 0; padding-left: 22px; }
.as-lines li { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.as-lines li:last-child { border-bottom: 0; }
.as-said { margin: 0; font-size: 1rem; line-height: 1.5; }
.as-spoken { margin: 0; color: var(--ink-3); font-size: .82rem; }
.as-lines audio { width: 100%; max-width: 420px; height: 38px; }
.as-lines .btn { justify-self: start; }
.as-takes { display: flex; flex-wrap: wrap; gap: 6px; }
.as-take { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--fill-2); font-size: .85rem; cursor: pointer; }
.as-take.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.as-take input { margin: 0; accent-color: var(--accent); }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.as-card { display: grid; gap: 8px; margin: 0; align-content: start; }
.as-card img, .as-card video { width: 100%; height: auto; border-radius: 14px; object-fit: cover; background: var(--fill-2); box-shadow: 0 0 0 1px var(--hair); }
.as-card img.as-cut { background: repeating-conic-gradient(var(--fill-2) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; object-fit: contain; }
.as-card .row-btns { gap: 6px; }
.as-move { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; align-items: end; padding: 14px; border-radius: var(--radius-ctl); background: var(--fill-2); }
.as-move h4 { grid-column: 1 / -1; margin: 0; }
.as-move .row-btns { grid-column: 1 / -1; }
.as-empty { margin: 8px 0; color: var(--ink-2); }
.as-files { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.as-files li { display: flex; align-items: center; gap: 10px; }
.as-file { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: var(--radius-ctl); background: var(--fill-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.as-file:hover { background: var(--accent-soft); }
.as-file img, .as-file video, .as-ico { width: 56px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface); }
.as-ico { display: grid; place-items: center; color: var(--accent); }
.as-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.as-file span { display: grid; gap: 2px; min-width: 0; }
.as-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-file small { color: var(--ink-3); font-size: .8rem; }
.as-sec { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--radius-slip); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.as-sec h3 { margin: 0; font-size: 1rem; }
.as-voices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.as-voices li { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--radius-ctl); background: var(--fill-2); }
.as-voices small { color: var(--ink-2); }
.as-voices .btn { justify-self: start; }
.stack .as-check, .as-check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.as-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.as-pron { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.as-tabs button:focus-visible, .as-file:focus-visible, .as-chip:focus-within, .as-take:focus-within { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
@media (max-width: 560px) {
  .as-tabs button span { font-size: .85rem; }
  .as-tabs button { padding: 0 10px; }
  .as-job, .as-sec { padding: 14px; }
  .as-files li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .as-bar i { transition: none; } }

/* ---------- Create ads: Back, Close, delete, post and share (20 October 2026) ---------- */
.ad-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-top h2 { flex: 1 1 auto; min-width: 0; margin: 0; }
.ad-top .ad-past { flex: 0 1 auto; min-width: 0; }
.ad-top .ad-past select { max-width: min(320px, 60vw); }
.ad-top .btn.icon svg, .ad-batchbar svg, .ad-card .row-btns svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ad-batchbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.ad-share { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; align-items: end; margin-top: 10px; padding: 12px; border-radius: var(--radius-ctl); background: var(--fill-2); }
.ad-share .row-btns { grid-column: 1 / -1; }
.as-head .as-x { margin-left: auto; }
.as-head { align-items: center; }

/* ---------- Create ads batches on the Desk (20 October 2026) ---------- */
.rd-mark.ad { width: 10px; height: 7px; border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--c); background: transparent; }
.ads-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.ads-card { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 12px; border: 0; border-radius: var(--radius-slip); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--hair); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ads-card:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.ads-card:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.ads-card img, .ads-noimg { width: 100%; aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: var(--fill-2); }
.ads-noimg { display: grid; place-items: center; color: var(--c); font-weight: 700; }
.ads-txt { display: grid; gap: 3px; min-width: 0; }
.ads-txt span { color: var(--ink-2); font-size: .92rem; }
.ads-txt small { color: var(--ink-3); font-size: .8rem; }
.ads-card .btn { justify-self: start; pointer-events: none; }

/* ---------- AI Studio in the post panel: Generate image, the Reel's voice (20 October 2026) ---------- */
.as-postbox { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border-radius: var(--radius-ctl); background: var(--fill-2); }
.as-postbox .as-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.reel-voice { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-weight: 600; font-size: .9rem; }
.reel-voice select { max-width: min(280px, 70vw); }

/* ---------- one card per day: every run together, a ✕ on every item (20 October 2026) ---------- */
.rd-mark.cp { width: 8px; height: 8px; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); transform: rotate(45deg); }
.run-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); font-size: .74rem; font-weight: 600; vertical-align: middle; }
.del-x { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: .95rem; line-height: 1; cursor: pointer; }
.del-x:hover { background: var(--red-soft); color: var(--red); }
.del-x:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.tile-acts { display: flex; align-items: center; gap: 6px; }
.tile-acts .acts { flex: 1 1 auto; min-width: 0; }
.del-x.in-acts { margin-left: auto; }
.s-wrap { position: relative; display: grid; }
.s-wrap > .s-item { width: 100%; }
.del-x.on-pic { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; background: rgba(255, 255, 255, .88); box-shadow: 0 1px 4px rgba(16, 36, 30, .18); font-size: .8rem; }
.l-run { color: var(--ink-2); white-space: nowrap; }
.ltable td.l-del { width: 1%; text-align: right; }

/* ---------- ADMAE AI (the app's new name, 20 October 2026): "AI" a touch lighter than the name ---------- */
.wm-ai { font-weight: 400; opacity: .78; letter-spacing: .02em; }
